//write the content on the page
document.writeln("<div id='contactInfo' style='position:absolute; left:20px; top:300px; visibility:visible; z-index:2'>");
document.writeln("<table>");
document.writeln("<tr><td>BW-HRMS</td></tr>");
document.writeln("<tr><td><a href=hrsoft.asp>人事管理软件介绍</a></td></tr>");
document.writeln("<tr><td><a href=hrsoft.asp>人事管理软件论坛</a></td></tr>");
document.writeln("</table></div>");

//the property of the layer
var LAYER_HEIGHT = 80;
var MIN_Y = 300;

//determine what's the browser type
var is_NS = navigator.appName == "Netscape";
var is_Ver = parseInt(navigator.appVersion);
var is_NS4 = is_NS && is_Ver >= 4 && is_Ver < 5;
var is_NS5up = is_NS && is_Ver >= 5;

placeContactInfo();

function placeContactInfo() {
	var layer = document.getElementById("contactInfo");
	var currentY;
	var availableY;

	if (is_NS4) {
		currentY = window.pageYOffset;
		availableY = window.innerHeight;
	} else {
		currentY = document.body.scrollTop;
		availableY = document.body.clientHeight;
	}

	move(layer, 20, currentY + availableY - LAYER_HEIGHT);
	setTimeout("placeContactInfo()", 20);
}

function move(object, x, y) {
	if (y < MIN_Y) {
		y = MIN_Y;
	}

	if (is_NS5up) {
		object.style.left = x + "px";
		object.style.top = y + "px";
	} else {
		object.style.pixelLeft = x;
		object.style.pixelTop = y;
	}
}
