// ##############################
// FONT AND TABLE SECTION
// ##############################

// ns = (navigator.appName == "Netscape")? true:false

var myagent=navigator.userAgent.toLowerCase();

document.write("<style type=\"text/css\">");

document.write("A:link {color: "+csslinkcolor+"; text-decoration: none}");
document.write("A:visited { color: "+csslinkcolor+"; text-decoration: none}");
document.write("A:active { color: "+csslinkcolor+"; text-decoration: none} ");
document.write("A:hover { color: #E6A139; text-decoration: none}");

document.write(".menu A:link {color: #FFFFFF; text-decoration: none} ");
document.write(".menu A:visited { color: #FFFFFF; text-decoration: none} ");
document.write(".menu A:active { color: #FFFFFF; text-decoration: none} ");
document.write(".menu A:hover { color: #E6A139; text-decoration: none}");

document.write(".premiumright A:link {font: arial,helvetica; color: #CE9A6B; text-decoration: underline; font-weight:bold;} ");
document.write(".premiumright A:visited {font: arial,helvetica; color: #CE9A6B; text-decoration: underline; font-weight:bold;} ");
document.write(".premiumright A:active {font: arial,helvetica; color: #CE9A6B; text-decoration: underline; font-weight:bold;} ");
document.write(".premiumright A:hover {font: arial,helvetica; color: #CE9A6B; text-decoration: underline; font-weight:bold;} ");

document.write(".htic { float:left;}");
document.write(".hpic { float:right; vertical-align:middle;}");
document.write(".hprice { color:gray; margin-top:-1px; margin-bottom:1px;}");

document.write("h1 {font-size:10pt;font-weight:bold; margin-top: 0px; margin-bottom: 0px; margin-right: 6px; background-color: transparent }");
document.write("h2 {font-size:8pt; margin-top: 0px; margin-left: 10px; margin-bottom: 0px; margin-right: 0px; font-weight:normal;}");
// alert(myagent.search(/mozilla.+/));
if (myagent.search(/msie/) != -1 && myagent.search(/opera/) == -1){

document.write(".menuitem {	padding-top: 6px;	margin-left: 6px;	margin-left: 6px;	margin-right: 6px;	width: 141;	padding-bottom:6px;	border-bottom: 1px dotted #FFFFFF;	background-color: transparent }");
document.write(".menuitemlast {	padding-top: 6px;	margin-left: 6px;	width: 141px;	padding-bottom:6px;	background-color: transparent 	}");
document.write(".myheadline {	font-weight: bold; 	}");

document.write(".buttonact {background-color:"+cssmaincolor+"; padding-top:4; padding-bottom:4; padding-left:2; padding:4; text-decoration:none;}");
document.write(".menurowact {background-color:"+cssmaincolor+";}");
document.write("input {font-family:"+cssfont+"; border-color:gray; border-style:solid; border-width:1px;}");
document.write("textarea {	font-family:"+cssfont+"; border-color:gray; border-style:solid; border-width:1px;	}");
document.write("select{font-family:"+cssfont+"; border-color:gray; border-style:solid;	border-width:1px;}");
document.write("option{	font-family:"+cssfont+";	border-color:gray; border-style:solid;border-width:1px;}");
document.write(".ctd{font:10pt/12pt;color: "+cssfontcolor+";font-style:normal;font-family:"+cssfont+";}");
document.write(".ctd-leftbarbg{font:10pt/12pt;color: "+cssfontcolor+";font-style:normal;font-family:"+cssfont+"; background-image: url('../pic/menubarrasterfill.gif'); background-color:"+cssmaincolor+";}");
document.write(".ctd-tt{font:10pt/12pt;color: #FFFFFF;background-color: "+cssmaincolor+";font-style:normal;font-weight:bold;font-family:"+cssfont+";}");
document.write(".ctd-bg{font:10pt/12pt;color: "+cssfontcolor+";background-color: "+csstablecolor+";font-style:normal;font-family:"+cssfont+";}");
document.write(".ctd-hp{font:10pt/12pt;color: "+cssfontcolor+";font-style:normal;font-family:"+cssfont+"; background-color:#EFEFEF; dummybackground-image: url('../pic/community_bg_semitrans.gif');}");

document.write(".staticinput {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:305px; color:gray;}");
document.write(".staticinputshort {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:209px; color:gray;}");
document.write(".staticinputcur {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:28px; color:gray; margin-right:2px;}");

}

else if (myagent.search(/mozilla.+/) != -1){

	// preserve opera's native form element borders
	if (myagent.search(/opera.+/) != -1){
		document.write("input {font-size:10pt; font-family:"+cssfont+";}");
		document.write("select{font-size:10pt; font-family:"+cssfont+";}");
		document.write("textarea {font-size:10pt; font-family:"+cssfont+"; }"); 
		}
	else
		{ 
		document.write("input {font-size:10pt; font-family:"+cssfont+"; border-color:gray; border-style:solid; border-width:1px; }");
		document.write("select{font-size:10pt; font-family:"+cssfont+"; border-color:gray; border-style:solid;	border-width:1px;}");
		document.write("textarea {font-size:10pt; font-family:"+cssfont+"; border-color:gray;border-style:solid; border-width:1px;	}");
		}


document.write(".staticinput {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:305px; color:gray;}");
document.write(".staticinputshort {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:209px; color:gray;}");
document.write(".staticinputcur {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:28px; color:gray; margin-right:3px;}");

document.write(".menuitem {	padding-top: 6px;	margin-left: 6px;	margin-left: 6px;	margin-right: 6px;	width: 141;	padding-bottom:6px;	border-bottom: 1px dotted #FFFFFF;	background-color: transparent }");
document.write(".menuitemlast {	padding-top: 6px;	margin-left: 6px;	width: 141px;	padding-bottom:6px;	background-color: transparent 	}");
document.write(".myheadline {	font-weight: bold; 	}");
document.write(".buttonact {background-color:"+cssmaincolor+"; padding-top:4; padding-bottom:4; padding-left:2; padding:4; text-decoration:none;}");
document.write(".menurowact {background-color:"+cssmaincolor+";}");
document.write("option{font-size:10pt; font-family:"+cssfont+"; border-color:gray; }");
document.write(".ctd{font-size:10pt;letter-spacing:0;color:  "+cssfontcolor+";font-style:normal;font-family:"+cssfont+";}");
document.write(".ctd-leftbarbg{font-size:10pt;letter-spacing:0;color: "+cssfontcolor+";font-style:normal;font-family:"+cssfont+"; background-image: url('../pic/menubarrasterfill.gif'); background-color:"+cssmaincolor+";}");
document.write(".ctd-tt{	font-size:10pt;	letter-spacing:;color: #FFFFFF;	background-color: "+cssmaincolor+";font-style:normal;font-weight:bold;font-family:"+cssfont+";}");
document.write(".ctd-bg{font-size:10pt;	letter-spacing:0;	color:  "+cssfontcolor+";	font-style:normal;	font-family:"+cssfont+";	background-color: "+csstablecolor+";}");
document.write(".ctd-hp{font-size:10pt;letter-spacing:0;color:  "+cssfontcolor+";font-style:normal;font-family:"+cssfont+"; background-color:#EFEFEF;}");
}

else{
document.write(".staticinput {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:305px; color:gray;}");
document.write(".staticinputshort {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:209px; color:gray;}");
document.write(".staticinputcur {border-color:gray; border-style:solid; border-width:1px; background-color: #FFFFFF; padding:1; width:28px; color:gray; margin-right:3px;}");

document.write(".menuitem {	padding-top: 6px;	margin-left: 6px;	margin-left: 6px;	margin-right: 6px;	width: 141;	padding-bottom:6px;	border-bottom: 1px dotted #FFFFFF;	background-color: transparent }");
document.write(".menuitemlast {	padding-top: 6px;	margin-left: 6px;	width: 141px;	padding-bottom:6px;	background-color: transparent 	}");
document.write(".myheadline {	font-weight: bold; 	}");
document.write("input { border-style:solid; border-color:gray; border-width:1px; font:'<?=$cssfont?>'; }");
document.write("textarea {border-style:solid; border-color:gray; border-width:1px; font:<?=$cssfont?>; }");
document.write("a.button {width:100%; text-decoration:none;}");
document.write("span.buttonact {width:100%; background-color:"+cssmaincolor+"; text-decoration:none;}");
document.write(".ctd{font-size:10pt;color: "+cssfontcolor+";font-style:normal;font-family:"+cssfont+";}");
document.write(".ctd-leftbarbg{font:10pt;color: "+cssfontcolor+";font-style:normal;font-family:"+cssfont+"; background-image: url('../pic/menubarrasterfill.gif'); background-color:"+cssmaincolor+";}");
document.write(".ctd-tt{	font-size:10pt;	color: #FFFFFF;	background-color: "+cssmaincolor+";font-style:normal;font-weight:bold;font-family:"+cssfont+";}");
document.write(".ctd-bg{font-size:10pt; color: "+cssfontcolor+";	font-style:normal;	font-family:"+cssfont+";	background-color: "+csstablecolor+";}");
}
document.write(".ctd-hp{font-size:10pt;color: "+cssfontcolor+";font-style:normal;font-family:"+cssfont+"; background-color:#EFEFEF;}");
document.write("</style>");


// ##############################
// ROW HIGHLIGHT SECTION
// ##############################

function RowOn(Row)
{
  Row.style.backgroundColor = "#EFEFEF"
  Row.style.color = "#FFFFFF"
  Row.style.cursor = document.all ? "hand" : "pointer" // set "hand" for ie "pointer" for the rest
}
function RowOff(Row)
{
  Row.style.backgroundColor = "#FFFFFF"
  Row.style.color = cssmaincolor;
}

// ##############################
// CLOCK SECTION
// ##############################

	function show_clock(servermillisecs,serverdate) {
//	if (!document.layers&&!document.all&&!document.getElementByID) return // browsers below version 4 won't see anything

		//show clock in NS 4
		if (document.layers)
                document.ClockPosNS.visibility="show"
		if (old == "die") { return; }

//		var summertime = '<? echo date("I",mktime()); ?>';
		var summertime = '';

		if (!servermillisecs) 
		{
			var servermillisecs = serverdate.getTime();
		}

		servermillisecs = servermillisecs + 1000;
		serverdate.setTime(servermillisecs);

/** set hours for chinese city **/
//		if (summertime)	var hours = serverdate.getHours()+6;
//		if (!summertime)	var hours = serverdate.getHours()+7;
		var hours = serverdate.getHours();

/** set hours for european city **/
		var hours2 = serverdate.getHours()+24-7;
		
		var minutes = serverdate.getMinutes();
		var seconds = serverdate.getSeconds();


		if (hours >= 24) { hours = hours-24; }
		if (hours2 >= 24) { hours2 = hours2-24; }

		if (hours <= 9) { hours = "0"+hours; }
		if (hours2 <= 9) { hours2 = "0"+hours2; }

		if (minutes <= 9) { minutes = "0"+minutes; }
		if (seconds <= 9) { seconds = "0"+seconds; }



		myclock = '';
		myclock += '<table border=0 cellspacing=1 align=right style="letter-spacing:1.3; color:'+myfont_color+'; font-family:'+myfont_face+'; font-size:'+myfont_size+'pt;"><tr><td nowrap>';
		myclock += chincity+' ';
		myclock += hours+':'+minutes+':'+seconds+' ';
		myclock += ' </td><td nowrap> > </td><td nowrap>';
		myclock += eurcity+' ';
		myclock += hours2+':'+minutes+':'+seconds+' ';
		myclock += '</td></tr>'+logrow+'</table>';


		if (old == "true") {
			document.write(myclock);
			old = "die"; return;
		}

		if (document.layers) {
			clockpos = document.ClockPosNS;
			liveclock = clockpos.document.LiveClockNS;
			liveclock.document.write(myclock);
			liveclock.document.close();
		} else if (document.all) {
			LiveClockIE.innerHTML = myclock;
		} else if (document.getElementById) {
			document.getElementById("LiveClockIE").innerHTML=myclock;
		}

		setTimeout("show_clock("+servermillisecs+",serverdate)",1000);
}
