function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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];}}
}


// *****************************  open window *************************************************************

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// show/hide layer
javascript:;
function change_vis(div_id){
	var change_div=document.getElementById(div_id);
	if(change_div.style.display=="none" || change_div.style.display==""){
		change_div.style.display="block";
	}else{
		change_div.style.display="none";
	}
   return change_div.style.display;
}

<!--
var browser=new Object;
browser=navigator.appName;
version=navigator.appVersion;
os=navigator.platform;
codename=navigator.appCodeName;
agent=navigator.userAgent;
browser.major = parseInt(navigator.appVersion);
browser.minor = parseFloat(navigator.appVersion);

/*
document.write("<br><br><br>Browser:" + browser + "<br>");
document.write("Version:" + version + "<br>");
document.write("Sprache:" + language + "<br>");
document.write("Betriebssystem:" + os + "<br>");
document.write("Codename des Browsers:" + codename + "<br>");
document.write("User-Agent-Attribut:" + agent + "<br>");
document.write("Browser:" + browser + "<br>");
*/
var stylepfad="";
var spfad= stylepfad+'/common/styles/'; 

safari = (navigator.appVersion.indexOf("Safari")!=-1) ? true : false;
moz = (navigator.appName.indexOf("Netscape")!=-1) ? true : false;
isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
opera = (navigator.userAgent.indexOf("Opera")!=-1) ? true : false;
ie55 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.5")!=-1)) ? true : false;
ie7 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 7")!=-1)) ? true : false;
IEmac = ((document.all)&&(isMac)) ? true : false;
NS4 = (document.layers) ? true : false;

if(ie55) document.write('<link rel="stylesheet" media="screen, projection" href="'+spfad+'styles_ie55.css" type="text/css" />'); 

function setContentHeight1(){
    var bheight=getMyPageSize();
    //alert(bheight[1]);
     if (moz  || ie7) document.getElementById("contentMiddle").style.minHeight = bheight[1]-333 + "px";
    else document.getElementById("contentMiddle").style.height = bheight[1]-332 + "px";
}

function setContentHeight2(){
    var bheight=getMyPageSize();
    // alert(bheight[1]);
     if (moz  || ie7) document.getElementById("content788").style.minHeight = bheight[1]-394 + "px";
    else document.getElementById("content788").style.height = bheight[1]-394 + "px";
}



function getMyPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}


	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}

//Zahlenbibliothek
// 'Ermittle Nachkommaanteil 131203'
function getFrac(num) { 
   num=""+num; 
   return parseFloat("0."+num.substring(num.length-((num.indexOf(".")>=0)?num.length-num.indexOf(".")-1:0),num.length)); 
}
// 'Zahlenumwandlung 131203' (benoetigt getFrac())
function stringInt(num,base,size) {
   var i, q, sign, result="", baseTable="0123456789ABCDEF"; 
   num=parseInt(num); 
   sign=(num<0)?"-":""; 
   base=parseInt(base); 
   size=(size)?size:0; 
   if(!base || base<=1 || base>baseTable.length) {
       base=10; 
   } 
   while(true) { 
      q=num/base; 
      result=baseTable.charAt(parseInt(getFrac(q)*base))+result; 
      num=parseInt(q); 
      if(num==0) { 
         break; 
      } 
   } 
   q=""; 
   size-=result.length; 
   for(i=0;i<size;i++) { 
      q+="0";
   } 
   return sign+q+result; 
}

// 'Runde Zahl 131203'
function dezRound(num,pos) { 
   if(pos<0) { 
      pos=Math.pow(10,Math.abs(pos)); 
      return Math.round(num/pos)*pos; 
   } 
   else if(pos>0) { 
      pos=Math.pow(10,pos); 
      return Math.round(num*pos)/pos; 
   } 
   else { 
      return Math.round(num); 
   } 
}
// 'Formatierte Zahlenausgabe 021203'
 // Formatierung des Integerbereichs
function dezInt(num,size,prefix) { 
   prefix = (prefix) ? prefix : "0"; 
   var minus = (num<0) ? "-" : "", result= (prefix=="0") ? minus : ""; 
   num=Math.abs(parseInt(num,10)); 
   size-=(""+num).length; 
   for(var i=1;i<=size;i++) { 
      result+=""+prefix; 
   } 
   result+=((prefix!="0")?minus:"")+num; 
   return result; 
}

// Formatierung des Fliesskommabereichs (benoetigt getFrac())
function dezFrac(num,size,postfix) { 
   postfix=(postfix)?postfix:"0"; 
   var i, result=getFrac(Math.abs(num)); 
   result=(result)?""+result:""; 
   if(result) { 
      result=result.substring(2,result.length); 
   } 
   size-=result.length; 
   for(i=1;i<=size;i++) { 
      result+=postfix; 
   } 
   return result;
}

// Formatierung realer Zahlen (benoetigt dezInt() & dezFrac())
function dez(num,presize,postsize,prefix,postfix,fracSign) {
   fracSign=(fracSign)?fracSign:"."; 
   var result=dezInt(num,presize,prefix)+fracSign+dezFrac(num,postsize,postfix);
   result=(result.substring(result.length-1,result.length)==fracSign)?result.substring(0,result.length-1):result;
   return result; 
}
// 'Natuerliche Zufallszahl 130703' (1<=Zahl<=max)
function rnd(max) { 
   if(Math.random) { 
      return Math.ceil(Math.max(1,max)*Math.random()); 
   } else { 
      return max; 
   } 
}

// 'Ganze Zufallszahl 060104' (min<=Zahl<=max)
function rand(min,max) { 
   var range=max-min+1; 
   if(range>0) { 
      if(Math.random) { 
         return Math.ceil(range*Math.random())+min-1; 
      } else { 
         return max; 
      } 
   } else { 
      return "undefined"; 
   } 
}


function switchFaq(fid){
   var faqAntwort = document.getElementById("faq_" + fid);
   var switchLink = document.getElementById("faqSwitch_" + fid);
   var faqFrage   = document.getElementById("faqQ_" + fid);
   if(faqAntwort.style.display == "none"){
      faqFrage.style.color = "#00ADEF";
      faqAntwort.style.display = "";
      switchLink.innerHTML = "Zuklappen";
      switchLink.title = "Zuklappen";
      switchLink.className = "faqClose";
   }else{
      faqFrage.style.color = "";
      faqAntwort.style.display = "none";
      switchLink.innerHTML = "Mehr...";
      switchLink.title = "Mehr";
      switchLink.className = "faqOpen";
   }
}

// *****************************  textbox *************************************************************

function showWMTT(el,text) {

        nanu=getElementPosition(el)
        wmtt = document.getElementById("overDiv");
        wmtt.style.left = nanu.left+20+ "px";
        wmtt.style.top = nanu.top+20+ "px";
	wmtt.innerHTML=text;
	wmtt.style.display = "block"


}

function getElementPosition(elemID){
var offsetTrail = document.getElementById(elemID);
var offsetLeft = 0;
var offsetTop = 0;
while (offsetTrail){
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
offsetTrail = offsetTrail.offsetParent;
}
if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){
offsetLeft += document.body.leftMargin;
offsetTop += document.body.topMargin;
}
return {left:offsetLeft,top:offsetTop};
}

function hideWMTT() {
	wmtt.style.display = "none";
}

function get_cookie ( cookie_name )
{
	var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
	if ( results )
	return ( unescape ( results[2] ) );
	else
	return null;
}

function set_cookie ( name, value, expires, path, domain, secure )
{
	var cookie_string = name + "=" + escape ( value );
	if ( expires )
        {
        var now = new Date();
        var exp = new Date(now.getTime()+ 2592000000); 
        cookie_string += "; expires=" + exp.toGMTString();
        }
	if ( path )
	cookie_string += "; path=" + escape ( path );
	if ( domain )
	cookie_string += "; domain=" + escape ( domain );
	if ( secure )
	cookie_string += "; secure";
	document.cookie = cookie_string;
}


function setVolume(volume) {
	set_cookie('musicplayer',volume,1);
}

function getVolume() {
	var vol = get_cookie('musicplayer');
	if (!vol) return 20;
	else return vol;
}

//-->