// ------------------------------------------------------------
// 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.
// ------------------------------------------------------------



// ------------------------------------------------------------
//
//           F I S T I N G     C E N T R A L
//
//            T O U R    F U N C T I O N S
//
// ------------------------------------------------------------



// P R I N T   T O U R   H O M E   V I D E O   L I N K S ( )
// ------------------------------------------------------------

function PrintTourHomeVideoLinks(Video_ID, Video_Type, Video_Date, First_Video)
{
// first check if Video_Type is provided, i.e. there is a video; otherwise print vid not available
	if (Video_Type=='')
	{
		if (First_Video) document.write('&nbsp;');
		return true;
	}
	
	else if (Video_Type=='Full700_wide2')
	{
		document.write('<img src="../../images/playvideo.gif" height="19" width="73" alt="Play Video" vspace=1><a href="/tour/wmvplayer/'+Video_ID+'_trailer/38/w700ws2"><img src=../images/38k.gif width=28 height=19 hspace=1 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/180/w700ws2"><img src=../images/180k.gif width=28 height=19 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/300/w700ws2"><img src=../images/300k.gif width=28 height=19 hspace=1 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/700/w700ws2"><img src=../../images/700k.gif width=28 height=19 hspace=0 border=0 vspace=1></a>');
	}
	else if (Video_Type=='BTS')
	{
		document.write('<img src="../../images/playvideo.gif" height="19" width="73" alt="Play Video" vspace=1><a href="/tour/wmvplayer/'+Video_ID+'_trailer/38/w700ws2"><img src=../images/38k.gif width=28 height=19 hspace=1 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/180/w700ws2"><img src=../images/180k.gif width=28 height=19 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/300/w700ws2"><img src=../images/300k.gif width=28 height=19 hspace=1 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/700/w700ws2"><img src=../../images/700k.gif width=28 height=19 hspace=0 border=0 vspace=1></a>');
	}
	else
		{
		document.write('<img src="../../images/playvideo.gif" height="19" width="73" alt="Play Video" vspace=1><a href="/tour/wmvplayer/'+Video_ID+'_trailer/38/w700"><img src=../images/38k.gif width=28 height=19 hspace=1 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/180/w700"><img src=../images/180k.gif width=28 height=19 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/300/w700"><img src=../images/300k.gif width=28 height=19 hspace=1 border=0 vspace=1></a><a href="/tour/wmvplayer/'+Video_ID+'_trailer/700/w700"><img src=../../images/700k.gif width=28 height=19 hspace=0 border=0 vspace=1></a>');
	}
	


}





// P R I N T   R S   V I D E O   L I N K S ( )
// ------------------------------------------------------------


function Print_RS_Video_Links(Video_ID, Video_Type, Video_Date)
{
// first check if Video_Type is provided, i.e. there is a video; otherwise print vid not available
	if (Video_Type=='')
	{
		document.write('<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td align=right>Video Coming Soon </td></tr></table>');
		return true;
	}

// now check if Video_Date is present and test if it is in the future
	if (Video_Date!='')
	{
		var CurrentDate = new Date;
		var ReleaseDate = new Date(Video_Date);
		if (ReleaseDate>CurrentDate)
		{
			document.write('<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td align=right>Coming '+Video_Date+' </td></tr></table>');
			return true;
		}
	}

// now process the Video_Type argument
// if 700 is included
    var x700 = Video_Type.indexOf('700');
    var DL_Speed;
    var has700;
    var DL_Link;
	if (x700>0)
	{
		Video_Type = Video_Type.substr(0,x700);
		DL_Speed = 700;
		has700 = true;
	}
	else
	{
		DL_Speed = 300;
		has700 = false;
	}


// initializing the Download link depending on the Video_Type
	if (Video_Type=='BTS')
	{
		DL_Link = 'http://gunzblazing.com/signup/signup.php?s=6';
	}
	else
	{
		if (Video_Type=='Normal')
		{
			DL_Link = 'http://gunzblazing.com/signup/signup.php?s=6';
		}
		else
		{
			DL_Link = '#';
		}
	}

// initialize the html code for the Play video (by speed) buttons
	var play38k = '<a href="http://gunzblazing.com/signup/signup.php?s=6"><img src=../../images/38k.gif width=28 height=19 hspace=1 border=0 vspace=0></a>';
	var play180k = '<a href="http://gunzblazing.com/signup/signup.php?s=6"><img src=../../images/180k.gif width=28 height=19 border=0 vspace=0></a>';
	var play300k = '<a href="http://gunzblazing.com/signup/signup.php?s=6"><img src=../../images/300k.gif width=28 height=19 hspace=1 border=0 vspace=0></a>';
	var play700k = '<a href="http://gunzblazing.com/signup/signup.php?s=6"><img src=../../images/700k.gif width=28 height=19 hspace=0 border=0 vspace=0></a>';
	if (!has700) play700k = '<img src="../../images/spacer.gif" height="1" width="28" hspace=1 vspace=0>';

// finally print the video links
	document.write ('<img src="../../images/play.gif" height="19" width="73" alt="Play Video">'+play38k+play180k+play300k+play700k+'<br><img height=19 alt="Download Video" src="../../images/download.gif" hspace=1 vspace=1 width=73 border=0><a href="http://gunzblazing.com/signup/signup.php?s=6"><img src="../../images/d'+DL_Speed+'.gif" width="28" height="19" border="0" hspace="0" vspace="1" alt="Right Click &gt; Save Target As"></a>');
}





// ------------------------------------------------------------
//
//                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();
}
