function cOvr(src) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
}
}

function cOut(src) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
}
}

function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
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 checkbusca(form) {
   buscar = "";
   texto = "";

   if (form.BuscarTexto.value == "") {
	alert( "Entre com o texto para buscar" );
	return false;
   }

   texto = form.BuscarTexto.value;
   texto = texto.replace( " ", "+" );

   if (form.BuscarEm.value == "1") {
	buscar = "http://www.google.com/search?q="+texto;
	buscar = buscar + "&hl=pt&lr=lang_pt"
   }   
   if (form.BuscarEm.value == "2") {
	buscar = "http://www.altavista.com/cgi-bin/query?sc=on&hl=on&q="+texto;
	buscar = buscar + "&kl=pt&pg=q&Translate=on&text=yes&search=Search";
   }
   if (form.BuscarEm.value == "3") {
	buscar = "http://br.google.yahoo.com/bin/query_br?p="+texto;
	buscar = buscar + "&z=2&hc=0&hs=0";
   }
   if (form.BuscarEm.value == "4") {
	buscar = "http://busca.zeek.com.br/busca/busca.cfm?p="+texto;
   }
   if (form.BuscarEm.value == "5") {
	buscar = "http://hotbot.lycos.com/?MT="+texto;
	buscar = buscar + "&SM=MC&DV=0&LG=any&DC=10&DE=2&AM1=MC&x=59&y=16"
   }
   if (form.BuscarEm.value == "6") {
	buscar = "http://search.excite.com/search.gw?search="+texto;
   }
   if (form.BuscarEm.value == "7") {
	buscar = "http://www.northernlight.com/nlquery.fcg?cb=0&qr="+texto;
   }
   if (form.BuscarEm.value == "8") {
	buscar = "http://busca.cade.com.br/scripts/engine.exe?p1="+texto;
	buscar = buscar + "&p2=1&p3=1&p5=10&submit=Busca";
	}
   remote = window.open( buscar, "buscar" );
   remote.location.href = buscar;

   return false;
}


function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}