
// Image-Preload
/* function preload () {
	if (document.images) {
		var jscr = new Array();
		for (var i = 0; i < 7; i++) { jscr[i] = new Image(); }
		var dir = "/images/nav/";
		jscr[1].src = dir + "xxx_m.gif";
		jscr[2].src = dir + "heilpraktiker_kontakt_m.gif";
		jscr[3].src = dir + "naturheilpraxis_m.gif";
		jscr[4].src = dir + "osteopathie_links_m.gif";
		jscr[5].src = dir + "patienteninfo_naturheilkunde_m.gif";
		jscr[6].src = dir + "therapie_luebeck_m.gif";
	}
}*/

// Window-Status permanent setzen
window.status = "...Rallyeteam Greim...";

// ------------------------------------------------------------
// Ändert den Text in der Statuszeile des Browserfensters.
// ------------------------------------------------------------
function stat(aname) {
	var text;
	text = aname;
	if ( aname == '1' ) { text = '...Rallyeteam Greim...'; }
	if ( aname == '2' ) { text = '...Rallyeteam Greim...'; }
	if ( aname == '3' ) { text = '...Rallyeteam Greim...'; }
	if ( aname == '4' ) { text = '...Rallyeteam Greim...'; }
	if ( aname == '5' ) { text = '...Rallyeteam Greim...'; }
	if ( aname == '6' ) { text = '...Rallyeteam Greim...'; }
	if ( aname == '7' ) { text = '...Rallyeteam Greim...'; }
	window.status = text;
	return true;
}
// Setzt die Statuszeile des Browserfensters wieder zurück.
function s_off () {
	window.status = "...Rallyeteam Greim...";
	return true;
}
// ------------------------------------------------------------


// ------------------------------------------------------------
// Open_Window: Neues Fenster öffnen
// ------------------------------------------------------------
function blank_window(url) {
	var blank_win = window.open( url, "blankwindow" );
	 return false;
}
function open_window(url, x, y) {
	if (x && x != "") { width = x; } else { width = 600; }
	if (y && y != "") { height = y + 17; } else { height = 507; }
	var zoom_win = window.open(url, "openwindow", "width="+width+",height="+height+",scrollbars=yes,menubar=no,toolbar=no,location=no,status=yes,resizable=yes,top=0,left=0");
}
function open_window_full(url) {
	var zoom_win = window.open(url, "openwindowfull", 'width=' + screen.availWidth + ',height=' + screen.availHeight + ',top=0,left=0,scrollbars=auto,menubar=yes');
}
// ------------------------------------------------------------


// ------------------------------------------------------------
// Allgemeine Image-Changer
// ------------------------------------------------------------
function chg (ImageName, FileName) {
	document[ImageName].src = "/fileadmin/template/zzl/images/" + FileName;
	return true;
}
// ------------------------------------------------------------


// ------------------------------------------------------------
// Einzelne Menü-Items An-/Ausschalten
// ------------------------------------------------------------
function navon(Name) {
	document[Name].src = "/images/nav/" + Name + "_m.gif";
	return true;
}
function navoff(Name) {
	document[Name].src = "/images/nav/" + Name + ".gif";
	return true;
}
function navoff_s(Name) {
	document[Name].src = "/images/nav/" + Name + "_s.gif";
	return true;
}
// ------------------------------------------------------------


// ------------------------------------------------------------
// Formular-Elemente hervorheben
// ------------------------------------------------------------
// Element hervorheben
var fade_start = 60;
var fade_end = 95;
var counter = 0;	// Schutzmechanismus
function FocusElement (obj) {
	counter = 0;
	if (document.getElementById || document.all) {
		document.all[obj].style.backgroundColor = "#EFEFDD";
		document.all[obj].style.fontWeight = "bold";
		if( document.all[obj].filters.alpha.opacity ) { fadein( obj ) };
	}
}
function BlurElement (obj) {
	counter = 0;
	if (document.getElementById || document.all) {
		document.all[obj].style.backgroundColor = "#EEEEEF";
		document.all[obj].style.fontWeight = "normal";
		if( document.all[obj].filters.alpha.opacity ) { fadeout(obj); }
	}
}
function fadein (obj) {
	if( counter <= 30 ) {
		if(document.all[obj].filters.alpha.opacity < fade_end) {
			document.all[obj].filters.alpha.opacity += 3;
			counter++;
			setTimeout("fadein('"+obj+"')",1);
		}
	}
}
function fadeout (obj) {
	if( counter <= 30 ) {
		if(document.all[obj].filters.alpha.opacity > fade_start) {
			document.all[obj].filters.alpha.opacity -= 3;
			counter++;
			setTimeout("fadeout('"+obj+"')",1);
		}
	}
}

// Navigation Highlighting inkl. Transparency Effekt
function high_on(obj, color) {
	if( obj.style ) {
		if( ! color || color == "" ) {
			// obj.style.background='#5E6669';
		} else {
			obj.style.background=color;
		}
		if( obj.filters ) {
			obj.style.filter="progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=70 )";
		} else if ( obj.style.MozOpacity ) {
			obj.style.MozOpacity = 0.7;
		}
	}
	return true;
}
function high_off(obj) {
	if( obj.style ) {
		obj.style.background='';
		if( obj.filters ) {
			obj.style.filter="progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=100 )";
		} else if ( obj.style.MozOpacity ) {
			obj.style.MozOpacity=1.0;
		}
	}
	return true;
}

// Swap-Image mit Fading-Effekt von AIZ
function MM_swapImage(obj) { //v3.0
  if( obj.filters ) { obj.style.filter = "progid:DXImageTransform.Microsoft.fade(duration=1.5)"; }
  // alert( "test: " + obj.style.filter );
  var i,j=0,x,a=MM_swapImage.arguments;
  document.MM_sr=new Array;
  for(i=0;i<(a.length-2);i+=3) {
	   if ((x=MM_findObj(a[i]))!=null){
	   	document.MM_sr[j++]=x;
	   	if(!x.oSrc) x.oSrc=x.src;
		// Abwandlung für Transition
		if( obj.filters ) { 
			obj.filters[0].Apply();
			obj.src = a[2];
			obj.filters[0].Play();
		}
		x.src=a[i+2];
      }
   }
}

// ------------------------------------------------------------


