// JavaScript Document
function ChangeUrl(form) {
	if (form.changeurl.selectedIndex != 0){
		location.href = form.changeurl.options[form.changeurl.selectedIndex].value;
	}
}

function setVisible(_what,_value) {
	document.getElementById(_what).style.visibility = _value;
}

function setDisplay(_what,_value) {
	document.getElementById(_what).style.display = _value;
}

function confirmLink(theLink, theMessage)
{
	var is_confirmed = confirm(theMessage);
	if (is_confirmed) {
		theLink.href += '&is_js_confirmed=1';
	}
	return is_confirmed;
} 

function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// function for saving a record
function save(){
	
	// search the edit form for input element witch start with 'CMSsave_'
	
	var form = this.document.forms['CMSEDIT'];
	for( t = 0; t < form.length; t++ ){
		var input = form.elements[t];
		if( input.name.substr(0,8) == 'CMSsave_' ){
			// execute the function in the input.value
			eval( input.value );
		}
	}
	return true;
}



