
function isEmpty(text){
   var enter1 = "\n",
       enter2 = "\r",
       espaco = " ",
       tab = "\t";

   if (text =="") return true;
   if (text ==0) return true;

   //A verifica se o caracter selecionada possui valor vahlido
   for (var indice = 0; indice < text.length; indice++){
      if (text.charAt(indice) != espaco && 
         text.charAt(indice) != tab &&
         text.charAt(indice) != enter1 && 
         text.charAt(indice) != enter2 )
         return false;
   }
   return true;
}

function envia_form_login_artigos()
{
	if (isEmpty(document.form_login_artigos.email.value)){
	   alert ("Campo Seu E-mail deve ser preenchido");
	   document.form_login_artigos.email.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form_login_artigos.email.value))){ 
	   alert ("Por favor, informe um E-mail válido");
	   document.form_login_artigos.email.focus();   
	   return false;
	}

	return true;
}

function envia_form_indique_este_produto($idioma)
{

	if (isEmpty(document.indique_este_produto.nome.value)){
	   alert ("Campo Seu Nome deve ser preenchido");
	   document.indique_este_produto.nome.focus();
	   return false;
	}

	if (isEmpty(document.indique_este_produto.email.value)){
	   alert ("Campo Seu E-mail deve ser preenchido");
	   document.indique_este_produto.email.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.indique_este_produto.email.value))){ 
	   alert ("Por favor, informe um E-mail válido");
	   document.indique_este_produto.email.focus();   
	   return false;
	}

	if (isEmpty(document.indique_este_produto.nome_indicacao.value)){
	   alert ("Campo Nome da Indicação deve ser preenchido");
	   document.indique_este_produto.nome_indicacao.focus();
	   return false;
	}

	if (isEmpty(document.indique_este_produto.email_indicacao.value)){
	   alert ("Campo E-mail da Indicação deve ser preenchido");
	   document.indique_este_produto.email_indicacao.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.indique_este_produto.email_indicacao.value))){ 
	   alert ("Por favor, informe um E-mail da Indicação válido");
	   document.indique_este_produto.email_indicacao.focus();   
	   return false;
	}

	return true;
}

function envia_form_indique_este_artigo($idioma)
{

	if (isEmpty(document.indique_este_artigo.nome.value)){
	   alert ("Campo Seu Nome deve ser preenchido");
	   document.indique_este_artigo.nome.focus();
	   return false;
	}

	if (isEmpty(document.indique_este_artigo.email.value)){
	   alert ("Campo Seu E-mail deve ser preenchido");
	   document.indique_este_artigo.email.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.indique_este_artigo.email.value))){ 
	   alert ("Por favor, informe um E-mail válido");
	   document.indique_este_artigo.email.focus();   
	   return false;
	}

	if (isEmpty(document.indique_este_artigo.nome_indicacao.value)){
	   alert ("Campo Nome da Indicação deve ser preenchido");
	   document.indique_este_artigo.nome_indicacao.focus();
	   return false;
	}

	if (isEmpty(document.indique_este_artigo.email_indicacao.value)){
	   alert ("Campo E-mail da Indicação deve ser preenchido");
	   document.indique_este_artigo.email_indicacao.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.indique_este_artigo.email_indicacao.value))){ 
	   alert ("Por favor, informe um E-mail da Indicação válido");
	   document.indique_este_artigo.email_indicacao.focus();   
	   return false;
	}

	return true;
}

  function validaData(Dia,Mes,Ano) {
    if(Mes < 1 || Mes > 12) return false;
    var totalDias = 31;
    if(Mes == 2) { if(ehBissexto(Ano)) { totalDias = 29; } else { totalDias = 28; } }
    if(Mes == 4 || Mes == 6 || Mes == 9 || Mes == 11) { totalDias = 30; }
    if(Dia < 1 || Dia > totalDias) return false;
    return true;
    }
  
  function ehBissexto(ano) {
    if ((ano % 4) == 0 && (ano % 100) == 0 && (ano % 400) == 0){
      return true;
    }else if ((ano % 4) == 0 && (ano % 100) == 0) {
      return false;
    }else if ((ano % 4) == 0){
      return true;
    }else if ((ano % 4) != 0){
      return false;
    }
  }  

function envia_form_evento()
{
   var data_dia = document.evento.data_dia.value;
   var data_mes = document.evento.data_mes.value;
   var data_ano = document.evento.data_ano.value;

   missinginfo = "";

   if (!validaData(data_dia,data_mes,data_ano)) {
      missinginfo += "\n     -  Data inválida";
			}

	 if (document.evento.titulo.value == "") {
      missinginfo += "\n     -  Título";
			}

   if (missinginfo != "") {
      missinginfo = "Verifique os seguintes campos: \n" + missinginfo + 
                    "\n\nComplete o que falta e continue.";
      alert(missinginfo);
      return false;
      }
   		else { 
         return true;
         }
			}
	 
/*
	if (isEmpty(document.evento.titulo.value)){
	   alert ("Campo Título deve ser preenchido");
	   document.evento.titulo.focus();
	   return false;
	}
	return true;
*/   

function envia_form_artigo()
{
	if (isEmpty(document.artigo.titulo.value)){
	   alert ("Campo Título deve ser preenchido");
	   document.artigo.titulo.focus();
	   return false;
	}
	if (isEmpty(document.artigo.resumo.value)){
	   alert ("Campo Resumo deve ser preenchido");
	   document.artigo.resumo.focus();
	   return false;
	}
	if (isEmpty(document.artigo.autor.value)){
	   alert ("Campo Autor deve ser preenchido");
	   document.artigo.autor.focus();
	   return false;
	}

	return true;
}
function envia_form_busca($idioma)
{

	if (isEmpty(document.form_busca.busca.value)){
	   alert ("Informe pelo menos uma\npalavra-chave para a busca");
	   document.form_busca.busca.focus();
	   return false;
	}

	return true;
}
function envia_form_newsletter_site($idioma)
{

	if (isEmpty(document.form_newsletter_site.nome.value)){
	   alert ("Campo Nome deve ser preenchido");
	   document.form_newsletter_site.nome.focus();
	   return false;
	}

	if (isEmpty(document.form_newsletter_site.email.value)){
	   alert ("Campo E-mail deve ser preenchido");
	   document.form_newsletter_site.email.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form_newsletter_site.email.value))){ 
	   alert ("Por favor, informe um E-mail válido");
	   document.form_newsletter_site.email.focus();   
	   return false;
	}

	return true;
}

function envia_form_contato($idioma)
{
	if (isEmpty(document.form_contato.nome.value)){
	   alert ("Campo Nome deve ser preenchido");
	   document.form_contato.nome.focus();
	   return false;
	}

	if (isEmpty(document.form_contato.email.value)){
	   alert ("Campo E-mail deve ser preenchido");
	   document.form_contato.email.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form_contato.email.value))){ 
	   alert ("Por favor, informe um E-mail válido");
	   document.form_contato.email.focus();   
	   return false;
	}

	return true;
}

function envia_form_cadastro($idioma)
{
	if (isEmpty(document.form_cadastro.nome.value)){
	   alert ("Campo Nome deve ser preenchido");
	   document.form_cadastro.nome.focus();
	   return false;
	}

	if (isEmpty(document.form_cadastro.email.value)){
	   alert ("Campo E-mail deve ser preenchido");
	   document.form_cadastro.email.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form_cadastro.email.value))){ 
	   alert ("Por favor, informe um E-mail válido");
	   document.form_cadastro.email.focus();   
	   return false;
	}

	return true;
}

function checkUncheck(field, field2)
{
/*
The function is called in onclick
event, if checkbox was checked call
de function checkAll to checker all
checkox or if checkox was unchecked 
call the function uncheckAll to unchecker
all checkbox 
*/
  if (field.checked == 1){
    //checkAll(field2);


  for (var c = 0; c < nlt_vincular_contatos.elements.length; c++)
    if (nlt_vincular_contatos.elements[c].type == 'checkbox')
      nlt_vincular_contatos.elements[c].checked = true;



  }else{
    //uncheckAll(field2);
  for (var c = 0; c < nlt_vincular_contatos.elements.length; c++)
    if (nlt_vincular_contatos.elements[c].type == 'checkbox')
      nlt_vincular_contatos.elements[c].checked = false;


  }
}

function checkAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}
function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}
function testa_file()
{
alert("Clique no botão \"Procurar\" para informar o nome do arquivo.");
return false;
}
function quebra_frame()
{
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}
function mClk(src) {
	if(event.srcElement.tagName=='TD'){
	  src.children.tags('A')[0].click();
	}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
/**
 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;


/**
 * Sets/unsets the pointer and marker in browse mode
 *
 * @param   object    the table row
 * @param   interger  the row number
 * @param   string    the action calling this script (over, out or click)
 * @param   string    the default background color
 * @param   string    the color to use for mouseover
 * @param   string    the color to use for marking a row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
    var theCells = null;

    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 3.3 ... Opera changes colors set via HTML to rgb(r,g,b) format so fix it
    if (currentColor.indexOf("rgb") >= 0) 
    {
        var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1,
                                     currentColor.indexOf(')'));
        var rgbValues = rgbStr.split(",");
        currentColor = "#";
        var hexChars = "0123456789ABCDEF";
        for (var i = 0; i < 3; i++)
        {
            var v = rgbValues[i].valueOf();
            currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16);
        }
    }

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor              = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
            // Garvin: deactivated onclick marking of the checkbox because it's also executed
            // when an action (like edit/delete) on a single item is performed. Then the checkbox
            // would get deactived, even though we need it activated. Maybe there is a way
            // to detect if the row was clicked, and not an item therein...
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
             && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
        if (theAction == 'out') {
            newColor              = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor              = (thePointerColor != '')
                                  ? thePointerColor
                                  : theDefaultColor;
            marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
                                  ? true
                                  : null;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = false;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
} // end of the 'setPointer()' function

function goToUrl(goToLocation){
    eval("document.location.href = '" + goToLocation + "'");
}

function goToUrlDestaque(goToLocation){
    eval("document.location.href = '" + goToLocation + "'");
}


function pop_up(pagina,nome_pagina,largura,altura,rolagem) {
// Este script mostra um pop-up no meio da página do visitante  
  // Variaveis da página 
        
  var posLargura = (screen.width / 2) - (largura / 2); 
  var posAltura  = (screen.height / 2) - (altura / 2); 

  var propriedades = 'toolbar=no,';          // retira a barra de  
                                             //   trabalho 
  propriedades    += 'location=no,';         // retira a barra de 
                                             //   localização 
  propriedades    += 'directories=no,';      // retira a barra de  
                                             //   diretorios 
  propriedades    += 'status=no,';           // retira a barra de  
                                             //   status 
  propriedades    += 'menubar=no,';          // retira a barra de  
                                             //   menu 

if (rolagem == 0){
   propriedades    += 'scrollbars=no,';      // retira as barras  
                                             //   de rolagem 
}else{
   propriedades    += 'scrollbars=yes,';      // retira as barras  
                                             //   de rolagem 
}

  propriedades    += 'resizable=no,';        // retira a opção de  
                                             //   reescalagem da janela 
  propriedades    += 'width='+largura+',';   // largura da janela 
  propriedades    += 'height='+altura+',';   // altura da janela 
  propriedades    += 'left='+posLargura+','; // posição inicial  
                                             //   horizontal da janela 
  propriedades    += 'top='+posAltura;       // posição inicial  
                                             //   vertical da janela  
  window.open(pagina, nome_pagina, propriedades); 

}

   //Função que é executada a cada caracter digitado
   function muda_foco(tamanho,campo) {
	    //Obtenho o nome do objeto text - atributo name
	    var nome = campo.name;
	    //Se desloca até o elemento desejado
      var posicao = 0;
      while (document.evento.elements[posicao].name != nome) {
         posicao++;
         }
      var tam = document.evento.elements[posicao].value.length;
      if (tam == tamanho) {
			   //posiciona no próximo elemento
		   var proximo = posicao+1;
         document.evento.elements[proximo].focus();
         }
      }

function mmLoadMenus() {
  if (window.mm_menu_0514161116_0) return;
                                      window.mm_menu_0514161116_0 = new Menu("root",140,20,"Verdana, Arial, Helvetica, sans-serif",11,"#999999","#FFFFFF","#FFFFFF","#999999","left","middle",3,0,1000,-5,7,true,false,true,0,false,true);
  mm_menu_0514161116_0.addMenuItem("Kit&nbsp;Estojo&nbsp;1000","window.open('produtos_kitestojo1000.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Kit&nbsp;Estojo&nbsp;600","window.open('produtos_kitestojo600.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Kit&nbsp;Estojo&nbsp;400","window.open('produtos_kitestojo400.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Bandeja","window.open('produtos_bandeja.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Organizadores","window.open('produtos_organizadores.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Spray","window.open('produtos_spray.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Ponto Dux","window.open('produtos_pontodux.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Placa&nbsp;para&nbsp;sementes","window.open('produtos_placasemente.php', '_top');");
  /*mm_menu_0514161116_0.addMenuItem("Livro","window.open('produtos_manual.php', '_top');");*/
   mm_menu_0514161116_0.hideOnMouseOut=true;
   mm_menu_0514161116_0.bgColor='#555555';
   mm_menu_0514161116_0.menuBorder=2;
   mm_menu_0514161116_0.menuLiteBgColor='';
   mm_menu_0514161116_0.menuBorderBgColor='#CCCCCC';

mm_menu_0514161116_0.writeMenus();
} // mmLoadMenus()

function mmLoadMenus_eng() {
  if (window.mm_menu_0514161116_0) return;
                                      window.mm_menu_0514161116_0 = new Menu("root",140,20,"Verdana, Arial, Helvetica, sans-serif",11,"#999999","#FFFFFF","#FFFFFF","#999999","left","middle",3,0,1000,-5,7,true,false,true,0,false,true);
  mm_menu_0514161116_0.addMenuItem("Dux&nbsp;Case&nbsp;1000","window.open('produtos_kitestojo1000.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Dux&nbsp;Case&nbsp;600","window.open('produtos_kitestojo600.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Dux&nbsp;Case&nbsp;400","window.open('produtos_kitestojo400.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Tray","window.open('produtos_bandeja.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Organizers","window.open('produtos_organizadores.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Spray","window.open('produtos_spray.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Ear Pellets","window.open('produtos_pontodux.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Seed-Plate","window.open('produtos_placasemente.php', '_top');");
  /*mm_menu_0514161116_0.addMenuItem("Book","window.open('produtos_manual.php', '_top');");*/
   mm_menu_0514161116_0.hideOnMouseOut=true;
   mm_menu_0514161116_0.bgColor='#555555';
   mm_menu_0514161116_0.menuBorder=2;
   mm_menu_0514161116_0.menuLiteBgColor='';
   mm_menu_0514161116_0.menuBorderBgColor='#CCCCCC';

mm_menu_0514161116_0.writeMenus();
} // mmLoadMenus()

function mmLoadMenus_esp() {
  if (window.mm_menu_0514161116_0) return;
                                      window.mm_menu_0514161116_0 = new Menu("root",140,20,"Verdana, Arial, Helvetica, sans-serif",11,"#999999","#FFFFFF","#FFFFFF","#999999","left","middle",3,0,1000,-5,7,true,false,true,0,false,true);
  mm_menu_0514161116_0.addMenuItem("Kit&nbsp;Estuche&nbsp;1000","window.open('produtos_kitestojo1000.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Kit&nbsp;Estuche&nbsp;600","window.open('produtos_kitestojo600.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Kit&nbsp;Estuche&nbsp;400","window.open('produtos_kitestojo400.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Bandeja","window.open('produtos_bandeja.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Organizadores","window.open('produtos_organizadores.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Spray","window.open('produtos_spray.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Microesferas","window.open('produtos_pontodux.php', '_top');");
  mm_menu_0514161116_0.addMenuItem("Placa-Semillas","window.open('produtos_placasemente.php', '_top');");
  /*mm_menu_0514161116_0.addMenuItem("Libro","window.open('produtos_manual.php', '_top');");*/
   mm_menu_0514161116_0.hideOnMouseOut=true;
   mm_menu_0514161116_0.bgColor='#555555';
   mm_menu_0514161116_0.menuBorder=2;
   mm_menu_0514161116_0.menuLiteBgColor='';
   mm_menu_0514161116_0.menuBorderBgColor='#CCCCCC';

mm_menu_0514161116_0.writeMenus();
} // mmLoadMenus()

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}
// Troca Imagem do Produto em Destaque
function trocaImagemProdutos(novaImagem1, novaImagem2)
{
	document.getElementById("produtos_destaque1").src = '_imagens/transparent.gif';
	document.getElementById("produtos_destaque1").src = '_imagens/'+novaImagem1;
	document.getElementById("produtos_destaque2").src = '_imagens/transparent.gif';
	document.getElementById("produtos_destaque2").src = '_imagens/'+novaImagem2;
}



function envia_form_ondecomprar()
{
	if (isEmpty(document.form_ondecomprar.nome.value)){
	   alert ("Campo Nome deve ser preenchido");
	   document.form_ondecomprar.nome.focus();
	   return false;
	}

	if (isEmpty(document.form_ondecomprar.email.value)){
	   alert ("Campo E-mail deve ser preenchido");
	   document.form_ondecomprar.email.focus();
	   return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form_ondecomprar.email.value))){ 
	   alert ("Por favor, informe um E-mail válido");
	   document.form_ondecomprar.email.focus();   
	   return false;
	}

	return true;
}
function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
