var callme_name=null,callme_submit=null,callme_phone=null,callme_popup=null,navmenu,navLeft=0;function callMeNow(c){if(returnAjax()===null){return true}var a=callme_popup;if(a===null){a=callme_popup=document.getElementById("callMePopup");if(a===null){return true}}if(callme_phone===null){callme_phone=document.getElementById("callme_phone")}if(callme_submit===null){callme_submit=document.getElementById("callme_submit")}if(callme_name===null){callme_name=document.getElementById("callme_name")}var b=c.getBoundingClientRect();a.style.top=b.top+c.offsetHeight+"px";a.style.left=b.left+"px";if(a.style.display==="none"){a.style.display="block";if(callme_name!==null){callme_name.focus();if(callme_submit!==null){callme_submit.disabled=(callme_phone.value==="")}}}else{a.style.display="none"}return false}function handleCallMeNow(){if(callme_phone===null){return true}if(callme_phone.value==""){alert(L.LANG_PHONE);return false}if(callme_name.value==""){alert(L.LANG_NAME);return false}ajax("/ajax/callMeNow","callme_phone="+escape(callme_phone.value)+"&callme_name="+escape(callme_name.value),function(){alert(L.LANG_ASAPCONTACT);callme_popup.style.display="none"},function(){alert(L.LANG_CALLMEERROR)});return false}function handleCallMeKeyUp(a){if(callme_submit===null){return true}callme_submit.disabled=(callme_name.value===""||callme_phone.value==="")}function handleCallMeKeyPress(b){var a=b||window.event;return((a.charCode!==undefined&&(a.charCode>=48&&a.charCode<=57||a.charCode==0||a.charCode==45||a.charCode==43||a.charCode==40||a.charCode==41))||(a.charCode===undefined&&(a.keyCode>=48&&a.keyCode<=57||a.keyCode==0||a.keyCode==45||a.keyCode==43||a.keyCode==40||a.keyCode==41)))}function ajax(e,c,a,d){var b=returnAjax();b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){a(b.responseText)}else{d(b)}}};b.open("POST",e,true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.send(c)}function returnAjax(){try{return new XMLHttpRequest()}catch(a){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}}return null}document.body.onscroll=window.onscroll=document.onscroll=function(){try{if(navmenu==null){navmenu=document.getElementById("navmenu")}if(getViewportHeight()-10>navmenu.clientHeight){if(typeof document.body.style.maxHeight!="string"){navmenu.style.top=Math.max(0,getScrollXY()-265)+"px"}else{if(getScrollXY()>264){if(navLeft==0){navLeft=findPosX(navmenu)}navmenu.style.position="fixed";navmenu.style.left=navLeft+"px";navmenu.style.top="0px"}else{navmenu.style.left="-150px";navmenu.style.position="relative"}}}}catch(a){}};function getScrollXY(){if(typeof(window.pageYOffset)=="number"){return window.pageYOffset}if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){return document.body.scrollTop}if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){return document.documentElement.scrollTop}}function getViewportHeight(){if(typeof window.innerWidth!="undefined"){return window.innerHeight}if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientHeight!="undefined"&&document.documentElement.clientHeight!=0){return document.documentElement.clientHeight}return document.getElementsByTagName("body")[0].clientHeight}function findPosX(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};