function showul(id) {
	/* this takes the id of the ul we want to expand */
	/* and iterates through all the uls with another id up to the second var that is passed */

	/* get all the uls */
    var ulCollection = document.getElementsByTagName("ul");
	
   var ultoopen = 'ul-'+id;

    for (var i=0; i<ulCollection.length; i++) {
		if (ulCollection[i].id == ultoopen) {
			if (ulCollection[i].style.display=='block') {
				ulCollection[i].style.display='none';				
			} else {
				ulCollection[i].style.display='block';	
			}		
		} else {
			if (ulCollection[i].id!='containerul') {
				ulCollection[i].style.display='none';				
			}
		}
	}
}

function displaydiv(divname) {
	if (document.getElementById(divname).style.display == 'block') {
		/* hide the divname div */
		document.getElementById(divname).style.display = 'none';
	} else {
		/* make the divname div appear*/
		document.getElementById(divname).style.display = 'block';
	}
}

window.onload=function(){
	StartClock();
}

var cid=0;
function UpdateClock() {
	if(cid){
		clearTimeout(cid);
		cid=0;
	}

	dt=new Date();
	
	Y=dt.getYear();
	if(Y<1000)
		Y+=1900;
		
	M=dt.getMonth()+1;
	if(M<10)
		M="0"+M;
	
	d=dt.getDate();
	if(d<10)
		d="0"+d;
	
	h=dt.getHours();
	if(h<10)
		h="0"+h;
		
	m=dt.getMinutes();
	if(m<10)
		m="0"+m;
		
	s=dt.getSeconds();
	if(s<10)
		s="0"+s;
	
	document.getElementById("date_time").innerHTML=d+"/"+M+"/"+Y+" "+h+":"+m+":"+s;
	 
	cid=setTimeout("UpdateClock()",1000);
}

function StartClock() {
	 cid=setTimeout("UpdateClock()", 500);
}

function KillClock() {
	 if(cid) {
			clearTimeout(cid);
			cid=0;
	 }
}




