function out_of_frame(){
	if(window !=top)
		top.location.href=location.href;
}

            
/*
Dynamic countdown Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/


function setcountdown(theyear,themonth,theday){
	yr=theyear;mo=themonth;da=theday
}

//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////

//STEP 1: Configure the countdown-to date, in the format year, month, day:
setcountdown(2012,5,5)

//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
var occasion="SHOVELHEAD PARTY! MAYBE?"
var message_on_occasion="SHOVELHEAD PARTY DAY!"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='150px'
var countdownheight='60px'
var countdownbgcolor='silver'
var opentags='<div style="text-align:center; font-size:14pt; color:red;">'
var closetags='</div>'

//////////DO NOT EDIT PASS THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countdown(){
	if (document.layers)
		document.countdownnsmain.visibility="show"
	else if (document.all||document.getElementById)
		crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
		countdown()
}

function countdown(){
	var today=new Date()
	var todayy=today.getYear()
	if (todayy < 1000)
		todayy+=1900
	var todaym=today.getMonth()
	var todayd=today.getDate()
	var todayh=today.getHours()
	var todaymin=today.getMinutes()
	var todaysec=today.getSeconds()
	var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
	futurestring=montharray[mo-1]+" "+da+", "+yr
	dd=Date.parse(futurestring)-Date.parse(todaystring)
	dday=Math.floor(dd/(60*60*1000*24)*1)
	dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
	dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
	dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
	//if on day of occasion
	if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
		if (document.layers){
		document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
		document.countdownnsmain.document.countdownnssub.document.close()
		}
		else if (document.all||document.getElementById)
	crosscount.innerHTML=opentags+message_on_occasion+closetags
	return
	}
//if passed day of occasion
	else if (dday<=-1){
		if (document.layers){
		document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags)
		document.countdownnsmain.document.countdownnssub.document.close()
		}
		else if (document.all||document.getElementById)
		crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
		return
	}
//else, if not yet
	else{
		if (document.layers){
		document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds<br>left until the"+occasion+closetags)
		document.countdownnsmain.document.countdownnssub.document.close()
		}
		else if (document.all||document.getElementById)
		crosscount.innerHTML=opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until the "+occasion+closetags
	}
	setTimeout("countdown()",1000)
}

function Banner(refreshTime,width,height,altText,start,random){
	this.objName="bannerAd"+(Banner.count++);
	eval(this.objName+"=this");
	if(!refreshTime) this.refreshTime=5000;
	else this.refreshTime=refreshTime*1000;
	if(!width) this.width=460;
	else this.width=width;
	if(!height) this.height=68;
	else this.height=height;
	if(random==null) this.random=1;
	else this.random=random;
	this.altText=altText;
	this.ads=[];
	if(start) this.currentAd=start-1;
	else start=null;
	this.mySize=0;
	this.Ad=function(src,href,target,mouseover){
		var tempImage=new Image();
		tempImage.src=src;
		this.ads[this.mySize]=new Object();
		var ad=this.ads[this.mySize];ad.src=src;
		if(typeof(target)=="undefined"||target==null) ad.target="_self";
		else ad.target=target;
		ad.href=href;
		ad.mouseover=mouseover;
		this.mySize++;
	}
	this.link=function(){
		var ad=this.ads[this.currentAd];
		if(ad.target=="_self"){location.href=ad.href;}
		else if(ad.target=="_blank"||ad.target=="_new"){open(ad.href,this.objName+"Win");}
		else top.frames[ad.target].location.href=ad.href;
	}
	this.showStatus=function(){
		var ad=this.ads[this.currentAd];
		if(ad.mouseover) status=ad.mouseover;
		else status=ad.href;
	}
	this.randomAd=function(){
		var n;
		do{n=Math.floor(Math.random()*(this.mySize));}
		while(n==this.currentAd);
			this.currentAd=n;
		}
	this.output=function(){
		var tempCode="";
		if(this.mySize>1){
			if(this.currentAd==null) this.randomAd();
			if(this.currentAd>=this.mySize) this.currentAd=this.mySize-1;
			tempCode='<a href="javascript:'+this.objName+'.link();"';
			tempCode+=' onMouseOver="'+this.objName+'.showStatus();return true"';
			tempCode+=' onMouseOut="status=\'\';return true">';
			tempCode+='<img src="'+this.ads[this.currentAd].src+'" width="'+this.width;
			tempCode+='" name="'+this.objName+'Img" height="'+this.height+'" ';
			if(this.altText) tempCode+='alt="'+this.altText+'" ';
			tempCode+='border="0"><\/a>';document.write(tempCode);this.nextAd();
		} else document.write("Error: two banners must be defined for the script to work.");
	}
	this.newAd=function(){
		if(!this.random){
			this.currentAd++;
			if(this.currentAd>=this.mySize)
				this.currentAd=0;
		} else {
			this.randomAd();
		}
		this.nextAd();
	}
	this.nextAd=function(){
		document.images[this.objName+'Img'].src=this.ads[this.currentAd].src;
		setTimeout(this.objName+'.newAd()',this.refreshTime)
	}
}
Banner.count=0;

myAd=new Banner(120,468,60,"click here",0,1);
myAd.Ad("http://www.cycletrailerrental.com/banners/knowtow.gif","http://www.elvistowing.com/","_blank","KnowTow");
myAd.Ad("http://www.cycletrailerrental.com/images2/whitelinebanner.jpg","http://www.whitelinemagazine.com/","_blank","White Line Magazine");
myAd.Ad("http://www.cycletrailerrental.com/images/cobrasmc.jpg","http://www.cobrasmc.com","_blank","Cobras MC");
myAd.Ad("http://www.cycletrailerrental.com/images/ftusa.jpg","http://floridafullthrottle.com/","_blank","Full Throttle Magazine");
myAd.Ad("http://www.cycletrailerrental.com/images/bikerbags.gif","http://www.bikerbags.com/","_blank","BIKERBAGS.COM");
myAd.Ad("http://www.cycletrailerrental.com/banners/knowtow.gif","http://www.elvistowing.com/","_blank","KnowTow");
myAd.Ad("http://www.cycletrailerrental.com/images2/whitelinebanner.jpg","http://www.whitelinemagazine.com/","_blank","White Line Magazine");
myAd.Ad("http://www.cycletrailerrental.com/images/biker-crossroads.gif","http://www.biker-crossroads.com/","_blank","Biker-Crossroads");
myAd.Ad("http://www.cycletrailerrental.com/banners/babeonhd.com.gif","http://www.babeonhd.com/","_blank","Babe's Hawg dot com");
myAd.Ad("http://www.cycletrailerrental.com/banners/whiteriders468.jpg","http://www.freewebs.com/handym","_blank","White Riders");
myAd.Ad("http://www.cycletrailerrental.com/banners/knowtow.gif","http://www.elvistowing.com/","_blank","KnowTow");

