function popUpWindow(URLStr, left, top, width, height, scroll, resize, winID)
{
	var winVar = this[winID];
	if(winVar) {
		if(!winVar.closed) winVar.close();
	}
	winVar = open(URLStr, winID, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + (scroll ? "yes" : "no") + ',resizable=' + (resize ? "yes" : "no") + ',copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	winVar.moveTo(left, top);
	winVar.focus();
}

function launchSite()
{
	var width,height,left,top;
	
	// DETERMINE WINDOW SIZE TO POP IF LARGER THAN 640, OTHERWISE DEFAULT TO HTML SITE
	if(screen.availWidth > 800){
		if( screen.availWidth >= 1024){ 
			theURL = "maing.htm"; 
			width=875;
			height=650;
		}else { 
			theURL = "mainm.htm";
			width=800;
			height=600;
		}
	}
	left=Math.round(((screen.availWidth-10)/2)-(width/2));
	top=Math.round(((screen.availHeight-29)/2)-(height/2));
	popUpWindow(theURL, left, top, width, height, false, true, "castor");
}




