var TimeOut = 300; var closeTimer = null; function autoComplete(element,event) { var q = element.value; if (!document.getElementById(element.id+"Search")) { var elementID = document.createElement('div'); elementID.setAttribute('id', element.id+"Search"); elementID.style.margin = "5px 0 0 90px"; elementID.style.background = "#FFFFFF"; elementID.style.border = "1px solid #A5ACB2"; elementID.style.textAlign = "right"; elementID.style.width = "151px"; elementID.style.right = "20px"; elementID.style.top = "25px"; elementID.style.position = "absolute"; elementID.style.zIndex= "1"; elementID.style.display= "block"; element.parentNode.insertBefore(elementID, element.nextSibling); } else { var elementID = document.getElementById(element.id+"Search"); } intkey = (event.keyCode)? event.keyCode: event.charCode; if (((intkey == 38) || (intkey == 40)) && (elementID.innerHTML != "")) { // Move Up and Down resultNum = elementID.getElementsByTagName("input").item(0); if (resultNum.value > 0) { if (elementID.getElementsByTagName("div").item(resultNum.value-1)) { elementID.getElementsByTagName("div").item(resultNum.value-1).style.background = "#FFFFFF"; } } if (intkey == 38) { // Move Up if (resultNum.value == 0) { resultNum.value=elementID.getElementsByTagName("input").item(1).value; } else { resultNum.value=parseInt(resultNum.value)-1; } } else { // Move Down resultNum.value=parseInt(resultNum.value)+1; } if (resultNum.value > 0) { if (elementID.getElementsByTagName("div").item(resultNum.value-1)) { elementID.getElementsByTagName("div").item(resultNum.value-1).style.background = "#D5E2FF"; } else { resultNum.value=0; } } element = document.getElementById(elementID.id.slice(0,elementID.id.length-6)); element.value = elementID.getElementsByTagName("div").item(resultNum.value-1).innerHTML.replace(/\&\;/g,"&"); } else if ((intkey == 13) || (intkey == 9)) { // Enter or Tab resultNum = elementID.getElementsByTagName("input").item(0); // var OnClick = elementID.getElementsByTagName("div").item(resultNum.value-1).getAttribute("onclick"); // OnClick = OnClick.replace('this', elementID.getElementsByTagName("div").item(resultNum.value-1)); // alert(OnClick); // eval(OnClick); if (intkey == 13) { return false; } else { return false; } // } else if ((intkey == 8) || (intkey == 45)) { // Delete or Backspace } else { if (q.length>0) { LoadPage('/inc/autocomplete.php','q='+q+'&element='+element.id,element.id+'Search',element.id+'Search'); } else { element.parentNode.removeChild(elementID); return; } } } var xmlObj = null; function LoadPage(url,params,loading_element,result_element){ // alert(params); xmlObj= XmlHttp.create(); if(xmlObj) { if (document.getElementById(loading_element)) { // Loading document.getElementById(loading_element).innerHTML='Loading..'; document.getElementById(loading_element).style.display="block"; } xmlObj.onreadystatechange = function() { if (xmlObj.readyState == 4) { if (xmlObj.status == 200) { // OK if (document.getElementById(loading_element)) { document.getElementById(loading_element).style.display="none"; } var mybody = xmlObj.responseXML.getElementsByTagName("mybody")[0].firstChild.nodeValue; if (document.getElementById(result_element)) { document.getElementById(result_element).style.display="block"; document.getElementById(result_element).innerHTML=mybody; } eval(xmlObj.responseXML.getElementsByTagName("myscript")[0].firstChild.nodeValue); } else { // Error if (document.getElementById(loading_element)) { document.getElementById(loading_element).style.display="none"; } // alert('Error reciving data...\n'+xmlObj.statusText); } } }; xmlObj.open("POST", url, true); xmlObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlObj.setRequestHeader("Content-length", params.length); xmlObj.setRequestHeader("Connection", "close"); xmlObj.send(params); } } function XmlHttp(){} XmlHttp.getAvailableActiveX = function(){ if(XmlHttp.availableActiveX) return XmlHttp.availableActiveX; var ids = ["MSXML4.XmlHttp", "MSXML3.XmlHttp", "MSXML2.XmlHttp", "MSXML.XmlHttp", "Microsoft.XmlHttp"]; for(var i=0; i= 170) { document.getElementById("leftBanner").style.display = "block"; document.getElementById("container").style.margin = "0 auto"; document.getElementById("lastfooter").style.margin = "0 auto"; } else if ((document.body.clientWidth-980) >= 170) { document.getElementById("leftBanner").style.display = "block"; document.getElementById("container").style.margin = "0 " + (160+(document.body.clientWidth-(980+160))/2) + "px"; document.getElementById("lastfooter").style.margin = "0 " + (160+(document.body.clientWidth-(980+160))/2) + "px"; } else { document.getElementById("leftBanner").style.display = "none"; document.getElementById("container").style.margin = "0 auto"; document.getElementById("lastfooter").style.margin = "0 auto"; } } function Setting() { // document.getElementById("rightBanner").innerHTML = ''; // document.getElementById("leftBanner").innerHTML = ''; // OnResize(); if (document.getElementById("video")) { if (!(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])) { var str = document.getElementById("video").innerHTML; var start = str.search(/movie=/i); str = str.substr(start+6); var end = str.search(/"/i); str = str.substr(0,end); // alert(str); document.getElementById("video").innerHTML = ''; } } } window.onload = Setting; //window.onresize = OnResize; function focus_login() { document.login.Email.focus(); document.login.Email.style.background = "yellow"; window.setTimeout(set_background_white, 150); window.setTimeout(set_background_yellow, 300); window.setTimeout(set_background_white, 450); window.setTimeout(set_background_yellow, 600); window.setTimeout(set_background_white, 750); window.setTimeout(set_background_yellow, 900); // window.setTimeout(set_background_color("login","yellow"), 100); // window.setTimeout(set_background_color("login","cccccc"), 100); } function js_link(url) { _gaq.push(['_trackEvent', 'Link', url, getIP()]); form = document.createElement("form"); var uri=url.split("?"); if (uri[1]) { var parameters=uri[1].split("&"); for(var i in parameters) { var parameter=parameters[i].split("="); input = document.createElement("input"); input.type = 'hidden'; input.name = parameter[0]; input.value = parameter[1]; form.appendChild(input); } } form.action = url; form.target = "_blank"; document.body.appendChild(form); form.submit(); } function set_background_white() { document.login.Email.style.background = "#ffffff"; } function set_background_yellow() { document.login.Email.style.background = "yellow"; } function mchange() { if (document.getElementById("M").style.opacity) { if (document.getElementById("M").style.opacity < 1) { document.getElementById("M").style.opacity = 1; } else { document.getElementById("M").style.opacity = 0.4; } } if (document.getElementById("M").filters.alpha) { if (document.getElementById("M").filters.alpha.opacity < 100) { document.getElementById("M").filters.alpha.opacity=100; } else { document.getElementById("M").filters.alpha.opacity=40; } } } function mopen() { var M = document.getElementById("Minfo"); if(M) { mcancelclosetime(); if (document.getElementById("Minfo").style.display != "block") { document.getElementById("Minfo").style.display = "block"; // mchange(); } } } function mclosetime() { closeTimer = window.setTimeout(mclose, TimeOut); } function mcancelclosetime() { if(closeTimer) { window.clearTimeout(closeTimer); closeTimer = null; } } function mclose() { document.getElementById("Minfo").style.display = "none"; // mchange(); } function Mlist(str,reload) { document.getElementById("Minfo").innerHTML='טוען'; xmlhttp=GetXmlHttpObject() if (xmlhttp==null) { alert ("Your browser does not support XML HTTP Request"); return; } var url="/inc/mlist.php"; var params=str; params=params+"&sid="+Math.random(); xmlhttp.open("POST", url, true); //Send the proper header information along with the request xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.onreadystatechange=function () { if (xmlhttp.readyState==4) { document.getElementById("Minfo").innerHTML=xmlhttp.responseText; if (reload == 'yes') { window.location.reload(); } else { mchange(); } } } xmlhttp.send(params); } function ChooseDate(month,year) { document.getElementById("Calendar").innerHTML='טוען'; xmlhttp=GetXmlHttpObject() if (xmlhttp==null) { alert ("Your browser does not support XML HTTP Request"); return; } var url="/inc/calendar.php"; var params="month="+month; params=params+"&year="+year; params=params+"&sid="+Math.random(); xmlhttp.open("POST", url, true); //Send the proper header information along with the request xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.onreadystatechange=function () { if (xmlhttp.readyState==4) { document.getElementById("Calendar").innerHTML=xmlhttp.responseText; } } xmlhttp.send(params); } function getIP() { if(typeof(window.ip) == 'undefined') { xmlhttp=GetXmlHttpObject() if (xmlhttp==null) { alert ("Your browser does not support XML HTTP Request"); return; } var url="/inc/ip.php"; var params="sid="+Math.random(); xmlhttp.open("POST", url, false); //Send the proper header information along with the request xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); window.ip=xmlhttp.responseText; } return window.ip; } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } // END of dc