function setUrlForPrint() {
	sUrl = document.location.href;
	if ((document.all) || (document.layers)){
		sUrl = sUrl.replace(/\?/, "\\/");
		sUrl = sUrl.replace(/\&/, "//");
		//alert(sUrl);
	}
	document.printform.url.value = sUrl;
}

function open_down_window(surl,name,width,height, pos_x, pos_y)
{ 
	download_Window = window.open(surl,name,'width=' + width + ',height=' + height + ',statusbar=yes,scrollbars=no,resizable=yes');
	download_Window.moveTo(pos_x,pos_y);
	download_Window.focus();
}
function open_help_window(target,name,width,height, posx, posy)
{ 
	helpWindow = window.open(target,name,'width=' + width + ',height=' + height + ',statusbar=yes,scrollbars=no,resizable=yes');
	helpWindow.moveTo(posx,posy);
	helpWindow.focus();
}

//==============================================================================

function ComboRedir(cmbWhich)
{	var sUrl=cmbWhich.options[cmbWhich.selectedIndex].value;
	if(sUrl!="") window.location=sUrl;
	
	for(var iCtr=0;iCtr<cmbWhich.length;iCtr++)
		if(cmbWhich.options[iCtr].defaultSelected)
		{	cmbWhich.options[iCtr].selected=true;
			return;
		}
	cmbWhich.options[0].selected=true;
}

function WeatherRedir(cmbRegion,cmbSection)
{	var reg,sec;
	reg=cmbRegion.options[cmbRegion.selectedIndex].value;
	if(cmbSection==null)
		sec="karte";
	else
	{	sec=cmbSection.options[cmbSection.selectedIndex].value;
		if(sec=="satbilder")	reg="europa";
	}
	window.location="/tmh/wetter/"+reg+"/"+sec+".asp";
}

function GetComboValue(cmbWhich)
{	return cmbWhich[cmbWhich.selectedIndex].value;
}

function SetComboValue(cmbWhich,vValue)
{	for(var iCtr=0;iCtr<cmbWhich.length;iCtr++)
		if(cmbWhich.options[iCtr].value==vValue)
		{	cmbWhich.options[iCtr].selected=true;
			return true;
		}
	return false;
}

function SetRadioValue(ctlWhich,vValue)
{	for(var iCtr=0;iCtr<ctlWhich.length;iCtr++)
		if(ctlWhich[iCtr].value==vValue)
		{	ctlWhich[iCtr].checked=true;
			return true;
		}
	return false;
}

function SwitchDivs(act,pas) {
		document.getElementById[act].style.visibility='visible';
		document.getElementById[pas].style.visibility='hidden';
	/*if (act="most")
	{
		getElementById('most').style.visibility='visible';
		getElementById('last').style.visibility='hidden';
	}

	if (act='last')
	{
		getElementById('last').style.visibility='visible';
		getElementById('most').style.visibility='hidden';
	}*/
		
	return false;
}

function swap(Bildname,BildURL)
{
document.images[Bildname].src = BildURL;
}
