// JavaScript Document

// Load Event function

	function addLoadEvent(func) {	
		var oldonload = window.onload;
		if (typeof window.onload != 'function'){
			window.onload = function() { func; };
		} else {
			window.onload = function(){
			oldonload();
			func();
			}
		}
	}


// Countdown

var end = new Date('September 17, 2007 21:00:00');
function toSt2(n) {
  s = '';
  if (n < 10) s += '0';
  return (s + n).toString();
}
function toSt3(n) {
  s = '';
  if (n < 10) s += '00';
  else if (n < 100) s += '0';
  return (s + n).toString();
}
function countdown() {
  d = new Date();
  count = Math.floor(end.getTime() - d.getTime());
  if(count > 0) {
    miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
    seconds = toSt2(count%60); count = Math.floor(count/60);
    minutes = toSt2(count%60); count = Math.floor(count/60);
    hours = toSt2(count%24); count = Math.floor(count/24);
    days = count;
    document.getElementById('c1').innerHTML = days + ' TAGE';
    document.getElementById('c2').innerHTML = hours + ':' + minutes + ':' + seconds
    setTimeout('countdown()', 50);
  }
}



// Sort Table
/*
	function SortResults () {
		mySorted = new SortedTable();
		mySorted.colorize = function() {
			for (var i=0;i<this.elements.length;i++) {
				if (i%2){
					this.changeClass(this.elements[i],'even','odd');
				} else {
					this.changeClass(this.elements[i],'odd','even');
				}
			}
		}
		mySorted.onsort = mySorted.colorize;
		mySorted.colorize();
	}	
*/

// Load Events


