function Validator(theForm)
{
  if (theForm.busca.value == "")
  {
    alert("O ítem \"Procura\" deve estar preenchido para que a busca seja feita, por favor, click em \"OK\" e preencha-o com um mínimo de 3 letras. Obrigado.");
    theForm.busca.focus();
    return (false);
  }
  if (theForm.busca.value.length < 3)
  {
    alert("Insira no mínimo 3 letras ou números no ítem \"Procura\". Obrigado.");
    theForm.busca.focus();
    return (false);
  }
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-.,; \t\r\n\f";
  var checkStr = theForm.busca.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("No ítem \"Procura\" são aceitos apenas letras (com ou sem acentos), números e os símbolos ( . )  ( , )  ( ; ) e ( - ). Qualquer dúvuda entre em contato pelo e-mail ecanetas@ecanetas.com.br. Obrigado");
    theForm.busca.focus();
    return (false);
  }
  return (true);
}



var support_images

	if (document.images) support_images = true
    	function menuitem(name, stat) {
		if (support_images) {
			this.name          = "icone_" + name
			this.stat          = stat
			this.over          = new Image()
			this.definicao     = new Image()
			this.over.src      = "images/" + name + "on.gif"
			this.out           = "images/" + name + "off.gif"
			this.definicao.src = "images/caneta_up.gif"
			this.defaultdef    = "images/caneta.gif"
		}

		this.putover  = over_menuitem
		this.putout   = out_menuitem
		return this

	}

	function over_menuitem() {
		if (support_images){
			if (document.images[this.name].complete)
				document.images[this.name].src = this.over.src
			if (document.definicao.complete)
				document.definicao.src = this.definicao.src
		}

		window.status = this.stat
	}

	function out_menuitem() {
		if (support_images) {
			if (document.images[this.name].complete)
				document.images[this.name].src = this.out
			if (document.definicao.complete)
				document.definicao.src = this.defaultdef
		}

		window.status = ""
	}

	home   = new menuitem("home", "HOME")
	loja   = new menuitem("loja", "LOJA")
	caixa   = new menuitem("caixa", "CAIXA")
	cesta   = new menuitem("cesta", "CESTA")
	contato   = new menuitem("contato", "CONTATO")
	duvidas   = new menuitem("duvidas", "DÚVIDAS")


function selectDrop()
{
var select1 = self.document.form1.cat
if (select1.options[select1.selectedIndex].value != "")
	{
	self.location = "loja.asp?cat=" + select1.options[select1.selectedIndex].value
	}
}
function selectDrop2()
{
var select2 = self.document.form2.fab
if (select2.options[select2.selectedIndex].value != "")
	{
	self.location = "loja.asp?fab=" + select2.options[select2.selectedIndex].value
	}
}



var support_images

	if (document.images) support_images = true
    	function menuitem(name, stat) {
		if (support_images) {
			this.name          = "icone_" + name
			this.stat          = stat
			this.over          = new Image()
			this.definicao     = new Image()
			this.over.src      = "images/" + name + "on.gif"
			this.out           = "images/" + name + "off.gif"
			this.definicao.src = "images/caneta_up.gif"
			this.defaultdef    = "images/caneta.gif"
		}

		this.putover  = over_menuitem
		this.putout   = out_menuitem
		return this

	}

	function over_menuitem() {
		if (support_images){
			if (document.images[this.name].complete)
				document.images[this.name].src = this.over.src
			if (document.definicao.complete)
				document.definicao.src = this.definicao.src
		}

		window.status = this.stat
	}

	function out_menuitem() {
		if (support_images) {
			if (document.images[this.name].complete)
				document.images[this.name].src = this.out
			if (document.definicao.complete)
				document.definicao.src = this.defaultdef
		}

		window.status = ""
	}

	home   = new menuitem("home", "HOME")
	loja   = new menuitem("loja", "LOJA")
	caixa   = new menuitem("caixa", "CAIXA")
	cesta   = new menuitem("cesta", "CESTA")
	contato   = new menuitem("contato", "CONTATO")
	duvidas   = new menuitem("duvidas", "DÚVIDAS")


function selectDrop()
{
var select1 = self.document.form1.cat
if (select1.options[select1.selectedIndex].value != "")
	{
	self.location = "loja.asp?cat=" + select1.options[select1.selectedIndex].value
	}
}
function selectDrop2()
{
var select2 = self.document.form2.fab
if (select2.options[select2.selectedIndex].value != "")
	{
	self.location = "loja.asp?fab=" + select2.options[select2.selectedIndex].value
	}
}
