/***************************************
** Main Menu Mouse Over, Mouse Out
****************************************/
function mainMenuOver(id){
	id.style.backgroundColor='#4F4F4F';	
}
function mainMenuOut(id){
	id.style.backgroundColor='#343434';	
}
/***************************************
** Pop-up System
****************************************/
function MM_openBrWindow(theURL,winName,features) { //v2.0
 janela = window.open(theURL,winName,features);
 text = "OPS.. vc tem um bloqueador de pop-up";
 if(janela != null) {
	 janela.moveTo(300,200);
 }else{
	 alert(text); 
	 return false;	 
 }
  
}
/********************************** 
Formatação para qualquer mascara 
***********************************/
function formatar(src, mask) 
{
  var i = src.value.length;
  var saida = mask.substring(0,1);
  var texto = mask.substring(i)
if (texto.substring(0,1) != saida) 
  {
	src.value += texto.substring(0,1);
  }
}
/********************************** 
Verifica se o email é válido
***********************************/
function checkMail(mail){
    var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
    if(typeof(mail) == "string"){
        if(er.test(mail)){ return true; }
    }else if(typeof(mail) == "object"){
        if(er.test(mail.value)){
                    return true;
                }
    }else{
        return false;
        }
}