var _topLauncher="topLauncher";function getElementLeft(Elem){var elem;if(document.getElementById){elem=document.getElementById(Elem);}else if(document.all){elem=document.all[Elem];}
var xPos=elem.offsetLeft;var tempEl=elem.offsetParent;while(tempEl!=null){xPos+=tempEl.offsetLeft;tempEl=tempEl.offsetParent;}
return(xPos);}
function getElementTop(Elem){var elem;if(document.getElementById){elem=document.getElementById(Elem);}else if(document.all){elem=document.all[Elem];}
var xPos=elem.offsetTop;var tempEl=elem.offsetParent;while(tempEl!=null){xPos+=tempEl.offsetTop;tempEl=tempEl.offsetParent;}
return(xPos);}
function setLeft(){var iWidth;var sWidth;var iMaxWidth=1239;var iConstant=100;var iDiff=235;var iBannerWidth=945;if(document.body.clientWidth>1200){document.getElementById("all").style.backgroundPosition="center top";}else{if(document.body.clientWidth<=iMaxWidth-iDiff){document.getElementById("all").style.backgroundPosition="-135px 0px";}else if(document.body.clientWidth<iMaxWidth){iWidth=document.body.clientWidth- iMaxWidth-iDiff;iWidth=iWidth/2+iConstant;iWidth+='';sWidth=iWidth+"px 0px";document.getElementById("all").style.backgroundPosition=sWidth;}else{iConstant+='';document.getElementById("all").style.backgroundPosition="-15px 0px";}}}
function bodyLoadComplete(){if(document.body.offsetHeight<900){document.getElementById("all").style.height="900px";}
topLauncherCheck();}
function setResolution(){var avalWidth;if(window.outerWidth>1035){avalWidth=(window.outerWidth- 1035)/2;document.getElementById("margin1").style.display="";document.getElementById("margin2").style.display="";document.getElementById("margin1").width=avalWidth;document.getElementById("margin2").width=avalWidth;}else{document.getElementById("margin1").style.display="none";document.getElementById("margin2").style.display="none";document.getElementById("maindisplay").width=1035;}}
function topLauncherCheck(){if(document.body.offsetHeight>document.documentElement.clientHeight){attachTopLauncher()
window.onscroll=viewTopLauncher}}
function attachTopLauncher(){var topLauncher=document.createElement("a");topLauncher.id=_topLauncher;topLauncher.href="#top";topLauncher.innerHTML='<img src="theme/images/back_to_top.png" alt="Back To Top" />';topLauncher.style.display="none";topLauncher.style.position="fixed";document.body.appendChild(topLauncher);}
function viewTopLauncher(event){if(navigator.appName=="Microsoft Internet Explorer"&&navigator.appVersion<7){document.getElementById(_topLauncher).style.top=document.documentElement.scrollTop}
if(document.documentElement.scrollTop==0)
document.getElementById(_topLauncher).style.display="none"
else
document.getElementById(_topLauncher).style.display="block"}
