function uSimpleValidate()
{
    var re, tbs, result;
    re = new RegExp("^(.*)(uSimpleTB)$");
    tbs = document.getElementsByTagName('input');
    for(var i=0; i<tbs.length; i++){
        if(tbs[i].type =='text'){
            result = re.exec(tbs[i].id);
            if (result != null) {
                var msgFld = RegExp.$1 + "uSimpleMsg";
                var tbFld  = tbs[i].id;
                break;
            }
        }
    }
    if (document.getElementById(tbFld).value == "") {
        //document.getElementById("uSimpleSearchBox1_HyperLink1").click() --- this only supported on IE
        document.getElementById(msgFld).innerHTML = "<br>Find Anyone - Enter a name and add addresss info if you want.";
        return false;
    }
    else {
        return true;
    }
}



// set the height of of divs with class uchTitle to the max height
// and also set the height of uchnGlobal to be the same as uQuickTitle
matchHeight=function(){
     var divs,contDivs,maxHeight,divHeight,d;
     var qtH,Gd;

     // get all <div> elements in the document
     divs=document.getElementsByTagName('div');
     contDivs=[];

     // initialize maximum height value
     maxHeight=0;

     // iterate over all <div> elements in the document
     for(var i=0;i<divs.length;i++){
          // make collection with <div> elements with class attribute 'uchTitle'
          if(/\buchTitle\b/.test(divs[i].className)){
                d=divs[i];
                contDivs[contDivs.length]=d;

                // determine height for <div> element
                if(d.offsetHeight){
                     divHeight=d.offsetHeight;
                }

                else if(d.style.pixelHeight){
                     divHeight=d.style.pixelHeight;
                }

                // calculate maximum height
                maxHeight=Math.max(maxHeight,divHeight);
          }
          else
            if(/\buQuickTitle\b/.test(divs[i].className)){
                d=divs[i];
                //qtH=d.style.pixelHeight;
                qtH=d.offsetHeight;            }
            else
                //if(/\buchnGlobal\b/.test(divs[i].className)){
                if(/\buchNav\b/.test(divs[i].className)){
                    Gd=divs[i];
                }

     }

     // assign maximum height value to all of uchTitle <div> elements
     for(var i=0;i<contDivs.length;i++){
          contDivs[i].style.height=maxHeight;
     }

     // assign height to gD
     if (typeof(qtH) != 'undefined') {
        Gd.style.height=qtH;
     }
}

// execute function when page loads
window.onload=function()
{
 if(document.getElementsByTagName){
    matchHeight();
 }
}


