/*
//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'?'images/hide.gif':'images/show.gif');
	} else if(document.all) { // IE
		id.style.display = (id.style.display=='block'?'none':'block');
		indicator.src = (id.style.display=='block'?'images/hide.gif':'images/show.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'?'images/hide.gif':'images/show.gif');
	}
}

//Versteckten Text aufklappen ohne Bildänderung
function toggledisplay2 (id){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		obj.style.display = (obj.style.display=='block'?'none':'block');
	} else if(document.all) { // IE
		id.style.display = (id.style.display=='block'?'none':'block');
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = (document.id.style.display=='block'?'none':'block');
	}
}


//Versteckten Text initial verstecken
function nodisplay (id, indicator){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		var pic = document.getElementsByName(indicator);
		obj.style.display = 'none';
		pic[0].src = 'images/show.gif';
	} else if(document.all) { // IE
		id.style.display = 'none';
		indicator.src = 'images/show.gif';
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = 'none';
		document.indicator.src = 'images/show.gif';
	}
}

//Versteckten Text initial verstecken
function nodisplay2 (id){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		obj.style.display = 'none';
	} else if(document.all) { // IE
		id.style.display = 'none';
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = 'none';
	}
}

//Versteckten Text anzeigen
function showdisplay2 (id){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		obj.style.display = 'block';
	} else if(document.all) { // IE
		id.style.display = 'block';
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = 'block';
	}
}

//Radiobutton zurücksetzen
function resetradio (id){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		obj.checked = false;
	} else if(document.all) { // IE
		id.checked = false;
	} else if (document.layers) { // Netscape 4.x
		document.id.checked = false;
	}
}

//INPUT zurücksetzen
function resetinput (id){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		obj.value = '';
	} else if(document.all) { // IE
		id.value = '';
	} else if (document.layers) { // Netscape 4.x
		document.id.value = '';
	}
}


//SELECT zurücksetzen auf ersten Eintrag (="Bitte wählen"
function resetselect (id){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		obj.selectedIndex = 0;
	} else if(document.all) { // IE
		id.selectedIndex = 0;
	} else if (document.layers) { // Netscape 4.x
		document.id.selectedIndex = 0;
	}
}


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 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=/;";
}
