// JavaScript Document
// ================================================
		// script by Gerard Ferrandez - Nov 2001 - July 2006
		// http://www.dhteumeuleu.com
		// ================================================
		var xm = 0;
		var ym = 0;
		var nx = 0;
		var ny = 0;
		var nw = 0;
		var nh = 0;
		var turno = 1;
		
		
		function resize() {
			with(document.getElementById("screen")){
				nx = offsetLeft;
				ny = offsetTop;
				nw = offsetWidth;
				nh = offsetHeight;
			}
		}
		onresize = resize;
		
		document.onmousemove = function(e){
			if(window.event) e=window.event;
			xm = (e.x || e.clientX) - nx;
			ym = (e.y || e.clientY) - ny;
			R = 1;
		}
		// ---------------------
		var Nb = 17;
		var R = 0;
		var C = 0;
		var object = new Array();
		
		function makedoot(N){
			this.ds = document.createElement("img"); 
			if(turno == 1)
			{
				this.ds.src = document.getElementById("glob1").src;
				turno++;
			}else{
				if(turno == 2)
				{
					this.ds.src = document.getElementById("glob2").src;
					turno++;
				}else{
					this.ds.src = document.getElementById("glob3").src;
					turno = 1;
				}
			}
			document.getElementById("screen").appendChild(this.ds);
			this.r = (N * 100 / Nb);
			this.x = -1000;
			this.y = 0;
			this.Ge = function (){
				with (this){
					if (r >= 100){
						R--;
						if (R<0){
							x = Math.random() * nw;
							y = Math.random() * nh;
						}
						else {
							x = xm;
							y = ym;
						}
						r = 0;
						ds.style.zIndex = C++;
					}
					r += 2;
					with (ds.style){
						left = Math.round(x-r)+"px";
						top = Math.round(y-r)+"px";
						width = height = Math.round(r * 2)+"px";
					}
					if (ds.filters != undefined) ds.filters.item(0).opacity = Math.round(102 - r);
					else ds.style.opacity = (102 - r) / 100;
				}
			}
		}
		
		
		onload = function() {
			resize();
			for (i=0; i<Nb; i++) object[i] = new makedoot(i);
			setInterval("for(i in object)object[i].Ge();", 16);
			if($.browser.version<7){
				$(document).pngFix();
			}
			$("#intro").css("display","block");
			$("#wrap").css("display","none");
			$("#intro").click(function(){
				$("#intro").fadeOut("slow",function(){
					$("#wrap").fadeIn("slow");
					$("body").css({"background":"url(imagenes/bg5.gif)","background-repeat":"repeat"});
				});
			});
		}