
function setCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function updateLang(){
	if (lang != null)
	{
		//$("#lang_website").find("[value=" + lang.charAt(0) + "]").attr("selected", true);
		$("#lang_video").find("[value=" + lang.charAt(1) + "]").attr("selected", true);
	}
}	

function hChangeLanguage(e)
{
	var langstr = $("#lang_website").val() + $("#lang_video").val();
	setCookie("lang", langstr, 365);
	window.location.href = "../" + langstr.charAt(0) + "/index.php";
}

function playVideo(url)
{
	$.LightFrame.open("/2010/resource/FPlayer.php?v=" + url, 720, 480);
	try{swfobject.getObjectById("VideoPlayer").pause();}
	catch(e) {}
}

function showtopbanner()
{
document.write("<div class=lanrentukubox>");
document.write("<DIV id=newsSlider>");
document.write("<DIV class=container2>");
document.write("<UL class=slides>");
//document.write("<LI><A href=\"http://www.wow1.tv/stc\" target=\"_blank\"><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/ad4.jpg\"></A>");
//document.write("<LI><A href=\"http://www.wow1.tv/stc\" target=\"_blank\"><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/ad3.jpg\"></A>");
//document.write("<LI><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/notice.png\">");
document.write("<LI><A href=\"javascript:playVideo('http://wow1.tv/2010/resource/topads/rona.flv');\"><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/rona.png\"></A>");
document.write("<LI><A href=\"javascript:playVideo('http://wow1.tv/2010/resource/topads/topads.flv');\"><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/01.png\"></A>");
//document.write("<LI><A href=\"http://www.wow1.tv/election\" target=\"_blank\"><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/02.jpg\"></A>");
//document.write("<LI><A href=\"http://www.wowtube.ca/\" target=_blank><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/03.jpg\"></A>");
//document.write("<LI><A href=\"http://www.lanrentuku.com/\" target=_blank><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/04.jpg\"></A>"); 
//document.write("<LI><A href=\"http://www.lanrentuku.com/\" target=_blank><IMG src=\"http://www.wow1.tv/2010/resource/topads/images/05.jpg\"></A>");
document.write("</LI>");
document.write("</UL></DIV>");
document.write("<DIV class=validate_Slider></DIV>");
document.write("<UL class=pagination>");
document.write("<LI><A href=\"#\">1</A> </LI>");
document.write("<LI><A href=\"#\">2</A> </LI>");
//document.write("<LI><A href=\"#\">3</A></LI>");
//document.write("<LI><A href=\"#\">4</A></LI>");
//document.write("<LI><A href=\"#\">5</A></LI>");
document.write("</UL></DIV></div>");
}

function showrightside()
{
document.write("<a href=\"http://www.cambridgebutterfly.com/\" target=\"_blank\"><img border=\"0\" src=\"/2010/resource/images/sideadv/right.jpg\" width=\"136\" height=\"700\" /></a>");
}

function showleftside()
{
document.write("<a href=\"http://www.kingsquare.ca/\" target=\"_blank\"><img border=\"0\" src=\"/2010/resource/images/sideadv/left.png\" width=\"136\" height=\"700\"></a>")
}

function iup ()
{
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"246\" height=\"88\" id=\"FPlayer\">")
document.write(" <param name=\"movie\" value=\"../resource/iup.swf\" />")
document.write(" <param name=\"allowFullscreen\" value=\"true\" />")
document.write(" <param name=\"allowScriptAccess\" value=\"always\" />")
document.write("  <param name=\"wmode\" value=\"opaque\" />")
document.write(" <!--[if !IE]>-->")
document.write("<object type=\"application/x-shockwave-flash\" data=\"../resource/iup.swf\" width=\"246\" height=\"88\">")
document.write("<param name=\"movie\" value=\"../resource/iup.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"opaque\" />")
document.write("<!--<![endif]-->")
document.write("<p><a href=\"http://www.100degreeshotpot.com/\"><img src=\"../resource/images/flashreplace/3.jpg\" height=\"80\" width=\"246\"/></a></p>")
document.write("<!--[if !IE]>-->")
document.write("</object>")
document.write("<!--<![endif]-->")
document.write("</object>")
}

function ad4 ()
{	
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"246\" height=\"78\" id=\"FPlayer\">")	
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv4.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"opaque\" />")
document.write("<!--[if !IE]>-->")
document.write("<object type=\"application/x-shockwave-flash\" data=\"../resource/adv/flash/adv4.swf\" width=\"246\" height=\"78\">")
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv4.swf\" />")
document.write("<param name=\"allowFullscreen\" value\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"opaque\" />")
document.write("<!--<![endif]-->")
document.write("<p><a href=\"http://www.quickmls.ca/aprg/home.aspx?sid=100018\"><img src=\"../resource/images/flashreplace/4.jpg\" height=\"78\" width=\"246\"/></a></p>")
document.write("<!--[if !IE]>-->")
document.write("</object>")
document.write("<!--<![endif]-->")
document.write("</object>")
}

function ad5 ()
{
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"246\" height=\"78\">")
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv5.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"transparent\" />")
document.write("<!--[if !IE]>-->")	
document.write("<object type=\"application/x-shockwave-flash\" data=\"../resource/adv/flash/adv5.swf\" width=\"246\" height=\"78\">")
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv5.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"transparent\" />")
document.write("<!--<![endif]-->")
document.write("<p><a href=\"http://www.tax911.ca/\"><img src=\"../resource/images/flashreplace/6.jpg\" height=\"80\" width=\"246\"/></a></p>")
document.write("<!--[if !IE]>-->")
document.write("</object>")
document.write("<!--<![endif]-->")
document.write("</object>")
}

function ad7 ()
{
//document.write("<a href=\"http://www.willowdalesubaru.com/\" target=\"_blank\"><img src=\"http://www.wow1.tv/2010/resource/images/ad9.png\" width=\"246\" height=\"98\"/></a>")
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"246\" height=\"98\">")
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv7.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"transparent\" />")
document.write("<!--[if !IE]>-->")
document.write("<object type=\"application/x-shockwave-flash\" data=\"../resource/adv/flash/adv7.swf\" width=\"246\" height=\"98\">")
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv7.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"transparent\" />")
document.write("<!--<![endif]-->")
document.write("<p>require Flash Player</p>")
document.write("<!--[if !IE]>-->")
document.write("</object>")
document.write("<!--<![endif]-->")
document.write("</object>")
}

function ad9 ()
{
//document.write("<a href=\"http://www.willowdalesubaru.com/\" target=\"_blank\"><img src=\"http://www.wow1.tv/2010/resource/images/ad9.png\" width=\"246\" height=\"98\"/></a>")
//document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"246\" height=\"98\">")
//document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv9.swf\" />")
//document.write("<param name=\"allowFullscreen\" value=\"true\" />")
//document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
//document.write("<param name=\"wmode\" value=\"transparent\" />")
//document.write("<!--[if !IE]>-->")
//document.write("<object type=\"application/x-shockwave-flash\" data=\"../resource/adv/flash/adv10.swf\" width=\"246\" height=\"98\">")
//document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv9.swf\" />")
//document.write("<param name=\"allowFullscreen\" value=\"true\" />")
//document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
//document.write("<param name=\"wmode\" value=\"transparent\" />")
//document.write("<!--<![endif]-->")
//document.write("<p>require Flash Player</p>")
//document.write("<!--[if !IE]>-->")
//document.write("</object>")
//document.write("<!--<![endif]-->")
//document.write("</object>")
}

function ad10 ()
{
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"246\" height=\"98\">")
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv10.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"transparent\" />")
document.write("<!--[if !IE]>-->")
document.write("<object type=\"application/x-shockwave-flash\" data=\"../resource/adv/flash/adv10.swf\" width=\"246\" height=\"98\">")
document.write("<param name=\"movie\" value=\"../resource/adv/flash/adv10.swf\" />")
document.write("<param name=\"allowFullscreen\" value=\"true\" />")
document.write("<param name=\"allowScriptAccess\" value=\"always\" />")
document.write("<param name=\"wmode\" value=\"transparent\" />")
document.write("<!--<![endif]-->")
document.write("<p>require Flash Player</p>")
document.write("<!--[if !IE]>-->")
document.write("</object>")
document.write("<!--<![endif]-->")
document.write("</object>")
}

function friend()
{
document.write("<a href=\"http://www.newstarnet.com\" target=\"_blank\"><img src=\"../resource/friendly_link/Newstarnet.jpg\" style=\"margin-top:3px; width:113px; height:38px; border:solid 3px #CCCCCC;\" /></a>")

document.write("<a href=\"http://www.torcn.com\" target=\"_blank\"><img src=\"../resource/friendly_link/torcn.jpg\" style=\"margin-top:3px; margin-left:8px; width:113px; height:38px; border:solid 3px #CCCCCC;\"/></a>")

document.write("<a href=\"http://www.tsctv.net\" target=\"_blank\"><img src=\"../resource/friendly_link/TSCTV.jpg\" style=\"margin-top:3px; width:113px; height:38px; border:solid 3px #CCCCCC\"/></a>")
}

function counter ()
{
document.write("<script type=\"text/javascript\" src=\"http://js.tongji.linezing.com/984990/tongji.js\"></script>")
document.write("<noscript>")
document.write("<a href=\"http://www.linezing.com\"><img src=\"http://img.tongji.linezing.com/984990/tongji.gif\"/></a>")
document.write("</noscript>")
}

function freecounter ()
{
	
document.write("<div style=\"float:left\"><a href=\"http://www.hit-counts.com\"><img src=\"http://www.hit-counts.com/counter.php?t=15&digits=9&ic=891223&cid=955959\"></a></div>")
}
        
