// JavaScript Document
function closeWindow(){
	document.getElementById('TransparentPopup').style.display = "none";
	//document.getElementById('ProductOverview').style.display = "none";
	document.getElementById('ProductOverviewContainer').style.display = "none";
	document.getElementById('ProductOverview').innerHTML = "";
}

function ShowProductOverview(catID) {
	
	ImagePopupWidth = 970;
	ImagePopupHeight = 600;
	PopupPositionLeft = (document.all)?(document.body.clientWidth-ImagePopupWidth)/2:(window.innerWidth-ImagePopupWidth)/2;
	PopupPositionTop_old = (document.all)?(document.body.clientHeight-ImagePopupHeight)/2:(window.innerHeight-ImagePopupHeight)/2;
	PopupPositionTop = 30;
	
	document.getElementById('ProductOverviewContainer').style.width = ImagePopupWidth+"px";
	document.getElementById('ProductOverviewContainer').style.height = ImagePopupHeight+"px";

	document.getElementById('ProductOverviewContainer').style.left = PopupPositionLeft+"px";
	document.getElementById('ProductOverviewContainer').style.top = PopupPositionTop+"px";
	
	var so = new SWFObject("/Files/Filer/Steinway/FLASH/SteinwayLyngdorfGallery.swf", "SteinwayLyngdorfGallery", "970", "585", "9");
		so.addVariable("nzURL", "http://steinway-lyngdorf.net.dynamicweb.dk/Default.aspx?ID=23");
		so.addVariable("category", catID);
		so.addVariable("nzImageFolder", "/Files/Filer/NZGalleri/data/");
		so.addVariable("nzTimerDelay", "7");
		so.addParam("wmode","transparent")
		so.write("ProductOverview");
	
	if(document.all){
		if(document.body.clientHeight>document.body.scrollHeight){
			PopupHeight = (document.body.clientHeight-document.body.scrollHeight)+document.body.scrollHeight;
		}
		else{
			PopupHeight = document.body.scrollHeight;
		}
	}
	else
	{
		PopupHeight = document.body.scrollHeight+window.scrollMaxY;
	}
	
	document.getElementById('TransparentPopup').style.height = PopupHeight+"px";

	document.getElementById('TransparentPopup').style.display = "block";
	document.getElementById('ProductOverviewContainer').style.display = "block";
}