sfHover = function() {
	var sfEls = document.getElementById("main_menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			this.style.zIndex=100;
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

String.prototype.trim = function() {
  return(this.replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,'$1'));
}


function validateString(obj, frm) {
   if (obj && obj.value.trim().length < 3 ) {
     alert('Introduceti un cuvant sau o expresie cu minim 3 caractere!');
     obj.focus();
     if(document.all) window.event.returnValue=false;
     return;
   }
   if (frm) frm.submit();
 }

