// ISIP Basis Java Scripts
function getMyISIPName(name)
{
newname = prompt("Geben Sie bitte einen Namen für diese Seite ein:",name);
document.myisip.titel.value=newname;
return (newname != null);
}

var fenster = null;
 
function isip_openWindow(theURL,winName,status,winWidth,winHeight,winXposition,winYposition)
{
fenster= window.open(theURL,winName,status);
fenster.resizeTo(winWidth, winHeight);
fenster.moveTo(screen.width-winWidth-3,winYposition);
fenster.focus();
}

function isip_closeWindow() 
{
if (fenster != null)
if (fenster.closed == false) fenster.close();
}

function Contact(s, shift, subject, body) 
{
var n=0;
var r="";
var sep="?";
for(var i=0;i<s.length;i++) 
{
	n=s.charCodeAt(i); 
	if (n>=8364) {n = 128;}
	r += String.fromCharCode(n-(shift)); 
}
if (subject != "") 
{
	r += sep + "subject=" + subject;
	sep = "&";
}
if (body != "")
{
	while (body.search(/<br>/) > 0)
	body = body.replace(/<br>/, "%0A");
	r += sep + "body=" + body;
}
return r;
}

function linkContact(s, shift, subject, body)
{
location.href=Contact(s, shift, subject, body);
}

function WSAlarm()
{
alert('Diese Wetterstation liefert ab 2007 keine aktuellen Wetterdaten mehr!\nBitte ' + unescape("l%F6schen") + ' Sie den Schlag oder ' + unescape("w%E4hlen") + ' Sie eine andere Wetterstation.\nVielen Dank!');
}

function goToLink()
{
if (document.kulturen.kultur.options[document.kulturen.kultur.selectedIndex].value != "none")
{
	location = document.kulturen.kultur.options[document.kulturen.kultur.selectedIndex].value
}
}

function goToLink2()
{ 
if (document.entscheidunghilfen.entscheidungshilfe.options[document.entscheidunghilfen.entscheidungshilfe.selectedIndex].value != "none")
{
	location = document.entscheidunghilfen.entscheidungshilfe.options[document.entscheidunghilfen.entscheidungshilfe.selectedIndex].value
}
}

function goToLinkMyISIP()
{ 
if (document.myisip.option.options[document.myisip.option.selectedIndex].value != "none")
{
	location = document.myisip.option.options[document.myisip.option.selectedIndex].value
}
}