			
function showMenu(menucat){
			switch (menucat){
				case "0":	
					//deporte.hide();
					pre.hide();
					pra.hide();
					//rankings.hide();
					turismo.hide();
					cria.hide();
					certamenes.hide();
					break;
				case "3":	
					//deporte.hide();
					pre.hide();
					pra.hide();
					//rankings.hide();
					turismo.hide();
					cria.hide();
					certamenes.hide();
					break;
				case "4":
					deporte.hide();
					//pre.hide();
					pra.hide();
					//rankings.hide();
					turismo.hide();
					cria.hide();
					certamenes.hide();
					break;
				case "5":
					deporte.hide();
					pre.hide();
					//pra.hide();
					//rankings.hide();
					turismo.hide();
					cria.hide();
					certamenes.hide();
					break;
				case "6":
					deporte.hide();
					pre.hide();
					pra.hide();
					//rankings.hide();
					turismo.hide();
					cria.hide();
					certamenes.hide();
					break;
				case "8":
					deporte.hide();
					pre.hide();
					pra.hide();
					//rankings.hide();
					//turismo.hide();
					cria.hide();
					certamenes.hide();
					break;
				case "9":
					deporte.hide();
					pre.hide();
					pra.hide();
					//rankings.hide();
					turismo.hide();
					cria.hide();
					//certamenes.hide();
					break;
				case "17":
					deporte.hide();
					pre.hide();
					pra.hide();
					//rankings.hide();
					turismo.hide();
					//cria.hide();
					certamenes.hide();
					break;
				default:
					//deporte.hide();
					pre.hide();
					pra.hide();
					//rankings.hide();
					turismo.hide();
					cria.hide();
					certamenes.hide();
					
				
			}
}			
/* -------------------------------- */

function goResults(d) {
	document.location.href = "showcompetitions?discipline=" + d;
}

function goResultsPag(p,d,mw) {
	document.location.href = "showcompetitions?page=" + p + "&discipline="+d + "&mw="+mw;
}

function goTurismo(value) {
	document.location.href = "#" + value;
}
/*function goConsul(value,radioObj) {
	var radioLength = radioObj.length;
	
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			cat = radioObj[i].value;
		}
	}

	document.location.href = "showcategory?id=28&auxcat=" + cat + "&consul=" + value;
}*/
function goConsul(pax,paxt,cat){
	document.location.href='showcategory?id=28&auxcat='+cat+'&page='+pax+'&tp='+paxt;
}
function goRanking(pax,paxt){
	document.location.href='showcategory?id=33&page='+pax+'&tp='+paxt;
}
function goNotis(pax,paxt){
	document.location.href='showcategory?id=27&page='+pax+'&tp='+paxt;
}
function goG(pax,paxt,cat){
	document.location.href='showcategory?id='+cat+'&page='+pax+'&tp='+paxt;
}
function goPalm(pag,sc){
	document.location.href='searchtrackrecord?'+sc+'&page='+pag;
}
function goSearchPics(pax,paxt,cad){
	document.location.href='searchpics?page='+pax+'&tp='+paxt+cad;
}
function goSearchPics2(pax,paxt,cad){
	document.location.href='tienda?page='+pax+'&tp='+paxt+cad;
}


function goGalPag(pag,totpags){
	document.location.href='showcategory?id=39&page='+pag+'&tp='+totpags;
}
function goSurveysYear(year){
	document.location.href='survey?anyo='+year;
}
/* -------------------------------- */
var ventana; 
//var cont=0 
//var titulopordefecto = "- Ecuestre Online -";

function openfoto(){ 
cual = rutas[indice].replace("little", "big");
imagen = new Image() ;
imagen.src = cual;
pie = pies[indice];
ventana=window.open(cual,'ventana','resizable=yes,scrollbars=no,status=no'); 
ventana.document.write('<html><head><title>' + pie + '</title><script language=JavaScript>var message="";function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function("return false")</script></head><body style="margin:0; background-color:#F1F1F1"><table border="0" cellspacing="0" cellpadding="0"><tr><td><a href="javascript:window.close()"><img src="' + cual + '" onload="opener.redimensionar(this.width,this.height)" border="0"></a></td></tr><tr><td style="font:12px Arial, Helvetica, sans-serif; padding:5px; text-align:center;">'+pie+'</td></tr></table></body></html>');
ventana.document.close();
} 

var ventana;

function openShowPhotoNoti(notid){
var p_id = pics_id[indice];
var p_w = pics_w[indice];
var p_h = pics_h[indice];
//p_w = Math.abs(p_w);
p_h = Math.abs(p_h) + 50;
ventana = window.open("showphoto?imgid="+p_id+"&id="+notid+"&indice="+indice,'',"width="+p_w+",height="+p_h+",scrollbars=auto");
ventana.moveTo((screen.width-p_w)/2,10);
}

function openShowPhoto(id,tienda,w,h){
h = Math.abs(h) + 50;
var ventana = window.open("showphoto?imgid="+id+"&tienda="+tienda,'',"width="+w+",height="+h+",scrollbars=auto");
}

function redimensionar(ancho,alto) { ventana.resizeTo(ancho+10,alto+90); ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2);}

function resizeOuterTo(w,h) {
 if (parseInt(navigator.appVersion)>3) {
   if (navigator.appName=="Netscape") {
    top.outerWidth=w;
    top.outerHeight=h;
   }
   else top.resizeTo(w,h);
 }
 top.moveTo((screen.width-w)/2,(screen.height-h)/2);
}

function getNextPicture(numimg,r){
if(indice<numimages-1){
	indice++;
	var img=document.getElementById("foto");
	img.src=rutas[indice];
	var alternativo=document.getElementById("alternativo").firstChild;
	alternativo.nodeValue = "";
	alternativo.appendData(alternativos[indice]);
	//alternativo.value=alternativos[indice];
	var imgactual=document.getElementById("imgactual");
	imgactual.value=eval(indice+1)+ " de "+numimg;
	if (r) {
		this.resizeTo(pics_w[indice],(Math.abs(pics_h[indice])+140));
		this.moveTo((screen.width-pics_w[indice])/2,10);
	}
}
}
function getPrevPicture(numimg,r){
if(indice>0){
	indice--;
	var img=document.getElementById("foto");
	img.src=rutas[indice];
	var alternativo=document.getElementById("alternativo").firstChild;
	alternativo.nodeValue = "";
	alternativo.appendData(alternativos[indice]);
	var imgactual=document.getElementById("imgactual");
	imgactual.value=eval(indice+1)+ " de "+numimg;
	if (r) {
		this.resizeTo(pics_w[indice],(Math.abs(pics_h[indice])+140));
		this.moveTo((screen.width-pics_w[indice])/2,10);
	}
}
}

function getNextPictureb(numimg){
//alert("tengo \"indice\""+indice);
if(ind<numimgs-1){
	ind++;

var img=document.getElementById("fotog");
img.src=rus[ind];
var alternativo=document.getElementById("alt2");
alternativo.value=alts[ind];
var imgactual=document.getElementById("img2act");
imgactual.value=eval(ind+1)+ " de "+numimgs;
}
}
function getPrevPictureb(numimg){
if(ind>0){
ind--;
var img=document.getElementById("fotog");
img.src=rus[ind];
var alternativo=document.getElementById("alt2");
alternativo.value=alts[ind];
var imgactual=document.getElementById("img2act");
imgactual.value=eval(ind+1)+ " de "+numimg;
}
}

function imgsemact(){
var imgsemana=document.getElementById("fotog");
imgsemana.src=rus[0];
var alternativo=document.getElementById("alt2");
alternativo.value=alts[0];
}

function openfotob(titulo) 
{ 
if(cont==1){ventana.close();ventana=null} 
if(titulo==null){titulo=titulopordefecto}
cual = rus[ind].replace("little", "big");
imagen = new Image() ;
imagen.src = cual;
imagenh = imagen.height;
imagenw = imagen.width;
ventanaw = imagenw + 40;
ventanah = imagenh + 100;
pie = ps[ind];
ventana=window.open('','ventana','resizable=yes,scrollbars=no') 
ventana.document.write('<html><head><title>' + titulo + '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><a href="javascript:window.close()"><img src="' + cual + '" onLoad="opener.redimensionar('+ventanaw+', '+ventanah+')" border="0" height="' + imagenh + '" width="' + imagenw + '" style="margin:20px; margin-bottom:10px"></a><p style="text-align:center; margin:0; background-color:#EFEFEF; margin-left:20px;margin-right:20px; border-top:1px solid #B4B4B4;border-bottom:1px solid #B4B4B4; padding:10px; font-family: Arial,Helvetica,sans-serif; font-size:12px;">'+pie+'</p></body></html>') 
ventana.document.close() 
cont++ 
} 

function choosegalleryaction(){
if(nids[ind]!=-1){
document.location.href='shownew?id='+nids[ind];
}else{
openfotob();
}
}

/* -------------------------------- */
var WindowObjectReference; // global variable

function openRequestedPopup(dir,alt,w,h)
{
cual = dir.replace("little", "big");
//imagen = new Image();
//imagen.src = cual;
//imagenh = imagen.height;
//imagenhw = imagenh + 25;
//imagenw = imagen.width;
//w=w+10;
h=h+25;
cad = "resizable=no,scrollbars=no,width="+w+",height="+h;
WindowObjectReference = window.open(cual,"ecuestreonline",cad);
//WindowObjectReference.document.write('<html><head><title>Ecuestre Online-'+alt+'</title></head><body style="background-color:#F1F1F1;margin:0;"><table border="0" cellspacing="0" cellpadding="0"><tr><td><a href="javascript:window.close()"><img src="' + cual + '" border="0" onload="opener.redim('+w+','+h+')"></a></td></tr><tr><td style="font:12px Arial, Helvetica, sans-serif; text-align:center; padding:5px;">'+alt+'</td></tr></table></body></html>');
WindowObjectReference.document.write('<html><head><title>Ecuestre Online-'+alt+'</title><script language=JavaScript>var message="";function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function("return false")</script></head><body style="background-color:#F1F1F1;margin:0;"><table border="0" cellspacing="0" cellpadding="0"><tr><td><a href="javascript:window.close()"><img src="' + cual + '" border="0" onload="opener.redim('+w+','+h+')"></a></td></tr><tr><td style="font:12px Arial, Helvetica, sans-serif; text-align:center; padding:5px;">'+alt+'</td></tr></table></body></html>');
}
function redim(w,h){
//WindowObjectReference.resizeTo(w+10,h+74);
WindowObjectReference.moveTo((screen.width-w)/2,(screen.height-h)/2);
}

function MM_openBrWindow(theURL,winName,features) 
{ //v2.0
  var ventana = window.open("/ecuestredb"+theURL,winName,features);
  ventana.focus() ;
}

function openStatic(URL,w,h){
	var ventana = window.open("/"+URL,'',"width="+w+",height="+h+",scrollbars=yes");
}

function openExternal(URL,w,h){
	var ventana = window.open(URL,'',"width="+w+",height="+h+",scrollbars=yes");
}

function overflowHand(){
alert('testing...')
}
