var __doc__;
var __frm__;
var isFlashPresent = null;	
var isWMPPresent = null;
var isQTPresent = null;	
var isToolTipValue;
var clipsCnt=0;	
var objSpanType; // For Span Type
var intPref; // For Preference
var strASFPrevPath; // For ASF Preview Path
var strQTPrevPath; // For QT Preview Path
var strFLASHPrevPath; // For Flash Preview Path
var strFlashFileName;
var strFlashStreamingIP;
var strAudioPrevPath // For Audio Preview Path
var strThumbPath; // For Thumb image Path
var strAssetType; // For Asset Type
var strVirtualFlashPath;
var strEmbedObject = "NonFlash"; // Get the Embed Object id
var PrevLayerWidth = 800;
var PrevLayerXPos;
var PrevLayerYPos;
var maxw;
var maxh;
var clickedAssetID;
/********************************************************************************************
   Description: 1)Callback function used to get details based on the Asset id's.
   
   Parameters:  1)strAssetId  : Asset id.
*********************************************************************************************/ 
function AssetPreviewLayer_GetAssetValue(strAssetId)
{
	clickedAssetID = strAssetId;
	if (txtFirstLogin == 'NONLOGIN')
	{
		if (txtPrevAccessRestriction == 'true')
		{
			var objAsset = returnControlId('AssetPreviewLayer_ascx') + '_' + 'AssetCallback';
			eval(objAsset).Callback(strAssetId);
		}
		else
		{
			var strCLogin = getCookie('TNMLogin');
			if(strCLogin != null)
			{
				var objAsset = returnControlId('AssetPreviewLayer_ascx') + '_' + 'AssetCallback';
				eval(objAsset).Callback(strAssetId);
			}
		}
	}
	else
	{
		var objAsset = returnControlId('AssetPreviewLayer_ascx') + '_' + 'AssetCallback';
		eval(objAsset).Callback(strAssetId);
	}
}
/********************************************************************************************
   Description: 1)Function used to find flash install or not.
*********************************************************************************************/
function AssetPreviewLayer_isFlashInstalled()
{
	isFlashPresent = getCookie('PLUGIN_FLASH');
	if (isFlashPresent == '1')
	{
		isFlashPresent = true;
	}
	else
	{
		isFlashPresent = false;
	}
	return isFlashPresent;
}		
/********************************************************************************************
   Description: 1)Function used to find WMP install or not.
*********************************************************************************************/
function AssetPreviewLayer_isWMPInstalled()
{
	isWMPPresent = getCookie('PLUGIN_WMP');
	if (isWMPPresent == '1')
	{
		isWMPPresent = true;
	}
	else
	{
		isWMPPresent = false;
	}
	return isWMPPresent;
}
/********************************************************************************************
   Description: 1)Function used to find QT install or not.
*********************************************************************************************/
function AssetPreviewLayer_isQTInstalled()
{
	isQTPresent = getCookie('PLUGIN_QT');
	if (isQTPresent == '1')
	{
		isQTPresent = true;
	}
	else
	{
		isQTPresent = false;
	}
	return isQTPresent;
}
/********************************************************************************************
   Description: 1) Function used to hide or show the prev/next link.
*********************************************************************************************/
function loaded()
{	
	if (strNavOption == '1')
	{
		AssetPreviewLayer_DisablePrev();
		AssetPreviewLayer_DisableNext();
	}
	AssetPreviewLayer_DisableBoth();
}
/********************************************************************************************
   Description: 1)Last Callback function of the preview layer.
*********************************************************************************************/
function AssetPreviewLayer_LastCallBack()
{
	OmnitureControlCallBackStart();
	var objDivLoading = $('AssetPreviewLayer_divLoading');
	objDivLoading.style.display = 'none';
	
	try{
	var objEmbedSpanVideo = $('EmbedSpanVideo');
	objEmbedSpanVideo.style.display = 'block';}catch(ex){}
	
	try{
	var objEmbedSpanVideo = $('EmbedSpanAudio');
	objEmbedSpanVideo.style.display = 'block';}catch(ex){}
			
	AssetPreviewLayer_ShowPlayer();
	if (strEmbedObject != 'standalone')
	{
	 loaded();
	}
	/*if (strNavOption == '1')
	{
		AssetPreviewLayer_DisablePrev();
		AssetPreviewLayer_DisableNext();
	}
	AssetPreviewLayer_DisableBoth();*/
	GetLayerWidth();
	maxw = PrevLayerWidth;
	if (PrevLayerXPos)
	{ 
		hideselectboxes(0,PrevLayerXPos,PrevLayerYPos,maxw,maxh,0);
	}
}

function AssetPreviewLayer_HideMenus()
{
	setTimeout("AssetPreviewLayer_contractAssetPreview()",5000);
}

function AssetPreviewLayer_HideOpenMenus()
{
	var objdivAssetPreview = $('divAssetPreview');
	objdivAssetPreview.style.visibility = 'hidden';
}
/********************************************************************************************
   Description: 1)Function used to call for next Asset.
*********************************************************************************************/
function AssetPreviewLayer_nextClip()
{
	var objDivLoading = $('AssetPreviewLayer_divLoading');
	objDivLoading.style.display = 'block';
	
	AssetPreviewLayer_DisablePrevNextClick();
	
	try{
	var objEmbedSpanVideo = $('EmbedSpanVideo');
	objEmbedSpanVideo.style.display = 'none';}catch(ex){}
	
	try{
	var objEmbedSpanVideo = $('EmbedSpanAudio');
	objEmbedSpanVideo.style.display = 'none';}catch(ex){}		
	
	intPreviewClipCntr = intPreviewClipCntr + 1;
	AssetPreviewLayer_GetAssetValue(gArrListAssetId[intPreviewClipCntr]);
}
/********************************************************************************************
   Description: 1)Function used to call previous Asset.
*********************************************************************************************/
function AssetPreviewLayer_prevClip()
{
	var objDivLoading = $('AssetPreviewLayer_divLoading');
	objDivLoading.style.display = 'block';
	
	AssetPreviewLayer_DisablePrevNextClick();
	
	try{
	var objEmbedSpanVideo = $('EmbedSpanVideo');
	objEmbedSpanVideo.style.display = 'none';}catch(ex){}
	
	try{
	var objEmbedSpanVideo = $('EmbedSpanAudio');
	objEmbedSpanVideo.style.display = 'none';}catch(ex){}
			
	intPreviewClipCntr = intPreviewClipCntr - 1;
	AssetPreviewLayer_GetAssetValue(gArrListAssetId[intPreviewClipCntr]);
}
/********************************************************************************************
   Description: 1)Function used to Disable previous link.
*********************************************************************************************/
function AssetPreviewLayer_DisablePrev()
{
	if(intPreviewClipCntr == 0)
	{
		var objspnPrev = $('spnPrev');
		var objspnNext = $('spnNext');
		var objdivBottomDash = $('divBottomDash');
		var objspnAddToCart = $('AssetPreviewLayer_divAddToCart');
		objspnAddToCart.style.visibility = 'visible';		
		objspnPrev.style.visibility = 'hidden';
		objspnPrev.style.display = 'none';
		objspnNext.style.visibility = 'visible';
		objspnNext.style.display = 'block';
		objdivBottomDash.style.display = 'block';
	}
	else
	{	
		var objspnPrev = $('spnPrev');
		var objspnNext = $('spnNext');
		var objdivBottomDash = $('divBottomDash');
		var objspnAddToCart = $('AssetPreviewLayer_divAddToCart');
		objspnAddToCart.style.visibility = 'visible';		
		objspnPrev.style.visibility = 'visible';
		objspnPrev.style.display = 'block';
		objspnNext.style.visibility = 'visible';
		objspnNext.style.display = 'block';
		objdivBottomDash.style.display = 'block';
	}
}						
/********************************************************************************************
   Description: 1)Function used to Disable next link.
*********************************************************************************************/
function AssetPreviewLayer_DisableNext()
{
	var intCurrentPos;
	if (gArrListAssetId.length == 0)
	{
		intCurrentPos = 0;
	}
	else
	{
		intCurrentPos = intPreviewClipCntr + 1;
	}
	
	if(gArrListAssetId.length==intCurrentPos)
	{
		var objspnPrev = $('spnPrev');
		var objspnNext = $('spnNext');
		var objdivBottomDash = $('divBottomDash');
		var objspnAddToCart = $('AssetPreviewLayer_divAddToCart');
		objspnAddToCart.style.visibility = 'visible';		
		objspnNext.style.visibility = 'hidden';
		objspnNext.style.display = 'none';
		objspnPrev.style.visibility = 'visible';
		objspnPrev.style.display = 'block';
		objdivBottomDash.style.display = 'block';
	}
	else
	{
		if(intPreviewClipCntr != 0)
		{
			var objspnPrev = $('spnPrev');
			var objspnNext = $('spnNext');
			var objdivBottomDash = $('divBottomDash');
			var objspnAddToCart = $('AssetPreviewLayer_divAddToCart');
			objspnAddToCart.style.visibility = 'visible';		
			objspnPrev.style.visibility = 'visible';
			objspnPrev.style.display = 'block';
			objspnNext.style.visibility = 'visible';
			objspnNext.style.display = 'block';
			objdivBottomDash.style.display = 'block';
		}
	}
	
}
/********************************************************************************************
   Description: 1)Function used to Disable both links.
*********************************************************************************************/
function AssetPreviewLayer_DisableBoth()
{
	if (strNavOption == '1')
	{
		if(gArrListAssetId.length == 1 || gArrListAssetId.length == 0)
		{
			var objspnPrev = $('spnPrev');
			var objspnNext = $('spnNext');
			var objdivBottomDash = $('divBottomDash');
			var objspnAddToCart = $('AssetPreviewLayer_divAddToCart');
			objspnAddToCart.style.visibility = 'visible';		
			objspnNext.style.display = 'none';
			objspnPrev.style.display = 'none';
			objdivBottomDash.style.display = 'none';
			objspnNext.style.visibility = 'hidden';
			objspnPrev.style.visibility = 'hidden';
		}
	}
	else
	{
		var objspnPrev = $('spnPrev');
		var objspnNext = $('spnNext');
		var objdivBottomDash = $('divBottomDash');
		var objspnAddToCart = $('AssetPreviewLayer_divAddToCart');
		objspnAddToCart.style.visibility = 'visible';		
		objspnNext.style.display = 'none';
		objspnPrev.style.display = 'none';
		objdivBottomDash.style.display = 'none';
		objspnNext.style.visibility = 'hidden';
		objspnPrev.style.visibility = 'hidden';	
	}
}
/********************************************************************************************
   Description: 1)Function added for disabling the prev/next whenever user has clicked the 
				  prev/next.Issue ref 4530
				// This function is added for disabling the prev/next whenever user has clicked the prev/next
				// issue ref 4530
*********************************************************************************************/
function AssetPreviewLayer_DisablePrevNextClick()
{
	var objspnPrev = $('spnPrev');
	var objspnNext = $('spnNext');
	var objspnAddToCart = $('AssetPreviewLayer_divAddToCart');
	objspnAddToCart.style.visibility = 'hidden';
	objspnPrev.style.visibility = 'hidden';
	objspnNext.style.visibility = 'hidden';
}
/********************************************************************************************
   Description: 1)Function used to show player
*********************************************************************************************/
function AssetPreviewLayer_ShowPlayer()
{
	intPref = $(returnControlId('AssetPreviewLayer_ascx') + '_hidPref').value;
	strASFPrevPath = $(returnControlId('AssetPreviewLayer_ascx') + '_hidASFPreviewPath').value;
	strQTPrevPath = $(returnControlId('AssetPreviewLayer_ascx') + '_hidQTPreviewPath').value;
	strFLASHPrevPath = $(returnControlId('AssetPreviewLayer_ascx') + '_hidFLASHPreviewPath').value;
	strAudioPrevPath = $(returnControlId('AssetPreviewLayer_ascx') + '_hidAudioPreviewPath').value;
	strThumbPath = $(returnControlId('AssetPreviewLayer_ascx') + '_hidThumbPath').value;
	strAssetType = $(returnControlId('AssetPreviewLayer_ascx') + '_hidAssetType').value;
	strFlashFileName = $(returnControlId('AssetPreviewLayer_ascx') + '_hidFlashFileName').value;
	strFlashStreamingIP = $(returnControlId('AssetPreviewLayer_ascx') + '_hidFlashStreamingIP').value;
	strVirtualFlashPath=$(returnControlId('AssetPreviewLayer_ascx') + '_' + 'hidVirtualFlashPath').value;
	
	AssetPreviewLayer_ShowFlashLayer();	
}
/********************************************************************************************
   Description: 1)Function used to set the preview player
*********************************************************************************************/		
function AssetPreviewLayer_PreviewMacORWindows()
{
	objSpanType = 'EmbedSpanVideo';
	if (txtIsMAC == "false")
	/****************Operating System Is Windows*************************************/
	{			  
		if (strBrowserName != "IE")
		{
			if(strQTPrevPath !='')
			{
				Show_WIN_QT();
			}
			else if(strASFPrevPath !='')
			{
				Show_WIN_WMP();  
			}				  
			else
			{
				Show_NotAvailableImage();
			}
		}
		else
		{
			if(strASFPrevPath !='')
			{
				Show_WIN_WMP();  
			}				  
			else if(strQTPrevPath !='')
			{
				Show_WIN_QT();
			}
			else
			{
				Show_NotAvailableImage();
			}	
		}
	}
	else
	/****************Operating System Is Mac*************************************/
	{			  
		if(strQTPrevPath !='')
		{
			Show_MAC_QT();
		}
		else if(strASFPrevPath !='')
		{
			Show_MAC_WIN();
		}
		else
		{
			Show_NotAvailableImage();
		}
	}
}	

function Show_NotAvailableImage()
{
	$('EmbedSpanVideo').innerHTML = "<table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><img src='" + strjsImagePath + "missingpeviewfile.gif'></img></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";
}

function Show_MAC_WIN()
{
	/********Check Plugins of Windows Media Player************/
	AssetPreviewLayer_isWMPInstalled();
 	if (isWMPPresent)
	{					
	/*************Plugins of Windows Media Player Found**********/
		AssetPreviewLayer_isFlashInstalled();
		if(isFlashPresent)
		{
			$('EmbedSpanVideo').innerHTML = "<table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><embed name='mediaPlayer' id='mediaPlayer' pluginspage='http://www.microsoft.com/windows/windowsmedia/download/' type='application/x-mplayer2' width='320' height='283' ShowControls='1' ShowDisplay='0' ShowStatusBar='0' autostart='true' autorewind='0' ShowPositionControls='0' ShowTracker='1' src='" + strASFPrevPath +"' transparentatStart='true'></embed></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";
		}
		else
		{
			$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><embed name='mediaPlayer' id='mediaPlayer' pluginspage='http://www.microsoft.com/windows/windowsmedia/download/' type='application/x-mplayer2' width='320' height='287' ShowControls='1' ShowDisplay='0' ShowStatusBar='0' autostart='true' autorewind='0' ShowPositionControls='0' ShowTracker='1' src='" + strASFPrevPath +"' transparentatStart='true'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";	
		}	
	}
	else
	{
	/*************Plugins of Windows Media Player Not Found**********/
		AssetPreviewLayer_isFlashInstalled();
		if(isFlashPresent)
		{
			$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
		}
		else
		{
			$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
		}
	}  
}

function Show_MAC_QT()
{
	/********Check Plugins of QT Player************/
	AssetPreviewLayer_isQTInstalled();
	if (isQTPresent)
		{					
		/***************Plugins of QT Player Found***************************************/
			AssetPreviewLayer_isFlashInstalled();
			if(isFlashPresent)
			{
				$('EmbedSpanVideo').innerHTML = "<table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td align='center'><table border='0' cellpadding='0' cellspacing='0 width='320' height='283'><tr><td><embed src='" + strQTPrevPath + "' width='320' height='283' scale='tofit' autoplay='true' controller='true' CACHE='true' type='video/quicktime'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";
			}
			else
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><embed src='" + strQTPrevPath + "' width='320' height='283' scale='tofit' autoplay='true' controller='true' CACHE='true' type='video/quicktime'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
			}
		}
	else
	{
		Show_MAC_WIN();
		/***************Plugins of QT Player Not Found***************************************/	
		/*
		AssetPreviewLayer_isFlashInstalled();
		if(isFlashPresent)
		{
			$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
		}
		else
		{
			$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
		}
		*/
	}					  
}

function Show_WIN_QT()
{
	/********Check Plugins of QT Player************/
	AssetPreviewLayer_isQTInstalled();
	if (isQTPresent)
	{					
	/***************Plugins of QT Player Found***************************************/
		AssetPreviewLayer_isFlashInstalled();
		if(isFlashPresent)
		{
		$('EmbedSpanVideo').innerHTML = "<table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td align='center'><table border='0' cellpadding='0' cellspacing='0 width='220' height='206'><tr><td><embed src='" + strQTPrevPath + "' width='220' height='206' scale='tofit' autoplay='true' controller='true' CACHE='true' type='video/quicktime'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";
		}
		else
		{
		$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><embed src='" + strQTPrevPath + "' width='320' height='283' scale='tofit' autoplay='true' controller='true' CACHE='true' type='video/quicktime'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
		}
	}
	else
	{				
	/***************Plugins of QT Player Not Found***************************************/	
		
		if (strBrowserName != "IE")
		{
			Show_WIN_WMP();
		}
		else
		{
			AssetPreviewLayer_isFlashInstalled();
			if(isFlashPresent)
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
			}
			else
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
			}
		}
	}	
}

function Show_WIN_WMP()
{
	/********Check Plugins of Windows Media Player************/
 	AssetPreviewLayer_isWMPInstalled();
 	if (isWMPPresent)
	{					
	/*************Plugins of Windows Media Player Found**********/
		AssetPreviewLayer_isFlashInstalled();
		if(isFlashPresent)
		{
			if (strBrowserName != "IE")
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Please click <a title='Goto FAQ.' href='../HelpPages/TNMHelp.aspx?SN=FAQ&HID=14&CID=7#WMP'>here</a> if you have trouble viewing video.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><embed name='mediaPlayer' id='mediaPlayer' pluginspage='http://www.microsoft.com/windows/windowsmedia/download/' type='application/x-mplayer2' width='320' height='287' ShowControls='1' ShowDisplay='0' ShowStatusBar='0' autostart='true' autorewind='0' ShowPositionControls='0' ShowTracker='1' src='" + strASFPrevPath +"' transparentatStart='true'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";	
			}
			else
			{
				$('EmbedSpanVideo').innerHTML = "<table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><embed name='mediaPlayer' id='mediaPlayer' pluginspage='http://www.microsoft.com/windows/windowsmedia/download/' type='application/x-mplayer2' width='320' height='283' ShowControls='1' ShowDisplay='0' ShowStatusBar='0' autostart='true' autorewind='0' ShowPositionControls='0' ShowTracker='1' src='" + strASFPrevPath +"' transparentatStart='true'></embed></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";
			}
		}
		else
		{
			if (strBrowserName != "IE")
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.<br>! Please click <a title='Goto FAQ.' href='../HelpPages/TNMHelp.aspx?SN=FAQ&HID=14&CID=7#WMP'>here</a> if you have trouble viewing video.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><embed name='mediaPlayer' id='mediaPlayer' pluginspage='http://www.microsoft.com/windows/windowsmedia/download/' type='application/x-mplayer2' width='320' height='287' ShowControls='1' ShowDisplay='0' ShowStatusBar='0' autostart='true' autorewind='0' ShowPositionControls='0' ShowTracker='1' src='" + strASFPrevPath +"' transparentatStart='true'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";	
			}
			else
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><embed name='mediaPlayer' id='mediaPlayer' pluginspage='http://www.microsoft.com/windows/windowsmedia/download/' type='application/x-mplayer2' width='320' height='287' ShowControls='1' ShowDisplay='0' ShowStatusBar='0' autostart='true' autorewind='0' ShowPositionControls='0' ShowTracker='1' src='" + strASFPrevPath +"' transparentatStart='true'></embed></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";	
			}
		}				
	}
	else
	{
		if (strBrowserName == "IE")
		{
			Show_WIN_QT();
		}
		else
		{
			/*************Plugins of Windows Media Player Not Found**********/
			AssetPreviewLayer_isFlashInstalled();
			if(isFlashPresent)
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
			}
			else
			{
				$('EmbedSpanVideo').innerHTML = "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><img id='imgPreview' width='320' height='283' src='"+ strThumbPath+"'></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr></table>";
			}
		}
	}
}
/********************************************************************************************
   Description: 1)Function used to show Flash player
*********************************************************************************************/
function AssetPreviewLayer_ShowFlashLayer()
{
	//strEmbedObject = 'standalone';
	strEmbedObject = "NonFlash";
	// Video Type
	if (strAssetType == '1')
	{  
		AssetPreviewLayer_flipPreviewImage('V');
		if (strFLASHPrevPath == '')
		{   	    
			objSpanType = 'EmbedSpanVideo';
			AssetPreviewLayer_PreviewMacORWindows();
		}
		else
		{ 
			AssetPreviewLayer_isFlashInstalled();			
			if (isFlashPresent)
			{				
				strEmbedObject = 'standalone';
				var objPrevAssetID = $(returnControlId('AssetPreviewLayer_ascx') + '_' + 'hidPrevAssetId');
				var objPrevTRT = $(returnControlId('AssetPreviewLayer_ascx') + '_' + 'hidPrevTRT');
				//9873 start
				$('EmbedSpanVideo').innerHTML="<table width='0' cellpadding='0' cellspacing='0' border='0'><tr><td width='342' height='302'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='345' height='305' id='sa_new_overlay' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='" + strSWFPath + "StreamingPlayer.swf?ID=" + objPrevAssetID.value +"&TRT=" + objPrevTRT.value + "&overlay_img=" +strThumbPath+ "&stream="+ strFlashFileName +"&fmsip=" + strFlashStreamingIP + "&prog=" + strFLASHPrevPath + "&dcText=IMPORTANT: Note that this is only a preview. Add the asset to your cart to receive a broadcast-standard or streaming quality version.&displayOverlay=0&port=80' /><param name='quality' value='high' /><param name='bgcolor' value='#f0f0ed' /><embed src='" + strSWFPath + "StreamingPlayer.swf?ID=" + objPrevAssetID.value +"&TRT=" + objPrevTRT.value + "&overlay_img=" + strThumbPath +">&stream=" + strFlashFileName + "&fmsip=" + strFlashStreamingIP + "&prog=" + strFLASHPrevPath + "&dcText=IMPORTANT: Note that this is only a preview. Add clip to your cart to receive either broadcast-standard or streaming quality version of this video&displayOverlay=0&port=80' quality='high' bgcolor='#f0f0ed' width='345' height='305' name='sa_new_overlay' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></object></td></tr></table>";
				//9873 end
				//$('EmbedSpanVideo').innerHTML="<table width='0' cellpadding='0' cellspacing='0' border='0'><tr><td width='342' height='302'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='345' height='305' id='sa_new_overlay' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='" + strSWFPath + "StreamingPlayer.swf?ID=" + objPrevAssetID.value +"&TRT=" + objPrevTRT.value + "&overlay_img=" +strThumbPath+ "&stream="+ strFlashFileName +"&fmsip=" + strFlashStreamingIP + "&prog=" + strFLASHPrevPath + "&dcText=IMPORTANT: Note that this is only a preview. Add clip to your cart to receive either broadcast-standard or streaming quality version of this video&displayOverlay=0' /><param name='quality' value='high' /><param name='bgcolor' value='#f0f0ed' /><embed src='" + strSWFPath + "StreamingPlayer.swf?ID=" + objPrevAssetID.value +"&TRT=" + objPrevTRT.value + "&overlay_img=" + strThumbPath +">&stream=" + strFlashFileName + "&fmsip=" + strFlashStreamingIP + "&prog=" + strFLASHPrevPath + "&dcText=IMPORTANT: Note that this is only a preview. Add clip to your cart to receive either broadcast-standard or streaming quality version of this video&displayOverlay=0' quality='high' bgcolor='#f0f0ed' width='345' height='305' name='sa_new_overlay' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></object></td></tr></table>";
			}  
			else
			{	
				AssetPreviewLayer_PreviewMacORWindows();
			}
		}
	}
	// For Audio
	else if (strAssetType == '2')
	{		
		AssetPreviewLayer_flipPreviewImage('A'); 
		if (strAudioPrevPath == '')
		{		
			objSpanType = 'EmbedSpanAudio';			
			$('EmbedSpanAudio').innerHTML = "<table cellspacing='0' cellpadding='0'	border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td align='center'><table cellspacing='0' cellpadding='0' border='0' width='320' height='283'><tr><td><img width='320' height='283' src='" + strThumbPath + "'</img></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";	
		}
		else
		{ 
			AssetPreviewLayer_isFlashInstalled();
			AssetPreviewLayer_isWMPInstalled();
			if (isFlashPresent)
			{						  			    
				strEmbedObject = 'standalone';
				$('EmbedSpanAudio').innerHTML = "<table cellpadding='0' cellspacing='0' border='0' width='342' ><tr><td ><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='350' height='60' id='tnm_player' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='" + strSWFPath + "tnm_player.swf?audioFile=" + strAudioPrevPath+ "' /><param name='quality' value='high' /><param name='bgcolor' value='#f5f5f5' /><embed src='" + strSWFPath + "tnm_player.swf?audioFile=" + strAudioPrevPath + "' quality='high' bgcolor='#f5f5f5' width='350' height='60' name='tnm_player' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></td></tr></table>";  
			}  
			else if (isWMPPresent)
			{				     
				$('EmbedSpanAudio').innerHTML= "<table><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='25'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif'  width='6' height='1'></td><td valign='top' style='FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ed224c;'>! Install the latest<a href='http://www.macromedia.com/go/getflashplayer/' onmouseover=return onText('Download Flash'); target='_blank'>&nbsp;Adobe Flash Player&nbsp;</a>to enhance your experience.</td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table></td></tr><tr><td><table cellspacing='0' cellpadding='0' border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='6' height='1'></td><td align='center'><table><tr><td align='center'><OBJECT id='mediaPlayer' width='320'  height='283'  classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'> <param name='fileName' value='" + strAudioPrevPath +"'><param name='animationatStart' value='true'><param name='ShowPositionControls' value='0'><param name='showControls' value='true'><param name='transparentatStart' value='true'><Embed type='application/x-mplayer2' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='1' bgcolor='green' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='true'  src='" + strAudioPrevPath +"' autostart='true'  loop='false' cache='false' width='320' height='283'></Embed></OBJECT></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";
			}				  
			else
			{
				$('EmbedSpanAudio').innerHTML = "<table cellspacing='0' cellpadding='0'	border='0' class='whiteColor' width='347' height='307'><tr><td><img src='" + strjsImagePath + "stillDetails_top_left.gif' width='6' height='6'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_top_edge.gif);'><img src='" + strjsImagePath + "s.gif' height='1'></td><td><img src='" + strjsImagePath + "stillDetails_top_right.gif' width='7' height='6'></td></tr><tr><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_left_edge.gif);'><img src=" + strjsImagePath + "s.gif'  width='6' height='1'></td><td align='center'><table cellspacing='0' cellpadding='0' border='0' width='320' height='283'><tr><td><img width='320' height='283' src='" + strThumbPath + "'</img></td></tr></table></td><td height='100%' style='background-image: url(" + strjsImagePath + "stillDetails_right_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='7' height='1'></td></tr><tr><td><img src='" + strjsImagePath + "stillDetails_bottom_left.gif' width='6' height='7'></td><td width='100%' style='background-image: url(" + strjsImagePath + "stillDetails_bottom_edge.gif);'><img src='" + strjsImagePath + "s.gif' width='1' height='7'></td><td><img src='" + strjsImagePath + "stillDetails_bottom_right.gif' width='7' height='7'></td></tr></table>";	
			}	
		}
	}	
	// For Still  
	else if (strAssetType == '3')
	{
		AssetPreviewLayer_flipPreviewImage('S');
		$('EmbedSpanStill').innerHTML = "<img src='" + strThumbPath + "' alt='' border='0'></img>"; 
	}	

}		

function AssetPreviewLayer_flipPreviewImage(isImageFlag)
{   
		
	if(isImageFlag == 'V')
	{  
		isToolTipValue='V';
		$(returnControlId('AssetPreviewLayer_ascx') + '_imgPreviewIcon').src = strjsImagePath + 'icon_video_greyBG.gif';
	}
	
	else if(isImageFlag == 'A')  
	{
		isToolTipValue='A';
		$(returnControlId('AssetPreviewLayer_ascx') + '_imgPreviewIcon').src = strjsImagePath + 'icon_audio_greyBG.gif';
	}
	else if(isImageFlag == 'S')
	{
		isToolTipValue='S';
		$(returnControlId('AssetPreviewLayer_ascx') + '_imgPreviewIcon').src = strjsImagePath + 'icon_stills_greyBG.gif';
	}
}

function AssetPreviewLayer_getToolTipValue()
{
	if(isToolTipValue=='V')
	{ 				
		var a = returnMessage(40002)
		return escape(a);
	}
	else if(isToolTipValue=='A')
	{
		return escape(returnMessage(40005));
	}
	else if(isToolTipValue=='S')
	{
		return escape(returnMessage(40001));
	}
}

function AssetPreviewLayer_TitleToRedirect(strLink,strAssetId)
{	
	window.location = strLink;
}
/******************************************
Because of the selectbox bug in the browsers that makes 
selectboxes have the highest z-index whatever you do 
this script will check for selectboxes that interfear with
layer and then hide them. 
Parameters
pm - PM
x - X position
y - Y position
w - Width
h - Height
l - Level
*****************************************/
function hideselectboxes(pm,x,y,w,h,l)
{
	var agt=navigator.userAgent.toLowerCase();
	var ie  = (agt.indexOf("msie") != -1);
	//if (ie)
	//{
		var selx,sely,selw,selh,i
		if(!this.sel){
		this.sel=this.document.getElementsByTagName("SELECT")
			this.sel.level=0
		}
		var sel=this.sel
		for(i=0;i<sel.length;i++){
				selx=0; sely=0; var selp;
				if(sel[i].offsetParent){selp=sel[i]; while(selp.offsetParent){selp=selp.offsetParent; selx+=selp.offsetLeft; sely+=selp.offsetTop;}}
				selx+=sel[i].offsetLeft; sely+=sel[i].offsetTop
				selw=sel[i].offsetWidth; selh=sel[i].offsetHeight			
				if(selx+selw>x && selx<x+w && sely+selh>y && sely<y+h){
					if(sel[i].style.visibility!="hidden"){sel[i].level=l; sel[i].style.visibility="hidden"; if(pm){ if(!pm.mout) pm.mout=""; pm.mout+=this.name+".sel["+i+"].style.visibility='visible';"}}
		}else if(l<=sel[i].level && !(pm&&l==0)) sel[i].style.visibility="visible"
		}
	//}
}



function GetLayerWidth()
{
	if (strAssetType == '3')
	{
		PrevLayerWidth = 575;
	}
	else
	{
		PrevLayerWidth = 384;
	}
}
/********************************************************************************************
   Description: 1)FUNCTION USED FOR ASSET PREVIEW, SETTING PREVIEW ASSET LIST AND 
				CURRENT PREVIEW POSITION
*********************************************************************************************/
function AssetPreviewLayer_GetAllAssetIDs(intSelectedAssetId)
{
	try
	{
		intChkCount=0;
		if (txtCurrentPage == 'CartConfirmation.aspx' || txtCurrentPage == 'OrderRerun.aspx' || txtCurrentPage == 'CartCheckOut.aspx')
		{
			var strCheckoutAssetList = $('hidAssetIdsOnCheckout').value;
			var arrAssetlists = strCheckoutAssetList.split(',');
			for (var i=0; i<arrAssetlists.length; i++)
			{
				gArrListAssetId[intChkCount]=arrAssetlists[i];
				intChkCount = intChkCount + 1;
			}	
		}
		else
		{
			var arrAssetIds = document.getElementsByTagName("input");
			for (var i=0; i<arrAssetIds.length; i++)
			{
				if (arrAssetIds[i].id.substring(0,4)=='chk_')
				{
					if (arrAssetIds[i].name.indexOf("NP") == -1)
					{ 
						gArrListAssetId[intChkCount]=document.getElementsByTagName("input").item(i).value;
						intChkCount = intChkCount + 1;
					}
				}
			}
		}
		intPreviewClipCntr = 0;
		for(var j=0; j < gArrListAssetId.length; j++)
		{
			if(gArrListAssetId[j] == intSelectedAssetId)
			{
				break;
			}
			else
			{
				intPreviewClipCntr++;
			}
		}	
	}
	catch(ex)
	{
	}
}

function AssetPreviewLayer_getAssetID(intTmp_AssetId,bPrevFlag)
{	
	if(bPrevFlag=='false')
	{
		if($('chk_'+intTmp_AssetId).checked == true)
		{
			gArrListAssetId[intChkCount]=intTmp_AssetId;
			intChkCount = intChkCount + 1;
		}
		else
		{
			AssetPreviewLayer_RemoveDuplicateAssetID(intTmp_AssetId);
		}
		
	}
	else if(bPrevFlag=='true')
	{
		if($('chk_'+intTmp_AssetId).checked == false)
		{
			gArrListAssetId[intChkCount]=intTmp_AssetId;
			intChkCount = intChkCount + 1;	
			
		}
		intPreviewClipCntr = 0;
		for(var j=0; j < gArrListAssetId.length; j++)
		{
			if(gArrListAssetId[j] == intTmp_AssetId)
			{
				break;
			}
			else
			{
				intPreviewClipCntr++;
			}
			
		}			
	}
}

function AssetPreviewLayer_RemoveDuplicateAssetID(intTmpAssetID)
{
	for(var i=0; i <= gArrListAssetId.length; i++)
	{
		if(gArrListAssetId[i] == intTmpAssetID)
		{
			gArrListAssetId.splice(i,1);
			intChkCount = intChkCount - 1;
		}
	}
}

function checkSelect(chkAssetID)
{
	$(chkAssetID).checked = true;
}

function GetCoords()
{
    var scrollX, scrollY;
    if (document.all)
    {
        if (!document.documentElement.scrollLeft)
        scrollX = document.body.scrollLeft;
        else
        scrollX = document.documentElement.scrollLeft;
            
        if (!document.documentElement.scrollTop)
        scrollY = document.body.scrollTop;
        else
        scrollY = document.documentElement.scrollTop;
    }   
    else
    {
        scrollX = window.pageXOffset;
        scrollY = window.pageYOffset;
    }
}
/********************************************************************************************
   Description: 1)Function used to expand the preview layer
*********************************************************************************************/
function AssetPreviewLayer_expandAssetPreview()
{
	ClearAssetText();
	var VscrollY; 
	VscrollY = dd.getScrollY();
	var edivAssetPreview = dd.elements.divAssetPreview;
	if (txtCurrentPage == 'OrderRerun.aspx')
	{
		edivAssetPreview.moveTo(20, VscrollY); 
	}
	else
	{
		edivAssetPreview.moveTo(350, VscrollY); 
	}
	if (txtFirstLogin == 'NONLOGIN')
	{
		if (txtPrevAccessRestriction == 'true' && IsNonloginPreviewEnabled())
		{
			try{hideErrPageDiv();}catch(ex){}
			blnAssetPreviewFlag = true;
			var objspnPrev = $('spnPrev');
			var objspnNext = $('spnNext');
			var objdivBottomDash = $('divBottomDash');
			objspnNext.style.display = 'none';
			objspnPrev.style.display = 'none';
			objdivBottomDash.style.display = 'none';
			objspnNext.style.visibility = 'hidden';
			objspnPrev.style.visibility = 'hidden';
			var objDivExpandContents = $('divAssetPreview');
			var objDivLoading = $('AssetPreviewLayer_divLoading');
			objDivLoading.style.display = 'block';
			objDivExpandContents.style.display = 'block';
			objDivExpandContents.style.visibility = 'visible';
			omnitureFlag=true;
			omnitureJsCode('APL');
			s.pageName="The NewsMarket : Asset Preview";
			var intPreviewedCount = getCookie('PreviewedCount');
			if(intPreviewedCount != null)
			{
				intPreviewedCount = parseInt(intPreviewedCount) + 1;
				document.cookie="PreviewedCount="+intPreviewedCount + "; path=/";
			}
			else
			{
				document.cookie="PreviewedCount=1; path=/";
			}
		}
		else
		{
			var strCLogin = 0;
			strCLogin = getCookie('TNMLogin');
			if (strCLogin == null)
			{
				strCLogin = 0;
			}
			if(strCLogin != 0)
			{
				//setCookie('TNMReminderMsg','Please login to preview the asset', 365,'/');
				//UserLogout(txtLogoutPageURL);
				try{hideErrPageDiv();}catch(ex){}
				blnAssetPreviewFlag = true;
				var objspnPrev = $('spnPrev');
				var objspnNext = $('spnNext');
				var objdivBottomDash = $('divBottomDash');
				objspnNext.style.display = 'none';
				objspnPrev.style.display = 'none';
				objdivBottomDash.style.display = 'none';
				objspnNext.style.visibility = 'hidden';
				objspnPrev.style.visibility = 'hidden';
				var objDivExpandContents = $('divAssetPreview');
				var objDivLoading = $('AssetPreviewLayer_divLoading');
				objDivLoading.style.display = 'block';
				objDivExpandContents.style.display = 'block';
				objDivExpandContents.style.visibility = 'visible';
				omnitureFlag=true;
				omnitureJsCode('APL');
				s.pageName="The NewsMarket : Asset Preview";
			}
			else
			{
				try{hideErrPageDiv();}catch(ex){}	
				blnAssetPreviewFlag = false;
				var objDivExpandContents = $('divAssetPreview');
				var objDivLoading = $('AssetPreviewLayer_divLoading');
				objDivLoading.style.display = 'none';
				objDivExpandContents.style.display = 'none';
				objDivExpandContents.style.visibility = 'hidden';
				//expandPassRemWithCustomMessage(returnMessage(16004),'Y');
				//window.scrollTo(0,0);
				$(returnControlId('MastHeadHome_ascx') + '_' + 'hdRegistrationFlag').value="CPREVIEW";
			}				
		}
	}
	else
	{
		try{hideErrPageDiv();}catch(ex){}
		blnAssetPreviewFlag = true;
		var objspnPrev = $('spnPrev');
		var objspnNext = $('spnNext');
		var objdivBottomDash = $('divBottomDash');
		objspnNext.style.display = 'none';
		objspnPrev.style.display = 'none';
		objdivBottomDash.style.display = 'none';
		objspnNext.style.visibility = 'hidden';
		objspnPrev.style.visibility = 'hidden';
		var objDivExpandContents = $('divAssetPreview');
		var objDivLoading = $('AssetPreviewLayer_divLoading');
		objDivLoading.style.display = 'block';
		objDivExpandContents.style.display = 'block';
		objDivExpandContents.style.visibility = 'visible';
		omnitureFlag=true;
		omnitureJsCode('APL');
		s.pageName="The NewsMarket : Asset Preview";
	}
	if (blnAssetPreviewFlag == true)
	{
		var maxw = PrevLayerWidth;
		var maxh = 500;
		hideselectboxes(0,0,VscrollY,maxw,maxh,0);
	}
	else
	{
		if (document.body.scrollTop == 0)
		{
			blnCartErrorMsg = false;
			var strHidValue=$(returnControlId('MastHeadHome_ascx') + '_' + 'hdErrmsgNonLoginPreview').value;
			expandPassRemWithCustomMessage(strHidValue,'Y');
		}
		else
		{
			blnCartErrorMsg = false;
			Expand_FloatingLayer();		
		}
	}
}

function AssetPreviewLayer_contractAssetPreview()
{
	try
	{
		if (strBrowserName != 'IE')
		{
			var VscrollY; 
			VscrollY = dd.getScrollY();
			var edivAssetPreview = dd.elements.divAssetPreview;
			edivAssetPreview.moveTo(0, 0);
		}
		blnAssetPreviewFlag = false;
		try{
		$('mediaPlayer').Stop();
		$('mediaPlayer').src="";}
		catch(ex){}
		ClearAssetText();
		var objDivContractContents = $("divAssetPreview");
		objDivContractContents.style.display = "none";
		objDivContractContents.style.visibility = 'hidden';
		showselectboxes();
		if(intPref == 10)
		{
			$(strEmbedObject).Stop();
			$(strEmbedObject).src="";
		}
		else if(intPref == 9)
		{
			$(strEmbedObject).Filename="";
		}
		else if(intPref == 11)
		{
			$(strEmbedObject).src="";
		}
	}
	catch(ex)
	{
	
	}
}

function ClearAssetText()
{
	var objAssetPage = returnControlId('AssetPreviewLayer_ascx');
	try{$('EmbedSpanVideo').innerHTML ='';}catch(ex){}
	try{$('EmbedSpanAudio').innerHTML ='';}catch(ex){}
	try{$('EmbedSpanStill').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblViewPrev').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblViewNext').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblHeaderSource').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblAssetIDHeader').innerHTML ='';}catch(ex){}	
	try{$(objAssetPage + '_lblAssetID').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblTRTHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblTRT').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblProducedHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblProduced').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblLocationHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblLocationDetail').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblContactHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblContact').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblTelephoneHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblTelephone').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblEmailHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblEmail').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblPriceHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblPrice').innerHTML ='';}catch(ex){}	
	try{$(objAssetPage + '_lblUsageResHeader').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblUsageRestrictions').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblViewDetails').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblPreviewOnly').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblAddToCart').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblAssetInfo').innerHTML ='';}catch(ex){}
	try{$(objAssetPage + '_lblPageErrorMessageNonLive').innerHTML ='';}catch(ex){}
}

function AssetPreviewLayer_RemoveAssetList()
{
	intChkCount = 0;
	for(var i=0; i <= gArrListAssetId.length; i++)
	{
		gArrListAssetId.splice(i,1);
	}
}


function AssetPreviewLayer_OpenPopupWin(strPopupURL)
 {
	var popUpPage = strPopupURL;	
	hideErrPageDiv();
	window.open(popUpPage,'','resizable=no,width=600,height=600,scrollbars=yes,status=no,menubar=yes,toolbar=yes,location=no,screenX=100,screenY=200,top=10,left=200');
                		
}

function AssetPreviewLayer_SourceURLHover(strMessage)
	{
		
		var strTTHtml = "";

		strTTHtml += "<table cellspacing=\"0\" cellpadding=\"0\" width=\"170\" border=\"0\">"
		strTTHtml += "	<tr>"
		strTTHtml += "		<td><img src=\"" + strjsImagePath + "tt_error_edge_top_left.gif\" width=\"2\" height=\"2\"></td>"
		strTTHtml += "		<td><img src=\"" + strjsImagePath + "tt_error_edge_top_green.gif\" width=\"50\" height=\"2\"></td>"
		strTTHtml += "		<td class=\"toolTipRightBackground\"><img src=\"" + strjsImagePath + "tt_error_edge_top_transparent.gif\" width=\"100%\" height=\"2\"></td>"
		strTTHtml += "		<td class=\"toolTipRightBackground\"><img src=\"" + strjsImagePath + "tt_error_edge_top_right.gif\" height=\"2\" width=\"2\"></td>"
		strTTHtml += "	</tr>"
		strTTHtml += "	<tr>"
		strTTHtml += "		<td style=\"background-image: url(" + strjsImagePath + "tt_error_edge_left_green.gif);\"><img src=\"" + strjsImagePath + "tt_error_edge_left_green.gif\" width=\"2\" height=\"1\"></td>"
		strTTHtml += "		<td  bgcolor=\"#7DC242\">"
		strTTHtml += "			<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">"
		strTTHtml += "				<tr>"
		strTTHtml += "					<td class=\"toolTipExclamationOrQuestion\" align=\"center\"><img src=\"" + strjsImagePath + "tt_SourceURL.gif\" ></td>"
		strTTHtml += "				</tr>"
		strTTHtml += "			</table>"
		strTTHtml += "		</td>"
		strTTHtml += "		<td class=\"toolTipRightBackground\">"
		strTTHtml += "			<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">"
		strTTHtml += "				<tr>"
		strTTHtml += "					<td rowspan=\"3\"><img src=\"" + strjsImagePath + "s.gif\" width=\"10\" height=\"5\"></td>"
		strTTHtml += "					<td style=\"width: 100%\"><img src=\"" + strjsImagePath + "s.gif\" width=\"10\" height=\"5\"></td>"
		strTTHtml += "					<td rowspan=\"3\"><img src=\"" + strjsImagePath + "s.gif\" width=\"10\" height=\"5\"></td>"
		strTTHtml += "				</tr>"
		strTTHtml += "				<tr>"
		strTTHtml += "					<td>"
		strTTHtml += "						<table cellspacing=\"0\" cellpadding=\"0\" width=\"150\" border=\"0\">"
		strTTHtml += "	                       <tr>"
		strTTHtml += "                         <td>Click to visit:"
		
		strTTHtml += "	                       </td>" 
		strTTHtml += "		                    </tr>"
		strTTHtml += "							<tr>"
		strTTHtml += "								<td style=\"width: 100%;\">" + strMessage + "</td>"
		strTTHtml += "							</tr>"
		strTTHtml += "						</table>"
		strTTHtml += "					</td>"
		strTTHtml += "				</tr>"
		strTTHtml += "				<tr>"
		strTTHtml += "					<td><img src=\"" + strjsImagePath + "s.gif\" width=\"1\" height=\"5\"></td>"
		strTTHtml += "				</tr>"
		strTTHtml += "			</table>"
		strTTHtml += "		</td>"
		strTTHtml += "		<td class=\"toolTipRightBackground\" style=\"background-image: url(" + strjsImagePath + "tt_error_edge_right_transparent.gif);\"><img src=\"" + strjsImagePath + "tt_error_edge_right_transparent.gif\" width=\"2\" height=\"1\"></td>"
		strTTHtml += "	</tr>"
		strTTHtml += "	<tr>"
		strTTHtml += "		<td><img src=\"" + strjsImagePath + "tt_error_edge_bottom_left.gif\" width=\"2\" height=\"2\"></td>"
		strTTHtml += "		<td><img src=\"" + strjsImagePath + "tt_error_edge_bottom_green.gif\" width=\"50\" height=\"2\"></td>"
		strTTHtml += "		<td class=\"toolTipRightBackground\"><img src=\"" + strjsImagePath + "tt_error_edge_bottom_transparent.gif\" width=\"100%\" height=\"2\"></td>"
		strTTHtml += "		<td><img src=\"" + strjsImagePath + "tt_error_edge_bottom_right.gif\" height=\"2\" width=\"2\"></td>"
		strTTHtml += "	</tr>"
		strTTHtml += "</table>"

		return overlib(strTTHtml, FULLHTML, BACKGROUND, "" + strjsImagePath + "s.gif");
	}
function $(__strId__)
	{
		__doc__ = (typeof __doc__ == "object") ? __doc__ : document;
		__frm__ = (typeof __frm__ == "object") ? __frm__ : (typeof __doc__.forms[0] == "undefined") ? __frm__ : __doc__.forms[0].elements;

		if (arguments.length < 1)
			return __frm__;
		else
			return __doc__.getElementById(__strId__);
	}
