function countdown(strDate, strImagePath) {
	c1 = new Image(); c1.src = strImagePath + "number1.gif";
	c2 = new Image(); c2.src = strImagePath + "number2.gif";
	c3 = new Image(); c3.src = strImagePath + "number3.gif";
	c4 = new Image(); c4.src = strImagePath + "number4.gif";
	c5 = new Image(); c5.src = strImagePath + "number5.gif";
	c6 = new Image(); c6.src = strImagePath + "number6.gif";
	c7 = new Image(); c7.src = strImagePath + "number7.gif";
	c8 = new Image(); c8.src = strImagePath + "number8.gif";
	c9 = new Image(); c9.src = strImagePath + "number9.gif";
	c0 = new Image(); c0.src = strImagePath + "number0.gif";
	Cc = new Image(); Cc.src = strImagePath + "colon.gif";
	Cfireworks = new Image(); Cfireworks.src = strImagePath + "fireworks9.gif";
	
	now = new Date();
	later = new Date(strDate);
	
	if (now < later)
	{
		nextcall = "countdown('" + strDate + "','" + strImagePath + "');";
		newtime = window.setTimeout(nextcall, 1000);

		unusedSeconds = Math.floor((later-now)/1000);
		daysRound = Math.floor(unusedSeconds/86400);
		unusedSeconds = unusedSeconds - (daysRound*86400);
		hoursRound = Math.floor(unusedSeconds/3600);
		unusedSeconds = unusedSeconds - (hoursRound*3600);
		minutesRound = Math.floor(unusedSeconds/60);
		secondsRound = unusedSeconds - (minutesRound*60);

		if (secondsRound > 59)
		{
			alert("Yikes!!");
		}

		if ( (document.images.x != null) && (document.images.a != null) && (document.images.b != null) ) {
			if (daysRound <= 9) {
				document.images.x.src = c0.src;
				document.images.a.src = c0.src;
				document.images.b.src = eval("c"+daysRound+".src");
			}

			if (daysRound <= 99) {
				document.images.x.src = c0.src;
				document.images.a.src = eval("c"+Math.floor((daysRound/10)%10)+".src");
				document.images.b.src = eval("c"+Math.floor(daysRound%10)+".src");
			}

			if (daysRound <= 999){
				document.images.x.src = eval("c"+Math.floor(daysRound/100)+".src");
				document.images.a.src = eval("c"+Math.floor((daysRound/10)%10)+".src");
				document.images.b.src = eval("c"+Math.floor(daysRound%10)+".src");
			}
		}
	
		if ( (document.images.y != null) && (document.images.z != null) ) {
			if (hoursRound <= 9) {
				document.images.y.src = c0.src;
				document.images.z.src = eval("c"+hoursRound+".src");
			}
			else {
				document.images.y.src = eval("c"+Math.floor(hoursRound/10)+".src");
				document.images.z.src = eval("c"+(hoursRound%10)+".src");
			}
		}
	
		if ( (document.images.d != null) && (document.images.e != null) ) {
			if (minutesRound <= 9) {
				document.images.d.src = c0.src;
				document.images.e.src = eval("c"+minutesRound+".src");
			}
			else {
				document.images.d.src = eval("c"+Math.floor(minutesRound/10)+".src");
				document.images.e.src = eval("c"+(minutesRound%10)+".src");
			}
		}
	
		if ( (document.images.g != null) && (document.images.h != null) ) {
			if (secondsRound <= 9) {
				document.images.g.src = c0.src;
				document.images.h.src = eval("c"+secondsRound+".src");
			}
			else {
				document.images.g.src = eval("c"+Math.floor(secondsRound/10)+".src");
				document.images.h.src = eval("c"+(secondsRound%10)+".src");
			}
		}
	}
	else
	{
		document.images.x.src = "";
		document.images.x.width = 0;
		document.images.x.height = 0;

		document.images.a.src = "";
		document.images.a.width = 0;
		document.images.a.height = 0;

		document.images.b.src = "";
		document.images.b.width = 0;
		document.images.b.height = 0;

		document.images.c.src = "";
		document.images.c.width = 0;
		document.images.c.height = 0;

		document.images.y.src = Cfireworks.src;
		document.images.y.width = Cfireworks.width;
		document.images.y.height = Cfireworks.height;

		document.images.z.src = Cfireworks.src;
		document.images.z.width = Cfireworks.width;
		document.images.z.height = Cfireworks.height;

		document.images.cz.src = Cfireworks.src;
		document.images.cz.width = Cfireworks.width;
		document.images.cz.height = Cfireworks.height;

		document.images.d.src = Cfireworks.src;
		document.images.d.width = Cfireworks.width;
		document.images.d.height = Cfireworks.height;

		document.images.e.src = "";
		document.images.e.width = 0;
		document.images.e.height = 0;

		document.images.f.src = "";
		document.images.f.width = 0;
		document.images.f.height = 0;

		document.images.g.src = "";
		document.images.g.width = 0;
		document.images.g.height = 0;

		document.images.h.src = "";
		document.images.h.width = 0;
		document.images.h.height = 0;
	}
}

