// JavaScript Document

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->


function redirect(popup,base) {
day = new Date();
id = day.getTime();
if (navigator.appVersion.indexOf("MSIE")!=-1) {
eval("page" + id + " = window.open(popup, '_blank','toolbar=1,titlebar=yes,status=yes,scrollbars=yes,resizable=yes,menubar=yes,location=yes,width="+screen.availWidth+",height="+screen.availHeight+"');");	
}
else {
eval("page" + id + " = window.open(popup, '_blank');");	
}
window.location = base;

}

function countdown (){

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var today=new Date()
var todayy=today.getYear()
var countdownstr;
var yr = 2008;
var m = 1;
var d = 20;

if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var futurestring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)
var dstring=difference.toString()

if (difference>0){

for (i=0;i<=dstring.length-1;i++)

if (countdownstr == undefined) {
countdownstr = '<img src="img/c'+dstring.charAt(i)+'.gif" style="counterstyle">';
} 
else {
countdownstr += '<img src="img/c'+dstring.charAt(i)+'.gif" style="counterstyle">';
}

}
document.getElementById("counter").innerHTML = countdownstr
}
