document.onclick = function(e) {
	var target = e ? e.target : window.event.srcElement;
	while (target && !/^(a|body)$/i.test(target.nodeName)) {
		target = target.parentNode;
	}
	if (target && target.getAttribute('rel') && target.rel == 'external') {
    	var external = window.open(target.href,"","width=650,height=650,scrollbars=no,resizable=yes,status=yes,toolbar=no,menubar=no,location=no");
    	return external.closed;
	}
	if (target && target.getAttribute('rel') && target.rel == 'scooper') {
    	var external = window.open(target.href,"scooped","width=600,height=480,scrollbars=no,resizable=yes,status=yes,toolbar=no,menubar=no,location=no");
    	return external.closed;
	}
}

function getType(thisform) {
	if (thisform.type.options[thisform.type.selectedIndex].value != "") {
		thisform.action = "/"+thisform.s.value;
		thisform.submit();
	}
}

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", "");
   }
   }
  }
 }
}
window.onload=startList;

var imgNames = ['http://www.goopworld.com/images/home_01a.jpg', 'http://www.goopworld.com/images/goopscoop_02a.jpg', 'http://www.goopworld.com/images/goopwear_03a.jpg', 'http://www.goopworld.com/images/goopgifts_04a.jpg', 'http://www.goopworld.com/images/goopshop_05a.jpg'];
var imgObjects = [];
for (var i = 0; i < imgNames.length; i++)
{
  imgObjects[i] = new Image();
  imgObjects[i].src = imgNames[i];  
  //imgObjects[i].onload = function(){alert('Image preloaded.');}; //test function
}