var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

var line1txt = 'xxxx';
var color1, color2border, color2vis, color2inv, colorOrginal;

function changeContent(whichone){
	var oLineColor = document.getElementById("linecolor");
	var oHeaderColor = document.getElementById('header');
	var oLineColor2 = document.getElementById('feature_content');

	switch (whichone) {
		case "link1" :
		case "link2" :
		case "link4" :
			color1 = "green";
			color2border = "#93D073"
			color2vis = "#70BE40";
			color2inv = "#E7F2DC"
			colorOrginal = color2vis;
			break;
		case "link3" :
		case "link5" :
			color1 = "brown";
			color2border = "#C1986A";
			color2vis = "#814800";
			color2inv = "#F5EDE2"
			colorOrginal = color2vis;
			break;
	}
	oLineColor.style.borderColor = color2border;
	oHeaderColor.style.borderColor = color2border;
	oHeaderColor.style.color = color2border;
	oLineColor2.style.borderColor = color2border;

	var oLis = document.getElementsByTagName("a")
	for (var i=0; i < oLis.length; i++) {
		if (oLis[i].id == whichone+'a') {
			oLis[i].style.color = color2vis
		}else if (oLis[i].id.substring(0,4) == 'link'){
			oLis[i].style.color = color2inv
		}
	}
	var oImg = document.getElementsByTagName("img")
	for (var i=0; i < oImg.length; i++) {
		if (oImg[i].id == whichone+"img") {
			oImg[i].style.borderColor = color2vis
		}else {
			oImg[i].style.borderColor = color2inv
		}
	}
	var oImg = document.getElementById("bigpic")
	oImg.src = "pressroom/press0"+whichone.substring(4,5)+".jpg";
	var oImg = document.getElementById("text")
	oImg.src = "pressroom/press0"+whichone.substring(4,5)+"t.gif";
}

function hiddenall() {
	var hiddenLayer = document.getElementById("pressroom")
	hiddenLayer.style.display = "none"
}
function colorchange1(whichone){
	colorOrginal = whichone.style.color;
	whichone.style.color = color2vis;
	var oChangeImg = document.getElementById(whichone.id.substring(0,5)+"img");
	oChangeImg.style.borderColor = color2vis;
}
function colorchange1back(whichone){
	whichone.style.color = colorOrginal;
	var oChangeImg = document.getElementById(whichone.id.substring(0,5)+"img");
	oChangeImg.style.borderColor = colorOrginal;
}
function colorchange(whichone){
	var oChange = document.getElementById(whichone+"a");
	var oChangeImg = document.getElementById(whichone+"img");
	colorOrginal = oChange.style.color;
	oChange.style.color = color2vis;
	oChangeImg.style.borderColor = color2vis;
}
function colorchangeback(whichone){
	var oChange = document.getElementById(whichone+"a");
	var oChangeImg = document.getElementById(whichone+"img");
	oChange.style.color = colorOrginal;
	oChangeImg.style.borderColor = colorOrginal;
}


document.write('<div id="pressroom" style="display:none;">\
<div><a href="javascript:hiddenall();"><img id="cross" src="pressroom/cross.gif"></a></div>\
<img id="bigpic" src="pressroom/press01.jpg" width="377" height="416">\
<div id="linecolor" class="boxsize" >\
<h4 id="header">Featured News</h4>\
<ul id="textcolor">\
<li>\
<a id="link1a" href="#" onclick="changeContent(\'link1\');" onmouseover="colorchange1(this)" onmouseout="colorchange1back(this)">\
<img id="link1img" src="images/space.gif">\
<span>Speedy IT power unveiled <small>- August, 2005<br/>\
Interviewed by PCCW &lt;i.shop&gt; magazine</small></span></a>\
</li>\
<li>\
<a id="link2a" href="#" onclick="changeContent(\'link2\');" onmouseover="colorchange1(this)" onmouseout="colorchange1back(this)">\
<img id="link2img" src="images/space.gif">\
wheels and wine! <small>- Jan 14, 2005<br/>\
Mercedes-Benz & Zung Fu 50th Anniversary Party</small></a>\
</li>\
<li>\
<a id="link3a" href="#" onclick="changeContent(\'link3\');" onmouseover="colorchange(\'link3\')" onmouseout="colorchangeback(\'link3\')">\
<img id="link3img" src="images/space.gif">\
Ready to shake off those SARs blues <small>- Apr, 2003<br/>\
Speedy &quot;Stay Healthy&quot; Direct Mailer Campaign</small></a>\
</li>\
<li>\
<a id="link4a" href="#" onclick="changeContent(\'link4\');" onmouseover="colorchange(\'link4\')" onmouseout="colorchangeback(\'link4\')">\
<img id="link4img" src="images/space.gif">\
Utor lays down challenge to HK PROs <small>- Jul 13, 2001<br/>\
apr Agency Launch Party</small></a>\
</li>\
<li>\
<a id="link5a" href="#" onclick="changeContent(\'link5\');" onmouseover="colorchange(\'link5\')" onmouseout="colorchangeback(\'link5\')">\
<img id="link5img" src="images/space.gif">\
Bounce back economy brings more biz<small> - Dec 18, 2000<br/>\
EMC christmas dinner</small></a>\
</li>\
</ul>\
<div id="feature_content" >\
<img id="text" src="pressroom/press01t.gif">\
</div>\
</div>\
</div>');



function showLayer() {
	if (!ie5&&!ns6) {
//		window.open(url,"","width=width,height=height,scrollbars=1")
	} else{
		document.getElementById("pressroom").style.display='';
		changeContent('link1');
	}
}
