/*
//CSS Weiche
var MSIE=navigator.userAgent.indexOf("MSIE"); 
var NETS=navigator.userAgent.indexOf("Netscape"); 
var OPER=navigator.userAgent.indexOf("Opera"); 
if((MSIE>-1) || (OPER>-1)) { 
document.write("<link href='/typomotion_ms.css' type='text/css' rel='stylesheet'>"); 
} else { 
document.write("<link href='/typomotion.css' type='text/css' rel='stylesheet'>"); 
}
*/

//Versteckten Text aufklappen
function toggledisplay (id, indicator){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		var pic = document.getElementsByName(indicator);
		obj.style.display = (obj.style.display=='block'?'none':'block');
		pic[0].src = (obj.style.display=='block'?'/img/blank.gif':'/nav/pfeil.gif');
	} else if(document.all) { // IE
		id.style.display = (id.style.display=='block'?'none':'block');
		indicator.src = (id.style.display=='block'?'/img/blank.gif':'/nav/pfeil.gif');
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = (document.id.style.display=='block'?'none':'block');
		document.indicator.src = (document.id.style.display=='block'?'/img/blank.gif':'/nav/pfeil.gif');
	}
}

function displayPic(Pic,Titel,picX,picY) {
	xsize = picX
	ysize = picY
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;
	xpos = (ScreenWidth/2)-(xsize/2);
	ypos = (ScreenHeight/2)-(ysize/2);
	ypos = (ypos/5)*3;
	NewWindow=window.open("","Bild","height="+ysize+",width="+xsize+",scrollbars=no,resizable=yes,status=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>"+Titel+"</title></head>");
	NewWindow.document.write ("<body bgcolor='#ffffff' onload='focus()' style=\"margin:10px 0 10px 0;padding:0;\">");
	NewWindow.document.write ("<table border='0' bgcolor='#ffffff' cellpadding='0' cellspacing='0' width='100%' height='100%'><tr><td style=\"text-align:center;\">");
	NewWindow.document.write ("<img src='");
	NewWindow.document.write (Pic);
	NewWindow.document.write ("'");
	NewWindow.document.write ("</td>");
	NewWindow.document.write ("</tr></table>");
	NewWindow.document.write ("</body></html>");
	NewWindow.document.close();
}
function displayMovie(Pic,Titel,picX,picY) {
	xsize = (picX*1.04);
	ysize = (picY*1.068);
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;
	xpos = (ScreenWidth/2)-(xsize/2);
	ypos = (ScreenHeight/2)-(ysize/2);
	ypos = (ypos/5)*3;
	NewWindow=window.open("","Film","height="+ysize+",width="+xsize+",scrollbars=no,resizable=yes,status=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>"+Titel+"</title></head>");
	NewWindow.document.write ("<body bgcolor='#ffffff' onload='focus()' style=\"margin:10px 0 10px 0;padding:0;\">");
	NewWindow.document.write ("<table border='0' bgcolor='#ffffff' cellpadding='0' cellspacing='0' width='100%' height='100%'><tr><td style=\"text-align:center;\">");
	NewWindow.document.write ("<embed src='");
	NewWindow.document.write (Pic);
	NewWindow.document.write ("' ");
	NewWindow.document.write ("width='"+picX+"' height='"+picY+"' ");
	NewWindow.document.write (" autoplay='true' loop='false' controller='true' pluginspage='http://www.apple.com/de/quicktime/download/'></embed>");
	NewWindow.document.write ("</td>");
	NewWindow.document.write ("</tr></table>");
	NewWindow.document.write ("</body></html>");
	NewWindow.document.close();
}

function popup(url,myWidth,myHeight) {
	var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    myTop = (myTop/5)*3;
	options = "scrollbars=no,status=yes,width="+myWidth+",height="+myHeight+",top="+myTop+",left="+myLeft;
	Win = window.open(url,"Popup", options);
	Win.focus();
}

function changePage(newLoc) {
   nextPage = newLoc.options[newLoc.selectedIndex].value
   if (nextPage != "") {
      document.location.href = nextPage
   }
}

function changeSize(newSize) {
	mySize = newSize.options[newSize.selectedIndex].value
	var now = new Date();
	now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    document.cookie = "fontsize=" + mySize + "; expires=" + now + ";path=/;";
    window.location.href = unescape(window.location.pathname);
}

function qxmcookie(name,email,web) {
	var now = new Date();
	now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    document.cookie = "qxm_name=" + name + "; expires=" + now + ";path=/;";
    document.cookie = "qxm_eMail=" + email + "; expires=" + now + ";path=/;";
    document.cookie = "qxm_website=" + web + "; expires=" + now + ";path=/;";
}
//Waiting
function togglewaiting(sh) {
	if (document.getElementById) { 
		document.getElementById('spinner').style.display = (sh=='hide'?'none':'block');
	} else if(document.all) { // IE
		spinner.style.display = (sh=='hide'?'none':'block');
	} else if (document.layers) { // Netscape 4.x
		document.spinner.style.display = (sh=='hide'?'none':'block');
	}
}

function kommentar_eingabe_check() {
	ok=true;
	meldung='';
	p_name=trim(document.getElementById('name').value);
	p_eMail=trim(document.getElementById('email').value);
	p_msg=trim(document.getElementById('kommentar').value);
	if (p_name.length < 1) {
		meldung = 'Ihren Namen';
		ok=false;
	}
	if (p_eMail.length < 8) {
		if (meldung!='' && p_msg.length < 1) {
			meldung += ', eine E-Mail-Adresse';
		} else if (!meldung=='' && p_msg.length > 0) {
			meldung += ' und eine E-Mail-Adresse';
		} else {
			meldung = 'eine E-Mail-Adresse';
		}
		ok=false;
	}
	if (p_msg.length < 2) {
		if (meldung!='') {
			meldung += ' und einen Kommentar';
		} else {
			meldung = 'einen Kommentar';
		}
		ok=false;
	}
	if (ok==false) {
		document.getElementById('fehler').innerHTML = '<p class="fehler">Bitte tragen Sie noch ' + meldung + ' ein.</p>';
	}
	return ok;
}

function trim(s) {
	return s.replace(/^\s+/,"")
}