function init(){document.getElementById("cid")!=null&&document.getElementById("cid").getAttribute("type")=="checkbox"&&(replaceChecks(),desmarcaTodos())}function replaceChecks(){var i=document.getElementById("latContenido"),n,t;if(i!=null)for(inputs=i.getElementsByTagName("input"),n=0;n<inputs.length;n++)inputs[n].getAttribute("type")=="checkbox"&&(t=document.createElement("img"),t.src=inputs[n].checked?imgTrue:imgFalse,t.alt="",inputs[n].id=="chkTodos"?(t.id="checkImageTodos",t.onclick=new Function("checkChangeTodos(); marcarTodos();"),insertAfter(inputs[n].parentNode,t,inputs[n])):inputs[n].id=="chkTodosAba"?(t.id="checkImageTodosAba",t.onclick=new Function("checkChangeTodosAba(); marcarTodosAba();"),insertAfter(inputs[n].parentNode,t,inputs[n])):(t.id="checkImage"+n,t.onclick=new Function("checkChange("+n+"); desmarcaTodos()"),t.className="checkSelect",inputs[n].parentNode.insertBefore(t,inputs[n])),inputs[n].style.visibility="hidden")}function insertAfter(n,t,i){n.insertBefore(t,i.nextSibling)}function checkChangeTodos(){document.getElementById("chkTodos").checked?(document.getElementById("chkTodos").checked="",document.getElementById("checkImageTodos").src=imgFalse):(document.getElementById("chkTodos").checked="checked",document.getElementById("checkImageTodos").src=imgTrue)}function checkChangeTodosAba(){document.getElementById("chkTodosAba").checked?(document.getElementById("chkTodosAba").checked="",document.getElementById("checkImageTodosAba").src=imgFalse):(document.getElementById("chkTodosAba").checked="checked",document.getElementById("checkImageTodosAba").src=imgTrue)}function checkChange(n){inputs[n].checked?(inputs[n].checked="",document.getElementById("checkImage"+n).src=imgFalse):(inputs[n].checked="checked",document.getElementById("checkImage"+n).src=imgTrue)}function signOut(){var n=window.location.href.split("/"),t=n[n.length-1];window.location="http://www.environmental-expert.com/sign_out.asp?vienede="+t}function logear(){vienede=window.parent.document.location.href,window.parent.document.location="http://www.environmental-expert.com/user/login?returnurl="+vienede}function expandirFamilyProd(n){n==""&&(n="Product / Service Lines");var i=document.getElementById("divFamProdIzq"),r=document.getElementById("divFamProdDer"),t=document.getElementById("divMoreFamProd");t.innerHTML="",i.style.height=="152px"?(i.style.height="auto",r.style.height="auto",t.innerHTML="<a class='textoOnce' href='javascript:expandirFamilyProd(\""+n+"\")'><strong>Less "+n+" »</strong></a>"):(i.style.height="152px",r.style.height="152px",t.innerHTML="<a class='textoOnce' href='javascript:expandirFamilyProd(\""+n+"\")'><strong>More "+n+" »</strong></a>")}function marcarTodos(){var i=document.getElementById("chkTodos"),t=document.getElementById("chkTodosAba"),r=document.getElementById("latContenido"),n;for(t.checked=i.checked,document.getElementById("checkImageTodosAba").src=t.checked?imgTrue:imgFalse,inputs=r.getElementsByTagName("input"),n=0;n<inputs.length;n++)inputs[n].getAttribute("type")=="checkbox"&&inputs[n].getAttribute("name")=="cid"&&(inputs[n].checked=t.checked,inputs[n].id!="chkTodosAba"&&inputs[n].id!="chkTodos"&&(document.getElementById("checkImage"+n).src=inputs[n].checked?imgTrue:imgFalse))}function marcarTodosAba(){var i=document.getElementById("chkTodosAba"),t=document.getElementById("chkTodos"),r=document.getElementById("latContenido"),n;for(t.checked=i.checked,document.getElementById("checkImageTodos").src=t.checked?imgTrue:imgFalse,inputs=r.getElementsByTagName("input"),n=0;n<inputs.length;n++)inputs[n].getAttribute("type")=="checkbox"&&inputs[n].getAttribute("name")=="cid"&&(inputs[n].checked=t.checked,inputs[n].id!="chkTodos"&&inputs[n].id!="chkTodosAba"&&(document.getElementById("checkImage"+n).src=inputs[n].checked?imgTrue:imgFalse))}function desmarcaTodos(){var n=document.getElementById("chkTodos");n!=null&&(n.checked=!1,document.getElementById("checkImageTodos").src=imgFalse)}function getPosition(n){var t,i,r;return n=n||window.event,t={x:0,y:0},n.pageX||n.pageY?(t.x=n.pageX,t.y=n.pageY):(i=document.documentElement,r=document.body,t.x=n.clientX+(i.scrollLeft||r.scrollLeft)-(i.clientLeft||0),t.y=n.clientY+(i.scrollTop||r.scrollTop)-(i.clientTop||0)),t}function busquedaWord(n){for(var r=document.getElementsByName("searchPpal"),u=0,t,i=0;i<r.length;i++)if(r[i].checked){u=r[i].value;break}switch(u){case"2":t="/products/?keyword=";break;case"1":t="/services/?keyword=";break;case"4":t="/software/?keyword=";break;case"11":t="/training/?keyword="}location.href=t+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+")}function busquedaWordComp(n){for(var i=document.getElementsByName("searchPpalComp"),u=0,r,t=0;t<i.length;t++)if(i[t].checked){sValue=i[t].value;break}location.href=sValue!=0?"/companies/?company-name="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+"):"/companies/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+")}function busquedaWordNews(n){location.href="/news/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+")}function busquedaWordEvents(n){for(var r=document.getElementById("searchLocationEve"),u=document.getElementsByName("searchPpalEvents"),t,i=0;i<u.length;i++)if(u[i].checked){value=u[i].value;break}t="",r.options[r.selectedIndex].value!=0&&(t+="/location-"+r.options[r.selectedIndex].id);if(value!=0)switch(value){case"2":t+="/event-type-conference-seminar";break;case"5":t+="/event-type-trade-show-exhibition";break;case"6":t+="/event-type-workshops-training-courses";break;case"7":t+="/event-type-webinar"}location.href="/events"+t+"/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+")}function busquedaWordArticles(n){location.href="/articles/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+")}function busquedaWordPublications(n){for(var i=document.getElementsByName("searchPpalPub"),r,t=0;t<i.length;t++)if(i[t].checked){r=i[t].value;break}location.href=r=="5"?"/books/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+"):"/magazines/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+")}function busquedaWordJobs(n){for(var u=document.getElementById("searchLocationJob"),r=document.getElementById("searchLocationCV"),f=document.getElementsByName("searchPpalJob"),i,t=0;t<f.length;t++)if(f[t].checked){value=f[t].value;break}i="",value=="0"?(u.options[u.selectedIndex].value!=0&&(i+="/location-"+u.options[u.selectedIndex].id),location.href="/jobs"+i+"/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+")):(r.options[r.selectedIndex].value!=0&&(i+="/desired-location-"+r.options[r.selectedIndex].id),location.href="/curriculums"+i+"/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace(/\s/g,"+"))}function busquedaWordPeople(n){for(var r="0",i=document.getElementsByName("searchPpalPeople"),t=0;t<i.length;t++)if(i[t].checked){r=i[t].value;break}switch(parseInt(r)){case 1:location.href="/professional-profiles/search/?company="+n.value.replace("&","%26").replace('""',"%22").replace("+","%2b").replace(/\s/g,"+");break;case 2:location.href="/professional-profiles/search/?name="+n.value.replace("&","%26").replace('""',"%22").replace("+","%2b").replace(/\s/g,"+");break;case 3:location.href="/professional-profiles/search/?email="+n.value.replace("&","%26").replace('""',"%22").replace("+","%2b").replace(/\s/g,"+");break;default:location.href="/professional-profiles/search/?keyword="+n.value.replace("&","%26").replace('""',"%22").replace("+","%2b").replace(/\s/g,"+")}}function EnterNvo(n){n.keyCode==13&&(cancelEvent(n),stopEvent(n),busquedaNva())}function busquedaNva(){var i,r,t,n;for(typeof ajax_optionDiv!="undefined"&&ajax_options_hide(),i=["searchProd","searchComp","searchNews","searchEven","searchArti","searchPubl","searchJobs","searchPeople"],r=-1,t=0;t<i.length;t++)if(document.getElementById(i[t]).className=="activo"){r=t;break}n=getCtrlBusqueda();if(n!=null&&typeof n.value!="undefined")switch(r){case 0:busquedaWord(n);break;case 1:busquedaWordComp(n);break;case 2:busquedaWordNews(n);break;case 3:busquedaWordEvents(n);break;case 4:busquedaWordArticles(n);break;case 5:busquedaWordPublications(n);break;case 6:busquedaWordJobs(n);break;case 7:busquedaWordPeople(n)}}function stopEvent(n){n||(n=window.event),n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}function cancelEvent(n){n||(n=window.event),n.preventDefault?n.preventDefault():n.returnValue=!1}function mandar(){var t=0,n=document.getElementsByTagName("input");for(i=0;i<n.length;i++)if(n[i].type=="checkbox"&&n[i].name=="cid"&&n[i].checked){t=1;break}t==0?alert("Select Company to Contact"):(document.form1.action="/requestformbd_multi.asp",document.form1.submit())}function boxIndex(n){var u=document.getElementById("boxIndexNews"),f=document.getElementById("boxIndexArt"),e=document.getElementById("boxIndexPub"),s=document.getElementById("isSmCatTilePreviousButton"),o=document.getElementById("tabIndexNews"),h=document.getElementById("tabIndexArti"),c=document.getElementById("tabIndexPubl"),i=document.getElementById("tabIndexNewsLink"),r=document.getElementById("tabIndexArtiLink"),t=document.getElementById("tabIndexPublLink");u.style.height="0px",f.style.height="0px",e.style.height="0px",u.style.overflow="hidden",f.style.overflow="hidden",e.style.overflow="hidden";switch(n){case 0:u.style.visibility="visible",f.style.visibility="hidden",e.style.visibility="hidden",u.style.height="372px",i.href="/news",r.href="javascript:boxIndex(1);",t.href="javascript:boxIndex(2);",i.className="activo",r.className="",t.className="";break;case 1:u.style.visibility="hidden",f.style.visibility="visible",e.style.visibility="hidden",f.style.height="372px",i.href="javascript:boxIndex(0);",r.href="/articles",t.href="javascript:boxIndex(2);",i.className="",r.className="activo",t.className="";break;case 2:u.style.visibility="hidden",f.style.visibility="hidden",e.style.visibility="visible",e.style.height="372px",i.href="javascript:boxIndex(0);",r.href="javascript:boxIndex(1);",t.href="/books",i.className="",r.className="",t.className="activo"}}function menu(n){var u=document.getElementById("searchLocEven"),r=document.getElementById("searchLocJobs"),l=document.getElementById("ctrlsBusqueda"),s=l.getElementsByTagName("input"),w=document.getElementById("searchGral"),p=document.getElementById("searchProd"),y=document.getElementById("searchComp"),b=document.getElementById("searchNews"),g=document.getElementById("searchEven"),a=document.getElementById("searchArti"),d=document.getElementById("searchPubl"),k=document.getElementById("searchJobs"),v=document.getElementById("searchPeople"),c=document.getElementById("divContenedorSug"),h=["searchProd","searchComp","searchNews","searchEven","searchArti","searchPubl","searchJobs","searchPeople"],o,f,e,t,i;for(c!=null&&(c.style.display="none",o=document.getElementById("divContKeyIframe"),o&&(o.style.display="none")),i=0;i<h.length;i++)document.getElementById(h[i]).className="";for(document.getElementById(h[n]).className="activo",u!=null&&(u.style.visibility="hidden",u.style.display="none"),r!=null&&(r.style.visibility="hidden",r.style.display="none"),f=0;f<s.length;f++)if(s[f].type=="text"){ctrlTextoBusq=s[f];break}document.getElementById("controlesSearch").className=n==7?"controlesSearchVerde":"controlesSearch",ctrlTextoBusq!=null&&(ctrlTextoBusq.style.width="380px");switch(n){case 3:u.style.visibility="visible",u.style.display="block",ctrlTextoBusq.style.width="195px";break;case 6:r.style.visibility="visible",r.style.display="block",ctrlTextoBusq.style.width="195px"}for(e=["marketPlaceSearch","companiesSearch","","eventsSearch","","publicationsSearch","jobsSearch","peopleSearch"],i=0;i<e.length;i++)t=document.getElementById(e[i]),t!=null&&(t.style.visibility="hidden",t.style.display="none");t=document.getElementById(e[n]),t!=null&&(t.style.visibility="visible",t.style.display="inline")}function jobHoverOn(n){var t=document.getElementById(n);t.style.backgroundColor="#F0F0F0",t.focus()}function jobHoverOff(n){var t=document.getElementById(n);t.style.backgroundColor="#FFFFFF"}function cambiarImg(n,t){var i=document.getElementById(t);i.src=n}function getAbsoluteElementPosition(n){typeof n=="string"&&(n=document.getElementById(n));if(!n)return{top:0,left:0};var i=0,t=0;while(n.offsetParent)t+=n.offsetLeft,i+=n.offsetTop,n=n.offsetParent;return{top:i,left:t}}function getCtrlBusqueda(){var i=null,u="",r=document.getElementById("ctrlsBusqueda"),t,n;if(r!=null){for(t=r.getElementsByTagName("input"),n=0;n<t.length;n++)if(t[n].type=="text"){i=t[n];break}u=i.value.replace(/^\s*|\s*$/g,"")}return u+""==""?(alert("Search Word can't be Empty"),!1):i}function cualLocation(){var r=document.getElementsByName("searchPpalJob"),u=-1,t=document.getElementById("searchLocationJob"),n=document.getElementById("searchLocationCV"),i;if(r!=null){for(i=0;i<r.length;i++)if(r[i].checked){u=r[i].value;break}t.style.width="0%",n.style.width="0%",u==0?(t.style.width="100%",t.style.display="block",t.style.visibility="visible",n.style.display="none",n.style.visibility="hidden"):(n.style.width="100%",n.style.display="block",n.style.visibility="visible",t.style.display="none",t.style.visibility="hidden")}}function alterna(n,t){visible(n),oculta(t)}function visible(n){n.style.height="auto",n.style.visibility="visible",n.style.overflow="visible",n.style.display="block"}function oculta(n){n.style.height="0px",n.style.visibility="hidden",n.style.overflow="hidden",n.style.display="none"}function replaceAll(n,t,i){return n.replace(new RegExp(t,"g"),i)}function cambiaCambio(){var i=document.getElementById("cambio"),n=document.getElementById("cambio2"),t;n!=null&&i!=null&&(t=n.parentNode,t.replaceChild(n,i))}function MostrarTooltip(n){var t=document.getElementById(n);t.style.width="auto",document.getElementById("contentselect").style.width="auto"}function ddlNormal(n){var i=document.getElementById(n),t;i.style.width="188px",t=document.getElementById("contentselect"),t.style.width="188px"}function maxSize(){var n=document.getElementById("logo400");n!=null&&n!="undefined"&&n.width>400&&(n.width="400")}var ca,i,c,inputs,imgFalse,imgTrue;for(nameEQ="EECOM=",ca=document.cookie.split(";"),i=0;i<ca.length;i++){c=ca[i];while(c.charAt(0)==" ")c=c.substring(1,c.length);c.indexOf(nameEQ)==0&&(document.cookie=c.substring(nameEQ.length,c.length)=="IDPROFESSIONALPROFILE=0&IDCONTACTPERSON=0&EMAIL=&NAME="?"AIEE=; max-age=0; path=/; domain=environmental-expert.com":"AIEE='login'; path=/; domain=environmental-expert.com")}imgFalse="http://cdn.environmental-expert.com/_imgMenu/check.gif",imgTrue="http://cdn.environmental-expert.com/_imgMenu/checkOn.gif",window.onload=init
