var msgWindow;
function openWindow(locofwin,print){
	var width="800",height="600";
	var left=(screen.width/2) - width/2;
	var top=(screen.height/2) - height/2;
	var styleStr;
	if (print=='yes'){
		styleStr='toolbar=no,location=no,directories=no,status=no,menubar=no,dependent=no,scrollbars=no,resizable=no,copyhistory=no,width=10,height=10,left='+screen.width+',top='+screen.height+',screenX='+screen.width+',screenY='+screen.height;
	}
	else if (print=='pic'){
		width="660",height="660";
		left=(screen.width/2) - width/2;
		top=(screen.height/2) - height/2;
		styleStr='toolbar=no,location=no,directories=no,status=yes,menubar=no,dependent=no,scrollbars=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
	}
	else if (print=='admin'){
		width="screen.width";
		height="screen.height";
		styleStr='toolbar=no,location=no,directories=no,status=no,menubar=no,dependent=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height+',left=0,top=0,screenX=0,screenY=0';
	}
	else{
		styleStr='toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,dependent=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
	}
	msgWindow= open(locofwin,'Window',styleStr);
	if (print=='yes'){
		msgWindow.print();
		setTimeout("closemsg()",1000);
	}  
}

function closemsg(){
	msgWindow.close();
}

function pagelocation(){
	//alert(parent.location.href+"\n"+location.pathname+"\n"+location.protocol);
	trueloc=indexpath;
	trueloc2=indexpath2;
	loc=parent.location.pathname;
	if ((loc!=trueloc)&&(loc!=trueloc2)){
		//z=trueloc.length;
		//for (var i=0;i<=z;i++){
		//	trueloc=trueloc.replace("%20"," ");
		//}
		//d=trueloc.replace("\\index.html","");
		//z=d.lenght;
		//for (var i=0;i<=z;i++){
		//	d=d.replace('\\','\+');
		//}
		//loc=loc.replace(d,"");
		loc=loc.replace("/students/pages/","");
		parent.location.pathname=trueloc+"?p="+loc;
	}
}

var now = new Date();
var thisDate=now.getDate();
var thisMonth=now.getMonth()+1;
var thisYear=now.getYear();