﻿// JavaScript Document<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="627" height="50">

function writeTodaiMenu1(){
	document.write('<param name="movie" value="images/todai_menu.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<embed src="images/todai_menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="627" height="50"></embed></object>');
}

function writeTodaiMenu2(){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="630" height="50">');
	document.write('<param name="movie" value="images/todai_menu3.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<embed src="images/todai_menu2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="630" height="50"></embed></object>');
}

function writeTodaiMenu3(){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="630" height="50">');
	document.write('<param name="movie" value="images/todai_menu4.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<embed src="images/todai_menu2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="630" height="50"></embed></object>');
}

function SetProfName ( name ){
	document.cookie = "profname=" + name;
}

function GetProfName (){
	var allcookies = document.cookie;
	var pos = allcookies.indexOf("profname=");
	
	if (pos == -1){
		alert("no cookie!");
		return;
	}
	
	var start = pos + 9;
	var end = allcookies.indexOf(";", start);
	if (end == -1){
		end = allcookies.length;
	}

	var profname = allcookies.substring(start, end);

	var buffer = '<iframe frameborder="0" name="professor" src="' + profname + '" width=500" height="1800"></iframe>';
	document.write(buffer);
}
