document.getElementsByClassName=function(b){var a=[];var f=new RegExp("\\b"+b+"\\b");var e=this.getElementsByTagName("*");for(var d=0;d<e.length;d++){var c=e[d].className;if(f.test(c)){a.push(e[d])}}return a};function set_input_focus(){var b=document.getElementsByClassName("focus");if(b.length>0){try{b[0].hasFocus=false;b[0].onfocus=function(){this.hasFocus=true};b[0].onblur=function(){this.hasFocus=false};b[0].focus()}catch(a){}if(!b[0].hasFocus){if(!set_input_focus.counter){set_input_focus.counter=1}else{set_input_focus.counter++}if(set_input_focus.counter<10){window.setTimeout("set_input_focus()",200)}}}}function register_form(){var a=document.getElementById("hl_phone");if((typeof(a)!="undefined")&&(a!=null)){var b=a.title;if(a.value==""){a.value=b;a.className="grey"}else{if(a.value==b){a.className="grey"}}a.onfocus=function(){if(this.value==b){this.value="";this.className=""}};a.onblur=function(){if(this.value==""){this.value=b;this.className="grey"}}}}function switch_input_type(d,b,a){return d;var c=document.createElement("input");c.name=d.name;c.id=d.id;c.className=d.className;c.value=d.value;c.type=b;d.parentNode.replaceChild(c,d);if(a){c.focus()}c.onfocus=d.onfocus;c.onblur=d.onblur;return c}function head_login_form(){var b=document.getElementById("hl_password");if((typeof(b)!="undefined")&&(b!=null)){var d=document.getElementById("hl_username");var c=d.title;if(d.value==""){d.value=c;d.className="grey"}d.onfocus=function(){if(this.value==c){this.value="";this.className=""}};d.onblur=function(){if(this.value==""){this.value=c;this.className="grey"}};var a=b.title;if(d.value==c){b.value=a}b.className="grey";b.onfocus=function(){if(this.value==a){var e=switch_input_type(this,"password",true);e.value="";e.className=""}};b.onblur=function(){if(this.value==""){var e=switch_input_type(this,"text",false);e.value=a;e.className="grey"}}}}var tooltip=function(){var d="tt";var q=3;var f=3;var p=300;var g=8;var e=20;var l=90;var j=0;var m,r,n,o,k;var a=document.all?true:false;var i=new Array();return{init:function(){var c=document.getElementsByClassName("tt");for(var b=0;b<c.length;b++){c[b].onmouseover=function(){this.ttile=this.title;tooltip.show(this);this.title=""};c[b].onmouseout=function(){tooltip.hide();this.title=this.ttile}}},set:function(h,b,c){i[h]="<h3>"+b+"</h3>"+c},get:function(b){if(i[b.id]){return i[b.id]}else{return b.title}},show:function(c,b){if(m==null){m=document.createElement("div");m.setAttribute("id",d);r=document.createElement("div");r.setAttribute("id",d+"top");n=document.createElement("div");n.setAttribute("id",d+"cont");o=document.createElement("div");o.setAttribute("id",d+"bot");m.appendChild(r);m.appendChild(n);m.appendChild(o);document.body.appendChild(m);m.style.opacity=0;m.style.filter="alpha(opacity=0)";document.onmousemove=this.pos}m.style.display="block";n.innerHTML=tooltip.get(c);m.style.width=b?b+"px":"auto";if(!b&&a){r.style.display="none";o.style.display="none";m.style.width=m.offsetWidth;r.style.display="block";o.style.display="block"}if(m.offsetWidth>p){m.style.width=p+"px"}k=parseInt(m.offsetHeight)+q;clearInterval(m.timer);m.timer=setInterval(function(){tooltip.fade(1)},e)},pos:function(h){var c=a?event.clientY+document.documentElement.scrollTop:h.pageY;var b=a?event.clientX+document.documentElement.scrollLeft:h.pageX;m.style.top=(c-k)+"px";m.style.left=(b+f)+"px"},fade:function(h){var b=j;if((b!=l&&h==1)||(b!=0&&h==-1)){var c=g;if(l-b<g&&h==1){c=l-b}else{if(j<g&&h==-1){c=b}}j=b+(c*h);m.style.opacity=j*0.01;m.style.filter="alpha(opacity="+j+")"}else{clearInterval(m.timer);if(h==-1){m.style.display="none"}}},hide:function(){clearInterval(m.timer);m.timer=setInterval(function(){tooltip.fade(-1)},e)}}}();function form_autosend(){var b=document.getElementsByClassName("autosend");for(var a=0;a<b.length;a++){b[a].click()}}window.onload=function(){set_input_focus();register_form();head_login_form();tooltip.init();form_autosend()};