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;
	window.open(url, name, features);
}
//--------------------------------
function changeProductpage(pageid) {
	if (pageid != '') {
		location.href = 'showpage.asp?pageid=' + pageid;
	}
}
//--------------------------------
function changeProductChart(index, time) {
	// unterbinden, dass beim time-wechsel, der index ausgewertet wird
	if (index != actual_index)
	{
		switch(index) 
		{
			case 'product':
				document.getElementById('underlying').className = 'aktiv';
				if (actual_index == 'underlying')
				{
					document.getElementById('product').className = 'aktiv';
					actual_index = 'both';
				}
				else
				{
					document.getElementById('product').className = '';
					actual_index = 'underlying';
				}
				break;
				
			case 'underlying':
				document.getElementById('product').className = 'aktiv';
				if (actual_index == 'product')
				{
					document.getElementById('underlying').className = 'aktiv';
					actual_index = 'both';
				}
				else
				{
					document.getElementById('underlying').className = '';
					actual_index = 'product';
				}
				break;
			default:
				break;
		}
	}
	else if (time == actual_time)
	{
		if (index == 'product')
		{
			actual_index = 'underlying';
		}
		else if(index == 'underlying')
		{
			actual_index = 'product';
			
		}
		document.getElementById(index).className = '';
		document.getElementById(actual_index).className = 'aktiv';
	}
	document.getElementById(actual_time).className = '';
	document.getElementById(time).className = 'emphased';
	document.getElementById(actual_time+'Perf').className = '';
	document.getElementById(time+'Perf').className = 'emphased';
	actual_time = time;
	document.images['chart'].src = chartLinks[actual_index][time];
}
//--------------------------------
function changeChart(name, index, time) {
	eval("document.images['chart_" + name + "'].src = chartLinks_" + name + "[index][time];");
	if (index != 'no_index')
	{
		eval("document.getElementById(actual_index_" + name + " + '_" + name + "').className = '';");
		eval("document.getElementById(index + '_" + name + "').className = 'aktiv';");
	}
	eval("document.getElementById(actual_time_" + name + " + '_" + name + "').className = '';");
	eval("document.getElementById(time + '_" + name + "').className = 'aktiv';");
	eval("actual_index_" + name + " = index;");
	eval("actual_time_" + name + " = time;");
}
//--------------------------------
function changeIRLayer(currency) {
	document.getElementById(actual_currency + '_link').className = '';
	document.getElementById(currency + '_link').className = 'aktiv';
	document.getElementById(actual_currency + '_layer').style.visibility = 'hidden';
	document.getElementById(currency + '_layer').style.visibility = 'visible';
	actual_currency = currency;
}
//--------------------------------
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);
}
//--------------------------------
function deleteInput(ref)
{
	if (blnClicked == false)
	{
		ref.value = '';
		blnClicked = true;
	}
}