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_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v>=5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.ie)
}
is = new BrowserCheck()

d=document;
op=navigator.userAgent.toLowerCase().indexOf('opera')!=-1;

function gE(e,f){
	if(is.ns4){	
	ef=f || self;
	var V=ef.document.layers;
		if(V[e])return V[e];
	for(var W=0;W<V.length;)
	t=gE(e,V[W++]);
	return t;
	}
	if(d.all)return d.all[e]
	return (d.getElementById(e));
	
}

function sE(e){
	if(is.ns4)e.visibility='show';
	else e.style.visibility='visible';
}

function hE(e){
	if(is.ns4)e.visibility='hide';
	else e.style.visibility='hidden';
}

function sZ(e,z){
	if(is.ns4)e.zIndex=z;
	else e.style.zIndex=z;
}

function sX(e,x){
	if(is.ns4)e.left=x;
	else if(op)e.style.pixelLeft=x;
	else e.style.left=x;
}

function sY(e,y){
	if(is.ns4)e.top=y;
	else if(op)e.style.pixelTop=y;
	else e.style.top=y;
}

function sW(e,w){
	if(is.ns4)e.clip.width=w;
	else if(op)e.style.pixelWidth=w;
	else e.style.width=w;
}

function sH(e,h){
	if(is.ns4)e.clip.height=h;
	else if(op)e.style.pixelHeight=h;
	else e.style.height=h;
}

function sC(e,t,r,b,x){
	if(is.ns4){
	X=e.clip;
	X.top=t;
	X.right=r;
	X.bottom=b;
	X.left=x;
	}
	else e.style.clip='rect('+t+' '+r+' '+b+' '+x+')';
}

function wH(e,h){
	if(is.ns4){
	Y=e.document;
	Y.write(h);
	Y.close();
	}
	if(e.innerHTML)e.innerHTML=h;
}



eS=[]
function slide() { // usage: slide( object, startX, startY, stopX, stopY, Speed )
	if(typeof(arguments[0])=="object"){
	eS[eN=eS.length]=arguments[0];
	sE(eS[eN]);
	x1=arguments[1];
	y1=arguments[2];
	x2=arguments[3];
	y2=arguments[4];
	sp=arguments[5]
	}
	else{
	x1=arguments[0];
	y1=arguments[1];
	x2=arguments[2];
	y2=arguments[3];
	sp=arguments[4];
	eN=arguments[5]
	}
	eS[eN].y=y1;
	eS[eN].x=x1;
	ys=(eS[eN].y<y2)?1:-1;
	xs=(eS[eN].x<x2)?1:-1
	sp=sp||7
	yI=Math.ceil(Math.abs(y2-eS[eN].y)/(11-sp))
	xI=Math.ceil(Math.abs(x2-eS[eN].x)/(11-sp))
	sX(eS[eN],(eS[eN].x+=(xs*xI))+(!op?'px':0))
	sY(eS[eN],(eS[eN].y+=(ys*yI))+(!op?'px':0))
	
	if(btwn(y1,eS[eN].y,y2)||btwn(x1,eS[eN].x,x2))
		setTimeout("slide("+eS[eN].x+","+eS[eN].y+","+x2+","+y2+","+sp+","+eN+")", 30)
}
function btwn(x,n,y){ return(Math.min(x,y)<n && n<Math.max(x,y)) }


function findW(){
	if (is.ns) {
	pantalla= window.innerWidth;
		if (pantalla>796){
		flash='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="1003" height="152" hspace="0" vspace="0" align="top" border="0"><param name=movie value="img/home1024.swf"><param name=quality value=high><embed src="img/home1024.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1003" height="152" vspace="0" hspace="0" border="0" align="top"></embed></object>'
		}
		if (pantalla<=796){
		flash='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="780" height="152"><param name=movie value="img/home.swf"><param name=quality value=high><embed src="img/home.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="780" height="152"></embed></object>'
		}
	}
	if (is.ie) {
	pantalla= document.body.offsetWidth-20;
		if (pantalla>780){
		flash='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="1003" height="152" hspace="0" vspace="0" align="top" border="0"><param name=movie value="img/home1024.swf"><param name=quality value=high><embed src="img/home1024.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1003" height="152" vspace="0" hspace="0" border="0" align="top"></embed></object>'
		}
		if (pantalla<=780){
		flash='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="780" height="152"><param name=movie value="img/home.swf"><param name=quality value=high><embed src="img/home.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="780" height="152"></embed></object>'
		}
	}
	}

function findW2(){
	if (is.ns) {
	pantalla= window.innerWidth;
		if (pantalla>796){
		flash='<img src="img/tira_1024.jpg" border="0">'
		}
		if (pantalla<=796){
		flash='<img src="img/tira_800.jpg" border="0">'
		}
	}
	if (is.ie) {
	pantalla= document.body.offsetWidth-20;
		if (pantalla>780){
		flash='<img src="img/tira_1024.jpg" border="0">'
		}
		if (pantalla<=780){
		flash='<img src="img/tira_800.jpg" border="0">'
		}
	}
	}	

	
	

