

function ampliarFoto(img){ 
foto1 = new Image();
foto1.src=(img);
Controlla(img);
}

function Controlla(img){

if((foto1.width!=0)&&(foto1.height!=0)){ 
viewFoto(img);
} else {
funzione="Controlla('"+img+"')";
intervallo=setTimeout(funzione,20);
}
}

function viewFoto(img){
largh=foto1.width+20;
altez=foto1.height+20;
stringa="width="+largh+",height="+altez;
finestra=window.open(img,"",stringa);
}





function ampliar_imagen(imagen,ancho,alto) {
	w_amp=window.open('','','width='+ancho+', height='+alto);
	w_amp.document.write('<html><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"><img src="'+imagen+'"></body></html>');
	if (window.focus) {w_amp.focus()}
}

function abrir_ventana (url,nombre,parametros) {
	window.open (url,nombre,parametros);
}
function validar(form) 
{
	if (!document.getElementById('acepto').checked) {
		alert ("Acepte la política de privacidad");
		document.getElementById('acepto').focus();
		return false; }
	if (document.getElementById('pack').selectedIndex==0) {
		alert ("Introduzca el pack");
		document.getElementById('pack').focus();
		return false; }
	if (document.getElementById('mail').value.length==0) {
		alert ("Introduzca su email");
		document.getElementById('mail').focus();
		return false; }
	if (document.getElementById('mail').value=="E-mail") {
		alert ("Introduzca su email");
		document.getElementById('mail').focus();
		return false; }
	if (document.getElementById('telefono').value.length==0) {
		alert ("Introduzca su Telefono");
		document.getElementById('telefono').focus();
		return false; }
	if (document.getElementById('telefono').value=="Telefono") {
		alert ("Introduzca su Telefono");
		document.getElementById('telefono').focus();
		return false; }
	return true;
}

function enviar(form) 
{
	vals = "";
	vals=vals+"?telefono="+document.getElementById('telefono').value;
	vals=vals+"&mail="+document.getElementById('mail').value;
	vals=vals+"&pack="+document.getElementById('pack').value;
	url="mailrespuesta.php"+vals;
	abrir_ventana(url,'','scrollbars=yes,width=512,height=432')
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}




