/** GENERAL **/
/*
window.addEvent('domready', function(){
	$('container').setStyle('height', (window.getHeight()-245)+'px');
	iniciarEventos();
});
window.addEvent('resize', function(){
	$('container').setStyle('height', (window.getHeight()-245)+'px');
});
*/

var openPopUp = function(mL,pL,special) {
	var width = 800;
	var height = 600;
	var scroll = 1;
	if(special == undefined || special == '') special = 'false'
	switch(mL) {
		case 1: width = 960; height = 800; scroll = 1; break;
		case 'reserva_caminodesantiago':
		case 'reserva_despedida':
		case 'reserva_evento':
		case 'reserva_tour': width = 960; height = 800; scroll = 1; break;
		case 11: width = 800; height = 600; scroll = 0; break;
	}
	window.open('popup.snx?mL='+mL+'&pL='+pL+'&special='+special, 'MadridBikeToursPopUp','width='+width+',height='+height+',scrollbars='+scroll)
};

var checkBookForm = function() {
	if($('bookform').date1.value == '') {
		$('bookform').date1.focus();
	} else if($('bookform').numero_personas.value == '') {
		$('bookform').numero_personas.focus();
	} else if($('bookform').nombre.value == '') {
		$('bookform').nombre.focus();
	} else if($('bookform').email.value == '') {
		$('bookform').email.focus();
	} else if($('bookform').telefono.value == '') {
		$('bookform').telefono.focus();
	} else {
		$('bookform').bookform_submit.value='1';
		$('bookform').submit();
	}
};

var checkContactForm = function() {
	if($('contactform').nombre.value == '') {
		$('contactform').nombre.focus();
	} else if($('contactform').email.value == '') {
		$('contactform').email.focus();
	} else if($('contactform').more_info.value == '') {
		$('contactform').more_info.focus();
	} else {
		$('contactform').contactform_submit.value='1';
		$('contactform').submit();
	}
};
