
function openVerMenu(mid){
	if ($('vsubmenu_'+mid).style.display=='none'){
		$('vsubmenu_'+mid).style.display='';
/*		$('vmenu_'+mid).style.color='#090909';*/
		saveOpenedMenu(mid,1);
	}else{
		$('vsubmenu_'+mid).style.display='none';
/*		$('vmenu_'+mid).style.color='#090909';*/
		saveOpenedMenu(mid,0);
	}
}
function saveOpenedMenu(mid,stat){
	var url = saveMenuScript+'?mid='+mid+'&stat='+stat+'';
	new Ajax.Request(url, {
	  method: 'get',
	  onSuccess: function(transport) {
	    void(0);
	  }
	});
}

function trimAll( strValue ) {
/************************************************
DESCRIPTION: Removes leading and trailing spaces.

PARAMETERS: Source string from which spaces will
	be removed;

RETURNS: Source string with whitespaces removed.
*************************************************/
 var objRegExp = /^(\s*)$/;

	//check for all spaces
	if(objRegExp.test(strValue)) {
		 strValue = strValue.replace(objRegExp, '');
		 if( strValue.length == 0)
			return strValue;
	}

	 //check for leading & trailing spaces
	 objRegExp = /^(\s*)([\W\w]*)(\b\s*$)/;
	 if(objRegExp.test(strValue)) {
		 //remove leading and trailing whitespace characters
		 strValue = strValue.replace(objRegExp, '$2');
	}
	return strValue;
}
