function trim(str) {
	return str.replace(/(^\s*)|(\s*$)/g, "");
}

function isEmail(str) {
	var Par=/^([\.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/
    return Par.test(str);
}
function swap_style_over(my_item) {
	my_item.className = 'ruled' ;
}
function swap_style_out(my_item) {
	my_item.className = '' ;
}
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;
