/*********************************************************************************************************************************
 *														peelvid.js			 											 	 	 *
 *																																 *
 * - supported image file extension			: gif, jpg, png																		 *
 * - supported video flash file extensions	: flv																				 *
 *********************************************************************************************************************************/

/*********************************************************************************************************************************
 *													USER CONFIGURATION			 											 	 *
 *********************************************************************************************************************************/
var adsTotal = 1  

smallIcon = new Array();						// you shouldn't change this part
smallIcon[0]= 'http://www.satanbros.com/peel_video/analoutlaws/images/small.gif';  

content = new Array();							// you shouldn't change this part
content[0]= 'http://www.satanbros.com/peel_video/analoutlaws/scripts/video.flv';  

urlTarget = new Array();						// you shouldn't change this part
urlTarget[0]= 'http://secure.analoutlaws.com/track/'+id+'';

var peelVid = new Object();						// you shouldn't change this part
peelVid.smallIconPath = 'http://www.satanbros.com/peel_video/analoutlaws/scripts/icon.swf';  		// put the URL of the peel away corner flash here
peelVid.smallIcon = '100';						// set the width of your peel away corner flash here
peelVid.smallIconHeight = '100';				// set the width of your peel away corner flash here
peelVid.containerPath = 'http://www.satanbros.com/peel_video/analoutlaws/scripts/container.swf';	// put the URL of the ads container flash here
peelVid.containerWidth = '650';					// set the width of the ads container flash here
peelVid.containerHeight = '650';				// set the height of the ads container flash here

/*********************************************************************************************************************************
 *												Change these settings based on your server										 *
 *********************************************************************************************************************************/
var indexer = Math.round((adsTotal -1) * Math.random());

var linkTarget = urlTarget[indexer];
var smallImg = smallIcon[indexer];
var contentImg = content[indexer];

peelVid.url = escape(linkTarget);
peelVid.smallIconImage = escape(smallImg);
peelVid.smallIconParams = 'ico=' + peelVid.smallIconImage;
peelVid.adsPath = escape(contentImg);
peelVid.containerParams = 'adPath=' + peelVid.adsPath + '&adUrl=' + peelVid.url;

function smaller(){
	document.getElementById("peelSmall").style.top = "0px";
	document.getElementById("peelBig").style.top = "-1000px";
}

function bigger(){
	document.getElementById('peelBig').style.top = '0px';
	document.getElementById('peelSmall').style.top = '-1000px';
}

peelVid.putObjects = function () {
	document.write('	<div id="peelSmall" ');
	document.write('	 style="position:absolute;');
	document.write('		 width:'+ peelVid.smallIcon +'px;');
	document.write('	 height:'+ peelVid.smallIconHeight +'px;');
	document.write('	 z-index:9999;right:0px;top:0px;">');
	document.write('		<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('			 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
	document.write('			 id="peelVidSmallcornerObject" width="'+peelVid.smallIcon+'" height="'+peelVid.smallIconHeight+'">');
	document.write('				<param name="allowScriptAccess" value="always"/> ');
	document.write('				<param name="movie" value="'+ peelVid.smallIconPath +'?'+ peelVid.smallIconParams +'"/>');
	document.write('				<param name="wmode" value="transparent" />');
	document.write('				<param name="quality" value="high" /> ');
	document.write('				<param name="FlashVars" value="'+peelVid.smallIconParams+'"/>');
	document.write('				<embed src="'+ peelVid.smallIconPath + '?' + peelVid.smallIconParams +'" name="peelSmallObject" ');
	document.write('				 wmode="transparent" quality="high" ');
	document.write('				 width="'+ peelVid.smallIcon +'" height="'+ peelVid.smallIconHeight +'" ');
	document.write('				 flashvars="'+ peelVid.smallIconParams +'" allowscriptaccess="always" ');
	document.write('				   type="application/x-shockwave-flash" ');
	document.write('				 pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write('				</embed>');
	document.write('		</object>');
	document.write('	</div>');
	
	document.write('	<div id="peelBig" style="position:absolute;');
	document.write('	 width:'+ peelVid.containerWidth +'px;height:'+ peelVid.containerHeight +'px; ');
	document.write('				   z-index:9999;right:0px;top:0px;">');
	document.write('		<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('	 	 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
	document.write('	 	 id="peelBigObject" width="'+ peelVid.containerWidth +'" ');
	document.write('				   height="'+ peelVid.containerHeight +'">');
	document.write('	 		<param name="allowScriptAccess" value="always"/> ');
	document.write('	 		<param name="movie" value="'+ peelVid.containerPath +'?'+ peelVid.containerParams +'"/>');
	document.write('	 		<param name="wmode" value="transparent"/>');
	document.write('	 		<param name="quality" value="high" /> ');
	document.write('	 		<param name="FlashVars" value="'+ peelVid.containerParams +'"/>');
	document.write('			<embed src="'+ peelVid.containerPath + '?' + peelVid.containerParams +'" ');
	document.write('				   id="peelBigEmbed" ');
	document.write('			 name="peelBigObject" wmode="transparent" quality="high" ');
	document.write('			 width="'+ peelVid.containerWidth +'" height="'+ peelVid.containerHeight +'" ');
	document.write('				   flashvars="'+ peelVid.containerParams +'" ');
	document.write('			 swliveconnect="true" allowscriptaccess="always" type="application/x-shockwave-flash" ');
	document.write('			 pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write('			</embed>');
	document.write('		</object>');
	document.write('	</div>');
	
	setTimeout('document.getElementById("peelBig").style.top = "-1000px";',1000);
}
peelVid.putObjects();