function Form_Reenviar(url,msg){
	document.reenviar.action = url;
	document.reenviar.msg.value = msg;
	document.reenviar.submit();
}


//-----------------------------------------------------------------------------------------------------
//---  Funo para habilitar campos (enabled)
//-----------------------------------------------------------------------------------------------------
function HabilitaCampos(thisform){ // Inicio Funo HabilitaCampos

	for (var i = 0; i < thisform.elements.length; i++) 
	{
		if(thisform.elements[i].disabled) 
			{ thisform.elements[i].disabled = false;
			}
	}
	
	return true;
} // Final Funo HabilitaCampos



var timer=null;

function sClock(hours,minutes,seconds)
{
  if(timer){clearInterval(timer);timer=null;}
  timer=setInterval("work();",1000);
}

function twoDigit(_v)
{
  if(_v<10)_v="0"+_v;
  return _v;
}

function work()
{
  if (!document.layers && !document.all && !document.getElementById) return;
  var runTime = new Date();

  var shours = hours;
  var sminutes = minutes;
  var sseconds = seconds;

  if (!shours) shours = 12;
  sminutes=twoDigit(sminutes);
  sseconds=twoDigit(sseconds);
  shours  =twoDigit(shours  );
  movingtime = ""+ shours + ":" + sminutes +":"+sseconds+"";
  if (document.getElementById)
    document.getElementById("clock").innerHTML=movingtime;
  else if (document.layers)
  {
    document.layers.clock.document.open();
    document.layers.clock.document.write(movingtime);
    document.layers.clock.document.close();
  }
  else if (document.all)
    clock.innerHTML = movingtime;

  if(++seconds>59)
  {
    seconds=0;
    if(++minutes>59)
    {
      minutes=0;
      if(++hours>23)
      {
        hours=0;
      }
    }
  }
}
<!-- end clock -->

// funcao somente numeros
function SomenteNumeros(e,punct, fE)
	{
		
		// fE -> Flag Enter
		if (document.all){var evt=event.keyCode;}
		else{var evt = e.charCode;}
		
		var min_key = (punct?43:47);
		if (fE == "S") {
			if (evt == 13) {
   			 return false;
			}
		}
		if (evt <20 || (evt >min_key && evt<58)){return true;}
		return false;
	}
	

/**      
         FUNÇÕES PARA VALIDAÇÃO DE DADOS
         @Autor  Tiago Maradei   -   tiago.maradei@gmail.com  
		 http://forum.imasters.uol.com.br/index.php?/topic/201090-validar-e-mail-via-javascript/
 */

function is_email(email)
        {
          er = /^[a-zA-Z0-9][a-zA-Z0-9\._-]+@([a-zA-Z0-9\._-]+\.)[a-zA-Z-0-9]{2}/;
          
          if(er.exec(email))
                {
                  return true;
                } else {
                  return false;
                }
        }
        
function is_data(data)
        {
          if(data.length == 10)
                {
                  er = /(0[0-9]|[12][0-9]|3[01])[-\.\/](0[0-9]|1[012])[-\.\/][0-9]{4}/; 
          
                  if(er.exec(data))
                        {
                          return true;
                        } else {
                          return false;
                        }
                
                } else {
                  return false;
                }               
        }

function is_hora(hora)
        {
          er = /(0[0-9]|1[0-9]|2[0123]):[0-5][0-9]/;
          
          if(er.exec(hora))
                {
                  return true;
                } else {
                  return false;
                }
        }       

function valida_email(valor_email) {
	if (valor_email != "") {
		prim = valor_email.indexOf("@")
		if(prim < 2) {
		  alert("O e-mail informado não contem @.");
		  return false;
		}
		if(valor_email.indexOf("@",prim + 1) != -1) {
		  alert("O e-mail informado parece não conter um PROVEDOR valido depois do @.");
		  return false;
		}
		if(valor_email.indexOf(".") < 1) {
		  alert("O e-mail informado parece não conter um ponto (.) indicando seu provedor.");
		  return false;
		}
		if(valor_email.indexOf(" ") != -1) {
		  alert("O e-mail informado parece não estar correto.");
		  return false;
		}
		if(valor_email.indexOf("zipmeil.com") > 0) {
		  alert("O e-mail informado parece não estar correto.");
		  return false;
		}
		if(valor_email.indexOf("hotmeil.com") > 0) {
		  alert("O e-mail informado parece não estar correto.");
		  return false;
		}
		if(valor_email.indexOf(".@") > 0) {
		  alert("O valor inserido ( .@ ) ithisformado parece não estar correto.");
		  return false;
		}
		if(valor_email.indexOf("@.") > 0) {
		  alert("O e-mail inthisformado parece não estar correto.");
		 return false;
		}
		if(valor_email.indexOf(".com.br.") > 0) {
		  alert("O e-mail informado parece não estar correto.");  
		  return false;
		}
		if(valor_email.indexOf("/") > 0) {
		lert("O e-mail informado parece não estar correto. Caracter ilegal ( / )");  
		return false;
		}
		if(valor_email.indexOf("[") > 0) {
		alert("O e-mail informado parece não estar correto. Caracter ilegal ( [ )");
		  return false;
		}
		if(valor_email.indexOf("]") > 0) {
		  alert("O e-mail informado parece não estar correto. Caracter ilegal ( ] )");
		  return false;
		}
		if(valor_email.indexOf("(") > 0) {
		  alert("O e-mail informado parece não estar correto. Caracter ilegal ( ( )");	
		  return false;
		}
		if(valor_email.indexOf(")") > 0) {
		  alert("O e-mail informado parece não estar correto. Caracter ilegal ( ) )");  
		  return false;
		}
		if(valor_email.indexOf("..") > 0) {
		  alert("O e-mail informado parece não estar correto. Caracter ilegal ( .. )"); 
		  return false;
		}
		if(valor_email.indexOf("www") != -1) {
		  alert("O e-mail informado parece não estar correto. Caracter ilegal ( .www. )");	
		  return false;
		}
	}
  return true;
}

