function calcage(secs, num1, num2) 
{
  s = ((Math.floor(secs/num1))%num2).toString();
  if (LeadingZero && s.length < 2)
    s = "0" + s;
  return  s ;
}

function CountBack(secs) 
{
  
    document.getElementById("cntdwn").innerHTML = FinishMessage;
    return;
 
}

function putspan(backcolor, forecolor) 
{
 document.write("<div id='cntdwn' style='padding-top: 5px;padding-bottom: 5px;background-color:" + backcolor + "; color:" + forecolor + ";font-size:" + FontSize + "; font-weight:" + FontWeight +"'></div>");
}

BackColor = "#ffffff";
ForeColor= "#803144";
FontSize = "32px";
TargetDate = "12/09/2008 7:00 AM";
DisplayFormat = "%%D%%";
CountActive = true;
//FinishMessage = "It's here!";
CountStepper = -1;
LeadingZero = true;
FontWeight = "bold";


CountStepper = Math.ceil(CountStepper);
if (CountStepper == 0)
  CountActive = false;
var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990;
putspan(BackColor, ForeColor);
var dthen = new Date(TargetDate);
var dnow = new Date();
if(CountStepper>0)
  ddiff = new Date(dnow-dthen);
else
  ddiff = new Date(dthen-dnow);
  
gsecs = Math.floor(ddiff.valueOf()/1000);
CountBack(gsecs);

