new Image().src = 'fileadmin/img/indicator.gif';

function toggle_login(obj_id) {
	var active_obj = document.getElementById(obj_id);
	var inactive_obj_id = (obj_id == 'login_betapharm' ? 'login_doccheck' : 'login_betapharm');
	var inactive_obj = document.getElementById(inactive_obj_id);

	inactive_obj.style.display = 'none';
	active_obj.style.display = 'block';
	
	document.cookie = obj_id+'=block';
	document.cookie = inactive_obj_id+'=none';
}

function LTrim( value ) {
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
}

function RTrim( value ) {
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");
}

function trim( value ) {
	return LTrim(RTrim(value));
}


function insert_indicator(obj, mode, target_obj) {
	this.obj = obj;
	this.mode = mode;
	this.target_obj = document.getElementById(target_obj);
}

	insert_indicator.prototype.do_simple_insert = function() {
		this.target_obj.value = '       ' + this.target_obj.value;
		this.target_obj.onFocus = function() { this.blur(); };
		
		this.target_obj.style.background = "url(fileadmin/img/indicator.gif) no-repeat 0 0 #FFF";
		
		return true;
	}
/*
	insert_indicator.prototype.do_fancy_insert = function() {
		this.target_obj.innerHTML = '<p>Suche läuft...</p><p><img src="fileadmin/img/indicator_blue.gif" alt="" /></p>';
		this.target_obj.className = 'fancy_searchindcator';
		
		return false;
	}
*/

