function opennewwindow(mylink) {
	var new_window = window.open(mylink,"email_window","width=435,height=340");
}
function opennewwindowbig(mylink) {
	var new_window = window.open(mylink,"print_window","width=780,height=540,resizable=yes,scrollbars=yes");
}

function openCalculator(mylink) {
	var new_window = window.open(mylink,"Calculator","width=600,height=500,resizable=no,scrollbars=yes,toolbar=no,status=no,left=0,top=0");
}

// now to the last updated bit
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified)
var wday = days[dateObj.getDay() + 1]
var lmonth = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var fyear = dateObj.getYear()
if (fyear < 2000) 
fyear = fyear + 1900
var lastupdate = (wday + ", " + lmonth + " " + date + ", " + fyear)
// end of last updated bit

// Pop up window
var newWin = null;
function popUp(strURL, strType, strHeight, strWidth) {
 if (newWin != null && !newWin.closed)
   newWin.close();
 var strOptions="";
 if (strType=="console")
   strOptions="resizable,scrollbars,height="+
     strHeight+",width="+strWidth;
 if (strType=="fixed")
   strOptions="status,height="+
     strHeight+",width="+strWidth;
 if (strType=="elastic")
   strOptions="toolbar,menubar,scrollbars,"+
     "resizable,location,height="+
     strHeight+",width="+strWidth;
 newWin = window.open(strURL, 'newWin', strOptions);
 newWin.focus();
}
// end of Pop up window

// Enable links for Interactive campus map
function callJavascript(str) {
 
    if (str == "uot")
		window.open('http://www.tees.ac.uk/sections/about/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes') 
	if (str == "union")
		window.open('http://www.tees.ac.uk/sections/studentlife/students_union.cfm','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "kes")
		window.open('http://www.tees.ac.uk/sections/accommodation','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "woodlands")
		window.open('http://www.tees.ac.uk/sections/accommodation','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "parkside")
		window.open('http://www.tees.ac.uk/sections/accommodation','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "olympia")
		window.open('http://www.tees.ac.uk/sections/studentlife/sport_rec.cfm','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "athena")
		window.open('http://www.tees.ac.uk/schools/sam/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "studentcentre")
		window.open('http://www.tees.ac.uk/sections/studentsupport/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "tbs")
		window.open('http://www.tees.ac.uk/schools/tubs/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "sss")
		window.open('http://www.tees.ac.uk/schools/sssl/ ','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "centuria")
		window.open('http://www.tees.ac.uk/schools/soh/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "innovation")
		window.open('http://www.tees.ac.uk/schools/sst/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "houses")
		window.open('http://www.tees.ac.uk/sections/fulltime/accommodation.cfm','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "greig")
		window.open('http://www.tees.ac.uk/schools/scm/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
    if (str == "orion")
		window.open('http://www.tees.ac.uk/schools/sst/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes,dependant=yes') 
	if (str == "soh2")
		window.open('http://www.tees.ac.uk/schools/soh/','newwindow','menubar=yes,toolbar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes') 
	}
// end of Links

