function Memo() {this.container = new Array();this.number = 0;}

function Memo_add() {this.number += 1; this.container[this.number] = new Object();return this.number}

function Memo_getref(n) {return this.container[n];}

function Memo_release(n) {this.container[n] = null;}

Memo.prototype.add = Memo_add;
Memo.prototype.getref = Memo_getref;
Memo.prototype.release = Memo_release;

var mem = new Memo();

function writeLayer(obj,content)
{
	if (br.nav4up) 
	{
		obj.document.open();
		obj.document.write(content);
		obj.document.close();
	}
	if (br.ie4up)
	{
		obj.innerHTML = content;
	}
}


function clipLayer(obj,x,y,width,height) 
{
	var bottom = y+height;
	var right = x+width;
	if (br.nav4up) 
	{
		obj.clip.top = y;
		obj.clip.left = x;
		obj.clip.bottom = bottom;
		obj.clip.right = right;
	} 
	if (br.ie4up) 
	{
		obj.style.clip = 'rect('+y+','+right+','+bottom+','+x+')';
	}
}


function setChildImage(obj,iname,src)
{
	if (br.nav4up){obj.document.images[iname].src = src;}
	if (br.ie4up){document.images(iname).src = src;}
}

function setChildImageHeight(obj,iname,height)
{
	if (br.nav4up){obj.document.images[iname].height = height;}
	if (br.ie4up){document.images(iname).height = height}
}


function loadLayer(obj,url)
{
	if (br.nav4up) 
	{
//		obj.src = url;
		writeLayer(obj,'<layer src="'+url+'"></layer>');		
	}
	if (br.ie4up)
	{
		writeLayer(obj,'<iframe scrolling="no" height="500" width="500" src="'+url+'"></iframe>');
	}
}

function LayerObject(obj)
{
	this.obj = obj;
	this.id = getObjID(obj);
	this.left = getObjLeft(obj);
	this.top = getObjTop(obj);
	this.width = getObjWidth(obj);
	this.height = getObjHeight(obj);
}


function setObjPos(obj, x, y,fn) {if (br.nav4up) {obj.left = x;obj.top = y;} else {obj.style.pixelLeft = x;obj.style.pixelTop = y;} if (fn){eval(fn+";");}}

function shiftObjPos(obj,dx,dy) {if (br.nav4up) {obj.left += dx;obj.top += dy;} else {obj.style.pixelLeft = obj.offsetLeft + dx;obj.style.pixelTop = obj.offsetTop + dy;}}

function getObjLeft(obj) {return (br.nav4up ? obj.left : (br.ie5up ? obj.offsetLeft : obj.style.pixelLeft))}
function getObjTop(obj) {return (br.nav4up ? obj.top : (br.ie5up ? obj.offsetTop : obj.style.pixelTop))}

function getObjWidth(obj) {return (br.nav4up ? obj.clip.width : (br.ie5up ? obj.offsetWidth : obj.style.pixelWidth))}
function getObjHeight(obj) {return (br.nav4up ? obj.clip.height : (br.ie5up ? obj.offsetHeight : obj.style.pixelHeight))}
function getObjcliWidth(obj) {return (br.nav4up ? obj.clip.width : obj.clientWidth)}
function getObjcliHeight(obj) {return (br.nav4up ? obj.clip.height : obj.clientHeight)}

function setObjWidth(obj,width) { if (br.nav4up) {obj.clip.width = width} else {obj.style.pixelWidth = width}}
function setObjHeight(obj,height) {if (br.nav4up) {obj.clip.height = height} else {obj.style.pixelHeight = height}}

function getObjMiddleX(obj) {return (br.nav4up ? obj.left+obj.clip.width / 2 : getObjLeft(obj)+getObjWidth(obj) / 2)}
function getObjMiddleY(obj) {return (br.nav4up ? obj.top+obj.clip.height / 2 : getObjTop(obj)+getObjHeight(obj) / 2)}

function show(l) {rls(l).visibility = br.nav4up ? "show" : "visible";}
function hide(l) {rls(l).visibility = br.nav4up ? "hide" : "hidden";}

function getObjID(obj) {return(br.nav4up ? obj.name : obj.id)}

function showObj(obj,fn) {if (br.nav4up) {obj.visibility = "show";} else {obj.style.visibility = "visible";}if (fn)	eval(fn+";");}
function hideObj(obj,fn) {if (br.nav4up) {obj.visibility = "hide";} else {obj.style.visibility = "hidden";}if (fn)	eval(fn+";");}

