/* script to turn tab text images on/off */

//if (document.images)
//{
//  history_off= new Image(50,14); 
//  history_off.src="images/nav_ctuhistory.gif";
//  
//  history_on= new Image(50,14); 
//  history_on.src="images/nav_ctuhistory_on.gif";  
//  
//  bachelors_off= new Image(143,14); 
//  bachelors_off.src="images/nav_bachelors.gif";
//  
//  bachelors_on= new Image(143,14); 
//  bachelors_on.src="images/nav_bachelors_on.gif";
//  
//  masters_off= new Image(126,14); 
//  masters_off.src="images/nav_masters.gif";
//  
//  masters_on= new Image(126,14); 
//  masters_on.src="images/nav_masters_on.gif";
//
//}

/************************* show/hide tabs **************************/
//last_tab = "history";
//
//function show(layerName) {
//	document.getElementById(layerName).style.display = "";
//}
//
//function hide(layerName) {
//	document.getElementById(layerName).style.display = "none";
//}
//
//function showImg(layerName) {
//	if (document.images) {
//		document[layerName].src= eval(layerName + "_on.src");
//	}
//}
//
//function hideImg(layerName) {
//	if (document.images) {
//		document[layerName].src= eval(layerName + "_off.src");
//	}	
//}
//
//function show_next(tab_name) {
//	document.getElementById(last_tab).className = "tab";
//	var curr = document.getElementById(tab_name);
//	curr.className="selected";
//	hide(last_tab+"_data");
//	show(tab_name+"_data");
//	if (last_tab!="results") {
//		hideImg(last_tab);
//	}
//	showImg(tab_name);	
//	last_tab=tab_name;
//}


/* popup windows */

function open_desc(URL,name,h) {
	window.open(URL,name,"resizable,width=250,height=" + h + "")
}

function open_degree(URL,name) {
	window.open(URL,name,"resizable,scrollbars=yes,width=480,height=450")
}


function open_window(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*remember form data on refresh*/
function setCookie(name, value, expire) 
	{
	    strCookie = name + "=" + escape(value);
	    if (expire)
	        strCookie += "; expires=" + expire.toGMTString();	
	    document.cookie = strCookie;
	}

function saveValue(txtBox)
	{
		setCookie(txtBox.name,txtBox.value);
	}