
function noframe(){
	if (self != top) { top.location=self.location }
}

function startclock(){
	outdate();
	window.setTimeout("startclock()",1000);
}

function outdate() {
	var now = new Date();
	var year = now.getYear();
	var fyear = now.getFullYear();
	var month= now.getMonth();
	var day=now.getDay();
	
    var hours = now.getHours();
    var minutes = now.getMinutes();
    var seconds = now.getSeconds();
	
	var elecday= new Date(2006,10,13,8,0,0);
	var diff = elecday - now;
	var togo=new String(diff/86400000);
	var point=togo.indexOf(".")    //find the decimal point
    var daystogo=togo.substring(0,point)    //get just the whole days
	/*statusBarTime(hours,minutes,seconds);*/
	document.headform.timedate.value=now.toLocaleString();
	document.headform.daysremain.value="";
	
}
function setVisibility(id, visibility) {
document.all[id].style.display = visibility;
}

function switchid(id){ 
 hideallids();
 showdiv(id);
}

function hideallids(){
 //loop through the array and hide each element by id
 for (var i=0;i<ids.length;i++){
  hidediv(ids[i]);
 }    
}

function showallids(){
 //loop through the array and show each element by id
 for (var i=0;i<ids.length;i++){
  showdiv(ids[i]);
 }    
}

function hidediv(id) {
 //safe function to hide an element with a specified id
 if (document.getElementById) { // DOM3 = IE5, NS6
  document.getElementById(id).style.display = 'none';
 }
 else {
  if (document.layers) { // Netscape 4
   document.id.display = 'none';
  }
  else { // IE 4
   document.all.id.style.display = 'none';
  }
 }
}

function showdiv(id) {
 //safe function to show an element with a specified id
    
 if (document.getElementById) { // DOM3 = IE5, NS6
  document.getElementById(id).style.display = 'block';
 }
 else {
  if (document.layers) { // Netscape 4
   document.id.display = 'block';
  }
  else { // IE 4
   document.all.id.style.display = 'block';
  }
 }
}
