function open_window(url, name, breite, hoehe, center, scrollbar) {
	var features = 'location=no,menubar=no,resizable=yes,status=no,toolbar=no';
	if (scrollbar == 0) {
		features += ',scrollbars=no'
	} else {
		features += ',scrollbars=yes'
	}
	if (center == 1) {
		var left = (screen.width) ? (screen.width - breite) / 2 : 100;
		var top = (screen.height) ? (screen.height - hoehe) / 2 : 100;
		features += ',left=' + left + ',top=' + top;
	}
	features += ',width=' + breite + ',height=' + hoehe;
	popup_window = window.open(url, name, features);
	popup_window.focus();
}
//--------------------------------
function changeChart(index, time) {
	document.images['chart'].src = chartLinks[index][time];
	// Index
	if (index != actual_index)
	{
		//Index
		document.getElementById(actual_index).className = '';
		document.getElementById(index).className = 'aktiv';
		//Darstellung Produktlink
		document.getElementById('product' + actual_index).style.display = 'none';
		document.getElementById('product' + index).style.display = 'inline';
	}
	// Time
	if (time != actual_time)
	{
		document.getElementById(actual_time).className = '';
		document.getElementById(time).className = 'aktiv';
	}
	actual_index = index;
	actual_time = time;
}
//--------------------------------
function openProductPage(strURL) {
	open_window(strURL,'dbpower_products_popup',1000,770,1,0,0);
}
//--------------------------------
function setServerDate() {
	var actualClientTime = new Date();
	var elapsedTime = actualClientTime.getTime()-clientTime.getTime();
	actualServerTime = serverTime.getTime()+elapsedTime;
	setTimeout('setServerDate()',1000);
}
//--------------------------------
function clock(city,zone,showAmOrPm) {
	var digital = new Date(actualServerTime);
	var hours 	= digital.getHours() + parseInt(zone) + parseInt(sZone);
	var minutes = digital.getMinutes();
	var seconds = digital.getSeconds();
	var amOrPm 	= "AM";
	if (minutes<0) {
		minutes = 60 + minutes;
		hours	= hours -1;
	}
	if (minutes>=60) {
		minutes = minutes-60;
		hour	= hours+1;
	}
	if (minutes <= 9) minutes = "0" + minutes;
	
	if (hours >= 24) hours = hours-24;
	if (hours < 0) hours = hours+24;
	
	if (showAmOrPm) {
		if (hours == 0) hours = 12;
		if (hours >= 12) amOrPm = " PM"; else amOrPm = " AM";
		if (hours > 12) hours	= hours-12;
	} else {
		if (hours <= 9) hours = "0" + hours;
		amOrPm = "";
	}
	
	if (seconds <= 9) seconds = "0" + seconds;
	
	dispTime = hours + ":" + minutes + amOrPm ;
	document.getElementById(city).innerHTML = dispTime;
	setTimeout("clock('" + city + "'," + zone + "," + showAmOrPm + ")",1000);
}