function wo(where){
	window.open(where, "_blank","height=400,width=600,menubar=no, resizable=yes, toolbar=no,scrollbars=yes");
}

function askDelete(){
	return (confirm("Are you sure you want to delete this?"))
};

function trim(str) {
	return str.replace(/^\s*/, '').replace(/\s*$/, '');
}

function isContentEmpty(str) {	
	var re1 = new RegExp ('&nbsp;', 'gi');
	var re2 = new RegExp ('<P>', 'gi');
	var re3 = new RegExp ('</P>', 'gi');
	var re4 = new RegExp ('<BR>', 'gi');
	str = trim(str.replace(re1, '').replace(re2, '').replace(re3, '').replace(re4, ''));
	return (str=='');
}

function encodeItem(str) {
	var s=str.replace(/'/g,"&#39;");
	return s.replace(/"/g,"&quot;");
}



function getObject(id){
	var object;
	
	if(document.getElementById){
		object = document.getElementById(id);
	}else if(document.all){
		object = document.all[id]; 
	}

	return object;
}

var loadFunctions = new Array();

function body_onLoad(){
	for ( lf = 0; lf < loadFunctions.length; lf++ ){
		loadFunctions[lf]();
	}	

}

function loginFocus()
{
  if(document.loginForm)
    document.loginForm.login.focus();   
}


function addOnLoadFunction( func ) {
	loadFunctions[loadFunctions.length] = new Function(func);
}


	function chooseOption(obj, value) {
		for ( var x=0; x < obj.options.length; x++ ) {
			var oprion = obj.options[x];
			if ( oprion.value == value )
				oprion.selected = true;
		}
	}
