 
function writeHeader() {

document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write(' <td width="235" height="101" align="left" valign="top" bgcolor="#F1F2EC"><img src="/acadaff/images/top_2.jpg" width="211" height="101"></td>');
document.write('<td height="101" align="left" valign="bottom" bgcolor="#F1F2EC"><a href="/acadaff"><img src="/acadaff/images/title.gif" alt="Academic Affairs Office" width="399" height="54" hspace="10" border="0"></a></td>');
document.write('<td width="186" height=101" align="right" valign="top" bgcolor="#F1F2EC"><a href="/"><img src="/acadaff/images/wis.gif" alt="Weizmann Institute of Science" width="186" height="41" vspace="3" border="0"></a></td>');
document.write('</tr><tr>');
document.write('<td width="235" height="6" align="left" valign="top"><img src="/acadaff/images/h_bot_l.gif" width="235" height="6"></td>');
document.write('<td width="100%" height="6" background="/acadaff/images/bc_h_bot.gif"><img src="/acadaff/images/spacer.gif" width="283" height="6"></td>');
document.write('<td height="6" align="right" valign="top"><img src="/acadaff/images/hd_bt_r.gif" width="220" height="6"></td>');
document.write('</tr> </table>');
//document.write('<blockquote>');
//document.write('<div align="right">');
//document.write('<a href="/cgi-bin/print_nonav.pl?home=home.html">Printer friendly version</a><br>');
//document.write('</div>');
//document.write('</blockquote>');
}

function writeFooter() {
	
 document.write('<table width="100%" height="66" border="0" cellspacing="0" cellpadding="0"><tr>');
 
document.write('<td width="100%" colspan="2" height="6" align="left" valign="top" background="/acadaff/images/bc_foot.gif"><img src="/acadaff/images/spacer.gif" width="220" height="6"></td>');
document.write('</tr><tr>');
document.write('<td width="210" height="60" valign="top"><a href="/acadaff/as-staff.html"><img src="/acadaff/images/foot.jpg" width="210" height="60" border="0"></a></td>');
document.write('<td width="100%">');
document.write('<font class="footcolor" size="-1"><a href="/homepage/pages/acdir_home.shtml">Directorate for Research and Academic Affairs</a><br>');
document.write('<a href="/acadaff/">Academic Affairs Office</a>,&nbsp;<a href="/">Weizmann Institute of Science</a>,&nbsp;');
document.write('P.O.Box 26, Rehovot 76100, Israel<br>');
document.write('Comments and suggestions to <a href="mailto:academic.affairs@weizmann.ac.il">academic.affairs@weizmann.ac.il</a> &nbsp; Tel: &#43;972-8-934-3860 &nbsp; Fax: &#43;972-8-934-4492<br>');
document.write('Last Updated: ');
document.write(document.lastModified);
document.write('</font></td>');
document.write('</tr></table>');

}

//-----------------------------------------------------------------
//  closeAll global function
//-----------------------------------------------------------------
//Closes the table/page for the navigation bar
function closeAll(closeHt) {
	document.write('</td></tr></table>'); 
  }	

//-----------------------------------------------------------------
//  writeSciacIndex(indexyear)
//-----------------------------------------------------------------
//used for adding arrow backward,forward by year for current research (same as for sci-avtivities)
function writeCurrIndex(indexyear){
	var nextyear =  parseInt(indexyear) +1;
	var privyear =  nextyear-2;
	var indexurl = "/acadaff/Current_Research/" + indexyear;

	document.write('<table  border="0" cellspacing="0" cellpadding="0" height="47">'); 
	document.write('<tr>');   
	document.write('<td width="23" align="left" valign="top" >');  //background="/acadaff/Current_Research/images/bc_nav.gif"
  // handle priv:  till back 2000
 	var thePurl = "/acadaff/Current_Research/"  + privyear + "/" ;
  //alert("privurl:"+thePurl);
  if ( privyear < 2000){ // no priv disp off
			document.write('<img src="/acadaff/Scientific_Activities/images/prev_year_off.gif" width="23" height="21">');
	}
	else{
			document.write('<a href="' +thePurl +'"><img src="/acadaff/Scientific_Activities/images/prev_year.gif" width="23" height="21" border=0></a>');
	}
	document.write('</td><td width="33" align="left" valign="top" >');
	
//	document.write(indexyear + '</td>');
	document.write('<img src="/acadaff/Scientific_Activities/images/nav_year.gif" width="33" height="21" /></td>');
 //handel next, For NEXT YEAR we make the decfiion to have it OFF or ON here by testing the currnt year
 	var curdate = new Date();
	var thisyear = curdate.getFullYear();
	var theurl = "/acadaff/Current_Research/"  + nextyear + "/" ;
	if (nextyear <= thisyear){  		// we are after the index year so we should have already next
			document.write('<td width="23" align="left" valign="top" > <a href="' +theurl +'"><img src="/acadaff/Scientific_Activities/images/next_year.gif" width="23" height="21" border=0 >'+ '</a>'+'</td>');
	}
	else{														// off link grayed off arrow
	document.write('<td width="23" align="left" valign="top" ><img src="/acadaff/Scientific_Activities/images/next_year_off.gif" width="23" height="21" /></td>');
  }	
  	document.write('</td></tr></table>');	

}

//-----------------------------------------------------------------
//  writeSciacIndex(indexyear)
//-----------------------------------------------------------------
//used for adding arrow backward,forward by year for sci-avtivities
function writeSciacIndex(indexyear){
	var nextyear =  parseInt(indexyear) +1;
	var privyear =  nextyear-2;
	var indexurl = "/acadaff/Scientific_Activities/" + indexyear;
	document.write('<table  border="0" cellspacing="0" cellpadding="0" height="47">'); 
	document.write('<tr>');   
	document.write('<td width="23" align="left" valign="top" >');  //background="/acadaff/Scientific_Activities/images/bc_nav.gif"
  // handle priv:  till back 2000
 	var thePurl = "/acadaff/Scientific_Activities/"  + privyear + "/" ;
  //alert("privurl:"+thePurl);
  if ( privyear < 2000){ // no priv disp off
			document.write('<img src="/acadaff/Scientific_Activities/images/prev_year_off.gif" width="23" height="21">');
	}
	else{
			document.write('<a href="' +thePurl +'"><img src="/acadaff/Scientific_Activities/images/prev_year.gif" width="23" height="21" border=0></a>');
	}
	document.write('</td><td width="33" align="left" valign="top" >');
	document.write('<img src="/acadaff/Scientific_Activities/images/nav_year.gif" width="33" height="21" /></td>');
 //handel next, For NEXT YEAR we make the decfiion to have it OFF or ON here by testing the currnt year
 	var curdate = new Date();
	var thisyear = curdate.getFullYear();
	var theurl = "/acadaff/Scientific_Activities/"  + nextyear + "/" ;
	if (nextyear < thisyear){  		// we are after the index year so we should have already next
			document.write('<td width="23" align="left" valign="top" > <a href="' +theurl +'"><img src="/acadaff/Scientific_Activities/images/next_year.gif" width="23" height="21" border=0 >'+ '</a>'+'</td>');
	}
	else{														// off link grayed off arrow
	document.write('<td width="23" align="left" valign="top" ><img src="/acadaff/Scientific_Activities/images/next_year_off.gif" width="23" height="21" /></td>');
  }	
  	document.write('</td></tr></table>');	
}
