function isEmail(str) {  
   // are regular expressions supported?  
   var supported = 0;  
   if (window.RegExp) {  
	 var tempStr = "a";  
	 var tempReg = new RegExp(tempStr);  
	 if (tempReg.test(tempStr)) supported = 1;  
   }  
   if (!supported)   
	 return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);  
   var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");  
   var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");  
   return (!r1.test(str) && r2.test(str));  
}
	
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function IEHoverPseudo() {

	var navItems = document.getElementById("sub_main").getElementsByTagName("li");
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}

}
window.onload = IEHoverPseudo;




var Ac = {
	size:12,
	letraMaior:function() {
		if ( this.size < 16 ) {
			this.size++;
			//createCookie("fs", this.size, 365);
			document.body.style.fontSize = this.size+'px';
		}
	},
	letraMenor:function() {
		if ( this.size > 12 ) {
			this.size--;
			//createCookie("fs", this.size, 365);
			document.body.style.fontSize = this.size+'px';
		}
	},
	contraste:function() {
		setActiveStyleSheet('Acessível')
	},
	normal:function() {
		setActiveStyleSheet('Padrão');

	}
}


function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function goanchor(an) {document.location = (document.location+"").split("#")[0]+"#"+an;}


