function getObj(name) {
	if (document.getElementById) {
		if(document.getElementById(name)) {
			this.obj = document.getElementById(name);
			this.style = document.getElementById(name).style;
		}
	}
	else if (document.all) {
		if(document.all[name]) {
			this.obj = document.all[name];
			this.style = document.all[name].style;
		}
	}
	else if (document.layers) {
		if (document.layers[name]) {
			this.obj = document.layers[name];
			this.style = document.layers[name];
		}
	}
}


//------ resizer
function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}


function resizeContent(originalSize) {
	if(originalSize == undefined)
		iOriginalSize = null;
	else
		iOriginalSize = originalSize;
		
	//get objects
	oLeftContainer 	= new getObj('leftContainer');
	oRightContainer = new getObj('rightContainer');
	oContent 				= new getObj('content');
	
	//test to see if they exist	if(oLeftContainer.obj && oRightContainer.obj && oContent.obj && oContent.style) {
		//iLeftContainerY		= findPosY(oLeftContainer.obj);
		//iRightContainerY	= findPosY(oRightContainer.obj);
		
		//get sizes
		iOffset							= 20;
		iLeftContainerSize	= oLeftContainer.obj.offsetHeight;
		iRightContainerSize	= oRightContainer.obj.offsetHeight;
		iContentSize 				= oContent.obj.offsetHeight;

		if(iOriginalSize == null)
			iOriginalSize			= iContentSize;
		
		//choose the larger one
		iSize = Math.max(iLeftContainerSize, iRightContainerSize);
		iSize = Math.max(iSize, iOriginalSize);
		
		oContent.style.height = iSize + 'px';
		if(iOriginalSize != null)
			return iOriginalSize;

		return 0;
	}
}

function openClose(id) {
	if( !id )
		return;

	oBoxStyle = (new getObj(id)).style;
	if( !oBoxStyle )
		return;
	
	oBoxStyle.display = ( oBoxStyle.display == 'none' ) ? 'block' : 'none';
	btn = (new getObj(id + 'pic')).obj;
	
	var paths = btn.src.split('/');
	path = '';
	for(i = 0; i < paths.length - 1; i++)
		path += paths[i] + '/';
	
	imageString = paths[i];
	
	btn.src = path;
	btn.src += ( imageString == 'btn_plus.gif' ) ? 'btn_minus.gif' : 'btn_plus.gif';
	
	oFooter = (new getObj(id + 'ft')).obj;
	if( !oFooter )
		return;
	
	oFooter.className = ( oFooter.className == 'bottom' ) ? 'bottomC' : 'bottom';
	
}