window.setInterval("callLayout()",1000);window.onload=function(){callLayout();};window.onresize=function(){callLayout();};function callLayout(){layout();}function getWindowHeight(){var windowHeight=0;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(document.documentElement&&document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{if(document.body&&document.body.clientWidth){windowWidth=document.body.clientWidth;}}return windowWidth;}function getTop(obj){if(obj!=undefined){if(obj.offsetParent){return(obj.offsetTop+getTop(obj.offsetParent));}else{return(obj.offsetTop);}}}function getLeft(obj){if(obj!=undefined){if(obj.offsetParent){return(obj.offsetLeft+getLeft(obj.offsetParent));}else{return(obj.offsetLeft);}}}function setPosition(obj,topOffset,leftOffset){if(obj!=undefined){if(obj){obj.style.position="absolute";obj.style.top=topOffset+"px";obj.style.left=leftOffset+"px";}}}function setWidth(obj,width,padding){if(obj){obj.style.width=width+"px";if(obj.clientWidth>width){obj.style.width=(width-padding*2)+"px";}}}function addCorners(blockName){var block=document.getElementById(blockName);if(block){var top=getTop(block);var left=getLeft(block);addCorner(blockName,top,left,"tl");addCorner(blockName,top,(left+block.clientWidth-5),"tr");addCorner(blockName,(top+block.clientHeight-5),left,"bl");addCorner(blockName,(top+block.clientHeight-5),(left+block.clientWidth-5),"br");}}function addCorner(blockName,topOffset,leftOffset,type){var img=document.getElementById(blockName+type);if(!img){img=document.createElement("img");img.id=blockName+type;document.body.appendChild(img);img.style.position="absolute";img.style.padding="0px";img.style.width="5px";img.style.height="5px";img.src="/rsrc/img/auto/FFFFFF/corn_5_"+type+".gif";}img.style.top=topOffset+"px";img.style.left=leftOffset+"px";}function getBarMinWidth(barName,padding){var bar=document.getElementById(barName);if(!bar){return 0;}var minWidth=0;var barItems=bar.childNodes;for(var i=0;i<barItems.length;i++){if(barItems[i].nodeType==1){minWidth=minWidth+barItems[i].offsetWidth;}else{bar.removeChild(barItems[i]);}}return minWidth+padding*2;}