// Set the window name

window.name = "main";

// Tickets functions

	function openTicketWindow(getLink) {
		var sUrl, sFeatures, oSite;
		sUrl= getLink.href;
		sFeatures="height=600,width=768,location=no,menubar=no,toolbar=no,resizable=no,status=yes,scrollbars=yes";
		window.open(sUrl,null,sFeatures);
		return false;
	}
	
	function OpenTicket() {
		var sUrl, sFeatures, oSite;
		sUrl="https://eticketing.venpos.net/Index.aspx?Site=DeepSea";
		sFeatures="height=600,width=768,location=no,menubar=no,toolbar=no,resizable=no,status=yes,scrollbars=yes";
		window.open(sUrl,null,sFeatures);
	}

// Function to make DIV area act as its child A tag

	function doDivLink(getDiv) {
		if(document.getElementsByTagName) {
			newLocation = getDiv.getElementsByTagName('A').item(0).href;
			newTarget = getDiv.getElementsByTagName('A').item(0).target;
			if(newTarget == "_blank") {
				window.open(newLocation);
			} else window.location = newLocation;
		}
	}
	
	function clearDivLink() {
		if(document.getElementsByTagName) return false;
	}


// corporate logos png fixer

	var ieVersion = navigator.appVersion.split("MSIE");
	var ieVersion = parseFloat(ieVersion[1]);

	function iePNG() {
		// convert to png background for legacy IE support
		if ((ieVersion >= 5.5) && (ieVersion < 7) && (document.body.filters))  {
			var corpLogos = document.getElementById("asproFooterArea").getElementsByTagName("IMG");
			for(i=0;i<corpLogos.length;i++) {
				imgSrc = corpLogos[i].src;
				imgWidth = corpLogos[i].offsetWidth;
				imgHeight = corpLogos[i].offsetHeight;
				corpLogos[i].src = "/images/common/blank.gif";
				corpLogos[i].width = imgWidth;
				corpLogos[i].height = imgHeight;
				corpLogos[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + imgSrc  + "',sizingMethod='scale')";
			}
		}
	}