function whichBw()	{
	this.ns = (document.layers)? true:false;
	this.ie = (document.all)?    true:false;
	return this;
}/*whichBw()*/

function pageObj(){
	this.x=0;this.x2=(bw.ns)? window.innerWidth : document.body.offsetWidth-20;
	this.y=0;this.y2=(bw.ns)? window.innerHeight: document.body.offsetHeight-5;
	this.x50= parseInt(this.x2/2); this.y50=parseInt(this.y2/2);

	this.width  = (bw.ns)? window.innerWidth : document.body.offsetWidth-20
	this.height = (bw.ns)? window.innerHeight : document.body.offsetHeight-5

	return this;
}/*pageObj()*/

function makeLiquid() {
	if ((bw.ns && (bw.pageObj.width!=window.innerWidth || bw.pageObj.height!=window.innerHeight)) || bw.ie)
	history.go(0)
}/*makeLiquid()*/

function getRandNums(from,to){
//    temp = parseInt((Math.random() * (to-from)) + (from));
    temp = Math.round((Math.random() * (to-from)) + (from));
	return temp;
}/*getRandNums()*/

function getRandColor()	{
var htmlCode = new Array()
var colorCode = "#";
	for(var i=0;i<6;i++)	{
		htmlCode[i] = getRandNums(0,15);
		switch(htmlCode[i])	{
			case 10:
				htmlCode[i]	= "a";
				break;
			case 11:
				htmlCode[i]	= "b";
				break;
			case 12:
				htmlCode[i]	= "c";
				break;
			case 13:
				htmlCode[i]	= "d";
				break;
			case 14:
				htmlCode[i]	= "e";
				break;
			case 15:
				htmlCode[i]	= "f";
				break;
		}	
		
		colorCode += htmlCode[i];
	}

	return colorCode;	
}/*getRandColor()*/
function showHide(obj,show)	{
var v = '';
	if(show)
		v = (bw.ns)? "show":"visible";
	else	{
		v = (bw.ns)? "hide":"hidden";
	}
	obj.css.visibility = v;
}/*showHide()*/

function setClip(obj,t,r,b,l)	{
	if(bw.ns)	{
		obj.css.clip.top    = t;
		obj.css.clip.right  = r;
		obj.css.clip.bottom = b;
		obj.css.clip.left   = l;
	}
	else	{
		obj.css.clip = "rect("+t+","+r+","+b+","+l+")";
	}

}/*setClip()*/

function bgChange(obj,color){
	if(bw.ns)
		obj.css.bgColor = color;
	else
		obj.css.backgroundColor = color;
}/*bgChange()*/

function colorChange(obj,color){
	obj.css.color = color;
}/*colorChange()*/


function bgImgChange(obj,src){
	if(bw.ns)
		obj.css.background.src = src;
	else
		obj.css.backgroundImage = 'url('+src+')';
}/*bgImgChange()*/

function updateHTML(obj,txt)	{

	if(bw.ns)	{
		whichExp = eval("document.layers." + obj.name)
        whichExp.document.open();
		whichExp.document.write(txt);
		whichExp.document.close();
	}
	else	{
		whichExp = eval("document.all." + obj.name);
		whichExp = eval(obj.name);
		whichExp.innerHTML = txt;
	}

}/*updateHTML()*/