var screenWidth = screen.width;
var screenHeight = screen.height;    

var htmlWinWidth=600;
var htmlWinHeight=450; 
var htmlWinTop= 100;
var htmlWinLeft =  (screenWidth - (htmlWinWidth+50)) / 2;
 
function openWin(url, winName, w, h, wTop, wLeft) {  
	if (!w) var w=570;
	if (!h) var h=570; 
	
	// valign center if not given or 0
	if (!wTop) var wTop=  (screenHeight - (h+40)) / 2; // wTop = document.body.scrollTop+50;   
	
	// align center if not given or 0
	if (!wLeft) var wLeft =  (screenWidth - (w+50)) / 2; 
	
	if (!winName) var winName="mywin";
	
	window.open(url,winName,'resizable=1,scrollbars=1,width='+w+',height='+h+',top='+wTop+',left='+wLeft+',directories=0,location=0,menubar=0,status=0,toolbar=0') 
}
function checkTerm(theForm) {
	if ( !validEntry(theForm.SearchText.value,3)  || theForm.SearchText.toUpperCase() == "SEARCH") { 
			theForm.SearchText.focus();
			theForm.SearchText.select();
			alert("Enter at least 3 characters for your Search");
			return false;
	}
	return true;
}
function popUpImage(sImgPath, iImgW, iImgH) {
     var sHeader = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n<title>A Larger View</title>\n</head>\n<body>\n\n"; 
     var sFooter = "</body>\n</html>";
     var oWin = window.open("about:blank", null, "width=" + (iImgW+20) + ",height=" + (iImgH+75) + ",left=50,top=50,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
     oWin.document.open();
     oWin.document.write(sHeader);
     oWin.document.write("<div align=center><IMG SRC=\"" + sImgPath + "\" width=" + iImgW + " height=" + iImgH + " border=1>\n");
     oWin.document.write("<P>");
     oWin.document.write("<a href=\"javascript:window.close();\" style=\"font-size:8pt;font-weight:normal;font-family:arial;color:blue\">close window</a></div>");
     oWin.document.write(sFooter);
     oWin.document.close();
}  
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
} 
//document.write('<script language="JavaScript" type="text/javascript" src="w3s.js"></script>'); 