var color_fondo_pop="#CCCCCC"
var titulo="Imagen blasten.com"

function detectar_existente(obj){
return (typeof obj !="undefined")
}

function pop_img(img_path, popwidth, popheight, descripcion_img){

function posicion(){
izquierda_=(detectar_existente(window.screenLeft))?
screenLeft+document.body.clientWidth/2-popwidth/2 :
detectar_existente(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
superior_=(detectar_existente(window.screenTop))?
screenTop+document.body.clientHeight/2-popheight/2 :
detectar_existente(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
izquierda_-=screenLeft
superior_-=screenTop
}
}

posicion()
var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,
left='+izquierda_+',top='+superior_
var contenido=(color_fondo_pop.indexOf(".")!=-1)?
'background="'+color_fondo_pop+'"' : 'bgcolor="'+
color_fondo_pop+'"'
if (typeof pop_ventana=="undefined" || pop_ventana.closed)
pop_ventana=window.open("","",winattributes)
else{
pop_ventana.resizeTo(popwidth, popheight+30)
}
pop_ventana.document.open()
pop_ventana.document.write('<html><title>'+titulo+'</title>
<body '+contenido+'><img src="'+img_path+'" style="margin-bottom: 0.5em"><br>'+descripcion_img+'</body></html>')
pop_ventana.document.close()
pop_ventana.focus()
}
		




function check(frmForm) {
		  // validacion del nombre
		  if (frmForm.txtNombre.value=='')
		   {
			alert("Por favor, ingrese su nombre.");
			frmForm.txtNombre.focus();
			return false;
		   }

		  // validacion del mail
		  if (frmForm.txtFrom.value!='')
		   {
			  if((frmForm.txtFrom.value.indexOf('@', 0) == -1)||(frmForm.txtFrom.value.indexOf('.', 0) == -1)||(frmForm.txtFrom.value.length<6))
			   {
				alert("Su dirección de email "+frmForm.txtFrom.value+" no es correcta, corríjala por favor.");
				frmForm.txtFrom.focus();
				return false;
				}
			  else if (frmForm.txtFrom.value!=frmForm.from2.value)
			  {
				alert('Las dos direcciones de email no coinciden.');
				frmForm.from2.focus();
				return false;
				}
			}

		  // validacion del mensaje a enviar
		  if (frmForm.txtMensaje.value=='')
		   {
			alert("Detalle de la reserva sin contenido ! ");
			frmForm.txtMensaje.focus();
			return false;
		   }

		  else { return true;}
		}
		// fin de script para correo

