if (document.images) {
	kidsup=new Image(); kidsup.src="/images/mainNav/kids.gif";
	kidsover=new Image(); kidsover.src="/images/mainNav/kids_over.gif";
	parentsup=new Image(); parentsup.src="/images/mainNav/parents.gif";
	parentsover=new Image(); parentsover.src="/images/mainNav/parents_over.gif";
	prosup=new Image(); prosup.src="/images/mainNav/pros.gif";
	prosover=new Image(); prosover.src="/images/mainNav/pros_over.gif";
}


function openPopup(popupurl, Desc, Size){
	NewWinName = Desc.replace(/ /g, "_");
	NewWinName = NewWinName.replace(/&/g, "and");
	NewWinName = NewWinName.replace(/-/g, "_");
	NewWinName = NewWinName.replace(/\//g, "_");
	css = "";

	if (Size == "Large") {
		SizeString = "width=500,height=500";
		table_width = "100%";
		table_height = "100%";
	} else if (Size == "Fun") {
		SizeString = "width=330,height=330";
		css = "<style type=\"text/css\">body {background-image:none;}</style>";
		table_width = "330";
		table_height = "330";
	} else if (Size == "Winner") {
		SizeString = "width=400,height=350";
		table_width = "100%";
		table_height = "100%";
	} else {
		SizeString = "width=230,height=310";	
		table_width = "100%";
		table_height = "100%";
}

	var winString = "";
	var scrLeft = window.screenLeft + 175;
	var scrTop = window.screenTop + 100;
	var popWin = window.open("",NewWinName,"toolbar=no,left=" + scrLeft + ",top=" + scrTop + ",location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no," + SizeString);
	
	winString = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
		"<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\">\n" + 
		"<head>\n" + 
		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n" +
		"<title>Enlarged Image of " + Desc + "</title>\n" +
		"<link rel=\"stylesheet\" href=\"/styles/pres.css\" type=\"text/css\" />\n" + 
		"</head>\n\n" +
		css +
		"<body id=\"home\">\n" +
			"<table cellpadding=\"10\" border=\"0\" height=\""+ table_height +"\" width=\""+ table_width +"\" summary=\"\">\n" +
				"<tr>\n" +
					"<td align=\"center\" valign=\"middle\">" +
						"<a href=\"javascript: window.close()\">" +
							"<img src=\"" + popupurl + "\" border=\"0\" alt=\"Enlarged Image of " + Desc + ": click on the image to close window\" />" +
						"</a>" +
					"</td>\n" +
				"</tr>\n" +
			"</table>\n" +
		"</body>\n" +
		"</html>\n"

	popWin.document.write(winString);
	popWin.document.close();
	popWin.focus();
}



function popup(url){
	var scrX=screen.width;
	var scrY=screen.height;
	
	var popX=Math.round((screen.width*0.8)+30);
	var popY=Math.round((screen.height*0.8)+30);

//alert("PopY is " + popY);

	var TempY = Math.round((popX*280)/530);

//alert("TempY is " + TempY);


	if (TempY > popY) {
		var TempX = Math.round((popX*530)/280);
		popX = TempX;
	} else {
		popY = TempY;
	}

	var popPosX=Math.round(0.5*(scrX-popX));
	var popPosY=Math.round(0.5*(scrY-popY)-25);

//alert("PopX: " + popX);
//alert("PopY: " + popY);
//alert("PopPosX: " + popPosX);
//alert("PopPosY: " + popPosY);


myURL = url + "?width=" + (popX-20) + "&height=" + (popY-20);
	
	var popWin=window.open(myURL,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+popX+",height="+popY+",left="+popPosX+",top="+popPosY);
		//popWin.document.write(winString);
}


function legal(popupurl){
	var scrLeft=window.screenLeft + 175;
	var scrTop=window.screenTop + 100;
		
	window.open(popupurl,"_blank","toolbar=no,left=" + scrLeft + ",top=" + scrTop + ",location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=420,height=260");
}



function CheckField(Field,Text){

//	alert(Field.value);

	if (Field.value == Text) { 
		Field.value="";
	}

}



function imgOut(imgName) {
	if (document.images) {
		if (imgName != Selected1 && imgName != Selected2) {
			document[imgName].src=eval(imgName + "up.src");
		}
	}
	self.status = "";
}

function imgOver(imgName) {
	if (document.images) {
		if (imgName != Selected1 && imgName != Selected2) {
			document[imgName].src=eval(imgName + "over.src"); 
		}
	}
	self.status = "";
}


function HighLightDIV(Obj) {

	if (Obj) {
		if (document.getElementById(Obj)) {
			document.getElementById(Obj).style.background="#FFEF00";
			document.getElementById(Obj).style.padding="5px";
		}
		
		if (navigator.appVersion.indexOf('MSIE') > 0 ) {
			window.location.href="#" + Obj;	
		} else {
			window.scrollBy(0, -90);
		}
	}
}

