var arVersion=navigator.appVersion.split("MSIE")
var version=parseFloat(arVersion[1])
function fixPNG(myImage)
{if((version>=5.5)&&(version<7)&&(document.body.filters))
{var imgID=(myImage.id)?"id='"+myImage.id+"' ":""
var imgClass=(myImage.className)?"class='"+myImage.className+"' ":""
var imgTitle=(myImage.title)?"title='"+myImage.title+"' ":"title='"+myImage.alt+"' "
var imgStyle="display:inline-block;"+myImage.style.cssText
var strNewHTML="<span "+imgID+imgClass+imgTitle
+" style=\""+"width:"+myImage.width
+"px; height:"+myImage.height
+"px;"+imgStyle+";"
+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+myImage.src+"\', sizingMethod='scale');\"></span>"
myImage.outerHTML=strNewHTML}}
function move(id,nr)
{o=document.getElementById(id);o.style.top=o.offsetTop+nr+"px";}
function resetbt(id)
{o=document.getElementById(id);switch(id)
{case'homeimg':o.style.top="0px";break;case'whimg':o.style.top="-200px";break;case'resellerimg':o.style.top="-400px";break;case'dsimg':o.style.top="-600px";break;case'domainsimg':o.style.top="-800px";break;case'radioimg':o.style.top="-1600px";break;case'clientsimg':o.style.top="-1000px";break;case'supportimg':o.style.top="-1200px";break;case'contactimg':o.style.top="-1400px";break;}}
function changeback(id,mod)
{o=document.getElementById(id);if(mod==1)
{o.style.color='#0e9eed';}
if(mod==2)
{o.style.color='#838383';}}
function setright(id,n,mode)
{if(mode=="right")
{o=document.getElementById(id);o.style.left=screen.width-n+"px";}
else if(mode=="center")
{o=document.getElementById(id);o.style.left=screen.width/2-n+"px";}}
function hide(id1,id2)
{o=document.getElementById(id1);o.style.visibility='hidden';m=document.getElementById(id2);m.style.overflow='hidden';}
function show(id1,id2)
{o=document.getElementById(id1);m=document.getElementById(id2);m.style.overflow='visible';o.style.visibility='visible';}
function show_hide(id1,id2)
{o=document.getElementById(id1);if((o.style.visibility=='hidden')||(o.style.visibility==''))
{show(id1,id2)}
else
{hide(id1,id2);}}
function update(opt,id1,id2,id3)
{o=document.getElementById(id1);o.value=opt;hide(id2,id3);}
function display(param,id)
{if(param=="show")
{document.getElementById(id).style.display="block";}
if(param=="hide")
{document.getElementById(id).style.display="none";}}
function puttext(text,id)
{document.getElementById(id).innerHTML=text;}
function destroy(id)
{obj=document.getElementById(id);document.body.removeChild(obj);}
function create(msg)
{this.floater=document.createElement("div");this.floater.setAttribute("id","panelasd");this.floater.style.zIndex=50;this.floater.style.position="absolute";this.floater.style.width="300px";this.floater.innerHTML=msg;createin=document.getElementsByTagName('body')[0];createin.appendChild(this.floater);}
function create_alert(msg,title_txt)
{var productElement=document.getElementById("alert");if(productElement!=null)
{obj=document.getElementById("warn");document.body.removeChild(obj);}
l=Math.round((document.documentElement.clientWidth/2)-(320/2));if(window.pageYOffset==null)
{t=Math.round(document.documentElement.clientHeight/2)-Math.round(160/2)+document.documentElement.scrollTop;}
else
{t=Math.round((document.documentElement.clientHeight/2)-(160/2)+window.pageYOffset);}
this.warn=document.createElement("div");this.warn.setAttribute("id","alert");this.warn.style.zIndex=50;this.warn.style.position="absolute";this.warn.style.width="320px";this.warn.style.height="160px";if((title_txt=="Eroare")||(title_txt=="Error")||(title_txt=="Failed"))
{this.warn.style.backgroundImage="url(comun/images/alert.gif)";}
else
{this.warn.style.backgroundImage="url(comun/images/alert2.gif)";}
this.warn.style.top=t+"px";this.warn.style.left=l+"px";title=document.createElement("div");title.setAttribute("class","text_22px");title.style.zIndex=51;if((title_txt=="Eroare")||(title_txt=="Error")||(title_txt=="Failed"))
{title.style.color="#FF0000";}
else
{title.style.color="#0000FF";}
title.style.position="relative";title.style.textAlign="center";title.style.width="100%";title.style.height="30px";title.style.top="0px";title.style.overflow="hidden";title.style.paddingTop="10px";title.innerHTML=title_txt;this.warn.appendChild(title);alert_body=document.createElement("div");alert_body.setAttribute("class","alert_body");alert_body.style.zIndex=51;alert_body.style.position="relative";alert_body.style.top="0px";alert_body.style.width="100%";alert_body.style.height="70px";alert_body.style.padding="5px";alert_body.style.overflow="hidden";alert_body.style.textAlign="center";alert_body.innerHTML=msg;this.warn.appendChild(alert_body);ok_button=document.createElement("div");ok_button.setAttribute("class","ok_button");ok_button.style.zIndex=51;ok_button.style.textAlign="center";ok_button.style.position="relative";ok_button.style.top="0px";ok_button.style.width="100%";ok_button.style.height="30px";ok_button.overflow="hidden";ok_button.style.textAlign="center";ok_button.innerHTML="<input type='button' value='OK' class='button1' onclick=\"destroy('alert')\" />";this.warn.appendChild(ok_button);createin=document.getElementsByTagName('body')[0];createin.appendChild(this.warn);}
function menu(id,m,lang)
{switch(m)
{case 1:o=document.getElementById(id);o.style.background='url(http://hosting.bunt.ro/images/vps_menu_'+lang+'.png)';o.style.left="0px";if(navigator.appVersion.indexOf('MSIE 6')!=-1)
{o.style.top="14px";}
if(navigator.appVersion.indexOf('MSIE 7')!=-1)
{o.style.top="12px";}
o=document.getElementById('ob1');o.style.height="36px";o.style.top="0px";o=document.getElementById('ob2');o.style.height="27px";o.style.top="-27px";o=document.getElementById('ob3');o.style.height="27px";o.style.top="-54px";o=document.getElementById('ds_div4');o.style.visibility='visible';o=document.getElementById('ds_div6');o.style.visibility='hidden';o=document.getElementById('ds_div8');o.style.visibility='hidden';o=document.getElementById('ds_div10');o.style.visibility='visible';o=document.getElementById('ds_div12');o.style.visibility='hidden';o=document.getElementById('ds_div14');o.style.visibility='hidden';break;case 2:o=document.getElementById(id);o.style.background='url(http://hosting.bunt.ro/images/colocation_menu_'+lang+'.png)';o.style.left="-1px";if(navigator.appVersion.indexOf('MSIE 6')!=-1)
{o.style.top="14px";}
if(navigator.appVersion.indexOf('MSIE 7')!=-1)
{o.style.top="12px";}
o=document.getElementById('ob1');o.style.height="27px";o.style.top="9px";o=document.getElementById('ob2');o.style.height="36px";o.style.top="-27px";o=document.getElementById('ob3');o.style.height="27px";o.style.top="-54px";o=document.getElementById('ds_div4');o.style.visibility='hidden';o=document.getElementById('ds_div6');o.style.visibility='visible';o=document.getElementById('ds_div8');o.style.visibility='hidden';o=document.getElementById('ds_div10');o.style.visibility='hidden';o=document.getElementById('ds_div12');o.style.visibility='visible';o=document.getElementById('ds_div14');o.style.visibility='hidden';break;case 3:o=document.getElementById(id);o.style.background='url(http://hosting.bunt.ro/images/ds_menu_'+lang+'.png)';o.style.left="-1px";if(navigator.appVersion.indexOf('MSIE 6')!=-1)
{o.style.top="14px";}
if(navigator.appVersion.indexOf('MSIE 7')!=-1)
{o.style.top="12px";}
o=document.getElementById('ob1');o.style.height="27px";o.style.top="9px";o=document.getElementById('ob2');o.style.height="27px";o.style.top="-18px";o=document.getElementById('ob3');o.style.height="36px";o.style.top="-54px";o=document.getElementById('ds_div4');o.style.visibility='hidden';o=document.getElementById('ds_div6');o.style.visibility='hidden';o=document.getElementById('ds_div8');o.style.visibility='visible';o=document.getElementById('ds_div10');o.style.visibility='hidden';o=document.getElementById('ds_div12');o.style.visibility='hidden';o=document.getElementById('ds_div14');o.style.visibility='visible';break;}}
function validateform2(id1,id2,id3,id4)
{o=document.getElementById(id3);if(o.value=="")
{document.getElementById(id1).style.backgroundPosition="0px -65px";ob1=0;}
else
{ob1=1;}
o=document.getElementById(id4);if(o.value=="")
{document.getElementById(id2).style.backgroundPosition="0px -65px";ob2=0;}
else
{ob2=1;}
if((ob1==1)&&(ob2==1))
{return true;}
else
{return false;}}
function validateform3(id,id1)
{o=document.getElementById(id1);if(o.value=="")
{document.getElementById(id).style.backgroundPosition="0px -65px";ob1=0;}
else
{ob1=1;}
if(ob1==1)
{return true;}
else
{return false;}}
function validateform1(id,title,msg)
{o=document.getElementById(id+'f');if(o.value=="")
{o=document.getElementById(id).style.backgroundPosition="0px -65px";create_alert('<br />'+msg,title);ob1=0;}
else
{ob1=1;}
if((o.value.indexOf('@')==-1)||(o.value.indexOf('.',o.value.indexOf('@'))==-1))
{o=document.getElementById(id).style.backgroundPosition="0px -65px";create_alert('<br />'+msg,title);ob2=0;}
else
{ob2=1;}
if((ob1==1)&&(ob2==1))
{return true;}
else return false;}
function isphone(str)
{regex="^([0-9])";if(str.match(regex))return true;return false;}
function validateform(id1,id2,id3,id4)
{o=document.getElementById(id1+'f');if(o.value=="")
{document.getElementById(id1).style.backgroundPosition="-1px -329px";ob1=0;}
else
{ob1=1;}
o=document.getElementById(id2+'f');if(o.value=="")
{document.getElementById(id2).style.backgroundPosition="-1px -329px";ob2=0;}
else
{ob2=1;}
if((o.value.indexOf('@')==-1)||(o.value.indexOf('.',o.value.indexOf('@'))==-1))
{document.getElementById(id2).style.backgroundPosition="-1px -329px";ob5=0;}
else
{ob5=1;}
o=document.getElementById(id3+'f');if(o.value=="")
{document.getElementById(id3).style.backgroundPosition="-1px -362px";ob3=0;}
else
{ob3=1;}
o=document.getElementById(id4+'f');if(o.value=="")
{document.getElementById(id4).style.backgroundPosition="-1px -389px";ob4=0;}
else
{ob4=1;}
if((ob1==1)&&(ob2==1)&&(ob3==1)&&(ob4==1)&&(ob5==1))
{document.contact.submit();}}
function del(id)
{txt=document.getElementById(id).value;if(txt.indexOf('www.')!=-1)
{txt=txt.substr(4,txt.length);document.getElementById(id).value=txt;}}
function changelang(to)
{var s=location.href;if(to=="en")
{s=s.replace('/en/','/');}
if(to=="ro")
{s=s.replace('.ro/','.ro/en/');}
window.location=s;}
function ajaxFunction(param1,param2,param3,id)
{var xmlHttp;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{alert("Your browser does not support AJAX!");return false;}}}
xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{document.getElementById(id).innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET","actions.php?act="+param1+"&lang1="+param2+"&lang2="+param3,true);xmlHttp.send(null);}
var divObj;function getMouseCoordinates(e)
{var posx=0;var posy=0;if(!e)
e=window.event;if(e.pageX||e.pageY){posx=e.pageX;posy=e.pageY;}
else if(e.clientX||e.clientY){posx=e.clientX+document.body.scrollLeft
+document.documentElement.scrollLeft;posy=e.clientY+document.body.scrollTop
+document.documentElement.scrollTop;}
divObj=document.getElementById("panelasd");divObj.style.top=(posy+20)+"px";divObj.style.left=(posx+15)+"px";}
function limitText(txt){return(txt.value.length<300);}
function showBox(titlu){Shadowbox.open({player:'iframe',title:titlu,content:'testing.html',height:220,width:350});}
function fixeazaPNG(){fixPNG(document.getElementById('liveimg'));}
function fixarePNG(){setTimeout(fixeazaPNG,500);}
function changeLogoText(){document.getElementById('BuntHosting_logo_text').innerHTML="";document.getElementById('BuntHosting_logo_text').className="newClassLogo";}
function ChangeLogo(){var ti=setTimeout(changeLogoText,500);}
function fixAll(){var imgs=document.getElementsByTagName('img');for(i=0;i<imgs.length;i++)
{var src=imgs[i].getAttribute('src');var parts=src.split('.');if((parts[(parts.length-1)]=='png')||(parts[(parts.length-1)]=='PNG'))
{fixPNG(imgs[i]);}}}
setTimeout(fixeazaPNG,500);ChangeLogo();var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-2006833-20']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(ga);})();
