<!--
/*          cis.js        2008-02-04             */


function info_box( url ) {
	fenster = window.open( url, "infoBox","width=450,height=300,left=0,top=0" );
	fenster.focus();
}

/* Bearbeitungs- oder Info Box -----------

var wBox = new Array( 0 );
wBox["url"]=;
wBox["name"]=;
wBox["width"]=;
wBox["height"]=;
wBox["left"]= 160;
wBox["top"]= 200;
*/
var wBox;
var si= "2826";

function boxOpen ( aBox, parameter ) {
	aBox["left"]= aBox["left"] ? aBox["left"] : 60;
	aBox["top"] = aBox["top"]  ? aBox["top"]  : 60;
	if( parameter ) {
		parameter = "?si=" + si + "&" + parameter;
		// wBoxClose();
	}
	else {
		parameter= "";
	}
	var scroll= ( aBox["scroll"] ) ? ",scrollbars=1,resizable=yes" : "";
	var wProperties= "width="+aBox["width"]+",height="+aBox["height"]+",left="+aBox["left"]+",top="+aBox["top"] + scroll;
	if( wBox== null ) {
		wBox = window.open( aBox["url"]+parameter, aBox["name"], wProperties );
		wBox.focus();
	}
	else if( wBox.closed== true ) {
		wBox = window.open( aBox["url"]+parameter, aBox["name"], wProperties );
	} else {
		if( wBox.name != aBox["name"] ) {
			wBoxClose();
			wBox = window.open( aBox["url"]+parameter, aBox["name"], wProperties );
		}
		wBox.location.href=aBox["url"]+parameter;
		wBox.focus();
	}
}
function wBoxClose () {
	if( wBox!= null ) {
		wBox.close();
	}
	wBox= null;
}

function filterCheckbox( varname ) {
	if( form1.elements[varname].value== "t" ) {
		form1.elements[varname].value= "f";
	} else {
		form1.elements[varname].value= "t";
	}
	form1.submit();
}

function filterTextfeld( varname ) {
	if( form1.elements[varname].value == "" ) {
		form1.elements[varname].value= " ";
	}
	form1.submit();
}

// Formular initialiseieren bei onLoad
function init_form() {
	var Len= g_addsub_liste.length;
	var Erg= "";
	var i= 0;

	for( i= 0; i< Len; i++ ) {
		frm= g_addsub_liste[i];
		if( frm ) {
			create_option( frm );
		}
	}
}



function SetHiddenVar( varname, value ) {
	form1.elements[varname].value= value;
	form1.submit();
}

// Seite ueb_schulung_d.php   sUeb::html_taulen()
function add_einheiten( einheit ) {

	if( form1.evkStatus.value== "f" ) {
		return;
	}
	var e= einheit * 1;
	e= ( e + 1 );
	if( form1.aktuelle_einheit.value < e ) {
		form1.aktuelle_einheit.value= e;
		form1.form1_change.value= "aktuelle_einheit";
		form1.submit();
	}
}

function wirklich_loeschen() {
	var request= confirm( "wirklich löschen ?" );
	if( request ) {
		form1.button_delete.value= true;
		form1.submit();
	}
}

function form1_reload() {
	form1.submit();
}

-->

