//<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.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.layers['"+nestref+"'].document.layers['"+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.clipTo = lclipTo
	this.show = lShow
}
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 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 lShow(x){
	if (x) this.css.visibility = (is.ie || is.ns5)? "visible" : "show";
	else this.css.visibility = (is.ie || is.ns5)? "hidden" : "hide";
}
function css(id,left,top,width,height,up,len,down,right,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 && width!=null) str += ' height:'+height+'px;'
	if (arguments.length>=6 && (up!=null || len!=null || down!=null || right!=null))
	{	if (up==null) up='0'; if (down==null) down='0';
		str += ' clip:rect('+up+'px '+len+'px '+down+'px '+right+'px);';
	}
	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);
}
function initMouseEvents()
{	document.onmousedown = mouseDown; document.onmousemove = mouseMove; document.onmouseup = mouseUp;
	if (!document.all) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
}
function mouseDown(e) 
{	if ((!document.all && e.which!=1) || (document.all && event.button!=1)) return true;
	var x = (!document.all)? e.pageX : event.x+document.body.scrollLeft;
	var y = (!document.all)? e.pageY : event.y+document.body.scrollTop;
	if (!document.all && e.target!=document) routeEvent(e);
	if (Scroll && ScrollTestActive()) return false;
	else
	{	if (Drag && drag.mouseDown(x,y)) return false;
		else DynMouseDown(x,y);
	}
}
function mouseMove(e)
{	var x = (!document.all)? e.pageX : event.x+document.body.scrollLeft
	var y = (!document.all)? e.pageY : event.y+document.body.scrollTop
	if (!document.all && e.target!=document) routeEvent(e)
	if (Scroll && ScrollTestActive()) return false
	else if (Drag && drag.mouseMove(x,y)) return false
	else return DynMouseMove(x,y)
}
function mouseUp(e)
{	var x = (!document.all)? e.pageX : event.x+document.body.scrollLeft
	var y = (!document.all)? e.pageY : event.y+document.body.scrollTop
	if (!document.all && e.target!=document) routeEvent(e)
	if (Drag && drag.mouseUp(x,y)) return false
	else return DynMouseUp(x,y)
}

