// JavaScript Document

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {  
  document.getElementById("sub-menu").style.height = (document.getElementById("main").offsetHeight -1) + "px";
  //document.getElementById("text").style.height = document.getElementById("main").offsetHeight + "px";
  showTime();
});

function img_enter(nr) {     
	switch (nr) {
		case 1:
			document.getElementById("im_1").style.color = '#0000FF';
			break;
		case 2:
			document.getElementById("im_2").style.color = '#0000FF';
			break;
		case 3:
			document.getElementById("im_3").style.color = '#0000FF';
			break;
		case 4:
			document.getElementById("im_4").style.color = '#0000FF';
			break;
		case 5:
			document.getElementById("im_5").style.color = '#0000FF';
			break;
		case 6:
			document.getElementById("im_6").style.color = '#0000FF';
			break;
		case 7:
			document.getElementById("im_7").style.color = '#0000FF';
			break;		
		case 9:
			document.getElementById("im_9").style.color = '#0000FF';
			break;
		case 10:
			document.getElementById("im_10").style.color = '#0000FF';
			break;	
	}	
}

function img_leave(nr) {   
	switch (nr) {
		case 1:
			document.getElementById("im_1").style.color = '#000000';
			break;	
		case 2:
			document.getElementById("im_2").style.color = '#000000';
			break;
		case 3:
			document.getElementById("im_3").style.color = '#000000';
			break;
		case 4:
			document.getElementById("im_4").style.color = '#000000';
			break;
		case 5:
			document.getElementById("im_5").style.color = '#000000';
			break;
		case 6:
			document.getElementById("im_6").style.color = '#000000';
			break;
		case 7:
			document.getElementById("im_7").style.color = '#000000';
			break;		
		case 9:
			document.getElementById("im_9").style.color = '#000000';
			break;
		case 10:
			document.getElementById("im_10").style.color = '#000000';
			break;
	}	
}

var maxt;

function showTime() {
   maxt = setTimeout( "showTime()", 1000 );
   myDate = new Date();
   
   // Get time parts
   //hours   = myDate.getHours();
   //minutes = myDate.getMinutes();
   //seconds = myDate.getSeconds();
   hours   = myDate.getUTCHours();
   minutes = myDate.getUTCMinutes();
   seconds = myDate.getUTCSeconds();
   
   // Just to display the time in a nice format
   if (hours < 10)   hours   = "0" + hours;
   if (minutes < 10) minutes = "0" + minutes;
   if (seconds < 10) seconds = "0" + seconds;
   
   // Change the block content
   document.getElementById("utc_time").innerHTML = hours+":"+minutes+":"+seconds+" UTC";
}
