document.write("<script language=Javascript src='/tsnmain/js/corpbar.js'></script>");
<!--if (! (RN))
 //TSN FIXAD
var adMap = new Object();
//Top
adMap["acrhive,top"]  = 1;
adMap["charity,top"]  = 1;
adMap["forum,top"] 		= 1;
adMap["polling,top"]  = 1;
//Right
adMap["archive,right"]  = 1;
adMap["forum,right"]    = 1;
adMap["polling,right"]  = 1;
adMap["charity,right"]  = 1;
adMap["adult,right"]    = 1;
adMap["av,right"]       = 1;
adMap["car,right"]      = 1;
adMap["computer,right"] = 1;
adMap["ent,right"]      = 1;
adMap["fashion,right"]  = 1;
adMap["fina,right"]     = 1;
adMap["game,right"]     = 1;
adMap["mystery,right"]  = 1;
adMap["news,right"]     = 1;
adMap["sport,right"]    = 1;
adMap["tarvel,right"]   = 1;
adMap["charity,right"]  = 1;
adMap["racing,right"]  = 1;
adMap["energy,right"]  = 1;
adMap["mobile,right"]  = 1;
adMap["man,right"]  = 1;
adMap["family,right"]  = 1;
adMap["weekend,right"]  = 1;
adMap["macau,right"]  = 1;
adMap["food,right"]  = 1;
adMap["fea,right"]  = 1;
adMap["search,right"]  = 1;
adMap["hotline,right"]  = 1;
adMap["contactus,right"]  = 1;
//x25
adMap["archive,x25"]  = 1;
adMap["forum,x25"]    = 1;
adMap["polling,x25"]  = 1;
adMap["charity,x25"]  = 1;
adMap["adult,x25"]    = 1;
adMap["av,x25"]       = 1;
adMap["car,x25"]      = 1;
adMap["computer,x25"] = 1;
adMap["ent,x25"]      = 1;
adMap["fashion,x25"]  = 1;
adMap["fina,x25"]     = 1;
adMap["game,x25"]     = 1;
adMap["mystery,x25"]  = 1;
adMap["news,x25"]     = 1;
adMap["sport,x25"]    = 1;
adMap["tarvel,x25"]   = 1;
adMap["charity,x25"]  = 1;
adMap["racing,x25"]  = 1;
adMap["energy,x25"]  = 1;
adMap["mobile,x25"]  = 1;
adMap["man,x25"]  = 1;
adMap["family,x25"]  = 1;
adMap["weekend,x25"]  = 1;
adMap["macau,x25"]  = 1;
adMap["food,x25"]  = 1;
adMap["fea,x25"]  = 1;
adMap["search,x25"]  = 1;
adMap["hotline,x25"]  = 1;
adMap["contactus,x25"]  = 1;
//x26
adMap["archive,x26"]  = 1;
adMap["forum,x26"]    = 1;
adMap["polling,x26"]  = 1;
adMap["charity,x26"]  = 1;
adMap["adult,x26"]    = 1;
adMap["av,x26"]       = 1;
adMap["car,x26"]      = 1;
adMap["computer,x26"] = 1;
adMap["ent,x26"]      = 1;
adMap["fashion,x26"]  = 1;
adMap["fina,x26"]     = 1;
adMap["game,x26"]     = 1;
adMap["mystery,x26"]  = 1;
adMap["news,x26"]     = 1;
adMap["sport,x26"]    = 1;
adMap["tarvel,x26"]   = 1;
adMap["charity,x26"]  = 1;
adMap["racing,x26"]  = 1;
adMap["energy,x26"]  = 1;
adMap["mobile,x26"]  = 1;
adMap["man,x26"]  = 1;
adMap["family,x26"]  = 1;
adMap["weekend,x26"]  = 1;
adMap["macau,x26"]  = 1;
adMap["food,x26"]  = 1;
adMap["fea,x26"]  = 1;
adMap["search,x26"]  = 1;
adMap["hotline,x26"]  = 1;
adMap["contactus,x26"]  = 1;
{
	var RN = new String (Math.random());
	var RNS = RN.substring (2,11);
}

var fixAdServer = "ad2.on.cc";

function showbanner (page, position, width, height)
{
	var _version='11';

	var site = 'www.the-sun.com.hk';
	var server = '210.177.167.145';
	if (navigator.userAgent.indexOf('Mozilla/3') != -1) {

		_version='10';

	}

	var oas='http://' + server + '/RealMedia/ads/' ;

	var oaspage= site + '/' + page + '/1' + RNS + '@' + position;


	var isFixAd ;											//RECORD RECEIVE PAGE AND POSITION IS FIXAD OR BANNER AD

	index = page.indexOf("_");				//GET THE "_" TO SPLIT THE PAGE eg adult_h , news_h , news_i
	if(index > 0){										//IF "_" FIND IN THE PAGE
		page = page.substring(0,index);	//GET THE STRING BEFORE "_" eg . adult , news
	}

	check = page +','+position.toLowerCase();
	if (adMap[check]){								//CHECK WHETHER THE PAGE AND POSITION IS FIXAD OR BANNER AD
		isFixAd = 1;
	}else{
		isFixAd = 0;
	}

	if(isFixAd){

		var advPosition = position.toLowerCase();
		eval("var jsfile = 'tsn_" + page + "_" + advPosition +"'");
		document.write("<script language=Javascript src='http://"+ fixAdServer +"/html/"+jsfile+".js'></script>");
	}
	else{

		if (position == 'BottomLeft') {

			document.write('<a href ="http://the-sun.on.cc/advertisers/page_click_01.html" target="_blank"><img src="/adv/tsn_103.gif" width=103 height=60 border=0></a>');

		} else if (position == 'Bottom1') {

			document.write('<a href ="http://the-sun.on.cc/advertisers/page_click_02.html" target="_blank"><img src="/adv/football_103.gif" width=103 height=60 border=0></a>');

		 }else if (position == 'Bottom2') {

			document.write('<a href ="http://the-sun.on.cc/advertisers/page_click_03.html" target="_blank"><img src="/adv/racing_103.gif" width=103 height=60 border=0></a>');

		} else if (position == 'Bottom3') {

			document.write('<a href ="http://the-sun.on.cc/advertisers/page_click_04.html" target="_blank"><img src="/adv/recruit_103.gif" width=103 height=60 border=0></a>');

		} else if (position == 'BottomRight') {

			document.write('<a href ="http://the-sun.on.cc/advertisers/page_click_05.html" target="_blank"><img src="/adv/look_103.gif" width=103 height=60 border=0></a>');
		} else if (_version < 11) {

	                document.write ('<A HREF=' + oas + 'click_nx.ads/' + oaspage + 'TARGET ="_blank" ><IMG SRC="' + oas + 'adstream_nx.ads/' + oaspage + '" BORDER= "0" WIDTH="' + width + '" HEIGHT="' + height + '" ALT=" "></a>');

		}else {

			document.write ('<SCRIPT LANGUAGE="JavaScript1.1" SRC="' + oas +  'adstream_jx.ads/' + oaspage + '">' );

			document.write ('\<\!-- --\>');

			document.write ('\<\/SCRIPT\>');

			document.write ('\<\!-- --\>');

		}
	} // CALL BANNER AD
}

// -->


function print_bottom() {
	document.write("<script>var pub='tsn';</script>");
	document.write("<script>pyear(pub);</script>");
}

function print_menu() {
        var menu = "<a href=/news/ncbrkz0001x0.html target=_top><font color=000000>即時新聞</font></a>｜ "+
        "<a href=/ncfeature/sup/current/ncsupa00_idx.html target=_top><font color=000000>時事專輯</font></a> ｜ "+
        "<a href=/ncfeature/foc/current/ncfoca00_idx.html target=_top><font color=000000>報章頭條</font></a> ｜ "+
        "<a href=/ncfeature/old/current/ncolda00_idx.html target=_top><font color=000000>當年今日</font></a> ｜"+
        "<a href=/ncfeature/pol/ncpola00_idx.html target=_top><font color=000000>投票中心</font></a>｜"+
        "<a href=/ncfeature/dat/current/ncdata00_idx.html target=_top><font color=000000>常用資料</font></a><br>"+
        "<a href=/news/ncbrkz0001x0.html target=_top><font color=000000>總覽</font></a> ｜ "+
        "<a href=/hknews/index.html target=_top><font color=000000>港聞</font></a> ｜"+
        "<a href=/fin/index.html target=_top><font color=000000>財經</font></a> ｜"+
        "<a href=/china/index.html target=_top><font color=000000>兩岸</font></a> ｜"+
        "<a href=/int/index.html target=_top><font color=000000>國際</font></a> ｜"+
        "<a href=/ent/index.html target=_top><font color=000000>娛樂</font></a> ｜"+
        "<a href=/horse/index.html target=_top><font color=000000>馬訊</font></a> ｜"+
        "<a href=/sports/index.html target=_top><font color=000000>體育</font></a><br>"+
        "<a href=/faq/hkfonts_bottom.html><font color=000000>下載字庫</font></font></a>｜" +
        "<a href=/faq/><font color=000000>常見問題</font></a> <br><br>";
        document.write(menu);
}
function print_rj_backtomainpage() {
	var tomainpage = "<br><a href=/cgi-bin/racing/index.cgi><img src=/racing/img/gohome.gif width=64 height=11 border=0></a> " +
		"<a href=#top><img src=/racing/img/gotop.gif width=63 height=11 border=0></a><br><br>" +
		"<font size=-1>on.cc所提供之資訊概以較新版本為準，並已力求精確可靠，但不保證絕對無誤。<br>資料只供參考用途，如有錯漏而導致閣下蒙受損失，本公司概不負責。</font><br><br>" ;

	document.write(tomainpage);
}
function chgad(item){
	parent[0].location=item; 
}
function minwin(link, width, height) {
	window.open(link,'popup','location=no,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=yes,width='+width+',height='+height);
}
function popupwin(link, width, height) {
	window.open(link,'popupdetail','location=no,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=yes,width='+width+',height='+height);
}
function formaction2(currDate,sect,file) {
abc = '';
kk = '<title></title><body  bgcolor="white"><center><a href="javascript:top.window.close();"><img src="../../'+ sect + '/' + currDate + '/img/' + file + '" border=0></a></center></body></html>';
msgWin = window.open(abc, 'formwin', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=500,height=500');
msgWin.focus();
msgWin.document.write(kk);
msgWin.document.close();
}

function photoPopup(currDate,  sect,  file) {
        var popupURLStr = '';
        popupURLStr += '/channels/photoPopup.html?c='+currDate+'&s='+sect+'&f='+file+'&r='+(Math.random()*10000000000000000);        var msgWin = window.open(popupURLStr, 'formwin', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes');
        msgWin.focus();
        msgWin.document.close();
}


function print_bottom_menu(yyyymmdd) {
	document.write("<script>var pub='tsn';</script>");
	document.write("<script>pbmenu(pub);</script>");
	// CONTENT TEXT AD
	chgContent();
}
function gotonews(theForm) {
	if ((theForm.date[theForm.date.selectedIndex].value!="0")&&theForm.date[theForm.date.selectedIndex].value!="") {
		document.location = theForm.date[theForm.date.selectedIndex].value;
	}
}
function reload_ad_frame(ad_page) {
	if (parent.length > 0) {
		ad_page = "../../../advertisers/" + ad_page + "";
		parent[0].location = ad_page;
	}
}
function overture_search(id, numOfCol) {
if (id != null) {
	document.write( '<SCRIPT type="text/javascript" language="javascript"');
	
	//document.write( 'SRC="http://cmhtml.hk.overture.com/d/search/p/standard/hk/js/flat/ctxt/rlb/?Partner=orisun_hk_ctxt&accountFilters=orientaldaily_hk&ctxtId=' + id + '&maxCount=' + numOfCol + '">');
	//document.write( 'SRC="http://cm.hk.overture.com/js_flat_1_0/?config=3269468278&source=orisun_hk_ctxt&ctxtId=' + id + '&maxCount=' + numOfCol + '">');
	document.write( 'SRC="http://cmh.hk.overture.com/js_flat_1_0/?config=3269468278&source=orisun_hk_ctxt&ctxtId=' + id + '&maxCount=' + numOfCol + '&serveUrl=the-sun.on.cc">');
	
	document.write( '</SCRIPT>');
}
}
function print_overture_result() {
var i=6;
if (typeof(zSr) != "undefined") {
document.write('<table bgcolor="#CCCCCC" cellpadding="5" cellspacing="1" ><tr valign="top">');
while (i < zSr.length) {
	var descr = zSr[i++]; // listing description
	var unused1 = zSr[i++]; // (ignore)
	var clickURL = zSr[i++]; // listing link
	var title = zSr[i++]; // listing title
	var sitehost = zSr[i++]; // advertiser’s domain name
	var unused2 = zSr[i++]; // (ignore)
	document.write('<td bgcolor="#EEF7FF"><P><A TARGET="_new" HREF="' + clickURL + '">');
	document.write('<STRONG>' + title + '</STRONG></A>');
	document.write('<BR>' + descr + '<BR>');
	document.write('<I>(' + sitehost + '</I>)</P></td>');
}
document.write('</tr></table>');
}
}

////////////////////////////////////////////////////////////////////////////

// Added on December, 2006
function print_bottomLink(){
	document.write("<script>var pub='tsnmain';</script>");
	document.write("<script>pbmenu(pub);</script>");
}

function changeOnOffImage(in_id, total_no, img_id_prefix) {
	for(i=0;i<total_no; i++) {
		if(i == in_id) {
			document.getElementById(img_id_prefix+i+"_on").style.display = "block";
			document.getElementById(img_id_prefix+i+"_off").style.display = "none";
		} else {
			document.getElementById(img_id_prefix+i+"_on").style.display = "none";
			document.getElementById(img_id_prefix+i+"_off").style.display = "block";
		}
	}
}
function changeContent(in_id, total_no, div_id_prefix) {
	for(i=0;i<total_no; i++) {
		if(i == in_id) {
			document.getElementById(div_id_prefix+i).style.display = "block";
		} else {
			document.getElementById(div_id_prefix+i).style.display = "none";
		}
	}
}

