function createSWF(filename, swfwidth, swfheight, framejump) {
	if (framejump !== "") {
		framejump = "?jumpsec="+framejump;
	}
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+swfwidth+'" height="'+swfheight+'">');
	document.write('<param name="movie" value="swf/'+filename+'.swf'+framejump+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="menu" value="false">');
	document.write('<embed src="swf/'+filename+'.swf'+framejump+'" width="'+swfwidth+'" height="'+swfheight+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" menu="false"></embed></object>');
}
function createSubSWF(frameno) {
	document.write('<div style="position: absolute; overflow: visible; z-index: 100;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="570" height="170">');
	document.write('<param name="movie" value="swf/menuAbout.swf?part='+frameno+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="menu" value="false">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="swf/menuAbout.swf?part='+frameno+'" width="570" height="170" wmode="transparent" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" menu="false"></embed></object></div>');
}
function openWindow(url, wname, wwidth, wheight) {
	var left = parseInt((screen.availWidth-wwidth)/2);
	var top = parseInt((screen.availHeight-wheight)/2);
	var windowFeatures = "width="+wwidth+",height="+wheight+",left="+left+",top="+top+",status=yes,resizable=no,scrollbars=no,location=no,toolbar=no";
	myWindow = window.open(url, wname, windowFeatures);
	void (0);
	myWindow.focus();
}
function headerMap() {
	document.write('<map name="Map"><area shape="rect" coords="0,25,100,60" href="http://www.ied.edu.hk/" target="_blank"><area shape="rect" coords="730,45,773,65" href="index.html" target="_self"><area shape="rect" coords="774,45,836,65" href="#" onClick="')
	document.write("window.open('subscription.htm','reg','width=690,height=580,top=0,status=yes,location=no,scrollbars=yes');void(0)")
	document.write('" target="_self"><area shape="rect" coords="837,45,900,65" href="contactus.htm" target="_self"></map>');
}
function writeFooter() {
	var days = new Array(8);
	days[1] = "Sunday";
	days[2] = "Monday";
	days[3] = "Tuesday";
	days[4] = "Wednesday";
	days[5] = "Thursday";
	days[6] = "Friday";
	days[7] = "Saturday";
	var months = new Array(13);
	months[1] = "January";
	months[2] = "February";
	months[3] = "March";
	months[4] = "April";
	months[5] = "May";
	months[6] = "June";
	months[7] = "July";
	months[8] = "August";
	months[9] = "September";
	months[10] = "October";
	months[11] = "November";
	months[12] = "December";
	var dateMod = new Date(document.lastModified);
	var modDay = days[dateMod.getDay()+1];
	var modMonth = months[dateMod.getMonth()+1];
	var modDate = dateMod.getDate();
	var modYear = dateMod.getYear();
	if (modYear<2000) {
		modYear = modYear+1900;
	}
	document.write('<span class="des" style="color: #666666; line-height: 150%;">&copy; '+modYear+' <a href="http://www.ied.edu.hk/" target="_blank">The Hong Kong Institute of Education</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All rights reserved&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>Last updated on '+modDate+' '+modMonth+' '+modYear+'</span>');
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_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 MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

