
//REFERENCE http://javascript.about.com/library/blcount2.htm

//var month = '0'; // 1 through 12 or '*' for next month, '0' for this month
//var day = '+1';   // day of month or + day offset
//var hour = 0;    // 0 through 23 for the hour of the day
//var tz = 10;     // offset in hours from UTC to your timezone
//var lab = 'cd';  // id of the entry on the page where the counter is to be inserted

//var month = '6'; // 1 through 12 or '*' for next month, '0' for this month
//var day = '24';   // day of month or + day offset
//var hour = 6;    // 0 through 23 for the hour of the day
//var tz = 0;     // offset in hours from UTC to your timezone
//var lab = 'cd';  // id of the entry on the page where the counter is to be inserted
/*var month = document.countfrm.month.value; // 1 through 12 or '*' for next month, '0' for this month
var day = document.countfrm.day.value;   // day of month or + day offset
var hour = document.countfrm.hour.value;    // 0 through 23 for the hour of the day
var tz = 0;     // offset in hours from UTC to your timezone
var lab = 'cd';  // id of the entry on the page where the counter is to be inserted
*/
function start() 
{
if(document.loginfrm1.username)
{document.loginfrm1.username.focus();
}
var year = document.countfrm.year.value; 
var month = document.countfrm.month.value; // 1 through 12 or '*' for next month, '0' for this month
var day = document.countfrm.day.value;   // day of month or + day offset
var hour = document.countfrm.hour.value;    // 0 through 23 for the hour of the day
var tz = 0;     // offset in hours from UTC to your timezone
var lab = 'cd';  // id of the entry on the page where the counter is to be inserted
var countdown = document.countfrm.countdown.value;    // 0 through 23 for the hour of the day

var tz = 0;     // offset in hours from UTC to your timezone
var lab = 'cd';  // id of the entry on the page where the counter is to be inserted
var monthNamearr=new Array(12)
if(month == "") monthName="";mnth="";
if(month == "01") monthName="Jan";mnth="0";
if(month == "02") monthName="Feb";mnth="1";
if(month == "03") monthName="Mar";mnth="2";
if(month == "04") monthName="Apr";mnth="3";
if(month == "05") monthName="May";mnth="4";
if(month == "06") monthName="Jun";mnth="5";
if(month == "07") monthName="Jul";mnth="6";
if(month == "08") monthName="Aug";mnth="7";
if(month == "09") monthName="Sep";mnth="8";
if(month == "10") monthName="Oct";mnth="9";
if(month == "11") monthName="Nov";mnth="10";
if(month == "12") monthName="Dec";mnth="11";
displayCountdown(countdown,lab,monthName,day);
}
window.onload = start;

function displayCountdown(countdn,cd,monthName,day){
if (countdn < 0) 
 document.getElementById(cd).innerHTML = "  Time Out/No Matches"; 
 else
 {var secs = countdn % 60; 
 if (secs < 10) secs = '0'+secs;
 var countdn1 = (countdn - secs) / 60;
 var mins = countdn1 % 60; 
 if (mins < 10) mins = '0'+mins;
 countdn1 = (countdn1 - mins) / 60;
 var hours = countdn1 % 24;
 var days = (countdn1 - hours) / 24;
 if(days>1)
	 document.getElementById(cd).innerHTML = '<span class="highlights">'+days+'</span> Days <span class="highlights">'+hours+'</span>:<span class="highlights">'+mins+'</span>:<span class="highlights">'+secs+'&nbsp;&nbsp;&nbsp;</span>';
 else
	 document.getElementById(cd).innerHTML = '<span class="highlights">'+days+'</span> Day <span class="highlights">'+hours+'</span>:<span class="highlights">'+mins+'</span>:<span class="highlights">'+secs+'&nbsp;&nbsp;&nbsp;</span>';
	 
 setTimeout('displayCountdown('+(countdn-1)+',\''+cd+'\',\''+monthName+'\',\''+ day+'\');',1000);
 }
 
 }