var highlights = new Array(3);

highlights[0] = {
	title: "Test 1",
	img: "",
	date: "",
	text: "",
	link: "" };

highlights[1] = {
	title: "Test 2",
	img: "",
	date: "",
	text: "",
	link: "" };

highlights[2] = {
	title: "Test 3",
	img: "",
	date: "",
	text: "",
	link: "" };


function initLang() {
	var root, node;
	if (document.getElementById) {
		root = document.getElementById("lang");
		for (i=0; i<root.childNodes.length; i++) {
			node = root.childNodes[i];
			if (node.nodeName=="LI" && node.firstChild.nodeName == "A") {
				switch (node.id) {
					case "lang_hk":
						node.firstChild.href = window.location.href.replace(/\/\w\w\//, "/hk/");
						break;
					case "lang_en":
						node.firstChild.href = window.location.href.replace(/\/\w\w\//, "/en/");
						break;
				}
			}
		}
	}
}

function initNav() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("sitenav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function initHighlights() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("highlights");
		if (navRoot) {
			var r = Math.random();
			/*
			document.getElementById("himg").src = "";
			document.getElementById("hdate").innerHTML = "200X-XX-XX";
			document.getElementById("htitle").innerHTML = "E-Mice website renovation";
			document.getElementById("htext").innerHTML = "<p>The Company is a member of the E-Mice Group, formed in the HKSAR in 1999 and operating in two business segments.  First, the Group is a developer of highly-specialized customer relationship management (“CRM”) software applications, primarily for some of the largest telecom services providers in Mainland China and the HKSAR.  Secondly, it is a developer and/or provider of value-added products and services (including software applications) – for Government, businesses as well as consumers – that use PKI technology to enable secure and/or authenticated communications and transaction processing across open communication networks such as the Internet.</p>";
			document.getElementById("hmore").href = "http://www.google.com";
			*/
		}
	}
}

window.onload = function () {
	initNav();
	initLang();
	initHighlights();
}