<!--

function nuevoAjax(){
	var xmlhttp=false;
 	try {
 		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 	} catch (e) {
 		try {
 			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 		} catch (E) {
 			xmlhttp = false;
 		}
  	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
 		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}


	
	function cargarContenido_paginacion(ano,mmt,w,s,fr,pag_sel,max_pag){
	var ano, mmt, w, s, contenedor,preloader;
	contenedor = document.getElementById('contenedor');
	preloader = document.getElementById('preloader');

	
	ajax=nuevoAjax();
	ajax.open("GET", "centro_articulos_index.phtml?search=yes&fr="+fr+"&pag_sel="+pag_sel+"&max_pag="+max_pag+"&se=<? echo $se?>&ano="+ano+"&mmt="+mmt+"&w="+w+"&s="+s,true);
	ajax.onreadystatechange=function() {
	
	 if(ajax.readyState==1){
                        contenedor.innerHTML = "<br><br><br>Buscando informaci&oacute;n...";
                        //modificamos el estilo de la div, mostrando una imagen de fondo
                        contenedor.style.background = "url('<? echo $AdminPath?>images/loader.gif') no-repeat"; 
                } else if (ajax.readyState==4) {
							if(ajax.status==200){
                                //mostramos los datos dentro de la div
                                contenedor.innerHTML = ajax.responseText; 
                               // preloader.innerHTML = "Cargado.";
                               // preloader.style.background = "url('loaded.gif') no-repeat";
                        }else if(ajax.status==404){
                                contenedor.innerHTML = "La p&aacute;gina no existe";
                        }else{
                                //mostramos el posible error
                                contenedor.innerHTML = "Error:".ajax.status; 
                        }	}
	}
	ajax.send(null)
	}
	
	function cargarContenido(a,b,c){

	var a, b, w, s, contenedor,preloader;
	contenedor = document.getElementById('contenedor');
	
	
	
	ajax=nuevoAjax();

		ajax.open("GET", "center_ajax.phtml?se="+a+"&ca="+b+"&ajax="+c,true);
		
	ajax.onreadystatechange=function() {
	
	 if(ajax.readyState==1){
	 
                        contenedor.innerHTML = "<br><br><br>Abriendo página...";
						
                        //modificamos el estilo de la div, mostrando una imagen de fondo
                        contenedor.style.background = "url('<? echo $AdminPath?>images/loader.gif') no-repeat"; 
                } else if (ajax.readyState==4) {
							if(ajax.status==200){
                                //mostramos los datos dentro de la div
                                contenedor.innerHTML = ajax.responseText; 
                               // preloader.innerHTML = "Cargado.";
                               // preloader.style.background = "url('loaded.gif') no-repeat";
                        }else if(ajax.status==404){
                                contenedor.innerHTML = "La p&aacute;gina no existe";
                        }else{
                                //mostramos el posible error
                                contenedor.innerHTML = "Error:".ajax.status; 
                        }	}
	}
	ajax.send(null)
	}
function cargarVisualizacion(dato){
	var contenedor,preloader;
	contenedor = document.getElementById('cont_vizualizacion');
	preloader = document.getElementById('preloader');

	
	ajax=nuevoAjax();
	ajax.open("GET", "cookie_visualizacion.phtml?visualizacion="+dato,true);
	ajax.onreadystatechange=function() {
	
	 if(ajax.readyState==1){
                        contenedor.innerHTML = "<br><br><br>Modificando visualizaci&oacute;n...";
                        //modificamos el estilo de la div, mostrando una imagen de fondo
                        contenedor.style.background = "url('<? echo $AdminPath?>images/loader.gif') no-repeat"; 
                } else if (ajax.readyState==4) {
							if(ajax.status==200){
                                //mostramos los datos dentro de la div
                                contenedor.innerHTML = ajax.responseText; 
                               // preloader.innerHTML = "Cargado.";
                               // preloader.style.background = "url('loaded.gif') no-repeat";
                        }else if(ajax.status==404){
                                contenedor.innerHTML = "La p&aacute;gina no existe";
                        }else{
                                //mostramos el posible error
                                contenedor.innerHTML = "Error:".ajax.status; 
                        }	}
	}
	ajax.send(null)
	}
	






function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
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 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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function CheckPass(inField){
  var valid="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  var temp;
  if(inField.length>=6){
    for(var i=0; i<inField.length; i++){
      temp=inField.charAt(i);
      if(valid.indexOf(temp)==-1)
        return false;
    }
  }else{
    return false;
  }
  return true;
}
function _ltrim(string){
  var whitespace=" \n\t\f";
  while((whitespace.indexOf(string.charAt(0))!=-1) && (string.length!=0))
    string=string.substring(1);
  return string;
}
function _rtrim(string){
  var whitespace=" \n\t\f";
  while((whitespace.indexOf(string.charAt(string.length-1))!=-1) && (string.length!=0))
    string.substring(0,string.length-1);
  return string;
}
function _trim(string){
  return _rtrim(_ltrim(string));
}
function IsEmptyFieldMsg(InHtmlForm,InField,InElement){
  if(_ltrim(InHtmlForm.elements[InElement].value).length==0){
    alert(InField);
    InHtmlForm.elements[InElement].focus();
    return true;
  }
  return false;
}
function IsUnselectedSelectMsg(InHtmlForm,InField,InElement){
  if(InHtmlForm.elements[InElement].selectedIndex==0){
    alert(InField);
    InHtmlForm.elements[InElement].focus();
    return true;
  }
  return false;
}
function validEmail(email){
  invalidChars=" /:,;";
  if(email==""){
    return false;
  }
  for(i=0;i < invalidChars.length;i++){
    badChar=invalidChars.charAt(i);
    if(email.indexOf(badChar,0)>-1){
      return false;
    }
  }
  atPos=email.indexOf("@",1);
  if(atPos==-1){
    return false;
  }
  if(email.indexOf("@",atPos+1)!=-1){
    return false;
  }
  periodPos=email.indexOf(".",atPos);
  if(periodPos==-1){
    return false;
  }
  if(periodPos+3>email.length){
    return false;
  }
  return true;
}
function FillUpSelectArray(inFormSource,inFormDestination,selectSource,selectDestination,selected){
  if(inFormDestination==""){
    inFormDestination=inFormSource;
  }
  var TotalDestination=eval("inFormDestination." + selectDestination + ".options.length");
  for(var i=1; i<TotalDestination; i++){
    eval("inFormDestination." + selectDestination + ".options[i]=null");
  }
  if(!eval("inFormSource." + selectSource + ".selectedIndex==0")){
    var SelectedArray=eval(selected);
    for(var i=1; i<=SelectedArray.length; i++){
      eval("inFormDestination." + selectDestination + ".options[i]=" + "new Option" + SelectedArray[(i-1)]);
    }
  }
}
function OptionToField(inFormFrom,inFormTo){
  if( eval(inFormFrom + ".selectedIndex") && eval(inFormFrom + ".selectedIndex!=-1") ){
    var new_field;
    var exists=0;
    var TotalDestination=eval(inFormTo + ".options.length");
    for(var i=1; i<TotalDestination; i++){
      var inserted_values=eval(inFormTo + "[" + i + "].value");
	  var value_to_insert=eval(inFormFrom + "[" + inFormFrom + ".selectedIndex" + "].value");
      if(inserted_values==value_to_insert){
	    exists=1;
	  }
    }
    if(!exists){
      new_field=inFormTo + ".options[" + inFormTo + ".options.length] = new Option(" + inFormFrom + ".options[" + inFormFrom + ".selectedIndex].text, " + inFormFrom + ".options[" + inFormFrom + ".selectedIndex].value, false, false)";
	  fieldtodelete=inFormFrom + ".options[" + inFormFrom + ".selectedIndex" + "]=null";
    }
    eval(new_field);
    eval(fieldtodelete);
  }
}

function MoveUpDown(inFormFrom,Action){
  var numero_elemento=eval(inFormFrom + ".selectedIndex");
  if( numero_elemento && numero_elemento!=-1 ){
	var TotalDestination=eval(inFormFrom + ".options.length");
	if((Action=='-' && numero_elemento==1) || (Action=='+' && (numero_elemento+1)==TotalDestination)){
	  return void(0);
	}
	var texto=eval(inFormFrom + ".options[" + inFormFrom + ".selectedIndex].text");
	var valor=eval(inFormFrom + ".options[" + inFormFrom + ".selectedIndex].value");
	destino=inFormFrom + ".options[" + numero_elemento + "] = new Option(" + inFormFrom + ".options[(" + inFormFrom + ".selectedIndex" + Action + "1)].text, " + inFormFrom + ".options[(" + inFormFrom + ".selectedIndex" + Action + "1)].value, false, false)";
	origen=inFormFrom + ".options[(" + numero_elemento + Action + "1)] = new Option('" + texto + "', '" + valor + "', true, true)";
	eval(destino);
	eval(origen);
	eval(inFormFrom + ".focus()");
  }
}
function DoArray(inForm,inField){
  var arreglo='';
  var Total=eval(inForm + ".options.length");
  for(var i=0; i<Total; i++){
    arreglo=arreglo + eval(inForm + ".options[" + i + "].value") + ",";
  }
  eval(inField + ".value='" + arreglo + "'");
  return true;
}
function DoArrayGraphics(inForm,inField){
  var arreglo='';
  var Total=eval(inForm + ".options.length");
  for(var i=0; i<Total; i++){
    if(eval(inForm + ".options[" + i + "].selected==true"))
      arreglo=arreglo + eval(inForm + ".options[" + i + "].value") + ",";
  }
  eval(inField + ".value='" + arreglo + "'");
  return true;
}


a201=new Image(173,20)
a201.src="/img/btn_1_off.gif"
a301=new Image(173,20)
a301.src="/img/btn_1_on.gif"

a202=new Image(92,20)
a202.src="/img/home_03.jpg"
a302=new Image(92,20)
a302.src="/img/home_03-over.jpg"

a203=new Image(113,20)
a203.src="/img/btn_3_off.gif"
a303=new Image(113,20)
a303.src="/img/btn_3_on.gif"

a204=new Image(151,20)
a204.src="/img/btn_4_off.gif"
a304=new Image(151,20)
a304.src="/img/btn_4_on.gif"

a205=new Image(68,20)
a205.src="/img/btn_5_off.gif"
a305=new Image(68,20)
a305.src="/img/btn_5_on.gif"

a206=new Image(68,20)
a206.src="/img/btn_6-2_on.gif"
a306=new Image(68,20)
a306.src="/img/btn_6-2_off.gif"

a207=new Image(68,20)
a207.src="/img/btn_7_off.gif"
a307=new Image(68,20)
a307.src="/img/btn_7_on.gif"

a208=new Image(68,20)
a208.src="/img/btn_8_off.gif"
a308=new Image(68,20)
a308.src="/img/btn_8_on.gif"

a209=new Image(68,20)
a209.src="/img/btn_9_off.gif"
a309=new Image(68,20)
a309.src="/img/btn_9_on.gif"

a210=new Image(68,20)
a210.src="/img/btn_10_off.gif"
a310=new Image(68,20)
a310.src="/img/btn_10_on.gif"

a211=new Image(68,20)
a211.src="/img/btn_11_off.gif"
a311=new Image(68,20)
a311.src="/img/btn_11_on.gif"

a212=new Image(68,20)
a212.src="/img/btn_12_off.gif"
a312=new Image(68,20)
a312.src="/img/btn_12_on.gif"

a213=new Image(68,20)
a213.src="/img/btn_13_off.gif"
a313=new Image(68,20)
a313.src="/img/btn_13_on.gif"

a214=new Image(68,20)
a214.src="/img/btn_14_off.gif"
a314=new Image(68,20)
a314.src="/img/btn_14_on.gif"

a215=new Image(68,20)
a215.src="/img/btn_15_off.gif"
a315=new Image(68,20)
a315.src="/img/btn_15_on.gif"


a2Faq=new Image(68,20)
a2Faq.src="/img/btn_FAQ_on.gif"
a3Faq=new Image(68,20)
a3Faq.src="/img/btn_FAQ_off.gif"

a2Gal=new Image(68,20)
a2Gal.src="/img/galleria.jpg"
a3Gal=new Image(68,20)
a3Gal.src="/img/galleria-over.jpg"

function filter(imagename,objectsrc)
{
var n=navigator.appName
var v=parseInt(navigator.appVersion)
var browsok=((n=="Netscape")&&(v>=3))
var browsok2=((n=="Microsoft Internet Explorer")&&(v>=4))
if ((browsok)||(browsok2))
document.images[imagename].src=eval(objectsrc+".src")
}

function dxonmouseover(selected,hi,name)
{
		filter(name,hi);
		selected=true;
}

function dxonmouseout(selected,lo,name)
{
if(!(currentpush==name))
{
		filter(name,lo);
		selected=false;
}
}
//CREA ARREGGLO
	function SetNameArray(item)
	{
		this.length = item
		return this
	}

//-->

