/*
 * Allgemeine Funktionen
 *
 * info@l-vogel.de
 * erstellt: 2005-05-11
 * geaendert: 2006-03-23
 *
 */
 
/*--------------------------------------------------
  POPUP-FENSTER
  --------------------------------------------------*/

/**
 * Fenster absolut positionieren
 *
 *
 */
function getPosition () {
		self.moveTo(100, 100);
}

/**
 * Fenster n den Vordergrund
 *
 *
 */
function getFocus() {
	window.focus();
	//window.moveTo(60, 100);
}

/**
 * Pop-Up - Groesse wir d uebergeben
 *
 *
 */
function fenster(link,id,w,h) {
	//window.open(name,id,'width='+w+',height='+h);
	window.open(link, id,"resizable=no,scrollbars=no,locationbar=no,menuebar=no,status=yes,height="+h+",width="+w+", top="+((screen.height/2)-(h/1.5))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
    window.focus();
}

/**
 * Pop-Up - fixe Groesse
 *
 *
 */
function popUp(link, name) {
    var w  = 730;
	var h = 200;
	//alert("top="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+"");
 	if (link!=null && name!=null) {
	    window.open(link, name,"resizable=no,scrollbars=yes,locationbar=no,menuebar=no,status=no,height="+h+",width="+w+", top="+((screen.height/2)-(h/1))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
		//window.open(link, name,"resizable=no,scrollbars=yes,locationbar=no,menuebar=no,status=no, height="+height+", width="+width+",left="((screen.width/2-(width/2))",top="((screen.height/2)-(height/1.5)));
	} else {
    	// DEBUG
		alert("Link oder Fensternahme fehlt");
	}
}

/**
 *  Pop Up Fenster Werbung oeffnen
 *
 *
 */

function windowAd(link,id,w,h) {
	//window.open(name,id,'width='+w+',height='+h);
	window.open(link, id,"resizable=no,scrollbars=no,locationbar=no,menuebar=no,status=no,height="+h+",width="+w+", top="+((screen.height/2)-(h/1.5))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
}

/**
 *  Pop Up Fenster fuer Druckversion
 *
 *
 */
function printpopup(link,id,w,h) {
	//window.open(name,id,'width='+w+',height='+h);
	window.open(link, id,"resizable=yes,scrollbars=yes,locationbar=no,menuebar=no,status=yes,height="+h+",width="+w+", top="+((screen.height/2)-(h/1.5))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
}

/*--------------------------------------------------
  CSS
  --------------------------------------------------*/
  
/**
 * Tabellenzellen einfärben
 *
 *
 */

function getCellOver(element, color) {

	//alert("licht an: "+status);
    self.document.getElementById(element).style.backgroundColor="#"+color+"";

}
function getCellOut(element, color) {

	//alert("licht an: "+status);
    self.document.getElementById(element).style.backgroundColor="#"+color+""; 
}
/* Tabellen-Border einfärben Team */
function getElementBorderOver(element) {
//alert("licht an: "+status);
	    //alert("licht an: "+status);
    //self.document.getElementById(element).style.border="1px solid #b01b31";
	self.document.getElementById(element).style.border="1px solid #E8EAEB";
}
function getElementBorderOut(element) {

    self.document.getElementById(element).style.border="1px solid #000000";
}

/**
 * Ebenen unsichtbar
 *
 *
 */

function closeDiv (id) {
	self.document.getElementById(id).style.visibility  = "hidden";
}


/*--------------------------------------------------
  ENVIRONMENT
  --------------------------------------------------*/

/**
 * Dreamweaver Flash Detection
 *
 *
 */

function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    ok=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}

/**
 * Dreamweaver Netscape Resize Fix
 *
 *
 */
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

/*--------------------------------------------------
  Browser Workarounds
  --------------------------------------------------*/
function getBrowserWorkarounds() {
  
  	if (navigator.userAgent.match("Safari")) {
		 //self.document.getElementById("boxBrand").style.top="-50";
		 alert("Safari");
	} else if (navigator.userAgent.match("Mac") && navigator.userAgent.match("MSIE") && !navigator.userAgent.match("Opera")) {
		//
	} else {
	   //
	}
}