//
// start window resize
//window.resizeTo(970,698)
// end window resize
//
// start IE png transparency fix
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	document.writeln('<style type="text/css">img, input.image { visibility:hidden; } </style>');
	window.attachEvent("onload", fnLoadPngs);
}

function fnLoadPngs() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null) {
			fnFixPng(img);
			img.attachEvent("onpropertychange", fnPropertyChanged);
		}
		img.style.visibility = "visible";
	}

	var nl = document.getElementsByTagName("INPUT");
	for (var i = nl.length - 1, e = null; (e = nl[i]); i--) {
		if (e.className && e.className.match(/\bimage\b/i) != null) {
			if (e.src.match(/\.png$/i) != null) {
				fnFixPng(e);
				e.attachEvent("onpropertychange", fnPropertyChanged);
			}
			e.style.visibility = "visible";
		}
	}
}

function fnPropertyChanged() {
	if (window.event.propertyName == "src") {
		var el = window.event.srcElement;
		if (!el.src.match(/x\.gif$/i)) {
			el.filters.item(0).src = el.src;
			el.src = "/images/x.gif";
		}
	}
}

function dbg(o) {
	var s = "";
	var i = 0;
	for (var p in o) {
		s += p + ": " + o[p] + "\n";
		if (++i % 10 == 0) {
			alert(s);
			s = "";
		}
	}
	alert(s);
}

function fnFixPng(img) {
	var src = img.src;
	img.style.width = img.width + "px";
	img.style.height = img.height + "px";
	img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
	img.src = "/images/x.gif";
}
// end IE png transparency fix
//
// start IE drop down functions
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRootEXPLORE2 = document.getElementById("EXPLORE2");
		for (i=0; i<navRootEXPLORE2.childNodes.length; i++) {
			nodeEXPLORE2 = navRootEXPLORE2.childNodes[i];
			if (nodeEXPLORE2.nodeName=="LI") {
				nodeEXPLORE2.onmouseover=function() {
					this.className+=" over";
				}
				nodeEXPLORE2.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRoot2EXPLORE3Play = document.getElementById("EXPLORE3Play");
		for (i=0; i<navRoot2EXPLORE3Play.childNodes.length; i++) {
			node2EXPLORE3Play = navRoot2EXPLORE3Play.childNodes[i];
			if (node2EXPLORE3Play.nodeName=="LI") {
				node2EXPLORE3Play.onmouseover=function() {
					this.className+=" over";
				}
				node2EXPLORE3Play.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRoot2 = document.getElementById("nav2");
		for (i=0; i<navRoot2.childNodes.length; i++) {
			node2 = navRoot2.childNodes[i];
			if (node2.nodeName=="LI") {
				node2.onmouseover=function() {
					this.className+=" over";
				}
				node2.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRoot3 = document.getElementById("nav3");
		for (i=0; i<navRoot3.childNodes.length; i++) {
			node3 = navRoot3.childNodes[i];
			if (node3.nodeName=="LI") {
				node3.onmouseover=function() {
					this.className+=" over";
				}
				node3.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRoot3EXPLORE3Shop = document.getElementById("EXPLORE3Shop");
		for (i=0; i<navRoot3EXPLORE3Shop.childNodes.length; i++) {
			node3EXPLORE3Shop = navRoot3EXPLORE3Shop.childNodes[i];
			if (node3EXPLORE3Shop.nodeName=="LI") {
				node3EXPLORE3Shop.onmouseover=function() {
					this.className+=" over";
				}
				node3EXPLORE3Shop.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRoot4 = document.getElementById("nav4");
		for (i=0; i<navRoot4.childNodes.length; i++) {
			node4 = navRoot4.childNodes[i];
			if (node4.nodeName=="LI") {
				node4.onmouseover=function() {
					this.className+=" over";
				}
				node4.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRoot4EXPLORE3Sleep = document.getElementById("EXPLORE3Sleep");
		for (i=0; i<navRoot4EXPLORE3Sleep.childNodes.length; i++) {
			node4EXPLORE3Sleep = navRoot4EXPLORE3Sleep.childNodes[i];
			if (node4EXPLORE3Sleep.nodeName=="LI") {
				node4EXPLORE3Sleep.onmouseover=function() {
					this.className+=" over";
				}
				node4EXPLORE3Sleep.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
		navRoot5 = document.getElementById("nav5");
		for (i=0; i<navRoot5.childNodes.length; i++) {
			node5 = navRoot5.childNodes[i];
			if (node5.nodeName=="LI") {
				node5.onmouseover=function() {
					this.className+=" over";
				}
				node5.onmouseout=function() {
					this.className=this.className.replace(" over", "");	
		    	}
			}
		}
	}
}
window.onload=startList;
// end IE drop down functions
//
