/*
Count down until any date script-
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/
//change the text below to reflect your own,
function countdownTicker(yr,m,d,id,classname)
{
if (!id) id="cdticker";
if (!classname) classname="cdticker";

 this.create=function(yr,m,d,id,classname)
 				{
				this.display=document.getElementById(id);
				
				if (!this.display) 
				  {
				  document.writeln("<div class='cdticker' id='"+id+"'></div>");
				  this.display=document.getElementById(id);
				  }

				this.className=classname;
				
				if (this.display.childNodes.length==0)
				  this.display.appendChild(document.createTextNode(""));
				
				this.display.target=Date.parse(yr+"/"+m+"/"+d);

				this.display.updateDisplay=function()
								{
                        		var now=new Date();
                        		var diff=this.target-now;
								//alert(diff);
								var odiff=diff;
                                    var days=Math.floor(diff/(24*60*60*1000));
                        		diff-=days*24*60*60*1000;
                        		var hours=Math.floor(diff/(60*60*1000));
                        		diff-=hours*60*60*1000;
								var mins=Math.floor(diff/(60*1000));
								diff-=mins*60*1000;
                        		var secs=Math.floor(diff/(1000));
                        				
                        		if (odiff>0)
                                      this.replaceChild(document.createTextNode(days+"d "+hours+"h "+mins+"m "+secs+"s "+"to go!"),this.childNodes[0]);
                        		else
                                      this.replaceChild(document.createTextNode("StormerClan are at i40 now!"),this.childNodes[0]);
                        		}

				this.display.updateDisplay();
				setInterval("document.getElementById('"+id+"').updateDisplay();",100);
				}
				
this.create(yr,m,d,id,classname);
return this; 	
}


