
    /**
    /* funcion principal de decisiones: hace una cosa u otra en funcion de la 
    * opcion seleccionada en el primer combo
    */
    function combo()
    {
        /**
        * variable que almacena la opcion elegida en el primer combo
        */
        var indice=document.forms.form1.menu1.selectedIndex;
        /**
        * si se elige la primera opcion (la que aparece por defecto) > se pone el segundo combo a cero
        */
        if(indice==0)
        {
            document.forms.form2.menu2.options[0].value="0";
            document.forms.form2.menu2.options[0].text="---------------------------------";
            document.forms.form2.menu2.length=1;
        }
        /**
        * si se elige la segunda o la tercera > llamamos a la funcion correspondiente
        */
        if(indice==1) menu1();
        if(indice==2) menu2();
		 
		 
    }
    /**
    * funcion de relleno del segundo combo si se elige la primera opcion
    */
    function menu1()
    {
        segundoCombo=1;
        sub0=new Option("-choose one option-","sub0","defauldSelected");
        sub1=new Option("High income: EURO 74","una-una");
        sub2=new Option("Low income: EURO 37","una-dos");
		      sub3=new Option("(3 years in advance / 5% discount) High income: EURO 211","una-tres");
        sub4=new Option("(3 years in advance / 5% discount) Low income: EURO 105","una-cuatro");
        document.forms.form2.menu2.options[0]=sub0;
        document.forms.form2.menu2.options[1]=sub1;
        document.forms.form2.menu2.options[2]=sub2;
		document.forms.form2.menu2.options[3]=sub3;
        document.forms.form2.menu2.options[4]=sub4;
    }
    /**
    * funcion de relleno del segundo combo si se elige la primera opcion
    */
    function menu2()
    {
        segundoCombo=2;
        sub0=new Option("-choose one option-","sub0","defauldSelected");
        sub1=new Option("High income: EURO 37","dos-una");
        sub2=new Option("Low income: EURO 19","dos-dos");
		      sub3=new Option("(3 years in advance / 5% discount) High income: EURO 105","dos-tres");
        sub4=new Option("(3 years in advance / 5% discount) Low income: EURO 54","dos-cuatro");
        document.forms.form2.menu2.options[0]=sub0;
        document.forms.form2.menu2.options[1]=sub1;
        document.forms.form2.menu2.options[2]=sub2;
		      document.forms.form2.menu2.options[3]=sub3;
        document.forms.form2.menu2.options[4]=sub4;
    }   
	 


function combo3()
    {
        var descrip, valor;
        var indice3=document.forms.form2.menu2.selectedIndex;
        var valor=document.forms.form2.menu2.options[indice3].value;
         if(valor=="sub0")
        {
            midescrip="";
            mivalor="";
        }
        if(valor=="una-una")
        {
            midescrip="Base Membership. High Income (EURO 74)";
            mivalor="74";
        }
		 if(valor=="una-dos")
        {
            midescrip="Base Membership. Low Income (EURO 37)";
            mivalor="37";
        }
if(valor=="una-tres")
        {
            midescrip="(3 years in advance / 5% discount) Base Membership. High Income (EURO 211)";
            mivalor="211";
        }
if(valor=="una-cuatro")
        {
            midescrip="(3 years in advance / 5% discount) Base Membership. Low Income (EURO 105)";
            mivalor="105";
        }
		if(valor=="dos-una")
        {
            midescrip="Senior, Retiree or Junior Membership. High Income (EURO 37)";
            mivalor="37";
        }
		if(valor=="dos-dos")
        {
            midescrip="Senior, Retiree or Junior Membership. Low Income (EURO 19)";
            mivalor="19";
        }
	if(valor=="dos-tres")
        {
            midescrip="(3 years in advance / 5% discount) Senior, Retiree or Junior Membership. High Income (EURO 105)";
            mivalor="105";
        }
		if(valor=="dos-cuatro")
        {
            midescrip="(3 years in advance / 5% discount) Senior, Retiree or Junior Membership. Low Income (EURO 54)";
            mivalor="54";
        }
		 


       
       
       
        document.forms.resultados.descrip.value=midescrip;
        document.forms.resultados.valor.value=mivalor;
    }



function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
		if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
		if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
		if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    	ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
    	popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    	popupWindow[wp].document.body.onbeforeunload = function() {
  			if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    		window.onbeforeunload = null;	}  
   		autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
  	window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}

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_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '-choose one option.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

 
