<!--

// ------------------------------------------------------------------------------

var MENU_HREF=0;
var MENU_ESP=1;
var MENU_ENG=2;
var MENU_IMG=3;
var MENU_OPT=[
	['','Inicio','Home',''],
	['biografia.htm','Biografía','Biography','1'],
	['prensa1.htm','Prensa','Reviews','2'],
	['galeria1.htm','Galería','Gallery','7'],
	['grabaciones1.htm','Grabaciones','Recordings','5'],
	['repertorio.htm','Repertorio','Repertory','3'],
	['cursos.htm','Cursos','Courses','4'],
	['preguntas1.htm','Preguntas','FAQ','8'],
	['yehuda1.htm','Yehuda Gilad','Yehuda Gilad','9'],
	['enlaces.htm','Enlaces','Links','10'],
	['contacto.htm','Contacto','Contact','6'],
];
var MENU_ITEMS=11;
var	param = new Array();
var url = "";

function Menu(n) {
	if (n>0) {
		window.parent.menuFrame.location.href="menu.htm?"+n;
		window.parent.mainFrame.location.href=MENU_OPT[n][MENU_HREF];
	} else {
		window.parent.top.location.href="../index.htm";
	}
}

// ---------------------------------------------------------------------

function GetParam() {
	url = location.href;
	idioma = (url.indexOf("eng") == -1) ? MENU_ESP : MENU_ENG;
	val = url.indexOf("?");
	tmp = url.substring(0,val);
	val = url.substring(val+1,url.length);
	param = val.split("&");
	if (tmp == "") {
		url = param[0];
		param[0] = ""
	} else
		url = tmp;
}

// ---------------------------------------------------------------------

function Cursos(url) {
	popUpWindow("../cursos/"+url+".htm", "cursos", 10, 10, 960, 665)
}

// ---------------------------------------------------------------------

function Kutnowski() {
	popUpWindow("../prensa/kutnowski.htm", "prensa", 10, 10, 960, 665)
}

// ---------------------------------------------------------------------

function Prensa(url) {
	img = "../prensa/"+url+".jpg";
	popUpWin = open("", "prensa", 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=960, height=665,left=10, top=10, screenX=10, screenY=10');
	popUpWin.document.write("<head><title>VENANCIO RIUS MARTÍ</title><link href='../style.css' rel='stylesheet' type='text/css'></head><body scroll=auto><table border=0 width=100% height=100% class='texto'><tr align='center' valign='middle'><td><img src='" + img + "'></td></tr></table>")
}

// ---------------------------------------------------------------------

function Galeria(idioma,dir,n) {
	popUpWindow("../galeria/"+dir+"/galeria"+idioma+".htm?"+n, "galeria", 0, 0, 960, 665)
}

// ---------------------------------------------------------------------

function popUpWindow(url, name, x, y, w, h) {
	popUpWin = open(url, name, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width='+w+', height='+h+',left='+x+', top='+y+', screenX='+x+', screenY='+y+'');
	popUpWin.focus();
}

function printWindow() {
	url=window.top.mainFrame.location.href;
	printWin = open(url, 'print', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=no');
	printWin.focus();
}

function topWindow() {
		window.top.mainFrame.location.href=window.top.mainFrame.location.href+"#";
}

function EsMail(valor){  
	valor = StrTrim(StrValida(valor));
	posar = valor.indexOf("@");
	if ( posar < 1 || posar > (valor.length-5)) return false;
	return true;
}
function EsEntero(valor){  
	valor = StrValida(valor);
	if (!EsNumerico(valor)) return false;
	if (valor.indexOf(".") != -1) return false;
	return true;
}
function EsNumerico(valor){  
	valor = StrValida(valor);
	return ((StrTrim(valor) == "") || (isNaN(valor)))?false:true;   
}
function StrLeft(valor,num){ 
	valor = StrValida(valor);
	return valor.slice(0,num);
}
function StrRight(valor,num){  
	valor = StrValida(valor);
	return valor.slice(valor.length - num);
}
function StrTrim(valor){
	var flag,count=0,pos=0;
	var buffer =  new String("");
	valor = StrValida(valor);
	flag = 1;    
	for (count=0;count < valor.length;count++) {
		if ((valor.charAt(count) != " ") || (flag==0)) {
			buffer=buffer.concat(valor.charAt(count));	
			flag  = 0;
		}    
	}
	pos = 0;
	for (count = buffer.length-1;count > 0 ;count--){
		if (buffer.charAt(count) == " ") pos++;
			else break;
	}
	if (pos > 0) buffer = buffer.slice(0,buffer.length - pos);
		return buffer; 
}
function StrValida(valor){
	if((String(valor) == "undefined") || (String(valor) == "null")) return "";
	else return valor;
}

// ---------------------------------------------------------------------

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 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_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_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_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];}
}

//-->