// JavaScript Document
// JAVASCRIPT VARS
			// cache buster
			var cacheBuster = "?t=" + Date.parse(new Date());
			// stage dimensions		
			var stageW = "883";//"100%";
			var stageH = "439";//"100%";
			
			
			// ATTRIBUTES
			var attributes = {};
			attributes.id = 'FlabellComponent';
			attributes.name = 'FlabellComponent';

			// PARAMS
			var params = {};
			params.bgcolor = "#ffffff";
		    params.menu = "false";
		    params.scale = 'noScale';
		    params.wmode = "opaque";
		    params.allowfullscreen = "true";
		    params.allowScriptAccess = "always";			
			
			
			/* FLASH VARS */
			var flashvars = {};
			
			/// if commented / delete these lines, the component will take the stage dimensions defined 
			/// above in "JAVASCRIPT SECTIONS" section or those defined in the settings xml
		    flashvars.componentWidth = stageW;
			flashvars.componentHeight = stageH;
			
			/// path to the content folder(where the xml files, images or video are nested)
			/// if you want to use absolute paths(like "http://domain.com/images/....") then leave it empty("")			
			flashvars.pathToFiles = "";
			
			// path to content XML
			flashvars.xmlPath = "/xml/banner.xml";
			
			
			/** EMBED THE SWF**/
			swfobject.embedSWF("/swf/preview.swf"+cacheBuster, attributes.id, stageW, stageH, "9.0.124", "/js/expressInstall.swf", flashvars, params, attributes);			
///////////REGISTRO
function validarEmail(valor) {

  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){ 

   return (true)

  } else {

   return (false);

  }

 }
 
   
   /////CONTACTO
   function validar_contacto()
   {
	 errores=0;
     msg_error="TenisCourt.cl\nPor favor, ingrese correctamente los campos obligatorios:\n";
     nombres		=document.form1.nombre.value;
	 apellido		=document.form1.apellido.value;
	 comentario		=document.form1.comentarios.value;
	 
	// email			=validate_email(document.form1.email.value);
    
	if (nombres=="" || !isNaN(nombres) ){
        errores++;
        msg_error=msg_error+ " - Nombre\n";
     }
	 if (apellido=="" || !isNaN(apellido) ){
        errores++;
        msg_error=msg_error+ " - Apellido\n";
     }
	/*if (fono=="" || largo_fono < 6){
        errores++;
        msg_error=msg_error+ " - Tel\u00e9fono\n";
     }*/
	if(validarEmail(document.form1.email.value)==false )
	{
		errores++;
        msg_error=msg_error+ " - E-mail\n";
	}
	if (comentario=="" || !isNaN(comentario) ){
        errores++;
        msg_error=msg_error+ " - Comentarios\n";
     }
	/* largo_fono=fono.length;*/
	
	
	
	    
     if (errores==0){
		document.form1.submit();
     }else{
        window.alert(msg_error);
		return false;
     }
   }
   

   
   
 /*MENU*/
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
