function populaProduto(strValue) {
    var intIndex = -1;
    for (var intCont = 0; intCont < arrLocalidade.length; intCont++) {
        if (arrLocalidade[intCont][0] == strValue) {
            intIndex = strValue;
        }
    }
    if (document.all.link.options.length > 0) {
        var i = document.all.link.options.length - 1;
        while (i > 0) {
                document.all.link.options.remove(document.all.link.options.length - 1);
                i--;
        }
    }
    var intQuant = 0;
    for (var intCont = 0; intCont < arrLinks.length; intCont++) {
        if (arrLinks[intCont][0] == intIndex) {
            var objOption = document.createElement("OPTION");
            objOption.value = arrLinks[intCont][1];
            objOption.text = arrLinks[intCont][2];
            document.all.link.add(objOption);
            intQuant ++;
        }
    }
    if (intQuant==1) {
        document.all.link.options[1].selected=true;
    }
}
function selecionaProduto(strValue) {
    if (strValue!="") {
        if (document.all.link.options.length > 0) {
            var i = document.all.link.options.length - 1;
            while (i > 0) {
                    if (document.all.link.options.item(i).value==strValue) {
                        document.all.link.options.item(i).selected=true;
                    }
                    i--;
            }
        }
    }
}

function submete(){
    var strValue = document.all.link.value;
    if (strValue=="") {
        alert("Escolha seu estado e a opção de site");
        document.all.localidade.focus();
    }
    for (var intCont = 0; intCont < arrLinks.length; intCont++) {
        if (arrLinks[intCont][1] == strValue) {
            eval(arrLinks[intCont][3]);
        }
    }
   }

    function irpara (strUrl, strID) {

        if (strUrl=="") {
            alert("Escolha seu estado e a opção de site");
        } else {
            if (strUrl.indexOf("javascript:")>=0) {
                eval(strUrl.substring(strUrl.indexOf("javascript:")));
            } else {
                document.all.txtIDLocal.value=strID;
                document.all.txtUrl.value=strUrl;
                document.frmEntrada.submit();
            }
        }
    }


var myTime;
var myActive;
myActive = 1;
function scrollUp(){
        layertexto.window.scrollBy(0,-2);
        myTime = setTimeout('scrollUp()', 5);
}

function scrollDown(){
        layertexto.window.scrollBy(0,2);
        myTime = setTimeout('scrollDown()', 5);
}

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_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 swap_noswap() { //v3.0
  var i,j=0,x,a=swap_noswap.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];}
}