	var i = 0;
	var speed = 1;
	var index = 0;
	var exp = new Date();
	
	function formatTime() {
		var now = new Date();
				
		var hour = now.getUTCHours() + 2;
		var min = now.getUTCMinutes();
		var sec = now.getUTCSeconds();
				
		var colon = "";
		if(sec%2 == 1)
			colon = ":";
		else
			colon = " ";
		
		//Time of Zurich - Switzerland
		if (min <= 9) { min = "0" + min; }
		if (sec <= 9) { sec = "0" + sec; }
		if (hour < 10) { hour = "0" + hour; }
		//document.clock.clock1.value = hour + colon + min + " Zurich-Switzerland";
		document.getElementById("clock1").innerHTML = hour + colon + min + " Zurich-Switzerland";
		
		//Time of Vancouver - Canada
		var hourb = now.getUTCHours() - 7;		
		if (hourb < 0) { hourb = hourb + 24;}		
		if (hourb < 10) { hourb = "0" + hourb; }
		document.getElementById("clock2").innerHTML = hourb + colon + min + " Vancouver-Canada";
		//document.clock.clock2.value = hourb + colon + min + " Vancouver-Canada";		
	}

	function total(idx){
		exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 30));     //set it 30 days ahead 
		setCookie("statusBgMenu",idx,exp);
		getIndexMenu();
		markMenu(index);markMenuLeft(index);
		showdate();
		formatTime();
		i=readAvailableScroll();
		scroll();		
	}
	
	function getIndexMenu()
	{
		index=getCookie("statusBgMenu");
		delCookie("statusBgMenu");
	}
	
	function reMarkMenu(){
		markMenu(index);
	}
	function reMarkMenuLeft(){
		markMenuLeft(index);
	}
	
	//window.onload=total;
	
	function showdate(){
		var weekday=new Array(7);
		var currentDate = new Date();		
		var day = currentDate.getDate();
		var month = currentDate.getMonth()+1;
		var year = currentDate.getFullYear();
		
		var d = new Date();
		
		weekday[0]="Sunday";
		weekday[1]="Monday";
		weekday[2]="Tuesday";
		weekday[3]="Wednesday";
		weekday[4]="Thursday";
		weekday[5]="Friday";
		weekday[6]="Saturday";
		
		document.formDate.date.value = weekday[d.getDay()] + ", " + day + "." + month + "." + year;
	}	
	
	
	function scroll() {
		i = i + speed;
		var div = document.getElementById("news");
		
		div.scrollTop = i;
		if (i > div.scrollHeight - 300) {i = 0;}
		t1 = setTimeout("scroll();formatTime();",80);
	}
	
	function stop(){
		clearTimeout(t1);;
	}
	
	function readAvailableScroll()
	{
		var availableScroll=0;
		availableScroll=getCookie("availableScroll");
		delCookie("availableScroll");
		
		return availableScroll;
	}
	
	function setCookie(name, value, expires) {
		document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString());
		} 
	
	function getCookie (name) {
	    var dc = document.cookie;
	    var cname = name + "=";
	    if (dc.length > 0) {
	      begin = dc.indexOf(cname);
	      if (begin != -1) {
	        begin += cname.length;
	        end = dc.indexOf(";",begin);
	        if (end == -1) end = dc.length;
	        return parseInt(dc.substring(begin, end));
	        }
	      }
	    return 0;
	}
	
	function delCookie(name) {
		document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/";
	} 
	
	function changeScroll(index)
	{
		setCookie("availableScroll",i,exp);
		//setCookie("statusBgMenu",index,exp);
	}
	
	function load(linkWebsite) {
		var load = window.open(linkWebsite,'',
	    	'width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
	}