var forms ;
function load_pageStats () {
//	try {load_stats()} catch (e) {e}
}
function get_fieldValue ( fieldName , fieldType , fieldSep ) {
	wert = '' ;
	trenner =  ( fieldSep ) ? fieldSep : ';' ; 
	tmpField = eval ( forms + fieldName ) ;
	if ( !tmpField ) return wert ;
	
	if ( !fieldType ) {
		fieldType = ( tmpField.type ) ? tmpField.type : tmpField[0].type ;
	}
	switch ( fieldType ) {
	case 'text' : case 'textarea' : case 'hidden' :					// TEXT-FELDER
		wert = tmpField.value ;
		break ;
	case 'select-one' : case 'select-multiple' : 			// DIALOG-LISTE
		for ( i = 0 ; i < tmpField.length ; i++ ) {
			if ( tmpField[i].selected ) wert += tmpField[i].value + trenner ;
		}
		break ;
	case 'select-noindex' : 								// DIALOG-LISTE OHNE ANKLICKEN
		for ( i = 0 ; i < tmpField.length ; i++ ) {
			wert += tmpField[i].value + trenner ;
		}
		break ;
	case 'checkbox' : case 'radio' : 							// CHECKBOX, RADIO
		if ( tmpField.length ) {
			for ( i = 0 ; i < tmpField.length ; i++ ) {
				if ( tmpField[i].checked ) wert += tmpField[i].value + trenner ;
			}
		}
		else if ( tmpField.checked ) wert = tmpField.value ;
		break ;
	} 
	ind = wert.lastIndexOf(trenner) ; 
	if ( ind > -1 )  wert = wert.substring( 0 , ind );
	return wert ;
}
function replace_str ( txt1 , txt2 , txt3 ) {
//	@ReplaceSubstring ( txt1 ; txt2 ; txt3 )
	indOf = txt1.indexOf ( txt2 )
	tmp_txt = txt1 ;
	while ( indOf > -1 ) {
		tmp_txt = tmp_txt.replace ( txt2 , txt3 ) ;
		indOf = tmp_txt.indexOf ( txt2 )
	}
	return tmp_txt;
}
function trim ( txt ) {
	returnTxt = '' ; 
	lastChar = '' ;
	for ( t = 0 ; t < txt.length ; t ++ ) {
		currChar = txt.charAt (t) ; 
		if ( currChar == ' ' ) {
			if ( lastChar != '' && lastChar != ' ' ) returnTxt += currChar ; 
		}
		else returnTxt += currChar ; 
		lastChar = currChar ; 
	}
	if ( lastChar == ' ' ) returnTxt = returnTxt.substring ( 0 , returnTxt.length-1 )  ;
	return returnTxt ;
}

