function changeContactForm(loc, formtype) {
	var url = '/index.php?l='+loc+'&changeform=1&ftype='+formtype;
	var ajax = new Ajax.Updater('formhtml',url,{method:'get',evalScripts:true});
}
function joinMailinglist(type, msg, msg2){
	document.joinmailinglist.entry.value = type;
	if (type == 'join') {
		if (checkMailinglistMail(msg)) {
			//document.joinmailinglist.submit();
			// Show Extra Information DIV here
			var dO = MM_findObj('newsletterExtra');
			dO.style.top = '250px';
			dO.style.left = (document.documentElement.clientWidth/2-200)+'px';
			dO.style.visibility = 'visible';
		}
	} else if (type == 'unjoin') {
		if (confirm(msg2)) {
			if (checkMailinglistMail(msg)) {
				document.joinmailinglist.submit();
			}
		}
	}
}
function checkMailinglistMail(msg) {
	var returnval = true;
	var f = document.joinmailinglist;
	if (f.email.value.indexOf('@') == -1 || f.email.value.indexOf('.') == -1) {
		alert(msg);
		returnval = false;
	}
	return returnval;
}
function showMore(d,a,b) {
	var theDiv = MM_findObj(d);
	//var fulltext = window[d+'_full'];
	fulltext = MM_findObj(d+'_full');
	var visibility = window[d+'_visibility'];
	var backup = window[d+'_excerpt'];
	
	if (visibility == false) {
		window[d+'_excerpt'] = theDiv.innerHTML;
		theDiv.innerHTML = fulltext.innerHTML;
		window[d+'_visibility'] = true;
		MM_findObj(d+'_button').innerHTML = a;
	} else {
		var buffer = backup;
		window[d+'_excerpt'] = theDiv.innerHTML;
		theDiv.innerHTML = buffer;
		window[d+'_visibility'] = false;
		MM_findObj(d+'_button').innerHTML = b;
	}
}

function video () {
	openAWindow('/imagefilm/deutsch.html', 'ImageFilm', 400, 400, 1);
}

function video_en () {
	openAWindow('/imagefilm/englisch.html', 'ImageFilm', 400, 400, 1);
}

// 3rdparty below

//v4.01
function MM_findObj(n, d) {
 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 openAWindow( pageToLoad, winName, width, height, center) {
  xposition=0; yposition=0;
  if ((parseInt(navigator.appVersion) >= 4 ) &&(center)) {
   xposition = (screen.width - width) / 2;
   yposition = (screen.height - height) / 2;
  }
  args = "width=" + width + ","
  + "height=" + height + ","
  + "location=0,"
  + "menubar=0,"
  + "resizable=0,"
  + "scrollbars=0,"
  + "status=0,"
  + "titlebar=0,"
  + "toolbar=0,"
  + "hotkeys=0,"
  + "screenx=" + xposition + "," //NN Only
  + "screeny=" + yposition + "," //NN Only
  + "left=" + xposition + "," //IE Only
  + "top=" + yposition; //IE Only
  window.open( pageToLoad, winName, args );
}

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  return myWidth;
}