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

			// PARAMS
			var params = {};
			params.bgcolor = "#282828";
		    params.menu = "false";
		    params.scale = 'noScale';
		    params.wmode = "transparent";
		    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 = "";
			

			
			/** EMBED THE SWF**/
			swfobject.embedSWF("/swf/banner propel.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_opinion()
   {
	 errores=0;
     msg_error="Ligadiosas.cl\nPor favor, ingresa 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(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";
     }
 if (errores==0){
		document.form1.submit();
     }else{
        window.alert(msg_error);
		return false;
     }
   }

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

$(document).ready(function () {  
  var top = $('#comment').offset().top - parseFloat($('#comment').css('marginTop').replace(/auto/, 0));
  $(window).scroll(function (event) {
    // what the y position of the scroll is
    var y = $(this).scrollTop();
  
    // whether that's below the form
    if (y >= top) {
      // if so, ad the fixed class
      $('#comment').addClass('fixed');
    } else {
      // otherwise remove it
      $('#comment').removeClass('fixed');
    }
  });
});
