_editor_url = "/share/scripts/htmlarea/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
	
var today = new Date();
var day   = today.getDate();
var month = today.getMonth();
var year  = y2k(today.getYear());

menu_status = new Array(); 

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(switch_id.className != 'show') {
           switch_id.className = 'show';
        }else{
           switch_id.className = 'hide';
        }
    }
}

function eliminaart(articulo,url) { //v3.0
  confirmo=confirm("¿Desea ELIMINAR el Articulo: "+articulo+" ?");
  if (confirmo)
   {
     location.href = url; 	 
   }
}

function eliminaentidad(entidad, valor,url) { //v3.0
  confirmo=confirm("¿Desea ELIMINAR de "+entidad+": "+valor+" ?");
  if (confirmo)
   {
     location.href = url;  
   }
}

function elimina(valor,url) { //v3.0
  confirmo=confirm("¿Confirma que desea ELIMINAR "+valor+" ?");
  if (confirmo)
   {
     location.href = url;  
   }
}

function seleccioneprimero() { //v3.0
  alert("Previamente debe selección un elemento");
}

function abroventana(codigo,alto,ancho) {

  features="location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no";
  w=ancho;
  h=alto;

  if(screen.width)
   {
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
   }
  else
   {
    winl = 0;
    wint =0;
   }
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;

  page=codigo;
  win = window.open(page,"_grafico",settings);
  win.window.focus();
}

function y2k(number)    { return (number < 1000) ? number + 1900 : number; }

function padout(number) { return (number < 10) ? '0' + number : number; }

function restart() {
    document.formcartelera.vto.value = '' + padout(day) + '/' + padout(month - 0 + 1) + '/' + year ;
    mywindow.close();
}

function abropopupfecha() {
    mywindow=open('/share/html/almanaquepopup.html','almanaque','resizable=no,width=350,height=270');
    mywindow.location.href = '/share/html/almanaquepopup.html';
    if (mywindow.opener == null) mywindow.opener = self;
}

function abrocategorias(url) { //v3.0
  
      categoria  = document.fitros.cod_categoria.value;
      artes      = document.fitros.artesano.value;
      cod_fest   = document.fitros.cod_fest.value;
      souv       = document.fitros.souvenir.value;
     location.href = url + '?cat=' + categoria + '&artesano=' + artes + '&festividad=' + cod_fest + '&souvenir=' + souv;  
  
}

//-->