// ------------------------------------------------------------
// These functions created by Mansion Productions, part of MAS
// Modifications are at own risk, you are advised only to change the html ouput inside the document.write statements.
// ------------------------------------------------------------


// ------------------------------------------------------------
//
//                R A T I N G     W I N D O W
//
// ------------------------------------------------------------


function rateWindow(lid, rate)
{
	wndRate = window.open('http://content.pistolmedia.com/rate.php?lid='+lid+'&r='+rate,'MAS_rate','width=300,height=130,left='+(screen.availWidth-300)/2+',top='+(screen.availHeight-130)/2);
	wndRate.focus();
}







// PRINT VIDEO LINKS
// -----------------------------------------------------------



function Print_V2_Links(Video_ID, Video_Type, Video_Date, Trailer_Type, Colour)
{
// check if Video_Type is provided - if not print nothing
	if (Video_Type=='')
	{
		return true;
	}

// print appropriate links for video type


	
	if (Trailer_Type=='wmv300')
	{
		document.write ('<a href="/tour/play.php?type=wmv&path=' + Video_ID + '_trailer/300/w300"><img src="/images/tour_play_'+Colour+'.gif" alt="Play Trailer" title="Play Trailer" border="0"></a><a href="/tour/play.php?type=dl&path=newrsdrm/trailers/' + Video_ID + '-300"><img alt="Download Trailer" title="Download Trailer" src="../images/tour_dl_'+Colour+'.gif" border="0"></a>');
	}
	else if (Trailer_Type=='wmv700')
	{
		document.write ('<a href="/tour/play.php?type=wmv&path=' + Video_ID + '_trailer/300/w700"><img src="/images/tour_play_'+Colour+'.gif" alt="Play Trailer" title="Play Trailer" border="0"></a><a href="/tour/play.php?type=dl&path=newrsdrm/trailers/' + Video_ID + '-700"><img alt="Download Trailer" title="Download Trailer" src="../images/tour_dl_'+Colour+'.gif" border="0"></a>');
	}
	
	else if (Trailer_Type=='h.264 normal')
	{
		document.write ('<a href="/tour/play.php?type=flv&path=' + Video_ID + '_trailer/h1500/wh1500"><img src="/images/tour_play_'+Colour+'.gif" alt="Play Trailer" title="Play Trailer" border="0"></a><a href="/tour/play.php?type=dl&path=newrsdrm/trailers/' + Video_ID + '-1500"><img alt="Download Trailer" title="Download Trailer" src="../images/tour_dl_'+Colour+'.gif" border="0"></a>');
	}

	else if (Trailer_Type=='h.264 wide')
	{
		document.write ('<a href="/tour/play.php?type=flv&path=' + Video_ID + '_trailer/h1500/wh1500ws2"><img src="/images/tour_play_'+Colour+'.gif" alt="Play Trailer" title="Play Trailer" border="0"></a><a href="/tour/play.php?type=dl&path=newrsdrm/trailers/' + Video_ID + '-1500"><img alt="Download Trailer" title="Download Trailer" src="../images/tour_dl_'+Colour+'.gif" border="0"></a>');
	}
	
	else if (Trailer_Type=='wmvflash700')
	{
		document.write ('<a href="/tour/play.php?type=flv&path=' + Video_ID + '_trailer/flash700/wf700"><img src="/images/tour_play_'+Colour+'.gif" alt="Play Trailer" title="Play Trailer" border="0"></a><a href="/tour/play.php?type=dl&path=newrsdrm/trailers/' + Video_ID + '-700"><img alt="Download Trailer" title="Download Trailer" src="../images/tour_dl_'+Colour+'.gif" border="0"></a>');
	}
	else if (Trailer_Type=='700widescreen-1')
	{
		document.write ('<a href="/tour/play.php?type=flv&path=' + Video_ID + '_trailer/flash700/wf700"><img src="/images/tour_play_'+Colour+'.gif" alt="Play Trailer" title="Play Trailer" border="0"></a><a href="/tour/play.php?type=dl&path=newrsdrm/trailers/' + Video_ID + '-700"><img alt="Download Trailer" title="Download Trailer" src="../images/tour_dl_'+Colour+'.gif" border="0"></a>');
	}
	else if (Trailer_Type=='wmvflash700_wide2')
	{
		document.write ('<a href="/tour/play.php?type=flv&path=' + Video_ID + '_trailer/flash700/wf700ws2"><img src="/images/tour_play_'+Colour+'.gif" alt="Play Trailer" title="Play Trailer" border="0"></a><a href="/tour/play.php?type=dl&path=newrsdrm/trailers/' + Video_ID + '-700"><img alt="Download Trailer" title="Download Trailer" src="../images/tour_dl_'+Colour+'.gif" border="0"></a>');

	}

	else
	{
		document.write ('');
	}
}


function Print_Sneak_Peak_Links(Video_ID, Video_Type, Video_Date, Img)
{
// first check if Video_Type is provided, i.e. there is a video; otherwise print vid not available
	if (Video_Type=='')
	{
		return true;
	}

// check Video_Type and print appropriate links
// BTS is used for widescreen 16:9 videos
	if (Video_Type=='Full700_wide2')
	{
		document.write ('<a href="/tour/flvplayer/' + Video_ID + '_trailer/flash700/wf700ws2"><img src="' + Img +'" alt="Play Flash" title="Play Flash" border="0"></a>');
	}
	
	else if (Video_Type=='h.264 normal')
	{
		document.write ('<a href="/tour/flvplayer/' + Video_ID + '_trailer/h1500/wh1500"><img src="' + Img +'" alt="Play Flash" title="Play Flash" border="0"></a>');
	}

	else if (Video_Type=='h.264 wide')
	{
		document.write ('<a href="/tour/flvplayer/' + Video_ID + '_trailer/h1500/wh1500ws2"><img src="' + Img +'" alt="Play Flash" title="Play Flash" border="0"></a>');
	}
	
	else if (Video_Type=='BTS')
	{
		document.write ('<a href="/tour/flvplayer/' + Video_ID + '_trailer/flash700/wf700ws2"><img src="' + Img +'" alt="Play Flash" title="Play Flash" border="0"></a>');
	}

// otherwise videos have 700k	
	else
	{
		document.write ('<a href="/tour/flvplayer/' + Video_ID + '_trailer/flash700/wf700"><img src="' + Img +'" alt="Play Flash" title="Play Flash" border="0"></a>');
	}
}



function openApp() 
{
	
	wWidth = 820; wHeight = 515;
	
	wHPos = (screen.width / 2) - (wWidth / 2);
	wVPos = (screen.height / 2) - (wHeight / 2) - 50;
	
	if (document.all) {
	oWin = self.open("/feedback/","nvSMP","width="+wWidth+",height="+wHeight+",location=no,top="+wVPos+",left="+wHPos+",personalbar=no,menubar=no,scrollbars=yes,status=no,toolbar=no")
	oWin.focus()
	} else {
		oWin = self.open("/feedback/","nvSMP","width="+wWidth+",height="+wHeight+",location=no,screenY="+wVPos+",screenX="+wHPos+",personalbar=no,menubar=no,scrollbars=yes,status=no,toolbar=no")
		oWin.focus()
	}
	
}


function openChat() {
	
	wWidth = 800; wHeight = 515;
	
	wHPos = (screen.width / 2) - (wWidth / 2);
	wVPos = (screen.height / 2) - (wHeight / 2) - 50;
	
	if (document.all) {
		oWin = self.open("cams/","nvSMP","width="+wWidth+",height="+wHeight+",resizable=yes,location=no,top="+wVPos+",left="+wHPos+",personalbar=no,menubar=no,scrollbars=no,status=no,toolbar=no")
		oWin.focus()
	} else {
		oWin = self.open("cams/","nvSMP","width="+wWidth+",height="+wHeight+",resizable=yes,location=no,screenY="+wVPos+",screenX="+wHPos+",personalbar=no,menubar=no,scrollbars=no,status=no,toolbar=no")
		oWin.focus()
	}
	
}


