var opc = undefined;
function eid(a,b){
	return(document.forms[a].elements[b]);
}
function gid(a){
	return(document.getElementById(a));
}
function mid(a){
	var _1 = a.src.split('_');
	return(_1[1]);
}
function isdiv(a){
	return(typeof a != 'undefined' && a.tagName == 'DIV');
}
function over(a,b){
	if(isdiv(b))
		b.style.display='inline';
	if(opc == a)
		return;
	return(a.src= 'imagenes/verde_'+mid(a));
}
function out(a,b){
	if(isdiv(b))
		b.style.display='none';
	if(opc == a)
		return;
	return(a.src= 'imagenes/gris_'+mid(a));
}
function go(a,b){
	if(typeof opc == 'object' && opc != a){
		opc.src= 'imagenes/gris_'+mid(opc);
	}
	if(b != 'undefined'){
		parent.document.getElementById('cont').src = b;
	}
	opc = a;
}
function posX(a){
	var curleft = 0;
	if(a.offsetParent){
		while(a.offsetParent){
			curleft += a.offsetLeft;
			a = a.offsetParent;
		}
	} else if(a.x){
		curleft += a.x;	
	}
	return curleft;
}
function posY(a){
	var curtop = 0;
	if(a.offsetParent){
		while(a.offsetParent){
			curtop += a.offsetTop;
			a = a.offsetParent;
		}
	}	else if(a.y){
		curtop += a.y;
	}	
	
	return curtop;
}
function pos(a,b,c){
	a.style.top = b+'px';
	a.style.left = c+'px';
}
function BrowserDetect() {
   var ua = navigator.userAgent.toLowerCase(); 
   // browser engine name
   this.isGecko       = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
   this.isAppleWebKit = (ua.indexOf('applewebkit') != -1);
   // browser name
   this.isKonqueror   = (ua.indexOf('konqueror') != -1); 
   this.isSafari      = (ua.indexOf('safari') != - 1);
   this.isOmniweb     = (ua.indexOf('omniweb') != - 1);
   this.isOpera       = (ua.indexOf('opera') != -1); 
   this.isIcab        = (ua.indexOf('icab') != -1); 
   this.isAol         = (ua.indexOf('aol') != -1); 
   this.isIE          = (ua.indexOf('msie') != -1 && !this.isOpera && (ua.indexOf('webtv') == -1) ); 
   this.isMozilla     = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
   this.isFirefox     = (ua.indexOf('firefox/') != -1 || ua.indexOf('firebird/') != -1);
   this.isNS          = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
}



function init(){
	var b = new BrowserDetect();
	var x =posY(gid('b1'));
	var y =posX(gid('b1'))+10;

	if(b.isGecko){
		x -= 5;
		y -= 5;
	}

	pos(gid('m1'),x,y);
}