function wheeeeeePop(page) {
	var url = "pop_" + page + ".php";
	var atts = "width=700,height=600,scrollbars";
	var popWin = window.open(url, "secondary", atts);
	popWin.focus();
	}
	
function makePop(page) {
	if (opener)	opener.location.href = "http://www.wheeeeee.com/index.php";
	else {
		var mainWin = window.open("http://www.wheeeeee.com/index.php");
		wheeeeeePop(page);
		alert("The window you are trying to open was designed to be opened by a different window on Wheeeeee.com.  You will now receive a message asking you if you want to close this window.  Say YES to close it and you'll see this window again as it should be seen.  Thanks!");
		self.window.close();
		}
	}

function displayStatus(msgStr) { 
	status = msgStr; 
	document.returnVal = true;
	}

function findObject(n, d) { 
 		var p,i,x;  
	if (!d) d = document; 
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
   		d =	parent.frames[n.substring(p+1)].document; 
		n = n.substring(0,p);
		}
 		if (!(x=d[n]) && d.all) x = d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) x = d.forms[i][n];
 		for (i=0;!x&&d.layers&&i<d.layers.length;i++) x = findObject(n,d.layers[i].document);
 		if (!x && d.getElementById) x = d.getElementById(n); 
	return x;
	}

function imgSwap() { 
 		var i,j=0,x,a=imgSwap.arguments; 
	document.aSwap = new Array; 
	for(i=0;i<(a.length-2);i+=3)
  			if ((x=findObject(a[i]))!=null) {
			document.aSwap[j++] = x; 
			if (!x.oSrc) x.oSrc = x.src; 
			x.src=a[i+2];
			}
	}
	
function imgSwapRestore() { 
 		var i,x,a=document.aSwap; 
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src = x.oSrc;
	}

function imgPreload() { 
		var d = document; 
	if (d.images) { 
		if (!d.aTemp) d.aTemp = new Array();
  			var i,j=d.aTemp.length,a=imgPreload.arguments; 
		for (i=0; i<a.length; i++)
  				if (a[i].indexOf("#")!=0) { 
				d.aTemp[j] = new Image; 
				d.aTemp[j++].src=a[i];
				}
		}
	}
