<!-- winBRopen BEGIN
function winBRopen(theURL, Name, popW, popH, scroll, status) { // V 1.0

	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',status='+status
	Win = window.open(theURL, Name, winProp);
	
	if (parseInt(navigator.appVersion) >= 4){ 
		Win.window.focus(); 
	}

}

function openTour(pag){
	var idioma=document.getElementById('idioma').value;
	var url='cyclotour/' + idioma + '/' + pag + '.php';
	winBRopen(url,'CycloTour',500,500,1,0);	
}
// winBRopen END -->
<!--
function comprueba(frm) {

	if(frm.cantidad!=null){
		if (frm.cantidad.value=='') {
		alert('Por favor, introduce la cantidad de bicicletas');
		frm.cantidad.focus();
		return false;
		}
	}
	if (frm.nombre!=null){
		if (frm.nombre.value=='') {
		alert('Por favor, introduce tu nombre');
		frm.nombre.focus();
		return false;
		}
	}
	if (frm.apellidos!=null){
		if (frm.apellidos.value=='') {
		alert('Por favor, introduce tus apellidos');
		frm.apellidos.focus();
		return false;
		}
	}
	if (frm.dni!=null){
		if (frm.dni.value=='') {
		alert('Por favor, introduce tu dni');
		frm.dni.focus();
		return false;
		}
	}
	if (frm.direccion!=null){
		if (frm.direccion.value=='') {
		alert('Por favor, introduce tu dirección');
		frm.direccion.focus();
		return false;
		}
	}
	if (frm.telefono!=null){
		if (frm.telefono.value=='') {
		alert('Por favor, introduce tu telefono');
		frm.telefono.focus();
		return false;
		}
	}
	if (frm.email!=null){
		if (frm.email.value=='') {
		alert('Por favor, introduce tu dirección de email');
		frm.email.focus();
		return false;
		}
		
		if (!(checkEmail(frm))) {
		alert('Por favor, introduce una dirección de email correcta');
		frm.email.focus();
		return false;
		}
	}
	return true;
}
function checkEmail(frm) { 
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(frm.email.value)){
		return (true);
	}else{
		return (false);
	}
}

function cambiaIdioma(idioma){
		document.form_idioma.idioma.value=idioma;
		var pag_actual=new String(document.form_idioma.pag_act.value);
		if(pag_actual!=null){			
			if(pag_actual.indexOf("cyclotour")!=-1){				
				pag_actual='cyclotour_' + idioma + '.php';
			}
		}
		document.form_idioma.action=pag_actual;
		document.form_idioma.submit();
}

function comboFecha(name,var1,var2){
	var texto=new Array();	
	texto.push('<select name="'+ name +' ">');
	for (i = var1; i < var1+var2; i++) {
		
		if (i < 10) {
			i2="0"+i;
		}else{
			i2=i;
		}
	
		texto.push('<option value="' + i +'" >' + i2 +'</option>');
	} 
	texto.push('</select>');
	document.write(texto.join(''));
	texto.splice(0,texto.length);
}

function validaTextArea(texto){
	if (document.frmcontacto.consulta.value==texto) {
		document.frmcontacto.consulta.value=''
	}
}

function navegacion(pag){
		document.form_idioma.pag_act.value=pag;
		document.form_idioma.action=pag;
		document.form_idioma.submit();
		return false;
}

function MostrarFila(Fila) { 	
	var elementos = document.getElementsByName('f'); 
	//var imagenes = document.getElementsByName('i');
    for (k = 0; k<elementos.length; k++) {		
		if(k==(Fila-1)){
			muestraOcultaElemento(elementos[k]);
		}
    } 
} 

function muestraOcultaElemento(fila){
	if(fila!=null){
		if(fila.style.display=='none'){
			fila.style.display='block';
			//imagen.src='images/flecha_b.png';
		}else{
			fila.style.display = "none"; 
			//imagen.src='images/flecha_a.png';
		}
	}
}

function loadImages(id){
	if (document.getElementById) {
		opacity(id,100,0,500);
	}else{
		if (document.layers) { 
			opacity(id,100,0,500);	
		}else {
			opacity(id,100,0,500);	
	  }
   }
}

// JavaScript Document

function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 
    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 		
    }else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        }		
    } 	
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) {
	muestraObjeto(id,opacity);
	muestraCapaPrecarga(id,opacity);
} 

function muestraCapaPrecarga(id,opacity){
	if(opacity==0){	
		document.getElementById(id).style.display='none';
	}else{
		document.getElementById(id).style.display='block';
	}
}

function muestraObjeto(id,opacity){
	var object1 = document.getElementById(id).style;	    
	object1.opacity = (opacity / 100); 
    object1.MozOpacity = (opacity / 100); 
    object1.KhtmlOpacity = (opacity / 100); 
    object1.filter = "alpha(opacity=" + opacity + ")"; 		
}

//-->
