
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//*** Open Browser Window
var hWindow = false;

function MM_openBrWindow(theURL,winName,features) { //v2.0
	  if (hWindow.closed == false) hWindow.close();
	  hWindow = window.open(theURL,winName,features);
}

//*** MailSpamBlocker PRO / Copyright (c) 2004 by www.myvasco.com
function decode(x){
	var yy=7;var z=0;var xx="";
	for(var y=0;y<x.length;y++)
	{
	z=x.charCodeAt(y);
	xx+=String.fromCharCode(z-yy);
	}
	return xx;
}

function use(x){
	location.href=decode(x);
}

//*** disable context menu
function Click(evt) {
	if (navigator.appName.indexOf("Microsoft") != -1){
		if (event.button==2) {
		alert('Error 767869 - Der Quellcode kann nicht angezeigt werden');
		return false
		};
	};
	if (navigator.appName.indexOf("Netscape") != -1) {
		if ( evt.which == 3 ) {
		alert('Error 748659 - Der Quellcode kann nicht angezeigt werden');
		return false
		};
	};
};

function chkForm_contact() {
	if(document.form1.from_name.value == "") {
       alert("Bitte Ihren Namen eingeben!");
       document.form1.from_name.focus();
       return false;
    }
}

function chkForm_newsletter() {
	if(document.form1.email.value == "") {
       alert("Bitte Ihre Email Adresse eingeben!");
       document.form1.email.focus();
       return false;
    }
	if (!document.form1.email.value.match(/^[a-zA-Z0-9_\.-]{2,}@[a-z0-9-]{3,}\.[a-z]{2,4}|museum$/)) {
       alert("Bitte eine gültige Email Adresse eingeben!");
       document.form1.email.focus();
       return false;
    }
}

function chkForm_pwdrequest() {
	if(document.form1.email.value == "") {
       alert("Bitte Ihre Email Adresse eingeben!");
       document.form1.email.focus();
       return false;
    }
	if(!document.form1.email.value.match(/^[a-zA-Z0-9_\.-]{2,}@[a-z0-9-]{3,}\.[a-z]{2,4}|museum$/)) {
       alert("Bitte eine gültige Email Adresse eingeben!");
       document.form1.email.focus();
       return false;
    }
}

function chkForm_support() {
	return true;
}

function EnumLinkStyle() { 
	for (var i = 0; i < document.getElementsByTagName("a").length; i++) {
		var url = document.getElementsByTagName("a")[i].href;
		if (url.indexOf("http://instantcontent.freenet.de/")!= -1) {
			document.getElementsByTagName("a")[i].style.color = "#838282";
			//document.getElementsByTagName("a")[i].style.textDecoration = 'none';
		}
	}
	SkipNewsProviderTags();
}

function SkipNewsProviderTags() { 
	var oldHTML = document.getElementById('newscontent').innerHTML;
	var tmpHTML = oldHTML.toLowerCase();
	var pos = tmpHTML.indexOf("<hr");
	if (pos != -1) {
		var newHTML = oldHTML.substring(0, pos);
		document.getElementById('newscontent').innerHTML = newHTML;
	}
}

//*** control flash applet from html
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function stuff(s) {
	document.msgForm.message.value = s;
}
// 	html code for control link
//	<div id="Layer_LoadIntro" style="HEIGHT: 10px; RIGHT: 80px; POSITION: absolute; TOP: 135px; WIDTH: 60px; Z-INDEX: 1">
//		<a class="style7" href='javascript:var m=InternetExplorer?flashheader:document.embeds[0]; m.LoadMovie(0, "../applets/datenprofi-intro.swf")'>play intro</a>
//	</div>
