function checkBrowser(){
	this.win=(navigator.platform=="Win32")?1:0;
	this.mac=(navigator.platform=="MacPPC")?1:0;
	this.ns4 = (document.layers) ? true : false;
	this.ie4 = (document.all && !document.getElementById) ? true : false;
	this.ieDOM = (document.all && document.getElementById) ? true : false;
	this.ns6 = (navigator.product=='Gecko' && !window.GeckoActiveXObject) ? true : false;//Netscape 6 up - not 7.1
	this.ns7_1 = (window.GeckoActiveXObject) ? true : false;//Netscape 7.1 only (full active X control for WMP - same as IE)
	return this;
}

function objLayer(id) {
	/* object pointer */ 
	this.obj=document.getElementById(id);
	
	/* style reference */
	this.css=document.getElementById(id).style;

	if (bw.ieDOM) {this.x=this.css.pixelLeft; this.y=this.css.pixelTop; this.h=this.obj.scrollHeight; this.w=this.obj.scrollWidth}
	if (bw.ns6 || bw.ns7) {this.x=this.css.left; this.y=this.css.top; this.w=this.css.width; this.h=this.css.height;}
	/* mac variant */
	if (bw.mac && (bw.ie4 || bw.ieDOM)) {this.h=this.obj.clientHeight; this.w=this.obj.clientWidth}
	
	return this;
}

function obj_moveTo(x,y){
	this.x=x;
	this.y=y;
	this.css.left=this.x+"px";
	this.css.top=this.y+"px";
}

function obj_moveBy(x,y){
	this.x+=x;
	this.y+=y;
	this.css.left=this.x+"px";
	this.css.top=this.y+"px";
}

function obj_setSize(w,h) {
	this.css.width=w;
	this.css.height=h;
	this.w=w;
	this.h=h;
}

function obj_hide(){
	this.css.visibility='hidden';
}

function obj_show(){
	this.css.visibility='visible';
}

function obj_setZIndex(z){
	this.css.zIndex = z;
}

function obj_changeBackColor(c) {
	this.css.backgroundColor = c;
	this.css.bgColor = c;
}

function obj_clipTo(t,r,b,l){
	if(!bw.ieDOM){
		this.css.clip.top = t;
		this.css.clip.right = r;
		this.css.clip.bottom = b;
		this.css.clip.left = l;
	} else {
		this.css.clip="rect("+t+","+r+","+b+","+l+")";
	}
}

function obj_writeIt(t) {
	this.obj.innerHTML=t;
}

objLayer.prototype.moveTo=obj_moveTo;
objLayer.prototype.moveBy=obj_moveBy;
objLayer.prototype.hide=obj_hide;
objLayer.prototype.show=obj_show;
objLayer.prototype.setSize=obj_setSize;
objLayer.prototype.setZIndex=obj_setZIndex;
objLayer.prototype.changeBack=obj_changeBackColor;
objLayer.prototype.clipTo=obj_clipTo;
objLayer.prototype.writeIt=obj_writeIt;
