function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//Lastmod 12/4/2006 11:33
if(!window.Now){window.Now={};}Now.Flash=new function(){var me=this;var flv=null;var d=document;var w=window;this.Build=function(f,wf,hf,id){if(true){var el='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+wf+'" height="'+hf+'" id="'+id+'"><param name=movie value="'+f+'"><param name=allownetworking value=all><param name=allowscriptaccess value=always><param name=quality value=high><param name=wmode value=transparent><embed src="'+f+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+wf+'" height="'+hf+'" swliveconnect="true" allowwscriptaccess="always" allownetworking="all"></embed></object>';d.write(el);}};return this;};
var alldisabled = 'copyhistory=no,hotkeys=no,status=no,directories=no,location=no,menubar=no,toolbar=no,resizable=no,left=50,top=50,screenX=50,screenY=50,scrollbars=no,';
var pcwgdefault = 'copyhistory=no,hotkeys=no,status=yes,directories=no,location=yes,menubar=no,toolbar=yes,resizable=yes,left=50,top=50,screenX=50,screenY=50,scrollbars=yes,height=180,width=370';

function popupWin(url,name,options){
	newpopWin = window.open(url,name,options);
	setTimeout("newpopWin.focus()",100);
}

function promoteFlash_DoFSCommand(command, args){
	if(command=="fspopWin"){
		switch (args){
			case "now001" : 
				// Effective Date: 2002-09-17
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=now001','win550x400',alldisabled+',width=550,height=400');
				break;
			case "intro2" : 
				openerloc("http://media.now.com.hk/pcwg/joinus");
				self.close();
				break;
			case "intro3" : 
				openerloc("http://media.now.com.hk/pcwg/mediahl");
				self.close();
				break;
			case "intro4" :
				openerloc("http://media.now.com.hk/pcwg/help/bcheck");
				self.close();
				break;
			case "mgm_roller" :
				// Effective Date: 2003-03-21				
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=mgm_roller&page=1','win575x480',alldisabled+',width=575,height=480');
				break;
			case "emailcollection" :
				// Effective Date: 2003-03-21
				//selft.close();
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=5325635','win400x300',alldisabled+',width=400,height=300');
				break;
			case "do1" :
				// Effective Date: 2003-03-28				
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=mwd_lift','win400x300',alldisabled+',width=400,height=300');
				break;
			case "intro5" :
				self.close();
				break;
			case "boyz1" :
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/images/event/web_boyz/popup/popup_3300.jpg', 'win379x230', alldisabled+',width=379,height=230');
				break;
			case "boyz2" :
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/images/event/web_boyz/popup/popup_6220.jpg','win200x444',alldisabled+',width=200,height=444');
				break;
			case "famine" :
				// Effective Date: 2003-04-27				
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=coming&page=1','coming',alldisabled+'width=400,height=300');
				break;
			case "adultpost" :
				// Effective Date: 2003-07-21
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=nl0715','win500x600',alldisabled+'width=500,height=600');
				break;				
			case "girlpower01" :
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=girlpower&page=9','600x450','width=600,height=450');
				break;				
			case "girlpowergame01" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/girlpower/girlpowergame01.html','650x500','width=650,height=500');
				break;				
			case "girlpowergame02" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/girlpower/girlpowergame02.html','650x500','width=650,height=500');
				break;				
			case "girlpowergame03" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/girlpower/girlpowergame03.html','650x500','width=650,height=500');
				break;				
			case "girlpowercase01" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/girlpower/girlpowercase01_1.html','600x450','width=600,height=450');
				break;				
			case "girlpowercase02" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/girlpower/girlpowercase02_1.html','600x450','width=600,height=450');
				break;				
			case "muswildriver" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/wildriver/river400300.html','400x300','width=400,height=300');
				break;				
				// end Eventpage mve_m_mk 2003-11-13
			case "river01" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/wildriver/river_popup1.html','win400300','scrollbars=yes, width=420,height=300');
				break;				
				// end Eventpage mve_wildriver 2005-02-18
			case "river02" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/wildriver/river_popup1.html#why','win400300','scrollbars=yes, width=420,height=300');
				break;				
				// end Eventpage mve_wildriver 2005-02-18
			case "river03" :
				popupWin('http://pctv.netvigator.com/pctv/html/popup/wildriver/river_popup1.html#what','win400300','scrollbars=yes,width=420,height=300');
				break;				
				// end Eventpage mve_wildriver 2005-02-18
			case "dcc33" :
				//mov_m_2046 28/9/2004 11:01
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=mve_m_2046&page=1','win475x600',alldisabled+',width=475,height=600')
				break;
			case "2046_eps2" :
				//mov_m_2046 28/9/2004 11:01
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=mve_m_2046&page=2','win475x600',alldisabled+',width=475,height=600')
				break;
			case "2046_eps3" :
				//mov_m_2046 28/9/2004 11:01
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=mve_m_2046&page=3','win475x600',alldisabled+',width=475,height=600')
				break;
			case "2046_eps4" :
				//mov_m_2046 28/9/2004 11:01
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=mve_m_2046&page=4','win475x600',alldisabled+',width=475,height=600')
				break;
			case "2046_eps5" :
				//mov_m_2046 28/9/2004 11:01
				popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=mve_m_2046&page=5','win475x600',alldisabled+',width=475,height=600')
				break;
			case "2046wall01a" :
				//mov_m_2046 28/9/2004 11:01
				javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/1024/01.jpg','win1024x768',alldisabled+',width=1024,height=768')
			break;
			case "2046wall02a" :
				//mov_m_2046 28/9/2004 11:01
				javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/1024/02.jpg','win1024x768',alldisabled+',width=1024,height=768')
			break;
			case "2046wall03a" :
				//mov_m_2046 28/9/2004 11:01
				javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/1024/03.jpg','win1024x768',alldisabled+',width=1024,height=768')
			break;
			case "2046wall04a" :
				//mov_m_2046 28/9/2004 11:01
				javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/1024/04.jpg','win1024x768',alldisabled+',width=1024,height=768')
			break;
			case "2046wall05a" :
				//mov_m_2046 28/9/2004 11:01
				javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/1024/05.jpg','win1024x768',alldisabled+',width=1024,height=768')
			break;
			case "2046wall06a" :
				//mov_m_2046 28/9/2004 11:01
				javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/1024/06.jpg','win1024x768',alldisabled+',width=1024,height=768')
			break;
			case "2046wall07a" :
				//mov_m_2046 28/9/2004 11:01
				javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/1024/07.jpg','win1024x768',alldisabled+',width=1024,height=768')
			break;
			case "2046wall01b" :
				//mov_m_2046 28/9/2004 11:01
			javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/800/01.jpg','win800x600',alldisabled+',width=800,height=600')
			break;
			case "2046wall02b" :
				//mov_m_2046 28/9/2004 11:01
			javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/800/02.jpg','win800x600',alldisabled+',width=800,height=600')
			break;
			case "2046wall03b" :
				//mov_m_2046 28/9/2004 11:01
			javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/800/03.jpg','win800x600',alldisabled+',width=800,height=600')
			break;
			case "2046wall04b" :
				//mov_m_2046 28/9/2004 11:01
			javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/800/04.jpg','win800x600',alldisabled+',width=800,height=600')
			break;
			case "2046wall05b" :
				//mov_m_2046 28/9/2004 11:01
			javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/800/05.jpg','win800x600',alldisabled+',width=800,height=600')
			break;
			case "2046wall06b" :
				//mov_m_2046 28/9/2004 11:01
			javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/800/06.jpg','win800x600',alldisabled+',width=800,height=600')
			break;
			case "2046wall07b" :
				//mov_m_2046 28/9/2004 11:01
		javascript:popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=showimg&ext=jsp&src=/admail/images/event/mve_m_2046/wallpaper/800/07.jpg','win800x600',alldisabled+',width=800,height=600')
		break;
			case "lift01" :
				//mve_lift 09/6/2005
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift','620x600',alldisabled+'scrollbars=yes,width=620,height=600');
			break;
			case "lift02" :
				//mve_lift t and C  09/6/2005
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=3','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "lift03" :
				//mve_lift join a or b  09/6/2005
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=3','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb04" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=4','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb05" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=5','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb06" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=6','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb07" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=7','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb08" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=8','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb09" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=9','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb10" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=10','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb11" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=11','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb12" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=12','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb13" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=13','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb14" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=14','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb15" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=15','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb16" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=16','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb17" :
				//mve_lift 
			popupWin('http://imsp093.netvigator.com/now/poll/lift/vo05.php','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftb19" :
				//mve_lift 
			popupWin('http://pctv.netvigator.com/pctv/estore/popupwindow?categoryId=lift&page=19','470x420',alldisabled+'scrollbars=yes,width=470,height=420');
			break;
			case "liftbrainwave" :
				//mve_lift 
			popupWin('http://forum.netvigator.com/forum/lift.jspa?forumID=4&corpid=16','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			case "liftloudmusic" :
				//mve_lift 
			popupWin('http://forum.netvigator.com/forum/lift.jspa?forumID=4&corpid=15','520x500',alldisabled+'scrollbars=yes,width=520,height=500');
			break;
			default : 
				alert(args);
		}
	}
}

function openerloc(url) {	
	top.window.opener.location=url;
	top.window.opener.focus();
}

function highlight(obj){
	if (document.all) obj = event.srcElement;
	if (obj.className=="menu1"){
		obj.style.backgroundColor="#e6e6e6"
	}
	else if (obj.className=="menu2"){
		obj.style.backgroundColor="#f3f3f3"
	}
	else if (obj.className=="menu3"){
		obj.style.backgroundColor="#e6e6e6"
	}
}

function lowlight(obj){
	if (document.all) obj = event.srcElement;
	if (obj.className=="menu1"){
		obj.style.backgroundColor="#cdcdcd"
	}
	else if (obj.className=="menu2"){
		obj.style.backgroundColor="#e6e6e6"
	}
	else if (obj.className=="menu3"){
		obj.style.backgroundColor="#ffffff"
	}
}

function clickurl(url){
	if (url == "http://www.hk.pccw.com/legal/privacy_c.html" ||
		url == "http://www.hk.pccw.com/legal/privacy.html"){
		window.open(url);
	} else {
		window.location =url;
	}
}

function moviePopup(pid){
	popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=movie&page=' + pid,'win400x300',alldisabled+',width=400,height=300');
}

function moviePG(pid){
	popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=pg&page=' + pid,'win380x430',alldisabled+',width=380,height=430');
}

function movieWP(pid){
	popupWin('http://media.now.com.hk/pcwg/popupwindow?categoryId=wallpaper&page=' + pid,'win380x430',alldisabled+',width=380,height=430');
}

function $(element) {
  return document.getElementById(element);;
}

function transformpng(o)
{
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
				var ver = new Number(RegExp.$1);
				if (ver < 7) {
							o.onload = null;
							filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+o.src+'", sizingMethod=scale);';
							o.src = '/images/common/spacer.gif';
							o.style.filter = filter;
				}
		}		
}