<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 45;
// -----------------------------------------------------------------------------
// -->

function validar(){
	if(document.form_contacto.nombre.value.length <= 0) alert("Error: nombre");
	else if(document.form_contacto.email.value.length <= 0) alert("Error: email");
	else if(document.form_contacto.tlf.value.length <= 0) alert("Error: tlf");
	else if(document.form_contacto.mensaje.value.length <= 0) alert("Error: mensaje");
	else document.form_contacto.submit();
}

function popupw(URL,x,y){
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,top=0,left=0,width=" + x + ",height=" + y + "');");
}

function popup(image){
 	cuteLittleWindow = window.open('', "littleWindow", "location=0,scrollbars=auto,top=0,left=0,width=0,height=0");
  	cuteLittleWindow.document.write('<div style="position: absolute; width: 100%; height: 100%; z-index: 1; left:0px; top:0px"><table cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center"><img title="Cerrar ventana" id="IMG" onclick="window.close();" onload="window.resizeTo(this.width,this.height+80);" src="'+image+'"><\/td><\/tr><\/table><\/div>');
}

function pone_flash(ancho,alto,archivo){
	if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
		alert("JavaScript Deshabilitado!, porfavor habilitelo!");
	} else {
		var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		if(hasRightVersion) {  // if we've detected an acceptable version
			// embed the flash movie
			AC_FL_RunContent(
				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
				'width', ancho,
				'height', alto,
				'src', archivo,
				'quality', 'high',
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'align', 'middle',
				'play', 'true',
				'loop', 'true',
				'scale', 'showall',
				'wmode', 'transparent',
				'devicefont', 'false',
				'id', archivo,
				'bgcolor', '#ffffff',
				'name', archivo,
				'menu', 'false',
				'allowScriptAccess','sameDomain',
				'allowFullScreen','false',
				'movie', archivo,
				'salign', ''
				); //end AC code
		} else {  // flash is too old or we can't detect the plugin
			var alternateContent = 'Este contenido requiere Flash Player<br>'
				+ '<a href=http://www.macromedia.com/go/getflash/>Obtener Flash</a>';
			document.write(alternateContent);  // insert non-flash content
		}
	}
}
