function openPage(url) {
    window.location=url;
}

function checkBrowser(){
this.ver=navigator.appVersion; this.agent=navigator.userAgent
this.dom=document.getElementById?1:0; this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0;
this.ie=this.ie4||this.ie5||this.ie6; this.mac=this.agent.indexOf("Mac")>-1
this.opera5=this.agent.indexOf("Opera 5")>-1; this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
this.ns4=(document.layers && !this.dom)?1:0; 
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom);
return this;
}
bw=new checkBrowser();

fromX=40;
fromY=-10;

function getObject(name) {
	newObj=document.getElementById(name); 
	return newObj;
}

function makeObj(obj){								
  this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
  this.wref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;		
	this.writeIt=b_writeIt;this.showIt=fShowIt;this.hideIt=fHideIt;
	this.setHeight=setObjHeight;this.setWidth=setObjWidth;
	this.getHeight=getObjHeight;this.getWidth=getObjWidth;													
	return this
}
function b_writeIt(text){if(bw.ns4){this.wref.write(text);this.wref.close()}
else this.wref.innerHTML=text}

function fShowIt(){
  this.css.display = "block";
  this.css.visibility = "visible"
}

function fHideIt(){
  this.css.display="none";
  this.css.visibility="hidden";
}

function getWinWidth() {
	bw=new checkBrowser();win=window;width=0;width=(bw.ns6)?win.innerWidth:win.document.body.clientWidth;return width;
}
function getWinHeight() {
	win=window;height=0;height=(bw.ns6)?win.innerHeight:win.document.body.clientHeight;return height;
}
function setObjWidth(newWidth) {nW=newWidth+"px";this.css.width=nW;}
function getObjWidth() {newWidth=parseInt(this.offsetWidth);return newWidth;}
function setObjHeight(newHeight) {nH=newHeight+"px";this.css.height=nH;}
function getObjHeight() {newHeight=parseInt(this.offsetHeight);return newHeight;}

function setImage(id, name) {
	img = getObject(id);
	if (img) {
		src = img.src;
		curImage = img.src.substring(img.src.lastIndexOf('/')+1, img.src.lastIndexOf('.'));
		
		src = src.replace(curImage, name);
		img.src = src;
	}
}
