//<script>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.mac = (this.version.indexOf("Macintosh")>0)
	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()
function lObj(id,nestref){
	if (is.ie){
		this.cs = document.all[id];
		this.css = document.all[id].style;
		this.x = this.cs.offsetLeft;
		this.y = this.cs.offsetTop;
		this.w = (is.ie4)? this.css.pixelWidth : this.cs.offsetWidth
		this.h = (is.ie4)? this.css.pixelHeight : this.cs.offsetHeight
	} else if (is.ns4){
		this.css = (nestref)? eval("document."+nestref+".document."+id) : document.layers[id];
		this.cs = this.event = this.css
		this.x = this.css.left;
		this.y = this.css.top;
		this.w = this.css.clip.width;
		this.h = this.css.clip.height;
	} else if (is.ns5){
		this.cs = document.getElementById(id)
		this.css = document.getElementById(id).style
		this.x = this.cs.offsetLeft
		this.y = this.cs.offsetTop
		this.w = this.cs.offsetWidth
		this.h = this.cs.offsetHeight
	}
	this.active = 0
	this.obj = id+"something"
	eval(this.obj + "=this")
	this.moveTo = lMoveTo	this.moveBy = lMoveBy
	this.show = lShow
	this.fondo = lfondo
	this.clipTo = lclipTo
	this.replace = lreplace	this.resizeTo = lResizeTo
	this.slideTo = lSlideTo
	this.slideStart = lSlideStart
	this.slide = lSlide}
function lMoveTo(x,y) {
	if (x!=null) {
		this.x = x
		if (is.ns4 || is.ns5) this.css.left = this.x
		else this.css.pixelLeft = this.x
	}
	if (y!=null) {
		this.y = y
		if (is.ns4 || is.ns5) this.css.top = this.y
		else this.css.pixelTop = this.y
	}
}function lMoveBy(x,y) {
	this.moveTo(this.x+x,this.y+y)
}
function lShow(x){
	if (x == -1){
		this.css.visibility = "inherit";
		return;
	}
	if (x) this.css.visibility = (is.ie || is.ns5)? "visible" : "show";
	else this.css.visibility = (is.ie || is.ns5)? "hidden" : "hide";
}
function lfondo(c){	if(c!=null)	{	if (is.ns4) this.css.document.bgColor = c;
		else this.css.backgroundColor = c;
	}
	else
	{	if (is.ns4) this.css.document.bgColor = null;
		else this.css.backgroundColor = 'transparent';
	}
}
function lclipTo(mt,mr,mb,ml){
	if (is.ns4){
		this.css.clip.top = mt;
		this.css.clip.right = mr;
		this.css.clip.bottom = mb;
		this.css.clip.left = ml;
	} else {
		t = mt;
		r = mr;
		b = mb;
		l = ml;
		it="rect("+t+"px "+r+"px "+b+"px "+l+"px)";
		this.css.clip = it;
	}
}
function lreplace(html){
	if (is.ns4) {
		this.css.document.open()
		this.css.document.write(html)
		this.css.document.close()
	} else {
		this.cs.innerHTML = html;
	}
}
function lResizeTo(w,h){
	if (w!=null){
		this.w = w;
		if (is.ns4) this.css.clip.width = this.w;		else this.css.width = this.w;	}
	if (h!=null){
		this.h = h; 
		if (is.ns4) this.css.clip.height = this.h;		else this.css.height = this.h;	}	if (is.ie || is.ns5) this.css.clip = "rect("+0+"px "+this.w+"px "+this.h+"px "+0+"px)";
}
function lSlideTo(endx,endy,inc,speed,fn){
	if (endx==null)	endx = this.x;
	if (endy==null) endy = this.y;
	var distx = endx-this.x;
	var disty = endy-this.y;
	this.slideStart(endx,endy,distx,disty,inc,speed,fn);
}
function lSlideStart(endx,endy,distx,disty,inc,speed,fn){
	if (this.active) return;
	var num = Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc;
	var dx = distx/num;
	var dy = disty/num;
	if (!fn) fn = null;
	this.active = true;
	this.slide(dx,dy,endx,endy,num,1,speed,fn)
}
function lSlide(dx,dy,endx,endy,num,i,speed,fn){
	if (!this.active) return;
	if (i++ < num){
		this.moveBy(dx,dy);
		setTimeout(this.obj+".slide("+dx+","+dy+","+endx+","+endy+","+num+","+i+","+speed+",\""+fn+"\")",speed);
	} else {
		this.active = false
		this.moveTo(endx,endy)
		eval(fn);
	}
}
function css(id,left,top,width,height,color,vis,z,other)
{
	if (id=="START") return '<STYLE TYPE="text/css">\n';
	else if (id=="END") return '</STYLE>';
	
	var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'
	if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;'
	if (arguments.length>=5 && height!=null)
	{
		str += ' height:'+height+'px;'
		if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'
	}
	if (arguments.length>=6 && color!=null) str += (document.layers)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'
	if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';'
	if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';'
	if (arguments.length==9 && other!=null) str += ' '+other
	str += '}\n'
	return str
}
function wCss(str,showAlert)
{	
	str = css('START')+str+css('END');
	document.write(str);
	if (showAlert) alert(str);
}

