//Funcion para agregar a favoritos

var url="http://www.holiday-golf.com/"
var titulo="Holiday-Golf - Rent a Car"
function agregar(){
	if (document.all)
		window.external.AddFavorite(url,titulo)
} 

// Función para posicionar elemento posterior al grupo en los select de coches

function posiciona()
{
	indice = document.reserva1.coche.selectedIndex;
	indice ++;
	document.reserva1.coche.options[indice].selected=true;	
}

// Funcion para imprimir el resumen de la reserva

function imprime()
{
//	document.getElementById("imprimir").style.visibility='hidden'
//	document.getElementById("confirmar").style.visibility='hidden'
	document.getElementById("imprimir").style.display='none';	
	document.getElementById("confirmar").style.display='none';	
	window.print();
//	document.getElementById("imprimir").style.visibility='visible'
//	document.getElementById("confirmar").style.visibility='visible'
	document.getElementById("imprimir").style.display='inline';
	document.getElementById("confirmar").style.display='inline';
}

<!--
function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
//-->

<!--
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);
//-->

// Control de Campos

function check_field(value,regex)
{
	re = new RegExp(regex);

	r=re.exec(value);
	if (r==null) return false; else return true;
}

function check_form(form,nombreform)
{
	
	switch (nombreform) {
		case "reserva2" :
			fields=	new Array('nombre','apellidos','email');
			texts=	new Array("Nombre","Apellidos","E-Mail");
			types=	new Array('.+','.+','.+@.+');
			break;
	}
	document.estatus = true;
	for (i=0;i<fields.length;i++) {
		v=eval("form."+fields[i]+".value");
		r=check_field(v,types[i]);
		if (r==false) {
			alert ("Por favor, compruebe campo "+texts[i]);
			document.estatus = false;			
		}
	}
}
