function checkWordLen100(obj){var wordLen = 100; // Maximum word lengthvar len = obj.value.split(/[\s]+/);if(len.length > wordLen){alert("You have entered more than 100 words in this field.");obj.oldValue = obj.value!=obj.oldValue?obj.value:obj.oldValue;obj.value = obj.oldValue?obj.oldValue:"";return false;}return true;}function checkWordLen250(obj){var wordLen = 250; // Maximum word lengthvar len = obj.value.split(/[\s]+/);if(len.length > wordLen){alert("You have entered more than 250 words in this field.");obj.oldValue = obj.value!=obj.oldValue?obj.value:obj.oldValue;obj.value = obj.oldValue?obj.oldValue:"";return false;}return true;}function dotwistie(e) {var undefined;var srcElement;if(typeof e.target  == 'undefined'){      srcElement = window.event.srcElement; // event target} else {         srcElement = e.target ;}     /* var srcElement = window.event.srcElement; */var targetID = "S" + srcElement.id;var targetElement = document.getElementById(targetID);if (targetElement.style.display == "none") {   closeall(targetID);   targetElement.style.display = "";   if (srcElement.tagName == "IMG") {      /*srcElement.src = "/icons/vwicn118.gif"; */      srcElement.src = '/icons/ecblank.gif';    }} else {   targetElement.style.display = "none";   if (srcElement.tagName == "IMG") {   /*srcElement.src = "/icons/vwicn118.gif";*/   srcElement.src = '/icons/ecblank.gif';   }}};function closeall(targetID){var oObject = document.getElementsByTagName('DIV');if (oObject != null){   if (oObject.length != null){      for (i = 0; i < oObject.length; i++){         firstletter =oObject[i].id.substring(0,1);         firstthreeletter = oObject[i].id.substring(0,3);         if (oObject[i].id != targetID.substring(0,3))         {            if (firstletter == 'S' )            {              oObject[i].style.display = "none";             }         }        }   }   else{          /* do nothing */   }} };function doActApplication(actionname, stage){  /* need to do this ...view/unid?SaveDocument */     document.forms[0].ActionField.value=actionname;     document.forms[0].StageField.value=stage;    return true;}  function SearchPeople(){       var temp;    temp=document.all;        temp=document.getElementsByTagName('*');    var parms;    var officeindex;    var personname;    var practiceindex;    var marketindex;        parms='PeopleSearch.asp?OpenForm'    officeindex = temp.Office.options[temp.Office.selectedIndex].value ;    if ( officeindex != ' ')    {       parms = parms+'&Office='+officeindex;    }    personname=temp.PersonName.value;     if ( personname != '')    {       parms = parms+'&Person='+personname;    }    practiceindex = temp.PracticeArea.options[temp.PracticeArea.selectedIndex].value ;    if ( practiceindex != ' ')    {       parms = parms+'&PracticeArea='+practiceindex;    }    marketindex = temp.Market.options[temp.Market.selectedIndex].value ;     if ( marketindex != ' ')    {       parms = parms+'&Market='+marketindex;    }    Lang = temp.Lang.value;        //alert(Lang);    if(Lang.length==2)    {        parms = parms+'&Lang='+Lang    }        window.location.href=parms;}function doDetailSearch( sType, query ){    var temp;    /*temp=document.all; */    temp=document.getElementsByTagName('*');    var parms;    var searchInput;    parms='/Webpage/freesearch.asp?OpenForm&Type='+sType+'&Query='+query;    Lang = temp.Lang.value;        //alert(Lang);    if(Lang.length==2)    {        parms = parms+'&Lang='+Lang    }         window.location.href=parms;}function searchAll(){    var temp;    /*temp=document.all; */    temp=document.getElementsByTagName('*');    var parms;    var searchInput;    parms='/Webpage/freesearch.asp?OpenForm&Query=';    searchInput=temp.searchInput.value;     if ( searchInput != '')    {       parms = parms+searchInput;    }       Lang = temp.Lang.value;        //alert(Lang);    if(Lang.length==2)    {        parms = parms+'&Lang='+Lang    }         window.location.href=parms;}function searchAllHome(){    var temp;    /*temp=document.all; */    temp=document.getElementsByTagName('*');    var parms;    var searchInput;    parms='Webpage/freesearch.asp?OpenForm&Query=';    searchInput=temp.searchInput.value;     if ( searchInput != '')    {       parms = parms+searchInput;    }       Lang = temp.Lang.value;        //alert(Lang);    if(Lang.length==2)    {        parms = parms+'&Lang='+Lang    }        window.location.href=parms;}function changeLanguage(){    var temp;    /*temp=document.all; */    temp=document.getElementsByTagName('*');    var parms;    var language;    var openThis;    var pathname;    parms= window.location.search;    pathname = window.location.pathname;    parms=strLeft(parms,'&Lang=');    language=temp.Language.options[temp.Language.selectedIndex].value;    openThis = temp.OpenThis.value;    if(pathname.length<=1)    {       window.location.pathname='/index.html';    }        if ( language != '0')    {       Lang = language;       temp.Lang.value = language;    } else {       Lang = temp.Lang.value;    }        //alert(Lang);    if( parms.length==0)    {       parms=parms+'?'+openThis;    }       if(Lang.length==2)    {        parms = parms+'&Lang='+Lang    }           window.location.search=parms;    if(pathname.length<=1)    {       window.location.pathname='/index.html'+parms;    }}function SearchPublication(){       var temp;    temp=document.all;        temp=document.getElementsByTagName('*');    var parms;    var officeindex;    var keyword;    var practiceindex;    var marketindex;    var dateIndex;    var Doctypeindex;    var Personname;        parms='PubsSearch.asp?OpenForm'    dateindex = temp.DateRange.options[temp.DateRange.selectedIndex].value ;    if ( dateindex != ' ')    {       parms = parms+'&Date='+dateindex;    }    Doctypeindex = temp.Type.options[temp.Type.selectedIndex].value ;    if ( Doctypeindex != ' ')    {       parms = parms+'&Type='+Doctypeindex;    }    Personname = temp.People.options[temp.People.selectedIndex].value ;    if ( Personname != ' ')    {       parms = parms+'&PersonPub='+Personname;    }    officeindex = temp.Office.options[temp.Office.selectedIndex].value ;    if ( officeindex != ' ')    {       parms = parms+'&Office='+officeindex;    }    keyword=temp.KeyWord.value;     if ( keyword != '')    {       parms = parms+'&Keyword='+keyword;    }    practiceindex = temp.PracticeArea.options[temp.PracticeArea.selectedIndex].value ;    if ( practiceindex != ' ')    {       parms = parms+'&PracticeArea='+practiceindex;    }    marketindex = temp.Market.options[temp.Market.selectedIndex].value ;     if ( marketindex != ' ')    {       parms = parms+'&Market='+marketindex;    }    Lang = temp.Lang.value;        //alert(Lang);    if(Lang.length==2)    {        parms = parms+'&Lang='+Lang    }        window.location.href=parms;}function setCheckedValue(radioObj, newValue) {	if(!radioObj)		return;	var radioLength = radioObj.length;	if(radioLength == undefined) {		radioObj.checked = (radioObj.value == newValue.toString());		return;	}	for(var i = 0; i < radioLength; i++) {		radioObj[i].checked = false;		if(radioObj[i].value == newValue.toString()) {			radioObj[i].checked = true;		}	}}function getCheckedValue(radioObj) {	if(!radioObj)		return "";	var radioLength = radioObj.length;	if(radioLength == undefined)		if(radioObj.checked)			return radioObj.value;		else			return "";	for(var i = 0; i < radioLength; i++) {		if(radioObj[i].checked) {			return radioObj[i].value;		}	}	return "";}function doHideRevealSpans(){     var temp;    var fieldname = 'TxtEthnic';    /*temp=document.all; */    temp=document.getElementsByTagName('*');   var doObject = document.forms[0].OptEthnic;   var ele = document.getElementById('TxtEthnic');     if (getCheckedValue(doObject) =='')     {         if (doObject==undefined)         {                // do nothing                         return(0);          } else          {          setCheckedValue(doObject, ele.value);         }              } else {            ele.value=getCheckedValue(doObject);     }                    if (doObject[2].checked == true )     {   /* Span A*/           window.SpanA.style.display = '' ;          window.SpanB.style.display = 'none';          window.SpanC.style.display = 'none';          window.SpanD.style.display = 'none';          window.SpanE.style.display = 'none';                                  }else if (doObject[6].checked == true )     {         /*Span B */           window.SpanA.style.display = 'none' ;          window.SpanB.style.display = '';          window.SpanC.style.display = 'none';          window.SpanD.style.display = 'none';          window.SpanE.style.display = 'none';    }   else if (doObject[10].checked == true )     {         /*Span C */           window.SpanA.style.display = 'none' ;          window.SpanB.style.display = 'none';          window.SpanC.style.display = '';          window.SpanD.style.display = 'none';          window.SpanE.style.display = 'none';    }               else if (doObject[13].checked == true )     {         /*Span D */           window.SpanA.style.display = 'none' ;          window.SpanB.style.display = 'none';          window.SpanC.style.display = 'none';          window.SpanD.style.display = '';          window.SpanE.style.display = 'none';    }                   else if (doObject[15].checked == true )     {         /*Span D */           window.SpanA.style.display = 'none' ;          window.SpanB.style.display = 'none';          window.SpanC.style.display = 'none';          window.SpanD.style.display = 'none';          window.SpanE.style.display = '';    }         else      {         /*Span D */           window.SpanA.style.display = 'none' ;          window.SpanB.style.display = 'none';          window.SpanC.style.display = 'none';          window.SpanD.style.display = 'none';          window.SpanE.style.display = 'none';    }  } function doHideRevealDivsChild( ){      if (document.forms[0].NumChildren.value=="0")     {        if (document.forms[0].Child.value == 'Yes' )        {   /* Div 0*/              window.Parent.style.display = '' ;             window.Child.style.display = 'none';                                     }else         {            /* Div1 */             window.Parent.style.display = 'none'                window.Child.style.display = '';       }   } else   {             window.Parent.style.display = 'none'                window.Child.style.display = 'none';   }    } function SearchNews(){       var temp;    temp=document.getElementsByTagName('*');    var parms;    var keyword;    var practiceindex;    var marketindex;      var dateIndex;        parms='NewsSearch.asp?OpenForm'    dateindex = temp.DateRange.options[temp.DateRange.selectedIndex].value ;    if ( dateindex != ' ')    {       parms = parms+'&Date='+dateindex;    }    keyword=temp.KeyWord.value;     if ( keyword != '')    {       parms = parms+'&Keyword='+keyword;    }    practiceindex = temp.PracticeArea.options[temp.PracticeArea.selectedIndex].value ;    if ( practiceindex != ' ')    {       parms = parms+'&PracticeArea='+practiceindex;    }    marketindex = temp.Market.options[temp.Market.selectedIndex].value ;     if ( marketindex != ' ')    {       parms = parms+'&Market='+marketindex;    }    Lang = temp.Lang.value;        //alert(Lang);    if(Lang.length==2)    {        parms = parms+'&Lang='+Lang    }        window.location.href=parms;}function printThePage() { document.oIFrame.focus(); /* document.oIFrame.print(); */ } function setUpPrint() { var parms;var temp=document.getElementsByTagName('*');parms =rightBack(location.href,'/');parms = '/ViewPrint/'+parmsif((location.pathname.indexOf('.html')==-1)& (location.pathname.indexOf('recruit.asp')==-1)){     window.print();}else {        /*'alert('document.all.oIFrame.src');*/   temp.oIFrame.src=parms;   temp.oIFrame.focus();    temp.oIFrame.focus();    oIFrame.focus(); }} //@Left equivalentfunction strLeft(sourceStr, keyStr){return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : sourceStr.split(keyStr)[0];}//@Right equivalentfunction strRight(sourceStr, keyStr){idx = sourceStr.indexOf(keyStr);return (idx == -1 | keyStr=='') ? '' : sourceStr.substr(idx+ keyStr.length);}//@RightBack equivalentfunction rightBack(sourceStr, keyStr){arr = sourceStr.split(keyStr);return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : arr.pop()}//@LeftBack equivalentfunction leftBack(sourceStr, keyStr){arr = sourceStr.split(keyStr)arr.pop();return (keyStr==null | keyStr=='') ? '' : arr.join(keyStr)}//@Middle equivalentfunction middle(sourceStr, keyStrLeft, keyStrRight){ return strLeft(strRight(sourceStr,keyStrLeft), keyStrRight);}   