/* This script and many more are available free online at 
 The JavaScript Source!! http://javascript.internet.com */

var Temp2;
var timerID = null;
var timerRunning = false;
function arry() {
this.length = 12;
this[0] = 31;
this[1] = 28;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}
var date = new arry();

function stopclock() {
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

function startclock() {
stopclock();
showtime();
}

function write_time() {
	now = new Date();
	var CurMonth = now.getMonth();
	var CurDate = now.getDate();
	var CurYear = now.getFullYear();
	now = null;
	if (14 < CurDate) {
	CurDate -= date[CurMonth]; CurMonth++;
	}
	if (6 < CurMonth) {
	CurMonth -= 12; CurYear++;
	}
	
	var Yearleft = 2001 - CurYear;
	var Monthleft = 6 - CurMonth;
	var Dateleft = 14 - CurDate;
	
	yleft = ""
	mleft = ""
	if (Yearleft > 0) {
		yleft = Yearleft + " years"
	} 
	if (Monthleft > 0) {
		mleft = Monthleft + " months, and "
	}
	
	
	document.write(yleft + mleft + Dateleft + " days")
}


function showtime() {
now = new Date();
var CurMonth = now.getMonth();
var CurDate = now.getDate();
var CurYear = now.getFullYear();
now = null;
if (14 < CurDate) {
CurDate -= date[CurMonth]; CurMonth++;
}
if (6 < CurMonth) {
CurMonth -= 12; CurYear++;
}

var Yearleft = 2001 - CurYear;
var Monthleft = 6 - CurMonth;
var Dateleft = 14 - CurDate;

document.dateform.a.value = Yearleft;
document.dateform.b.value = Monthleft;
document.dateform.c.value = Dateleft;

timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
