// JavaScript Document

//Dynamic countup Script- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

function setcountup(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}

//////////CONFIGURE THE countup SCRIPT HERE//////////////////

//STEP 1: Configure the date to count up from, in the format year, month, day:
//This date should be less than today
setcountup(2008,1,1)

//STEP 2: Configure the below 5 variables to set the width, height, background color, and text style of the countup area
var countupwidth='0%'
var countupheight='0px' //applicable only in NS4
var countupbgcolor='#1a1a1a'
var opentags=''
var closetags=''

//////////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_countup(){
if (document.layers)
document.countupnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all?document.getElementById("countupie") : countupie
countup()
}

if (document.all||document.getElementById)
document.write('<span id="countupie" style="width:'+countupwidth+'; background-color:'+countupbgcolor+'"></span>')

window.onload=start_countup


function countup(){

var d, h, m, s;

var s = document.countform.s.value-0 -1
var m = document.countform.m.value-0 
var h = document.countform.h.value-0 
var d = document.countform.d.value-0

if(s<0)
{
	s = s+60
	m = document.countform.m.value-0 -1
	if(m<0)
	{
		m = m+60
		h = document.countform.h.value-0 -1
		if(h<0)
		{
			h = h+24
			d = document.countform.d.value-0 -1
		}
	}
}

document.countform.s.value=s;
document.countform.m.value=m;
document.countform.h.value=h;
document.countform.d.value=d;



if (document.layers){
document.countupnsmain.document.countupnssub.document.write(''+d+'<span class="grey">D</span> <span class="yellow">:</span> '+h+'<span class="grey">H</span> <span class="yellow">:</span> '+m+'<span class="grey">M</span> <span class="yellow">:</span> '+s+'<span class="grey">S</span>');
document.countupnsmain.document.countupnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=''+d+'<span class="grey">D</span> <span class="yellow">:</span> '+h+'<span class="grey">H</span> <span class="yellow">:</span> '+m+'<span class="grey">M</span> <span class="yellow">:</span> '+s+'<span class="grey">S</span>'

setTimeout("countup()",1000)
}