
function CountDown(){
	this.start = countStart;
	this.stop = countStop;
	this.next = countNext;
	this.go = countGo;
	this.show = countShow;
	this.remove = countRemove;

	this.interval = 500;
	this.intervalObject = false;
	this.count = 1;
	this.divName = "countDown";
	this.divWrapper = "timer";
	this.nextName = "countDown.next()";
	this.goUrl = "http://flurdy.com/ship.html";
}
function countStart(){
//	document.getElementById(this.divWrapper).style.display = "block" 
	this.intervalObject = window.setInterval(this.nextName, this.interval);
}
function countStop(){
	window.clearInterval(this.intervalObject);
}
function countNext(){
	if( this.count > 0 ){
		this.show();
		this.count--;
	} else {
		this.stop();
		this.go();
	}
}
function countGo(){
	window.location.href = this.goUrl;
}
function countShow(){
	document.getElementById(this.divName).innerHTML = 
		document.getElementById(this.divName).innerHTML 
		+ this.count + "..&nbsp; ";
}
function countRemove(){
	this.stop();
	this.count = 10;
	document.getElementById(this.divWrapper).innerHTML = ""; 

}
var countDown = new CountDown();

