var DOM=document.getElementById;var IE4=document.all&&navigator.userAgent.indexOf("Opera")==-1;var NS6=document.getElementById&&!document.all;var NS4=document.layers;var VISIBLE="visible";var HIDE=(IE4||NS6)?"hidden":"hide";function ShowLayer(PopupLayer)
{var divObj;var iWidth;var iHeight
var iX;var iY;var iMod;divObj=document.getElementById(PopupLayer);var windowHeight=getWindowHeight();var windowWidth=getWindowWidth();var contentHeight=divObj.offsetHeight;var contentWidth=divObj.offsetWidth;divObj.style.left=((windowWidth/2)-(contentWidth/2))+50+'px';divObj.style.top=((windowHeight/2)-(contentHeight/2))+'px';divObj.style.visibility=VISIBLE;}
function HideLayer(PopupLayer)
{if(DOM||IE4||NS6)
{var obj;obj=document.getElementById(PopupLayer);obj.style.visibility=HIDE;}}
function getWindowHeight()
{var windowHeight=0;if(typeof(window.innerHeight)=='number'){windowHeight=window.innerHeight;}
else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}
else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight;}}}
return windowHeight;}
function getWindowWidth()
{var windowWidth=0;if(typeof(window.innerWidth)=='number'){windowWidth=window.innerWidth;}
else{if(document.documentElement&&document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}
else{if(document.body&&document.body.clientWidth){windowWidth=document.body.clientWidth;}}}
return windowWidth;}
function ShowHelp(sImagePath)
{var myImage=new Image();myImage.src=sImagePath;if(DOM||IE4||NS6)
{var obj;obj=document.getElementById("HelpPopup");obj.style.visibility=VISIBLE;if(myImage.width>=0)
{iWidth=400;}
else
{iWidth=myImage.width;}
if(myImage.height>=0)
{iHeight=400;}
else
{iHeight=myImage.height;}
iX=(document.body.clientWidth-iWidth)/2;iY=(document.body.clientHeight-iWidth)/2;obj.style.left=iX;obj.style.top=iY;obj=document.getElementById("HelpPicture");obj.src=myImage.src;}}
function HideHelp()
{if(DOM||IE4||NS6)
{var obj;obj=document.getElementById("HelpPopup");obj.style.visibility=HIDE;}}
function ShowImagePopup(sImagePath,sLink,sViewLargerPath,sText)
{var myImage=new Image();myImage.src=sImagePath;if(DOM||IE4||NS6)
{var obj;var objLink;var objViewLarge;var objPopupText;obj=document.getElementById("ImagePopup");obj.style.visibility=VISIBLE;objLink=document.getElementById(sLink);if(myImage.width>=0)
{iWidth=222;}
else
{iWidth=myImage.width;}
if(myImage.height>=0)
{iHeight=222;}
else
{iHeight=myImage.height;}
var iOffSetY;var iOffSetX;iOffSetY=0;iOffSetX=0;obj.style.top=elementPosition(objLink).y+iOffSetY;obj.style.left=elementPosition(objLink).x+iOffSetX;obj=document.getElementById("PopupPicture");obj.src=myImage.src;objViewLarge=document.getElementById("ImagePopupViewLargerLink");objViewLarge.href='javascript:PopupWindow(\''+sViewLargerPath+'\')';objPopupText=document.getElementById("PopupText");objPopupText.innerHTML=sText;}}
function HideImagePopup()
{if(DOM||IE4||NS6)
{var obj;obj=document.getElementById("ImagePopup");obj.style.visibility=HIDE;}}
function PopupWindow(sURL)
{dtDay=new Date();sID=dtDay.getTime();eval("page"+sID+" = window.open(sURL, '"+sID+"', 'toolbar=0, scrollbars=0, location=0, statusbar=1, menubar=0, resizable=0, width=550, height=550, left = 150, top = 150');");}
function elementPosition(obj){var curleft=0,curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}}
return{x:curleft,y:curtop};}