

function Tetra_ShowTOC(sLayerName,sNextToObject,intXOffset, intYOffset) {
	var obj = AQ_findObj(sLayerName);
	var objNextTo = AQ_findObj(sNextToObject);
	var x = intXOffset;
	var y = intYOffset;
	if (objNextTo) {
		x += parseInt(AQ_calcLeft(objNextTo));
		y += parseInt(AQ_calcTop(objNextTo));
	}
	if (obj) {
		if (obj.style) {
			obj.style.left = x +'px';
			obj.style.top = y + 'px';
			obj.style.visibility = "visible";
		} else {
			obj.left = x +'px';
			obj.top = y +'px';
			obj.visibility = 'visible';
		}
	}

	return false;
}


function Tetra_HideTOC(sLayerName) {
	var obj = AQ_findObj(sLayerName);
	if (obj) {
		if (obj.style) {
			obj.style.visibility = "hidden";
		} else {
			obj.visibility = 'hidden';
		}
	}
	return false;
}


function test(arg)
{
		alert(arg);
}

function resizeWindow() {
	var obj = AQ_findObj('Tetra_TOC');
	if (obj.style.visibility == "visible") Tetra_ShowTOC('Tetra_TOC','TOC',0,0);
	
	
}

function URLencode(sStr) {
 sStr = escape(sStr)
    sStr.replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\//g,'%2F');
  return sStr
  }


function emailPage(sURL, sQueryString) {
	sURL = sURL + URLencode(sQueryString);
	window.open(sURL,"emailPage","width=655px,height=400px,toolbars=yes,scrollbars=yes,resizable=yes,menubar=yes");
}

window.onresize = resizeWindow;