var oldObj;
var oldMenu;
var oldImg;
var oldStyle ;
var oldImgSrc;

function LayerHandler(str_o, m) {
	o = document.getElementById(str_o);

	if (oldMenu == m) {
		return;
	}

	o.style.display = "block";
	o.style.left = subLayerLeft;

	if (typeof(oldObj) != "undefined" && oldObj != null) {
		oldObj.style.display = "none";
		if (m != null) {
			oldImg.src = oldImgSrc;
			oldMenu.style.cssText = oldStyle;
		}
	}

	if (m != null) {
		oldStyle = m.style.cssText;
		m.style.cssText = "text-decoration:underline;color:black;font-weight:bold;";
		imgObj = m.firstChild;
		oldImgSrc = imgObj.src;
		try {
			imgObj.src = oldImgSrc.replace(/\.gif/i,"_1.gif");
		}
		catch(e) {}
	}

	if (oldObj == o) {
		oldObj = null;
		oldMenu = null;
		oldImg = null;
	}
	else {
		oldObj = o;
		if (m != null) {
			oldMenu = m;
			oldImg = imgObj;
		}
	}
	self._cartoon.location.href = "about:blank";
}


function SetLayerPosition() {
	cW = document.body.clientWidth;
	cH = document.body.clientHeight;
	oH = document.body.offsetHeight;
	sH = document.body.scrollHeight;
	sT = document.body.scrollTop;

	subLayerLeft = (cW / 2) - (tableWidth / 2);
	subLayerLeft = (subLayerLeft < 2) ? 2 : subLayerLeft;

	if (typeof(oldObj) != "undefined" && oldObj != null) {
		oldObj.style.left = subLayerLeft;
	}
}


function SetNavigatorPosition() {
	
}


function MovePage(o) {
	tmp = document.frm1.cartoon_target;
	for (i=0; i<tmp.length; i++)
	{
		if (tmp[i].checked)
		{
			pageTarget = tmp[i].value;
			break;
		}
	}
	o.target = pageTarget;
	wobj = top.frames[pageTarget];
	self._cartoon.location.href = "about:blank";
	try
	{
		wobj.name = pageTarget;
	}
	catch (ex) {}
}

function OpenCartoon()
{
	if (pageTarget != "_dgdBody")
	{
		window.open("about:blank", pageTarget, "toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes");
	}
}