// JavaScript Document

function over(pic, source) {
	if (document.images) pic.src = source;
}

function out(pic, source) {
	if (document.images) pic.src = source;
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function loadContent(menusite, site)
{
	
	parent.mainFrame.location.href=site;
	location.href=menusite;
}

function writeStudent(name, email, phone, nationality, group, starting, title, supervisor_1, supervisor_2, supervisor_3, image, bShowDetails, index)
{
	var code = "";
	code += "<TR bgcolor='#E5EFFF'>"; 
	if(bShowDetails)
	{
		code += "<td nowrap valign='top'><img src='pics/list.gif' align='absmiddle'><a name='goto" + index + "'href='" + self.location.pathname + "'><b>" + name + "</b></a></td>";
    	code += "<td><img src='pics/one.gif' width='20' height='1'></td>";
    	code += "<td nowrap><b>Group: </b>" + group + "</td>";
		code += "<td><img src='pics/one.gif' width='20' height='1'></td>";
    	code += "<td nowrap><b>Phone: </b>" + phone + "</td>";
    	code += "<td><img src='pics/one.gif' width='20' height='1'></td>";
    	code += "<td nowrap><b>E-mail: </b><a href='mailto:" + email + "'>" + email + "</a></td>";
		code += "</tr><tr bgcolor='#E5EFFF' valign='top'>";
		code += "<td colspan='7'><img src='pics/one.gif' width='1' height='5'></td>";
		code += "</tr><tr bgcolor='#E5EFFF' valign='top'>";
		code += "<td><img src='pics/one.gif' width='7' height='1'><img src='" + image + "'></td>";
		code += "<td><img src='pics/one.gif' width='20' height='1'></td>";
    	code += "<td colspan='5' nowrap><b>Title of thesis: </b>" + title + "<br><img src='pics/one.gif' width='1' height='5'><br>";
		code += "<b>Starting date: </b>" + starting + "<br><img src='pics/one.gif' width='1' height='5'><br>";
    	code += "<b>Nationality: </b>" + nationality + "<br><img src='pics/one.gif' width='1' height='5'><br>";
		code += "<b>1st Supervisor: </b>" + supervisor_1 +"<br><img src='pics/one.gif' width='1' height='5'><br>";
		code += "<b>2nd Supervisor: </b>" + supervisor_2 +"<br><img src='pics/one.gif' width='1' height='5'><br>";
    	code += "<b>3rd Supervisor: </b>" + supervisor_3 +"</td>";
		
	}else{
		code += "<td nowrap><img src='pics/list.gif' align='middle'><a href='" + self.location.pathname + "?" + index + "#goto" + index + "'><b>" + name + "</b></a></td>";
    	code += "<td><img src='pics/one.gif' width='20' height='1'></td>";
    	code += "<td nowrap><b>Group: </b>" + group + "</td>";
		code += "<td><img src='pics/one.gif' width='20' height='1'></td>";
    	code += "<td nowrap><b>Phone: </b>" + phone + "</td>";
    	code += "<td><img src='pics/one.gif' width='20' height='1'></td>";
    	code += "<td nowrap><b>E-mail: </b><a href='mailto:" + email + "'>" + email + "</a></td>";
	}
	code += "</TR><tr><td colspan='7' nowrap><img src='pics/one.gif' width='1' height='8'></td></tr>";
	
	document.write(code);
	//alert(code); 
}