	  function mOvr(src,clrOver) {
	    if (!src.contains(event.fromElement)) {
		  src.style.cursor = 'default';
		  src.bgColor = clrOver;
		}
	  }
	  function mOut(src,clrIn) {
		if (!src.contains(event.toElement)) {
		  src.style.cursor = 'default';
		  src.bgColor = clrIn;
		}
	  }
	  function mClk(src) {
	    if(event.srcElement.tagName=='td'){
		  src.children.tags('A')[0].click();
	    }
	  }
	 function ChecaDigitoCampo(frmCampo,teclapres){
	  var tecla = teclapres.keyCode;
	  if ((tecla < 48 || tecla > 57))
	  {
	   window.alert("Você só pode digitar números nesse campo !");
	   frmCampo.focus();
	   return false;
	  }
	  return tecla;
	 }

  function proxima(link)
  {
   location.replace(link);
   return false;
  }
  function carrega(vobjeto) {
     for (var va = 0 ; va < document.forms[0].elements.length; va++) {
        if (document.forms[0].elements[va].name == vobjeto) {
            document.forms[0].elements[va].focus();
        }
     }    
     return false;
  }
  function volta(vvolta) {
     history.go(vvolta*-1);
     return false;
  }
  function SaltaCampo (campo, prox, tammax, teclapres)
{
   var tecla = teclapres.keyCode;
   vr = campo.value;
   tam = vr.length;
   if (tecla != 0 && tecla != 10 && tecla != 24)
      if (tam == tammax)
          prox.focus();
}

function popupnews() 
{
window.open('','NEWS',
'toolbar=no,menubar=no,resizable=no,status=no,scrollbars=no,width=500,height=150,left=400,top=400');
}

function popupenq() 
{
window.open('','ENQUETE',
'toolbar=no,menubar=no,resizable=no,status=no,scrollbars=no,width=500,height=250,left=400,top=400');
}

function popuprec() 
{
window.open('','RECO',
'toolbar=no,menubar=no,resizable=no,status=no,scrollbars=no,width=500,height=230,left=400,top=400');
}

		function carregabrw() 
			
			{
				window.open('','SHOPLINE',"toolbar=yes,menubar=yes,resizable=no,status=no,scrollbars=yes,width=655,height=440");				
			}						

function popupcres() 
{
window.open('','COMENTARIO',
'toolbar=no,menubar=no,resizable=no,status=no,scrollbars=no,width=600,height=350,left=400,top=400');
}

function popupprt() 
{
window.open('','IMPRIMIR',
'toolbar=no,menubar=no,resizable=no,status=no,scrollbars=yes,width=600,height=700');
}

/*** 
* Descrição.: formata um campo do formulário de 
* acordo com a máscara informada... 
* Parâmetros: - objForm (o Objeto Form) 
* - strField (string contendo o nome 
* do textbox) 
* - sMask (mascara que define o 
* formato que o dado será apresentado, 
* usando o algarismo "9" para 
* definir números e o símbolo "!" para 
* qualquer caracter... 
* - evtKeyPress (evento) 
* Uso.......: <input type="textbox" 
* name="xxx"..... 
* onkeypress="return txtBoxFormat(document.rcfDownload, 'str_cep', '99999-999', event);"> 
* Observação: As máscaras podem ser representadas como os exemplos abaixo: 
* CEP -> 99.999-999 
* CPF -> 999.999.999-99 
* CNPJ -> 99.999.999/9999-99 
* Data -> 99/99/9999 
* Tel Resid -> (99) 999-9999 
* Tel Cel -> (99) 9999-9999 
* Processo -> 99.999999999/999-99 
* C/C -> 999999-! 
* E por aí vai... 
***/

function txtBoxFormat(objForm, strField, sMask, evtKeyPress) {
     var i, nCount, sValue, fldLen, mskLen,bolMask, sCod, nTecla;

     if(document.all) { // Internet Explorer
       nTecla = evtKeyPress.keyCode; }
     else if(document.layers) { // Nestcape
       nTecla = evtKeyPress.which;
     }

     sValue = objForm[strField].value;

     // Limpa todos os caracteres de formatação que
     // já estiverem no campo.
     sValue = sValue.toString().replace( "-", "" );
     sValue = sValue.toString().replace( "-", "" );
     sValue = sValue.toString().replace( ".", "" );
     sValue = sValue.toString().replace( ".", "" );
     sValue = sValue.toString().replace( "/", "" );
     sValue = sValue.toString().replace( "/", "" );
     sValue = sValue.toString().replace( "(", "" );
     sValue = sValue.toString().replace( "(", "" );
     sValue = sValue.toString().replace( ")", "" );
     sValue = sValue.toString().replace( ")", "" );
     sValue = sValue.toString().replace( " ", "" );
     sValue = sValue.toString().replace( " ", "" );
     fldLen = sValue.length;
     mskLen = sMask.length;

     i = 0;
     nCount = 0;
     sCod = "";
     mskLen = fldLen;

     while (i <= mskLen) {
       bolMask = ((sMask.charAt(i) == "-") || (sMask.charAt(i) == ".") || (sMask.charAt(i) == "/"))
       bolMask = bolMask || ((sMask.charAt(i) == "(") || (sMask.charAt(i) == ")") || (sMask.charAt(i) == " "))

       if (bolMask) {
         sCod += sMask.charAt(i);
         mskLen++; }
       else {
         sCod += sValue.charAt(nCount);
         nCount++;
       }

       i++;
     }

     objForm[strField].value = sCod;

     if (nTecla != 8) { // backspace
       if (sMask.charAt(i-1) == "9") { // apenas números...
         return ((nTecla > 47) && (nTecla < 58)); } // números de 0 a 9
       else { // qualquer caracter...
         return true;
       } }
     else {
       return true;
     }
   }
//Fim da Função Máscaras Gerais

function numbersOnly(myfield, e){
    if (myfield.length ==0) myfield.value=0;  
	var key;
	var keychar;
    if (window.event)
		key = window.event.keyCode;
    else if (e)
     	key = e.which;
    else
     	return true;

	keychar = String.fromCharCode(key);
    if ((key==null) || (key==0) || (key==8) ||  (key==9)|| (key==13)|| (key==27) )
		return true;
    else if ((("0123456789").indexOf(keychar) > -1))
	    return true;
	else
		return false;
}

function textSOnly(myfield, e){
    if (myfield.length ==0) myfield.value=0;  
	var key;
	var keychar;
    if (window.event)
		key = window.event.keyCode;
    else if (e)
     	key = e.which;
    else
     	return true;

	keychar = String.fromCharCode(key);
    if ((key==null) || (key==0) || (key==8) ||  (key==9)|| (key==13)|| (key==27) )
		return true;
    else if ((("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ").indexOf(keychar) > -1))
	    return true;
	else
		return false;
}

function textCOnly(myfield, e){
    if (myfield.length ==0) myfield.value=0;  
	var key;
	var keychar;
    if (window.event)
		key = window.event.keyCode;
    else if (e)
     	key = e.which;
    else
     	return true;

	keychar = String.fromCharCode(key);
    if ((key==null) || (key==0) || (key==8) ||  (key==9)|| (key==13)|| (key==27) )
		return true;
    else if ((("ABCDEFGHIJKLMNOPQRSTUVWXYZ").indexOf(keychar) > -1))
	    return true;
	else
		return false;
}

function numbersmOnly(myfield, e){
    if (myfield.length ==0) myfield.value=0;  
	var key;
	var keychar;
    if (window.event)
		key = window.event.keyCode;
    else if (e)
     	key = e.which;
    else
     	return true;

	keychar = String.fromCharCode(key);
    if ((key==null) || (key==0) || (key==8) ||  (key==9)|| (key==13)|| (key==27) )
		return true;
    else if ((("0123456789,.").indexOf(keychar) > -1))
	    return true;
	else
		return false;
}

function textOnly(myfield, e){
    if (myfield.length ==0) myfield.value=0;  
	var key;
	var keychar;
    if (window.event)
		key = window.event.keyCode;
    else if (e)
     	key = e.which;
    else
     	return true;

	keychar = String.fromCharCode(key);
    if ((key==null) || (key==0) || (key==8) ||  (key==9)|| (key==13)|| (key==27) )
		return true;
    else if ((("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-").indexOf(keychar) > -1))
	    return true;
	else
		return false;
}

	function openWindow(page, width, height) { 
		popupWin = window.open(page, 'image', 'scrollbars=no,width='+width+',height='+height);
		}

	function openWindowB(page, width, height) { 
		popupWin = window.open(page, 'image', 'scrollbars=yes,width='+width+',height='+height);
		}

google_ad_client = "pub-4791817150943745";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
google_color_border = "A8DDA0";
google_color_bg = "EBFFED";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "6F6F6F";

			 color_1 = '#969E81'  //BG COLOR
			 color_2 = '#CFD9C6'  //FG COLOR
			 color_3 = '#3F532B'  //Text Color  
			 color_4 = '#3F532B'  //Caption color

		function check_from(form)

			{

				if(form.query.value.length <= 1)
					{
						alert('Digite uma palavra-chave válida.');
						form.query.focus();
						return false;

					}
				
				return true

			}


	self.focus();
