////////////////////////////////////////////////////////////////////////////////
/////////////////////////Not in these Pants Productions/////////////////////////
////////////////////////    Written by: David Elkin    /////////////////////////
////////////////////////////////////////////////////////////////////////////////
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTpooing();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.subpooing(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.subpooing(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}

function randomStartingMovieTop() 
{
topflashbanner = new Array();

topflashbanner[0] = "http://notinthesepants.com/includes/banners/flash/snakeclose.swf"
topflashbanner[1] = "http://notinthesepants.com/includes/banners/flash/lolrlypants.swf"
topflashbanner[2] = "http://notinthesepants.com/includes/banners/flash/rollout.swf"
topflashbanner[3] = "http://notinthesepants.com/includes/banners/flash/mimebleach.swf"
topflashbanner[4] = "http://notinthesepants.com/includes/banners/flash/snow.swf"
topflashbanner[5] = "http://notinthesepants.com/includes/banners/flash/8bit1.swf"
topflashbanner[6] = "http://notinthesepants.com/includes/banners/flash/auschwitz.swf"
topflashbanner[7] = "http://notinthesepants.com/includes/banners/flash/jesuswine.swf"
topflashbanner[8] = "http://notinthesepants.com/includes/banners/flash/bongobanner.swf"

rand = Math.floor(Math.random() * topflashbanner.length);
trap = topflashbanner[rand];
return trap;
}

function randomStartingImageBanner()
{
topimagebanner = new Array();
topimagebanner[0] = "http://notinthesepants.com/banners/image/banner1.jpg"
topimagebanner[1] = "http://notinthesepants.com/banners/banner2.jpg"
bill = Math.floor(Math.random() * topimagebanner.length);
asss = topimagebanner[bill];
return asss;
}

function randomNumber(limit)
{
  return Math.floor(Math.random()*limit);
}

function flashInput(filename, width, height)
			{	
				mov = ""
				mov = mov + '<object ';
				mov = mov + 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
				mov = mov + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '
				mov = mov + 'width="'+ width +'" '
				mov = mov + 'height="'+ height +'">'
				mov = mov + '<param name="movie" '
				mov = mov + 'value="'+ filename +'">'
				mov = mov + '<PARAM NAME=quality VALUE=high>'
				mov = mov + '<embed '
				mov = mov + 'src="'+ filename + '" '
				mov = mov + 'width="'+ width +'" '
				mov = mov + 'HEIGHT="'+ height +'" '
			    mov = mov + 'TYPE="application/x-shockwave-flash" '
			    mov = mov + 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">'
				mov = mov + '</embed>'
				mov = mov + '</object>'
				return mov;
				
			}
			


function randomTitle()
{
	titlearray = new Array()
	titlearray[0] = "Where it all begins... AGAIN!!"
	titlearray[1] = "Jogging Itches"
	titlearray[2] = "Poodles Shall Die"
	titlearray[3] = "We're not allowed to own radioactive stuff.....unlike the Brits"
	titlearray[4] = "So this is how liberty dies, with thunderous applause"
	titlearray[5] = "Where rockinghorse people eat marshmellow pies"
	titlearray[6] = "WE OWN YOUR SOUL"
	titlearray[7] = "Once you pop you just can't stop"
	titlearray[8] = "Every time a bell rings an angel gets its wings"
	titlearray[9] = "But daddy! I dont wanna go swimmin'!"
	titlearray[10] = "Where'd you get a Hand Grenade?"
	titlearray[11] = "Did you throw a trident?"
	milk = Math.floor(Math.random() * titlearray.length);
	gotch = titlearray[milk]
	gotch = 'Not in these Pants Productions: ' + gotch
	return gotch
}



