function setText(string) {
	document.getElementById('pt_app_hover_text').innerHTML = string;
}

function clearText() {
	document.getElementById('pt_app_hover_text').innerHTML = "";
}

function openNewWindow(string) {
	popupWin = window.open(string, 'open_window', 'menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=1024, height=640, left=0, top=0')
}

function openFixedWindow(URL, widthInPX, heightInPX) {
	popupWin = window.open(URL, 'open_window', 'scrollbars, resizable, dependent, width='+widthInPX+', height='+heightInPX+', left=0, top=0')
}

function relocate() {
	var file_name = document.location.href;
	var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	openFixedWindow("http://career.ucsd.edu/feedback/index.aspx?fromPage=" + file_name, 596, 650);
}

function openPage(link) {
	var redirection_url = "http://career.ucsd.edu/stats.html";
	var going_to        = "?to=" + link;
	var coming_from     = "&from=" + document.location.href;	
	openNewWindow(redirection_url + going_to + coming_from);	
}

function adjustLayout() {
	var lHeight = document.getElementById("left_window").offsetHeight;
	var cHeight = document.getElementById("main_window").offsetHeight;
	var rHeight = document.getElementById("right_window").offsetHeight;

	var maxHeight = Math.max(cHeight, Math.max(lHeight, rHeight));

	document.getElementById("left_window").style.height  = maxHeight;
	document.getElementById("main_window").style.height  = maxHeight;
	document.getElementById("right_window").style.height = maxHeight;
}


