/*!
 * Credicoop Ltda.
 * http://www.credicoop.cl/
 *
 * Copyright (c) 2009 Credicoop Ltda.
 * Date: 12/06/2009
 * Revision: 1
 */

// Ciclo del logo inicial
$(document).ready(function(){
	$('#CREDlogoW').cycle({fx: 'fade',speed: 500,timeout: 5000});	
	/*$('#actividad').hide();
	$('#CREDNot').click(function(){$('#actividad').hide();$('#noticia').fadeIn();});
	$('#CREDAct').click(function(){$('#noticia').hide();$('#actividad').fadeIn();});*/
});

// Crea Ventana PopUp
function popUp(URL) {
		day = new Date();
		id = day.getTime();
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=500');");
}

// Determina si el valor entregado es numerico
function IsNumeric(sText){
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;
   
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
}

//Validación de rut
function dv(T){
	var M=0,S=1;
	for(;T;T=Math.floor(T/10))
	S=(S+T%10*(9-M++%6))%11;
	return S?S-1:'K';
}
