function loadPageSpecial(cat,subcat,theId){	
	var genreId = "";
	var genreName = "";	
	if(cat == "genres"){	
		assetVODtheId = theId;
		globalChannelSection = "genres";		
		switch(subcat){
			case "drama":				
				genreId = "1";
				genreName = "Dramas & Series";				
				break;
			case "reality":				
				genreId = "2";
				genreName = "Reality & Talent Shows";
				break;
			case "lifestyle":				
				genreId = "3";
				genreName = "Lifestyle";
				break;
			case "music":				
				genreId = "4";
				genreName = "Music";
				break;
			case "sports":				
				genreId = "5";
				genreName = "Sports & Games";
				break;
			case "entertaiment":				
				genreId = "6";
				genreName = "Entertaiment";
				break;
			case "specials":				
				genreId = "7";
				genreName = "Specials";
				break;}	
		setChannelName(genreName);		
		unloadPage("whats on");
		unloadPage('previews');
		unloadPage('programmes');		
		unloadPage('playlist');			
		document.getElementById("apDiv5").style.display = "block";
		document.getElementById("tab_genre_list").style.display = "none";
		document.getElementById("tab_genre_list_bg").style.display = "none";
		MM_showHideLayers('apDiv5','','show');			
		setMenuActive('4');
		if(document.getElementById("list2").innerHTML == ""){ 
			loadPlaylistPanel();
			showPlaylist();		
			if(getCookie("loginid") != ""){
				loadAllUserPlaylistFromWS();}}	
		else{
			loadAllUserPlaylistFromWS();}		
		if(genreId == "7"){
			streamDetails();
			displayAssets('allTrail','displayAllAssets','latestProgrammeByGenreAssetArray','4','0');
			playNow('auto',assetVODtheId,'latestProgrammeByGenreAssetArray');}
		else{
			getAssetFromWeb(assetVODtheId,genreId,genreName);}}}
function streamDetails(){
		var assetId, assetImage, assetVideo, assetTitle, assetCategory, assetCategoryId, assetLanguage, assetGenreId;
		var assetCountryAccess, assetLengthMinutes, assetSynopsis, assetTags, assetViewed, assetRating, assetGenre;			
		var currentTime = new Date();
		var month = currentTime.getMonth() + 1;
		var day = currentTime.getDate();
		var year = currentTime.getFullYear();		
		var todayDate = month + "/" + day + "/" + year;			
		var viewDate = "5/24/2008";	
		//var viewDate = "4/4/2008";			
		var hours = currentTime.getHours();
		var minutes = currentTime.getMinutes();			
		var masa =  hours + ":" + minutes;
		var dtmasa = new Date("5/24/2008 " + masa);
		//var dtmasa = new Date("4/4/2008 " + masa);
		var masaStart = new Date("5/24/2008 8:30 PM");
		var masaStop = new Date("5/24/2008 11:20 PM");
		//var masaStart = new Date("4/4/2008 6:50 PM");
		//var masaStop = new Date("4/4/2008 6:55 PM");		
		latestProgrammeByGenreAssetArray = new Array();		
		assetId =  "331200";
		assetImage =  ""+serverURL+"images/stream/konsert_af.jpg";
		if(todayDate == viewDate)
		{
			if((dtmasa >= masaStart) && (dtmasa<=masaStop))
			{					
				assetVideo =  "mms://202.157.188.193/ria";	
				assetLevel =  "3";
			}
			else
			{
				assetVideo =  ""+serverURL+"images/stream/konsert_af.wmv";	
				assetLevel =  "1";
			}
		}
		else
		{				
			assetVideo =  ""+serverURL+"images/stream/konsert_af.wmv";	
			assetLevel =  "1";
		}
		assetTitle =  "AF6 Konsert Akhir";		
		assetCategory = "Specials";
		assetCategoryId = "117";
		assetLanguage =  "en";			
		assetCountryAccess =  "MY";			
		assetLengthMinutes =  "180";		
		assetSynopsis = "Saksikan konsert akhir Akademi Fantasia 6 pada hari Sabtu, 24 Mei 2008, Jam 9 malam.";		
		assetTags =  "konsert, AF6";
		assetViewed =  "0";			
		assetRating = "0";
		assetAstroChannelName = "Ria";
		assetGenre =  "Specials";					
		//push values into assetArray
			addLatestProgrammeByGenreAsset( assetId, assetImage, assetVideo, assetTitle, assetCategory, assetCategoryId, assetLanguage, assetCountryAccess, assetLengthMinutes, assetSynopsis, assetTags, assetViewed, assetRating, assetLevel, assetAstroChannelName, assetGenre);}
function streamNow(theId,theArray){		
		if(document.getElementById("MediaPlayer").style.display=='none'){

			document.getElementById("MediaPlayer").style.display='block';}		
		document.getElementById("divPauseBtn").style.display = "block";		
		//document.all.divPauseBtn.style.display = "none";
		document.getElementById("divPlayBtn").style.display = "none";		
		//document.all.divPlayBtn.style.display = "block";	
		if(document.getElementById('comments').style.visibility == 'visible'){
			closeControlPanel();}		
		currentlyPlayingId = theId; 
		currentlyPlayingArray = theArray;		
		if(document.getElementById("videoStop")){
			if(document.getElementById("videoStop").style.display == 'block'){
				document.getElementById("videoStop").style.display='none';
				document.getElementById("MediaPlayer").style.display='block';}}		
		if(document.getElementById("share")){
			document.all.share.style.visibility = "hidden";}		
		if(document.getElementById("shareResponse")){
			document.all.shareResponse.style.visibility = "hidden";
			//document.all.mainPanel.style.visibility = "visible";				
		}		
		var tempArray = eval(theArray);
		var assetCategoryId;		
		for (var i=0; i < tempArray.length; i++) 
		{
			if (tempArray[i].assetId == theId)
			{
				assetCategoryId = tempArray[i].assetCategoryId;		
				currentlyPlayingURL = tempArray[i].assetVideo;				
				//currentlyPlayingURL = serverURL+tempArray[i].assetVideo;				
				assetLevel = tempArray[i].assetLevel;				
			}
		}		
		// check user authorization
		if ( !checkUserAuthorization(assetLevel) ) 
		{
			return false;
		}		
		//if ( globalPage == 'home' ) {
			// get the group id
			//loadPage(assetCategoryId);
			// set direct play now
			//globalAutoPlay = true;
		//}
		// show player pause btn
		//document.getElementById("divPauseBtn").style.visibility = "visible";
		// start of play now		
		showNowPlaying();
		document.getElementById('divPlayNow').innerHTML = '<br><p class="style9">&nbsp;&nbsp;<img src="' + skinFolder + '/images/load.gif" width="10" height="10" align="absmiddle">&nbsp;Loading info...</p>';		
		//var tempArray = eval(theArray);
		//alert(tempArray); return;
		for (var i=0; i < tempArray.length; i++) 
		{							
			if (tempArray[i].assetId == theId)
			{
				var assetId = tempArray[i].assetId;
				var assetImage = tempArray[i].assetImage;
				var assetVideo = tempArray[i].assetVideo;
				var assetTitle = tempArray[i].assetTitle;
				var assetCategory = tempArray[i].assetCategory;
				var assetCategoryId = tempArray[i].assetCategoryId;				
				var assetLanguage = tempArray[i].assetLanguage;
				var assetLengthMinutes = tempArray[i].assetLengthMinutes;
				var assetSynopsis = tempArray[i].assetSynopsis;				
				var assetTags = tempArray[i].assetTags;
				var assetViewed = tempArray[i].assetViewed;
				var assetRating = tempArray[i].assetRating;				
				if (assetTags != "")
				{
					var txtTags = '<font color="#FFFFFF">Tags:</font>&nbsp;';
				}
				else
				{
					var txtTags = '';
				}				
				//generate tags link
				//assetTags = "aznil, lawak, mizal";				
				var ArrayassetTags = assetTags.split(",");
				var theTagLink = "";				
				for (var x=0; x < ArrayassetTags.length; x++) 
				{
					theTagLink += '<a style="cursor:pointer" onClick="goTagSearch(\'' + ArrayassetTags[x] + '\', \''+ tempArray[i].assetId +'\');">' + ArrayassetTags[x] + '</a>';
					if (x != eval(ArrayassetTags.length - 1)){ theTagLink += ", "; }
				}				
				//stream has no theRateFunc
				var theRateFunc = '&nbsp;'				
				//generate rating stars link
//				var theRateFunc = '<div id="divRateThisAsset"><table class="style9" border=0 cellspacing=0 cellpadding=0><tr><td>Rate this video : ' +
//				'<a style="cursor:pointer" onClick="goRateVideo(\'' + tempArray[i].assetId + '\',\'1\');"><img align="absmiddle" src="' + skinFolder + '/images/star2b.gif" name="rate1" width="14" height="14" border="0" id="Image2"  onMouseOver="ratingState(1); MM_swapImage(\'rate1\',\'\',\'' + skinFolder + '/images/star2.gif\',1)" onMouseOut="ratingState(0); MM_swapImgRestore()" /></a>' +
//				'<a style="cursor:pointer" onClick="goRateVideo(\'' + tempArray[i].assetId + '\',\'2\');"><img align="absmiddle" src="' + skinFolder + '/images/star2b.gif" name="rate2" width="14" height="14" border="0" id="Image21" onMouseOver="ratingState(2); MM_swapImage(\'rate1\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate2\',\'\',\'' + skinFolder + '/images/star2.gif\',1)" onMouseOut="ratingState(0); MM_swapImgRestore()" /></a>' +
//				'<a style="cursor:pointer" onClick="goRateVideo(\'' + tempArray[i].assetId + '\',\'3\');"><img align="absmiddle" src="' + skinFolder + '/images/star2b.gif" name="rate3" width="14" height="14" border="0" id="Image22" onMouseOver="ratingState(3); MM_swapImage(\'rate1\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate2\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate3\',\'\',\'' + skinFolder + '/images/star2.gif\',1)" onMouseOut="ratingState(0); MM_swapImgRestore()" /></a>' +
//				'<a style="cursor:pointer" onClick="goRateVideo(\'' + tempArray[i].assetId + '\',\'4\');"><img align="absmiddle" src="' + skinFolder + '/images/star2b.gif" name="rate4" width="14" height="14" border="0" id="Image23" onMouseOver="ratingState(4); MM_swapImage(\'rate1\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate2\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate3\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate4\',\'\',\'' + skinFolder + '/images/star2.gif\',1)" onMouseOut="ratingState(0); MM_swapImgRestore()" /></a>' +
//				'<a style="cursor:pointer" onClick="goRateVideo(\'' + tempArray[i].assetId + '\',\'5\');"><img align="absmiddle" src="' + skinFolder + '/images/star2b.gif" name="rate5" width="14" height="14" border="0" id="Image24" onMouseOver="ratingState(5); MM_swapImage(\'rate1\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate2\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate3\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate4\',\'\',\'' + skinFolder + '/images/star2.gif\',\'rate5\',\'\',\'' + skinFolder + '/images/star2.gif\',1)" onMouseOut="ratingState(0); MM_swapImgRestore()" /></a>' +
//				'</td><td><div id=divRateState>&nbsp;</div></td></tr></table></div>' +
//				'<div id="divRateThisAsset2" class="style11" style="display:none">submitting...</div>' +
//				'<div id="divRateThisAsset3" class="style11" style="display:none">Thank you for rating.</div>' +
//				'<div id="divDisplayRatedAsset" class="style9" style="display:none"></div>' +
//				'<div id="divRateThisAsset4" class="pl_notify" style="display:none">Please login to rate video.</div>' +
//				'<div id="divRateThisAssetAlready" class="style11" style="display:none">You already rate this video today.</div>';				
				var theContent = '<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"' + skinFolder + '/images/index_31.gif\">\
  <tr>\
	<td colspan=\"2\" rowspan=\"2\" valign=\"top\">&nbsp;</td>\
	<td width=\"55\" height=\"16\"></td>\
	<td width=\"57\"></td>\
	<td width=\"151\"></td>\
	<td colspan=\"2\" rowspan=\"2\" valign=\"top\">&nbsp;</td>\
  </tr>\
  <tr>\
	<td height=\"122\" colspan=\"3\" valign=\"top\"><p><span class=\"style8\">' + assetTitle + '</span><br>\
		  <span class=\"style2\">' + assetCategory + '</span></p><p class=\"style9\" style=\"height:70; width:100%; overflow:auto; \">' + assetSynopsis + '</p></td>\
  </tr>\
  <tr>\
	<td width=\"6\" height=\"8\"></td>\
	<td width=\"11\"></td>\
	<td></td>\
	<td></td>\
	<td></td>\
	<td width=\"11\"></td>\
	<td width=\"7\"></td>\
  </tr>\
  <tr>\
	<td height=\"13\"></td>\
	<td></td>\
	<td colspan=\"5\" valign=\"top\">' + theRateFunc + '</td>\
  </tr>\
  <tr>\
	<td height=\"24\"></td>\
	<td></td>\
	<td>&nbsp;</td>\
	<td></td>\
	<td></td>\
	<td></td>\
	<td></td>\
  </tr>\
  <tr>\
	<td height=\"24\"></td>\
	<td></td>\
	<td colspan=\"3\" valign=\"top\" class=\"style7\">' + txtTags + theTagLink + ' </td>\
	<td></td>\
	<td></td>\
  </tr>\
  <tr>\
	<td height=\"5\"></td>\
	<td></td>\
	<td></td>\
	<td></td>\
	<td></td>\
	<td></td>\
	<td></td>\
  </tr>\
   <tr>\
	<td height=\"19\"></td>\
	<td></td>\
	<td colspan=\"2\" valign=\"top\"></td>\
	<td>&nbsp;</td>\
	<td></td>\
	<td></td>\
  </tr>\
  <tr>\
	<td height=\"23\"></td>\
	<td></td>\
	<td>&nbsp;</td>\
	<td></td>\
	<td></td>\
	<td></td>\
	<td></td>\
  </tr>\
  <tr>\
	<td rowspan=\"2\" valign=\"top\">\
	  <img src=\"' + skinFolder + '/images/index_37.gif\" width=\"6\" height=\"63\" alt=\"\"></td>\
<td height=\"58\" colspan=\"5\" valign=\"top\">\
	<!--img src=\"' + skinFolder + '/images/ads/advert_small.gif\" width=\"285\" height=\"58\" alt=\"\"-->\
	<div id="divBannerPreRoll" style="height:61px; width:288px; overflow:hidden; background-color: #CCCCCC;"></div></td>\
<td rowspan=\"2\" valign=\"top\">\
	<img src=\"' + skinFolder + '/images/index_39.gif\" width=\"7\" height=\"63\" alt=\"\"></td>\
</tr>\
  <tr>\
	<td height=\"5\" colspan=\"5\" valign=\"top\">\
	  <img src=\"' + skinFolder + '/images/index_52.gif\" width=\"285\" height=\"5\" alt=\"\"></td>\
  </tr>\
</table>\
';
				document.getElementById('divPlayNow').innerHTML = theContent;
				MM_showHideLayers('tab3','','show','tab4','','hide','list3','','show','list4','','hide')
				//document.getElementById('divPlayNow').style.display = "";
		
				//alert(assetVideo);
				// remi added
				global_play_type = "single";				
				getVideoPreRoll(assetId);									
				// wait until global_state turns 'preRollPlayed' 
				// stupid solution, damn...but can replace the wait time with the actual video length
				//setTimeout("processDRM(assetVideo)",5000);
				global_play_type = "single";				
				// process the DRM video now
				//processDRM(assetVideo);
				global_mediaId = assetVideo;
					
				//Highlight playing video - Start
				if (lastHighlight !== undefined && lastHighlight != "")
				{
					//Clear last highlight
					if (document.getElementById(lastHighlight)) { 
						document.getElementById(lastHighlight).style.background = "url(' + skinFolder + '/images/listing_bg.gif)"; 
						// change the star
						var tmpStarArray = lastHighlight.split("Asset");
						var lastNo = tmpStarArray[1];
						//document.getElementById("mystar"+lastNo).innerHTML=displayStarRating(tempArray[lastNo].assetRating);
					}
				}
				//from playlist so go highlight playing video
				if (theArray == "arryActivePlaylistAsset"){
					var highlightDivName = 'playlistAsset' + i;					
					document.getElementById(highlightDivName).style.background = "url(' + skinFolder + '/images/listing_bg_02.gif)";
					lastHighlight = highlightDivName;
					//alert("hd: "+highlightDivName+" bg: "+document.getElementById(highlightDivName).style.background);
					// change the star
					//document.getElementById("mystar"+i).innerHTML=displayStarRating3(assetRating);
				}
				else
				{
					lastHighlight = "";
				}
				//Highlight playing video - End				
				//stats for statsViewVideo
				var epassLoginId = getCookie("loginid");
				if ( epassLoginId == "" )
				{ 
					epassLoginId = "0"; 
				}
			break;
			}
		}
}
function playStreamx(gmediaId)
{	
	document.all.status.innerHTML = "&nbsp;Loading...";
	var fullMediaURL = gmediaId;
	loadMediaPlayerFile( fullMediaURL );
}
function getSpecialInfo()
{
	var tempUrlx="#";
	htmlOutput = "<span style=\"cursor:hand;\" class=\"style33\" onClick=\"playStreamx('"+tempUrlx+"');\"><br>AEC LIVE SHOW.</span>";
	WriteLayer('displayAllAssets',null,htmlOutput);		
}
var assetFromWeb, retry_fromweb = 5, tmp_fw_assetId = "",  tmp_fw_genreId = "", tmp_fw_genreName = "";
function getAssetFromWeb(assetId,genreId,genreName){	
	var soapMessage, webMethod;	
	tmp_fw_assetId = assetId;
	tmp_fw_genreId = genreId;
	tmp_fw_genreName = genreName;
	if(document.getElementById("tab_whatson_editorspick"))
	{MM_showHideLayers('tab_whatson_editorspick','','hide');}	
	if(document.getElementById("WhatsOn"))
	{MM_showHideLayers('WhatsOn','','hide');}	
	if(document.getElementById("tab_whatson_mostviewed"))
	{MM_showHideLayers('tab_whatson_mostviewed','','hide');}	
	if(document.getElementById("MostViewed"))
	{MM_showHideLayers('MostViewed','','hide');}	
	if(document.getElementById("tab_previews_latest"))
	{MM_showHideLayers('tab_previews_latest','','hide');}	
	if(document.getElementById("PreviewLatest"))		
	{MM_showHideLayers('PreviewLatest','','hide');}	
	if(document.getElementById("tab_previews_bychannels"))	
	{MM_showHideLayers('tab_previews_bychannels','','hide');}	
	if(document.getElementById("PLByChannels"))	
	{MM_showHideLayers('PLByChannels','','hide');}	
	if(document.getElementById("apDiv5"))	
	{MM_showHideLayers('apDiv5','','show');}			
	if(document.getElementById("tab_programmes_latest"))	
	{MM_showHideLayers('tab_programmes_latest','','hide');}	
	if(document.getElementById("ProgrammeLatest"))
	{MM_showHideLayers('ProgrammeLatest','','hide');}		
	if(document.getElementById("tab_programmes_bychannels"))
	{MM_showHideLayers('tab_programmes_bychannels','','hide');}
	if(document.getElementById("PRByChannels"))
	{MM_showHideLayers('PRByChannels','','hide');}
	if(document.getElementById("list1"))
	{MM_showHideLayers('list1','','show');}	
	if(document.getElementById("GenreList"))
	{MM_showHideLayers('GenreList','','hide');}	
	if(document.getElementById("list2"))
	{MM_showHideLayers('list2','','hide');}	
	htmlOutput = "<span class=\"style33\"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"" + skinFolder + "/images/load.gif\" width=\"10\" height=\"10\" align=\"absmiddle\">&nbsp;Loading Genre...</span>";
	WriteLayer('displayAllAssets',null,htmlOutput);
	setChannelName('Loading ...');		
	assetFromWeb = new Array();	
	XMLPlayFW = false;
	XMLPlayFW = new ActiveXObject("Microsoft.XMLHTTP");		
	webMethod="getAssetsFromLink"; 	
	soapMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">";
	soapMessage += "  <soap:Body>";
	soapMessage += "    <" + webMethod + " xmlns=\"http://tempuri.org/\">";
	soapMessage += "	<assetId>"+ tmp_fw_assetId +"</assetId>";
	soapMessage += "    </" + webMethod + ">";
	soapMessage += "  </soap:Body>";
	soapMessage += "</soap:Envelope>";
	XMLPlayFW.onreadystatechange = getAssetFromWebResult;
	XMLPlayFW.Open("POST",addrWebServices, true);
	XMLPlayFW.SetRequestHeader("Content-Type","text/xml; charset=utf-8");
	XMLPlayFW.SetRequestHeader("SOAPAction","http://tempuri.org/" + webMethod);
	XMLPlayFW.send(soapMessage);}
function getAssetFromWebResult(){	
	if (XMLPlayFW.readyState == 4){
		if (XMLPlayFW.status == 200){	
			var assetId,assetImage,assetVideo,assetTitle,assetLengthMinutes;
			var assetSynopsis,assetTags,assetViewed,assetRating,assetLevel,programmeId,assetGenre;
			var x = XMLPlayFW.responseXML;
			var xx = x.childNodes[1].xml;			
			xmlObject = (new DOMParser()).parseFromString(xx, "text/xml");			
			var root = xmlObject.getElementsByTagName('assets')[0];			
			var assets = root.getElementsByTagName("asset");
			for(var i = 0 ; i < assets.length ; i++){
				asset = assets[i];
				assetId =  asset.getAttribute("assetId");
				if(asset.getElementsByTagName("assetImage")[0]){
					assetImage =  asset.getElementsByTagName("assetImage")[0].firstChild.nodeValue;} 
				else{assetImage = "";}
				if(asset.getElementsByTagName("assetVideo")[0].firstChild){
					assetVideo =  asset.getElementsByTagName("assetVideo")[0].firstChild.nodeValue;}
				else{assetVideo = "";}	
				if(asset.getElementsByTagName("assetTitle")[0].firstChild){
					assetTitle =  asset.getElementsByTagName("assetTitle")[0].firstChild.nodeValue;} 
				else{assetTitle = "";}
				assetLengthMinutes =  asset.getElementsByTagName("assetLengthMinutes")[0].firstChild.nodeValue;											
				if(asset.getElementsByTagName("assetSynopsis")[0]){
					assetSynopsis =  asset.getElementsByTagName("assetSynopsis")[0].firstChild.nodeValue;} 
				else{assetSynopsis = "";}
				if(asset.getElementsByTagName("assetTags")[0]){
					assetTags =  asset.getElementsByTagName("assetTags")[0].firstChild.nodeValue;} 
				else{assetTags = "";}
				assetViewed =  asset.getElementsByTagName("assetViewed")[0].firstChild.nodeValue;
				if ( asset.getElementsByTagName("assetRating")[0].firstChild){
					assetRating =  asset.getElementsByTagName("assetRating")[0].firstChild.nodeValue;} 
				else{assetRating = "";}
				assetLevel =  asset.getElementsByTagName("assetViewerCategory")[0].firstChild.nodeValue;
				if(asset.getElementsByTagName("assetGenre")[0].firstChild){
					assetGenre =  asset.getElementsByTagName("assetGenre")[0].firstChild.nodeValue;
					if(i == "0"){
						setChannelName(assetGenre);}} 
					else{assetGenre = "";}		
				programmeId = asset.getElementsByTagName("assetProgrammeId")[0].firstChild.nodeValue;
				addAssetsFromWeb(assetId,assetImage,assetVideo,assetTitle,assetLengthMinutes,assetSynopsis,assetTags,assetViewed,assetRating,assetLevel,programmeId, assetGenre);}		
			displayAssets('allTrail','displayAllAssets','assetFromWeb','4','0');
			playNow('auto',tmp_fw_assetId,'assetFromWeb');}
		else{
			if (retry_fromweb > 0){
				retry_fromweb -= 1;
				getAssetFromWeb(tmp_fw_assetId,tmp_fw_genreId,tmp_fw_genreName);}
			else{
				retry_fromweb = 5;
				tmp_fw_assetId = "";
				tmp_fw_genreId = "";
				tmp_fw_genreName = "";
				htmlOutput = "<span class=\"style33\"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Error loading programme, please try again later...</span>";
				WriteLayer('displayAllAssets',null,htmlOutput);}}}}
				var gb_assetVODtheId = 0;retry_gb_fromemail=5;
function playFromEmail(theId){	
	unloadPage("whats on");
	unloadPage('previews');
	unloadPage('programmes');		
	unloadPage('playlist');		
	document.getElementById("apDiv5").style.display = "block";		
	document.getElementById("tab_genre_list").style.display = "none";
	document.getElementById("tab_genre_list_bg").style.display = "none";
	if(document.getElementById("tab_whatson_editorspick"))
	{MM_showHideLayers('tab_whatson_editorspick','','hide');}	
	if(document.getElementById("WhatsOn"))
	{MM_showHideLayers('WhatsOn','','hide');}	
	if(document.getElementById("tab_whatson_mostviewed"))
	{MM_showHideLayers('tab_whatson_mostviewed','','hide');}	
	if(document.getElementById("MostViewed"))
	{MM_showHideLayers('MostViewed','','hide');}	
	if(document.getElementById("tab_previews_latest"))
	{MM_showHideLayers('tab_previews_latest','','hide');}	
	if(document.getElementById("PreviewLatest"))		
	{MM_showHideLayers('PreviewLatest','','hide');}	
	if(document.getElementById("tab_previews_bychannels"))	
	{MM_showHideLayers('tab_previews_bychannels','','hide');}	
	if(document.getElementById("PLByChannels"))	
	{MM_showHideLayers('PLByChannels','','hide');}	
	if(document.getElementById("apDiv5"))	
	{MM_showHideLayers('apDiv5','','show');}			
	if(document.getElementById("tab_programmes_latest"))	
	{MM_showHideLayers('tab_programmes_latest','','hide');}	
	if(document.getElementById("ProgrammeLatest"))
	{MM_showHideLayers('ProgrammeLatest','','hide');}		
	if(document.getElementById("tab_programmes_bychannels"))
	{MM_showHideLayers('tab_programmes_bychannels','','hide');}
	if(document.getElementById("PRByChannels"))
	{MM_showHideLayers('PRByChannels','','hide');}
	if(document.getElementById("list1"))
	{MM_showHideLayers('list1','','show');}	
	if(document.getElementById("GenreList"))
	{MM_showHideLayers('GenreList','','hide');}	
	if(document.getElementById("list2"))
	{MM_showHideLayers('list2','','hide');}	
	globalChannelSection = "genres";
	setMenuActive('4');		
	setChannelName('Loading ...');	
	htmlOutput = "<span class=\"style33\"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"" + skinFolder + "/images/load.gif\" width=\"10\" height=\"10\" align=\"absmiddle\">&nbsp;Loading ...</span>";
	WriteLayer('displayAllAssets',null,htmlOutput);	
	if(document.getElementById("list2").innerHTML == ""){ 
		loadPlaylistPanel();
		showPlaylist();
		if(getCookie("loginid") != ""){
			loadAllUserPlaylistFromWS();}} 
	else{
		loadAllUserPlaylistFromWS();}
	assetFromEmail = new Array();
	var epassLoginId = getCookie("loginid");	
	if(epassLoginId == ""){
		epassLoginId = "0";}
	var seederDate = "0";	
	if((getCookie("seederDate") != "") || (getCookie("seederDate") != undefined)){
		seederDate = getCookie("seederDate");}	
	var seederTime = "0";	
	if((getCookie("seederTime") != "") || (getCookie("seederTime") != undefined)){
		seederTime = getCookie("seederTime");}		
	sendStatsShareContentReply(epassLoginId, theId, seederDate, seederTime);
	sendStatsShareContentPlay(epassLoginId, theId, seederDate, seederTime);	
	gb_assetVODtheId = theId;	
	XMLPlayVOD = false;
	XMLPlayVOD = new ActiveXObject("Microsoft.XMLHTTP");	
	var soapMessage, webMethod;	
	webMethod="getAssetsFromLink"; 	
	soapMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">";
	soapMessage += "  <soap:Body>";
	soapMessage += "    <" + webMethod + " xmlns=\"http://tempuri.org/\">";
	soapMessage += "	<assetId>"+ theId +"</assetId>";
	soapMessage += "    </" + webMethod + ">";
	soapMessage += "  </soap:Body>";
	soapMessage += "</soap:Envelope>";
	XMLPlayVOD.onreadystatechange = playNow2CBFromEmail;
	XMLPlayVOD.Open("POST",addrWebServices, true);
	XMLPlayVOD.SetRequestHeader("Content-Type","text/xml; charset=utf-8");
	XMLPlayVOD.SetRequestHeader("SOAPAction","http://tempuri.org/" + webMethod);
	XMLPlayVOD.send(soapMessage);}
function playNow2CBFromEmail(){	
	if(XMLPlayVOD.readyState == 4){
		if(XMLPlayVOD.status == 200){	
			var assetId,assetImage,assetVideo,assetTitle,assetLengthMinutes,assetSynopsis,assetTags,assetViewed,assetRating,assetLevel,programmeId,assetGenre;	
			var x = XMLPlayVOD.responseXML;
			var xx = x.childNodes[1].xml;			
			xmlObject = (new DOMParser()).parseFromString(xx, "text/xml");			
			var root = xmlObject.getElementsByTagName('assets')[0];				
			var assets = root.getElementsByTagName("asset");			
			for(var i = 0 ; i < assets.length ; i++){
				asset = assets[i];
				assetId =  asset.getAttribute("assetId");
				if(asset.getElementsByTagName("assetImage")[0]){
					assetImage =  asset.getElementsByTagName("assetImage")[0].firstChild.nodeValue;} 
				else{assetImage = "";}
				if(asset.getElementsByTagName("assetVideo")[0].firstChild){
					assetVideo =  asset.getElementsByTagName("assetVideo")[0].firstChild.nodeValue;}
				else{assetVideo = "";}	
				if(asset.getElementsByTagName("assetTitle")[0].firstChild){
					assetTitle =  asset.getElementsByTagName("assetTitle")[0].firstChild.nodeValue;} 
				else{assetTitle = "";}
				assetLengthMinutes =  asset.getElementsByTagName("assetLengthMinutes")[0].firstChild.nodeValue;											
				if(asset.getElementsByTagName("assetSynopsis")[0]){
					assetSynopsis =  asset.getElementsByTagName("assetSynopsis")[0].firstChild.nodeValue;} 
				else{assetSynopsis = "";}
				if(asset.getElementsByTagName("assetTags")[0]){
					assetTags =  asset.getElementsByTagName("assetTags")[0].firstChild.nodeValue;} 
				else{assetTags = "";}
				assetViewed =  asset.getElementsByTagName("assetViewed")[0].firstChild.nodeValue;
				if(asset.getElementsByTagName("assetRating")[0].firstChild){
					assetRating =  asset.getElementsByTagName("assetRating")[0].firstChild.nodeValue;} 
				else{assetRating = "";}
				assetLevel =  asset.getElementsByTagName("assetViewerCategory")[0].firstChild.nodeValue;			
				if(asset.getElementsByTagName("assetGenre")[0].firstChild){
					assetGenre =  asset.getElementsByTagName("assetGenre")[0].firstChild.nodeValue;
					if(i == "0"){
						setChannelName(assetGenre);}} 
				else{assetGenre = "";}		
				programmeId = asset.getElementsByTagName("assetProgrammeId")[0].firstChild.nodeValue;				
				addAssetsFromEmail(assetId,assetImage,assetVideo,assetTitle,assetLengthMinutes,assetSynopsis,assetTags,assetViewed,assetRating,assetLevel,programmeId, assetGenre);}	
			displayAssets('allTrail','displayAllAssets','assetFromEmail','4','0');
			playNow('auto',gb_assetVODtheId,'assetFromEmail');}
		else{
			if(retry_gb_fromemail >0){
				retry_gb_fromemail -= 1;
				playFromEmail(gb_assetVODtheId);}
			else{retry_gb_fromemail = 5;}}}}
function callStatsShareContentRegister(){
	var epassLoginId;
	if (dpAssetIdFromEmail != "" ){
		epassLoginId = getCookie("loginid");
		if(epassLoginId == ""){
			epassLoginId = "0";}
		sendStatsShareContentRegister(epassLoginId)}}
// Project		: Astro Broadband TV
// Date			: 5 March 2008
// Author		: Nor Izura Bt. Abd. Gani (nor_ghani@astro.com.my)
// Copyrights	: All Copyrights Reserved of Multimedia Interactive Technology 
// Description	: This function related to omniture statistic

function setOmnitureValues(actionBy,caller,section,videoName,eventType,Id) 
{
	var l_pageName, l_server, l_channel, l_pageType, l_prop1, l_prop2, l_prop3, l_prop4, l_prop5, l_prop6, l_prop7;
	var l_prop8, l_prop9, l_campaign, l_events, l_products, l_eVar22, l_eVar23, l_hier1;

	l_server   = "video.astro.com.my"
	l_channel  = "video.astro.com.my";		
	
	switch(caller)
	{
		/*
			when user click 1st level tab whats on/previews/programmes/genres/my playlist				
			#loadPage
		*/
		case "loadPage":
			if (actionBy == "user")
			{
				if (section != "") 
				{		
					l_pageName = "watch video:"+section;				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:"+section;
					l_prop3    = "watch video:"+section;
					l_prop4    = "watch video:"+section;
					l_prop5    = "";
					l_prop6    = "";
					l_prop7    = "";
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";
					l_events   = "";
					l_products = "";
					l_eVar22   = "";
					l_eVar23   = "";
					l_hier1    = "watch video|"+section+"|home";	
					
					
				}
			}
			break;			
		/*
			when user click 2nd level tab editor's pick/previews:latest/programmes:latest
			these tab's onclick event using id			
			#getAssetsByGroupId @all-assets.js
		*/
		case "getAssetsByGroupId":
			if (actionBy == "user")
			{
				switch(section)
				{
					//whats on/editor's pick
					case "138":
						l_pageName = "watch video:whats on:editor's pick";
						l_pageType = "";
						l_prop1    = "watch video";
						l_prop2    = "watch video:whats on";
						l_prop3    = "watch video:whats on:editor's pick";
						l_prop4    = "watch video:whats on:editor's pick";

						if(videoName != "none")
						{
							l_prop5	   = videoName;		//Content Title
							l_prop6    = Id;			//Content ID
							l_prop7    = "video";		//Content Type	
							l_eVar22   = videoName;		//Document Name
							l_eVar23   = videoName;		//Video Name
							//l_events   = eventType;	//Video Start							
							//l_hier1    = "watch video|whats on|editor's pick|"+videoName;
						}
						else
						{
							l_prop5    = "";
							l_prop6    = "";
							l_prop7    = "";
							l_eVar22   = "";
							l_eVar23   = "";	
							//l_events   = "";							
							//l_hier1    = "watch video|whats on|editor's pick";
						}				
						
						l_events   = "";	
						l_hier1    = "watch video|whats on|editor's pick";
						l_prop8    = "";
						l_prop9    = "";
						l_campaign = "";						
						l_products = "";	
						
						
						
						break; 
					//previews/latest
					case "140":
						l_pageName = "watch video:previews:latest";
						l_pageType = "";
						l_prop1    = "watch video";
						l_prop2    = "watch video:previews";
						l_prop3    = "watch video:previews:latest";
						l_prop4    = "watch video:previews:latest";

						if(videoName != "none")
						{
							l_prop5	   = videoName;		//Content Title
							l_prop6    = Id;			//Content ID
							l_prop7    = "video";		//Content Type	
							l_eVar22   = videoName;		//Document Name
							l_eVar23   = videoName;		//Video Name
							//l_events   = eventType;	//Video Start							
							//l_hier1    = "watch video|previews|latest|"+videoName;							
						}
						else
						{
							l_prop5    = "";
							l_prop6    = "";
							l_prop7    = "";
							l_eVar22   = "";
							l_eVar23   = "";	
							//l_events   = "";							
							//l_hier1    = "watch video|previews|latest";
						}	
						
						l_events   = "";
						l_hier1    = "watch video|previews|latest|home";
						l_prop8    = "";
						l_prop9    = "";
						l_campaign = "";						
						l_products = "";	
						
						
						break;
					//programmes/latest
					case "142":
						l_pageName = "watch video:programmes:latest";
						l_pageType = "";
						l_prop1    = "watch video";
						l_prop2    = "watch video:programmes";
						l_prop3    = "watch video:programmes:latest";
						l_prop4    = "watch video:programmes:latest";

						if(videoName != "none")
						{
							l_prop5	   = videoName;		//Content Title
							l_prop6    = Id;			//Content ID
							l_prop7    = "video";		//Content Type	
							l_eVar22   = videoName;		//Document Name
							l_eVar23   = videoName;		//Video Name
							//l_events   = eventType;	//Video Start							
							//l_hier1    = "watch video|programmes|latest|"+videoName;
						}
						else
						{
							l_prop5    = "";
							l_prop6    = "";
							l_prop7    = "";
							l_eVar22   = "";
							l_eVar23   = "";	
							//l_events   = "";							
							//l_hier1    = "watch video|programmes|latest";
						}	
						
						l_events   = "";
						l_hier1    = "watch video|programmes|latest|home";
						l_prop8    = "";
						l_prop9    = "";
						l_campaign = "";						
						l_products = "";
						
						
						break;				
				}
			}
			break;			
		/*
			when user click 2nd level tab whats on:most viewed				
			#getMostViewedAssets	@most-viewed-assets.js
		*/
		case "getMostViewedAssets":
			if (actionBy == "user")
			{		
				if (section == "mostviewed") 
				{		
					l_pageName = "watch video:whats on:most viewed";				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:whats on";
					l_prop3    = "watch video:whats on:most viewed";
					l_prop4    = "watch video:whats on:most viewed";

					if(videoName != "none")
					{
						l_prop5	   = videoName;		//Content Title
						l_prop6    = Id;			//Content ID
						l_prop7    = "video";		//Content Type	
						l_eVar22   = videoName;		//Document Name
						l_eVar23   = videoName;		//Video Name
						//l_events   = eventType;		//Video Start						
						//l_hier1    = "watch video|whats on|most viewed|"+videoName;
					}
					else
					{
						l_prop5    = "";
						l_prop6    = "";
						l_prop7    = "";
						l_eVar22   = "";
						l_eVar23   = "";	
						//l_events   = "";						
						//l_hier1    = "watch video|whats on|most viewed";
					}
					
					l_events   = "";
					l_hier1    = "watch video|whats on|most viewed|home";
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";
					l_products = "";	
					
					
				}
			}
			break;		
		/*
			when user click 2nd level tab previews:by channels/programmes:by channels
			these tab's onclick event using section name			
			#getAllChannels @get-all-channels.js
		*/	
		case "getAllChannels":
			if (actionBy == "user")
			{
				switch(section)
				{
					//previews/By Channels
					case "previews":
						l_pageName = "watch video:previews:by channels";
						l_pageType = "";
						l_prop1    = "watch video";
						l_prop2    = "watch video:previews";
						l_prop3    = "watch video:previews:by channels";
						l_prop4    = "watch video:previews:by channels";
						l_prop5    = "";
						l_prop6    = "";
						l_prop7    = "";
						l_prop8    = "";
						l_prop9    = "";
						l_campaign = "";
						l_events   = "";
						l_products = "";
						l_eVar22   = "";
						l_eVar23   = "";
						l_hier1    = "watch video|previews|by channels|home";		
						
						
						
						break;  
					//programmes/By Channels
					case "programmes":
						l_pageName = "watch video:programmes:by channels";
						l_pageType = "";
						l_prop1    = "watch video";
						l_prop2    = "watch video:programmes";
						l_prop3    = "watch video:programmes:by channels";
						l_prop4    = "watch video:programmes:by channels";
						l_prop5    = "";
						l_prop6    = "";
						l_prop7    = "";
						l_prop8    = "";
						l_prop9    = "";
						l_campaign = "";
						l_events   = "";
						l_products = "";
						l_eVar22   = "";
						l_eVar23   = "";
						l_hier1    = "watch video|programmes|by channels|home";	
						
						
						
						break;			
				}
			}
			break;			
		/*
			when user click 3rd level tab previews:by channels:(channel name)
			<channel name> tab's onclick event using channel name			
			#getLatestPromosByChannel	@get-latest-promos-by-channel.js
		*/
		case "getlatestPromosByChannel":
			if(actionBy == "user")
			{
				if (section != "") 
				{		
					l_pageName = "watch video:previews:by channels:"+section;				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:previews";
					l_prop3    = "watch video:previews:by channels";
					l_prop4    = "watch video:previews:by channels:"+section;				
					
					if(videoName != "none")
					{
						l_prop5	   = videoName;		//Content Title
						l_prop6    = Id;			//Content ID
						l_prop7    = "video";		//Content Type	
						l_eVar22   = videoName;		//Document Name
						l_eVar23   = videoName;		//Video Name
						//l_events   = eventType;		//Video Start					
						//l_hier1    = "watch video|previews|by channels|"+section+"|"+videoName;
					}
					else
					{
						l_prop5    = "";
						l_prop6    = "";
						l_prop7    = "";
						l_eVar22   = "";
						l_eVar23   = "";	
						//l_events   = "";
						//l_hier1    = "watch video|previews|by channels|"+section;
					}
					
					l_events   = "";
					l_hier1    = "watch video|previews|by channels|"+section;
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";				
					l_products = "";	
					
					
				}	
			}
			break;				
		/*
			when user click 3rd level tab programmes:by channels:(channel name)
			these tab's onclick event using channel name			
			#getLatestProgrammeByChannel 	@get-latest-programme-by-channel.js
		*/
		case "getlatestProgrammeByChannel":
			if(actionBy == "user")
			{				
				if (section != "") 
				{				
					l_pageName = "watch video:programmes:by channels:"+section;				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:programmes";
					l_prop3    = "watch video:programmes:by channels";
					l_prop4    = "watch video:programmes:by channels:"+section;
					
					if(videoName != "none")
					{
						l_prop5	   = videoName;		//Content Title
						l_prop6    = Id;			//Content ID
						l_prop7    = "video";		//Content Type	
						l_eVar22   = videoName;		//Document Name
						l_eVar23   = videoName;		//Video Name
						//l_events   = eventType;	//Video Start					
						//l_hier1    = "watch video|programmes|by channels|"+section+"|"+videoName;
					}
					else
					{
						l_prop5    = "";
						l_prop6    = "";
						l_prop7    = "";
						l_eVar22   = "";
						l_eVar23   = "";	
						//l_events   = "";
						//l_hier1    = "watch video|programmes|by channels|"+section;
					}
					
					l_events   = "";
					l_hier1    = "watch video|programmes|by channels|"+section;
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";				
					l_products = "";	
					
					
				}
			}
			break;	
		/*
			when user click 2nd level tab genres:(genre name)
			these tab's onclick event using genre id/name			
			#getlatestProgrammeByGenre	@get-latest-programme-by-genre.js
		*/
		case "getlatestProgrammeByGenre":
			if(actionBy == "user")
			{
				if (section != "") 
				{	
					l_pageName = "watch video:genres:"+section;				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:genres";
					l_prop3    = "watch video:genres:"+section;
					l_prop4    = "watch video:genres:"+section;

					if(videoName != "none")
					{
						l_prop5	   = videoName;		//Content Title
						l_prop6    = Id;			//Content ID
						l_prop7    = "video";		//Content Type	
						l_eVar22   = videoName;		//Document Name
						l_eVar23   = videoName;		//Video Name
						//l_events   = eventType;		//Video Start						
						//l_hier1    = "watch video|genres|"+section+"|"+videoName;
					}
					else
					{
						l_prop5    = "";
						l_prop6    = "";
						l_prop7    = "";
						l_eVar22   = "";
						l_eVar23   = "";	
						//l_events   = "";						
						//l_hier1    = "watch video|genres|"+section;
					}
					
					l_events   = "";	
					l_hier1    = "watch video|genres|"+section;
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";					
					l_products = "";	
					
					
				}
			}
			break;
		/*
			when user click 1st level tab now showing		
			
			#default.asp @tab_nowshowing2.gif/@playnow.js
		*/
		case "nowShowing":
			if(actionBy == "user")
			{
				if (section == "nowShowing") 
				{		
					l_pageName = "watch video:now showing";				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:now showing";
					l_prop3    = "watch video:now showing";
					l_prop4    = "watch video:now showing";
					l_prop5    = "";
					l_prop6    = "";
					l_prop7    = "";
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";
					l_events   = "";
					l_products = "";
					l_eVar22   = "";
					l_eVar23   = "";
					l_hier1    = "watch video|now showing";	
					
					
				}
			}
			break;			
		/*
			when user click 1st level tab more episodes		
			
			#default.asp @tab_moreepisodes.gif
		*/
		case "moreEpisodes":
			if(actionBy == "user")
			{
				if (section == "moreEpisodes") 
				{	
					l_pageName = "watch video:more episodes";				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:more episodes";
					l_prop3    = "watch video:more episodes";
					l_prop4    = "watch video:more episodes";
					l_prop5    = "";
					l_prop6    = "";
					l_prop7    = "";
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";
					l_events   = "";
					l_products = "";
					l_eVar22   = "";
					l_eVar23   = "";
					l_hier1    = "watch video|more episodes";
					
					
				}
			}
			break;
		/*
			when user click 1st level tab all programmes	
			
			#getAllProgramme @all-programme-assets.js
		*/
		case "getAllProgrammes":
			if(actionBy == "user")
			{
				if (section == "allProgrammes") 
				{		
					l_pageName = "watch video:all programmes";				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:all programmes";
					l_prop3    = "watch video:all programmes";
					l_prop4    = "watch video:all programmes";
					l_prop5    = "";
					l_prop6    = "";
					l_prop7    = "";
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";
					l_events   = "";
					l_products = "";
					l_eVar22   = "";
					l_eVar23   = "";
					l_hier1    = "watch video|all programmes|home";		
					
					
				}
			}
			break;
		/*
			when user click 2nd level tab all programmes:(programmes name+season)				
			#getLatestProgrammesBySeason	@get-latest-programme-by-season.js
		*/
		case "getLatestProgrammesBySeason":
			if(actionBy == "user")
			{
				if (section != "") 
				{		
					l_pageName = "watch video:all programmes:"+section;            
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:all programmes";
					l_prop3    = "watch video:all programmes:"+section;
					l_prop4    = "watch video:all programmes:"+section;
					
					if(videoName != "none")
					{						
						l_prop5	   = videoName;		//Content Title
						l_prop6    = Id;			//Content ID
						l_prop7    = "video";		//Content Type	
						l_eVar22   = videoName;		//Document Name
						l_eVar23   = videoName;		//Video Name
						//l_events   = eventType;		//Video Start					
						//l_hier1    = "watch video|all programmes|"+section+"|"+videoName;
					}
					else
					{
						l_prop5    = "";
						l_prop6    = "";
						l_prop7    = "";
						l_eVar22   = "";
						l_eVar23   = "";	
						//l_events   = "";
						//l_hier1    = "watch video|all programmes|"+section;						
					}
					
					l_events   = "";
					l_hier1    = "watch video|all programmes|"+section;
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";
					l_products = "";		
					
					
				}
			}
			break;
		/*
			when user click search tab		
			
			#default.asp @tab_search.gif
		*/
		case "search":
			if(actionBy == "user")
			{
				if (section == "search") 
				{		
					l_pageName = "watch video:search";				
					l_pageType = "";
					l_prop1    = "watch video";
					l_prop2    = "watch video:search";
					l_prop3    = "watch video:search";
					l_prop4    = "watch video:search";
					l_prop5    = "";
					l_prop6    = "";
					l_prop7    = "";
					l_prop8    = "";
					l_prop9    = "";
					l_campaign = "";
					l_events   = "";
					l_products = "";
					l_eVar22   = "";
					l_eVar23   = "";
					l_hier1    = "watch video|search";	
					
					
				}
			}
			break;
//		case "videoStatistic":
//		
//			var duration = eventType;
//			
//			if (actionBy == "user")
//			{
//				l_pageName = "";				
//				l_pageType = "";
//				l_prop1    = "";
//				l_prop2    = "";
//				l_prop3    = "";
//				l_prop4    = "";				
//				l_prop6    = "";
//				l_prop7    = "";
//				l_prop8    = "";
//				l_prop9    = "";
//				l_campaign = "";
//				l_events   = "";
//				l_products = "";
//				l_eVar22   = "";
//				l_eVar23   = "";
//				l_hier1    = "";
//				l_videoEvent = section;
//				
//				var tmpDuration = parseInt(duration)*60;
//				
//				switch(section)
//				{
//					case "onLoadOf":
//						l_prop5 = videoName;						
//						l_duration = tmpDuration;						
//						break;
//					case "onPlayOf":
//						l_prop5 = videoName;						
//						break;
//					case "onStopOf":
//						l_prop5 = videoName;						
//						break;
//					case "onCloseOf":
//						l_prop5 = videoName;						
//						break;
//				}
//			}			
//			break;
	}
	
	load_omniture(l_pageName,l_channel,l_server,l_pageType,l_prop1,l_prop2,l_prop3,l_prop4,l_prop5,l_prop6,l_prop7,l_prop8,l_prop9,l_campaign,l_events,l_products,l_eVar22,l_eVar23,l_hier1);	
}