<!-- Begin
bottomBar = "logo";
movex = 0;
movey = 0;
xdiff = 0;
ydiff = 0;
ystart = 0;
xstart = 0;

function writeBottomBar() {
	var textContent = "<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor=\"#990000\" height=\"12\">\n";
		textContent += "<tr>\n";
		textContent += "<td width=\"342\" align=\"left\" valign=\"top\">\n";
		textContent += "<A href=\"http://www.polyu.edu.hk\"><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#FFFFFF\"><img src=\"http://www.polyu.edu.hk/cpa/bottom_bar/bottom_logo.gif\" width=\"342\" height=\"12\" border=\"0\" valign=\"top\"></font></A>\n";
		textContent += "<td width=\"100%\">&nbsp;</td>";
		textContent += "<td width=\"47\" align=\"left\" valign=\"top\">\n";
		textContent += "<A href=\"http://www.polyu.edu.hk\"><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#FFFFFF\"><img src=\"http://www.polyu.edu.hk/cpa/bottom_bar/bottom_home.gif\" width=\"47\" height=\"12\" border=\"0\" valign=\"top\"></font></A>\n";
		textContent += "</td>\n";
		textContent += "</tr>\n";
		textContent += "</table>\n";

	if (document.layers)
	{
		document.writeln("<layer id=\""+bottomBar+"\" visibility=show left=0px top=200px height=10 z-index=9\">");
		document.writeln(textContent);
		document.writeln("</layer>");
		
	}
	else 
	{
		document.writeln("<div id=\""+bottomBar+"\" style=\"position:absolute; visibility:show; left:0px; top:200px; height:12px; z-index:9\">");
		document.writeln(textContent);
		document.writeln("</div>");
	}
}

function setVariables() {
	if (navigator.appName == "Netscape") {
		v = ".top=";
		h = ".left=";
		dS = "document.";
		sD = "";
		y = "window.pageYOffset";
		x = "window.pageXOffset";
		iW = "window.innerWidth";
		iH = "window.innerHeight";
	}
	else {
		h = ".pixelLeft=";
		v = ".pixelTop=";
		dS = "";
		sD = ".style";
		y = "document.body.scrollTop";
		x = "document.body.scrollLeft";
		iW = "document.body.clientWidth";
		iH = "document.body.clientHeight";
	}
	xyz = 500;
	innerX = 0;//eval(iW) - 175;
	innerY = eval(iH)-20;//eval(iH) - 110;
	object = bottomBar;
	checkLocationA();
//	alert("innerX="+innerX+", innerY="+innerY);
}

function checkLocation() {
	yy = eval(y);
	xx = eval(x);
	ydiff = ystart - yy;
	xdiff = xstart - xx;

//alert("checkLocation, ystart="+ystart+" document.body.scrollTop="+eval(y));
//alert("ydiff=ystart-scorllTop="+ystart+"-"+yy+"="+ydiff);
	
	if ((ydiff < (-1)) || (ydiff > (1))) movey = Math.round(ydiff / 2), ystart -= movey;
//alert("movey="+movey+"\nystart="+ystart);	
//alert(dS + object + sD + v + (ystart + innerY));
	eval(dS + object + sD + v + (ystart + innerY));

	if ((xdiff < (-1)) || (xdiff > (1))) movex = Math.round(xdiff / 10), xstart -= movex;
	eval(dS + object + sD + h + (xstart + innerX));  // x always = 0;
	setTimeout("checkLocation()", 10);
}

function checkLocationA() {
	ystart = eval(y);
	xstart=eval(x);
//	alert("ystart="+ystart+", xstart="+xstart);
}
//  End -->
