
//=== setzen des DefaultStatus in der Statusbar
defaultStatus = "Deutsches Kuratorium für Therapeutisches Reiten e.V.";

//=== Navigation: MouseOver-Funktion und Preload der Buttons
var nav = "_pix/";
pfeil_p = new Image(); pfeil_p.src = nav + "bt_sub_p.gif";
pfeil_a = new Image(); pfeil_a.src = nav + "bt_sub_a.gif";

function MouseOverOut(PicID, Strg) {
	switch (Strg) {
		case 0 : var Button = pfeil_p; break;
		case 1 : var Button = pfeil_a; break;
		default : var Button = pfeil_p; break;
	}
	document.images[PicID].src = Button.src;
}

//=== Popup Funktion
function show_img(url, width, height) {
	var x = (screen.width/2) - (width/2);
	var y = (screen.height/2) - (height/2);
	
	popupWin = open('','pop','left=' + x +',top=' + y +',width=' + width +',height=' + height +',toolbar=no,location=no,directories=no,menubar=no,status=no,resizable=no,scrollbars=no,dependent=yes');
	popupWin.document.write('<html><head><title>Bilderanzeige</title>');
	popupWin.document.write('</head><body style="margin:0px 0px 0px 0px;" onblur="window.close()">');
	popupWin.document.write('<img src="'+url+'" width="'+width+'" height="'+height+'" border="0">');
	popupWin.document.write('</body></html>');
	popupWin.document.close();
	popupWin.focus();
}

//=== Popup Funktion
function show_video(url, width, height) {
	var x = (screen.width/2) - (width/2);
	var y = (screen.height/2) - (height/2);
	
	popupWin = open('film.php?film='+url,'pop','left=' + x +',top=' + y +',width=' + width +',height=' + height +',toolbar=no,location=no,directories=no,menubar=no,status=no,resizable=no,scrollbars=no,dependent=yes');

//	popupWin.document.write('<html><head><title>Bilderanzeige</title>');
//	popupWin.document.write('<script type="text/javascript" src="_include/swfobject.js"></script>');
//	popupWin.document.write('</head><body style="margin:0px 0px 0px 0px;" onblur="window.close()">');
//	popupWin.document.write('<div id="film">');
//  popupWin.document.write('</div>');
//	popupWin.document.write('<script type="text/javascript">');
//	popupWin.document.write('	var fo = new FlashObject("'+url+'", "film", "'+width+'", "'+height+'", "5", "#FFFFFF");');
//	popupWin.document.write('	fo.addParam("scale", "scale");');
//	popupWin.document.write('	fo.addParam("wmode", "transparent");');
//	popupWin.document.write('	fo.addParam("root", ".");');
//	popupWin.document.write('	fo.write("film");');
//	popupWin.document.write('</script>');
//	popupWin.document.write('</body></html>');
//	popupWin.document.close();
	popupWin.focus();
}

//### blendet je ein Element ein & aus
function showhide( showid, hideid ) {
	if ( showid == hideid && document.getElementById( showid ) ) {
		if ( document.getElementById( hideid ).style.visibility == 'hidden' ) {
			hideid = '';
		}
		else {
			showid = '';
		}
	}
  if ( document.getElementById( showid ) ) {
    document.getElementById( showid ).style.visibility = 'visible';
    document.getElementById( showid ).style.display = '';
  }
  if ( document.getElementById( hideid ) ) {
    document.getElementById( hideid ).style.visibility = 'hidden';
    document.getElementById( hideid ).style.display = 'none';
  }
}


//=== Hover-Funktion bei Datensaetzen die ueber mehrere TRs gehen
function tr_hover(ID, Status) {
	if (Status==1) { document.getElementById("tr"+ID).bgColor='#000066'; }
	if (Status==0) { document.getElementById("tr"+ID).bgColor=''; }
}

//=== Checken der Checkboxen
function check(formularname, boxname) {
	form_objekt = eval("document."+formularname+"."+boxname);

	with (form_objekt) {
		if (checked) { checked = false; }
		else { checked = true; }
	}
}

//=== Weiterspringen im Preisrechner (Kraftstoffpreis)
function gonext(wosollichhin) {
	var wokommichher = wosollichhin-1;

	if (document.myform["hidden_bruttopreis_"+wokommichher].value != document.myform["bruttopreis_"+wokommichher].value) {
		if (document.myform["bruttopreis_"+wokommichher].value >= 0 && document.myform["bruttopreis_"+wokommichher].value != "") {
			document.myform["bruttopreis_"+wosollichhin].focus();
		}
	}
	document.myform["hidden_bruttopreis_"+wokommichher].value = document.myform["bruttopreis_"+wokommichher].value;
}