v_foto_id=1;
v_foto_id_limite=1;
v_tipo_servicio="";


function centrar_contenedor()
  {
	document.getElementById('zoomFondo').style.left=((document.body.scrollWidth/2)- parseInt(document.getElementById('zoomFondo').offsetWidth)/2)+"px";
	document.getElementById('zoomFondoContenedor').style.height	= "2000px";
	document.getElementById('zoomFondoContenedor').style.width	= "2000px";
  }


function mano(a) {
    if (navigator.appName=="Netscape") {
        a.style.cursor='pointer';
    } else {
        a.style.cursor='hand';
    }
}

function cambiar_idioma(p_idioma,p_alias_archivo,p_archivo)
  {
	switch(p_idioma)
	  {
		case 'en':
				alert('This Language is not available for the web page, its under construction. Try again in a few days.');
		break;
		
		case 'fr':
				alert('Cette langue nest pas disponible pour cette page, il est en construction, sil vous plaît essayer de nouveau dans quelques jours.');
		break;
	  }
  }
  
function abrir_sobrecapa(p_capa_nombre)
  {
	  switch(p_capa_nombre)
	  {
		  case 'comollegar':
		  	document.getElementById('img_contenido').src="img/localizacion_comollegar.jpg";
			document.getElementById('div_botonVolverNormal').style.visibility='visible';
		  break;
	  }
  }
  
function cerrar_sobrecapa(p_capa_nombre)
  {
	  switch(p_capa_nombre)
	  {
		  case 'comollegar':
		  	document.getElementById('img_contenido').src="img/localizacion.jpg";
			document.getElementById('div_botonVolverNormal').style.visibility='hidden';
		  break;
	  }
  }
  
  function mostrar_servicio(p_tipo_servicio,p_limite)
    {
		v_foto_id=1;
		v_foto_id_limite=p_limite;
		v_tipo_servicio=p_tipo_servicio;
		document.getElementById('img_tablero').src='img/fotos/'+v_tipo_servicio+v_foto_id+'_s.jpg'

	}

function mostrar_foto_anterior()
{
if(v_foto_id_limite>1)
{
	v_foto_id=v_foto_id-1;
	if(v_foto_id==1)
	  {
		  v_foto_id=v_foto_id_limite;
	  }
	document.getElementById('img_tablero').src='img/fotos/'+v_tipo_servicio+v_foto_id+'_s.jpg'
}
}

function mostrar_foto_siguiente()
{
if(v_foto_id_limite>1)
{	v_foto_id=v_foto_id+1;
	if(v_foto_id==v_foto_id_limite)
	  {
		  v_foto_id=1;
	  }
	document.getElementById('img_tablero').src='img/fotos/'+v_tipo_servicio+v_foto_id+'_s.jpg'
}
}

function mostrar_foto_zoom()
{
	//Poner la imagen modal
	document.getElementById('img_zoomFoto').src='img/fotos/'+v_tipo_servicio+v_foto_id+'_b.jpg';
	document.getElementById('zoomFondoContenedor').style.visibility='visible';
	document.getElementById('zoomFondo').style.visibility='visible';


}
function ocultar_foto_zoom()
{
	document.getElementById('zoomFondoContenedor').style.visibility='hidden';
	document.getElementById('zoomFondo').style.visibility='hidden';
}

function validarForm(){
	msgError='';
	if(window.document.contacto.txtnombre.value==''){
		msgError=msgError+'Para enviar sus comentarios debe escribir su nombre \n'
	}
	if(window.document.contacto.txtemail.value==''){
		msgError=msgError+'Para enviar sus comentarios debe escribir su dirección de correo electrónico\n'
	}
	if(window.document.contacto.txttelefono.value==''){
		msgError=msgError+'Para enviar sus comentarios debe escribir un número de telefóno para contactarlo\n'
	}
	if(window.document.contacto.txtasunto.value==''){
		msgError=msgError+'Para enviar sus comentarios debe escribir un asunto para identificar su mensaje \n'
	}
	if(window.document.contacto.txtcomentario.value==''){
		msgError= msgError+'Para enviar sus comentarios debe escribir alguno\n'
	}
	if (msgError==''){
		window.document.contacto.envio.value=true;
		window.document.contacto.submit();
	}else{
		alert('Error en el procesamiento de sus datos ingresados \n \n' + msgError);
	}

}