
function openWindow(url, windowname, width, height) {
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	winStats='toolbar=yes,location=yes,directories=no,menubar=yes,status=yes,'
	winStats+='scrollbars=yes,width='+width+',height='+height+',resizable=yes,'
	winStats+='top='+wint+',left='+winl
	floater=window.open(url,windowname,winStats);
	floater.focus();
}


function openWindowNoScroll(url, windowname, width, height) {
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	winStats='toolbar=no,location=no,directories=no,menubar=no,status=no,'
	winStats+='scrollbars=no,width='+width+',height='+height+',resizable=no,'
	winStats+='top='+wint+',left='+winl
	floater=window.open(url,windowname,winStats);
	floater.focus();
}


function popIfRemote(url) {
   // will open a new window if the url is not a Phoenix College url
   var width  = 920;
   var height = 700;
   var windowname = 'remotewin';

   var isPcAddress = /\.pc\.maricopa\.edu\//;

   if(isPcAddress.exec(url) == null) {
   	var winl = (screen.width - width) / 2;
   	var wint = (screen.height - height) / 2;
   	winStats='toolbar=yes,location=yes,directories=no,menubar=yes,status=yes,'
   	winStats+='scrollbars=yes,width='+width+',height='+height+',resizable=yes,'
   	winStats+='top='+wint+',left='+winl
   	floater=window.open(url,windowname,winStats);
   	floater.focus();
   	return false;

   }else{
      document.location.href = url;
   }
}

