﻿    function PersisteTrecho(id, opcao, tipo)
    {
        if (tipo == "IDA")
            document.getElementById(prfMasterPricerA + "hdIDA").value = id + "|" + opcao;
        else if (tipo == "VOLTA")
            document.getElementById(prfMasterPricerA + "hdVolta").value = id + "|" + opcao;
    }
 
    function setHdnMontaTudo(p_intSet){
        document.getElementById(prfMasterPricerA + "hdnMontaTudo").value = p_intSet;
    }

    function MouseOver(divCelula)
    {
        divCelula.style.cursor='hand';
        divCelula.className = "hoverMatriz";
    }

    function MouseOut(divCelula)
    {
        divCelula.style.cursor = "hand";
        divCelula.className = "hoverMatriz2";
    }

    function findPos(obj) {
	    var curleft = curtop = 0;
	    if (obj.offsetParent) {
		    curleft = obj.offsetLeft
		    curtop = obj.offsetTop
		    while (obj = obj.offsetParent) {
			    curleft += obj.offsetLeft
			    curtop += obj.offsetTop
		    }
	    }
	    return [curleft,curtop];
    }
    
    function FixRadio(nameregex, current)
    {
       re = new RegExp(nameregex);
       for(i = 0; i < document.getElementById("aspnetForm").elements.length; i++)
       {
          elm = document.getElementById("aspnetForm").elements[i]
          if (elm.type == 'radio')
          {
             if (re.test(elm.name))
             {
                elm.checked = false;
             }
          }
       }
       current.checked = true;
    }
    
