function KeyReturn( Action, Seccion )
{
Buscar(Action, Seccion );
return false;
}

function Buscar( Action, Seccion)
{

var CodZona;
var cToken;

CodZona = document.all.IdLugar.value
// Parsear el string para traducir codigos de escape de http
// ---------------------------------------------------------
cToken = frmWord.txtSearchWord.value;
cToken = replace( cToken, "&", "%26%");

location.href= "index.asp?action=" + Action + "&CodZona=" + CodZona + "&Seccion=" + Seccion + "&Data=" + cToken;

}

function Buscar2( Action, Seccion)
{

var CodZona;
var cToken;

CodZona = document.all.IdLugar.value
// Parsear el string para traducir codigos de escape de http
// ---------------------------------------------------------
cToken = frmWord.txtSearchWord.value;
cToken = replace( cToken, "&", "%26%");

if (frmWord.opcion1[0].checked==1){
opcion=1;
}
else{
opcion=2;
}


location.href= "index.asp?action=" + Action + "&CodZona=" + CodZona + "&Seccion=" + Seccion + "&Data=" + cToken + "&opcion=" +opcion;

}
function Buscar3( Action )
{

var CodZona;
var cToken;

CodZona = document.all.IdLugar.value;
// Parsear el string para traducir codigos de escape de http
// ---------------------------------------------------------
//cToken = frmWord.txtSearchWord.value;
//cToken = replace( cToken, "&", "%26%");
First= ExData.First.value;
Last= ExData.Last.value;

//actividad=casilla.value;
var i ;

  for (i=0;i<casillas.casilla.length;i++){ 
    if (casillas.casilla[i].checked) 
    break; 
  } 
actividad =casillas.casilla[i].value ;
document.write ();
location.href= "index.asp?action=" + Action + "&CodZona=" + CodZona + "&Seccion=actprecios"  + "&First=" + First + "&Last=" + Last + "&actividad=" +actividad;

}
function GoUrl(Action, cmb)
{
  var CodAct;
  var CodZona;

  CodAct = cmb.options[cmb.selectedIndex].value;
  CodZona = document.all.IdLugar.value
  if ( CodAct != '0' ) 1
      location.href = "index.asp?action=" + Action + "&CodZona=" + CodZona + "&seccion=codact&Data="+CodAct;
}
function GoUrl2(Action, cmb)
{
  var CodAct;
  var CodZona;

  CodAct = cmb.options[cmb.selectedIndex].value;
  CodZona = document.all.IdLugar.value
  if ( CodAct != '0' ) 1
      location.href = "index.asp?action=" + Action + "&CodZona=" + CodZona + "&seccion=actprecios&Data="+CodAct;
}
function replace(string,text,by)
{
  var strLength = string.length, txtLength = text.length;
  if ((strLength == 0) || (txtLength == 0))
     return string;

  var i = string.indexOf(text);
  if ((!i) && (text != string.substring(0,txtLength)))
     return string;

  if (i == -1)
     return string;

  var newstr = string.substring(0,i) + by;

  if (i+txtLength < strLength)
     newstr += replace(string.substring(i+txtLength,strLength),text,by);

return newstr;
}

