<!--
// (c) 2000,2008 bernd.gassner@web.de
//
// www.dataparx.com
//
// You may not use, distribute or reproduce this code
// without written permission of the author.

function move(layerName, dx, dy) {
	// position (0,0) not supported
	if (document.all &&  document.all[layerName]) {
		if (dx) document.all[layerName].style.left = dx;
		if (dy) document.all[layerName].style.top = dy;
	} else if (document.layers &&  document.layers[layerName]) {
		if (!dx) dx = document.layers[layerName].left;
		if (!dy) dy = document.layers[layerName].top;
		document.layers[layerName].moveTo(dx, dy);
	} 
}

function moveAbsolute(layerName, dx, dy) {
	move(layerName, dx, dy);
}

function moveRelative(layerName, dx, dy) {
	// position (0,0) not supported
	if (document.all &&  document.all[layerName]) {
		if (dx) document.all[layerName].style.left += dx;
		if (dy) document.all[layerName].style.top += dy;
	} else if (document.layers &&  document.layers[layerName]) {
		if (!dx) dx = document.layers[layerName].left;
		if (!dy) dy = document.layers[layerName].top;
		document.layers[layerName].moveBy(dx, dy);
	} 
}

function invisible(layerName) {
	if (document.all &&  document.all[layerName]) {
		document.all[layerName].style.visibility = "hidden";
	} else if (document.layers &&  document.layers[layerName]) {
		document.layers[layerName].visibility = "hidden";
	} 
}

function invisibleAll(layerNames) {
	for (i = 0; i < layerNames.length; i++) {
		invisible(layerNames[i]);
	}
}

function visible(layerName) {
	if (document.all &&  document.all[layerName]) {
		document.all[layerName].style.visibility = "visible";
	} else if (document.layers &&  document.layers[layerName]) {
		document.layers[layerName].visibility = "visible";
	} 
}

function visibleAll(layerNames) {
	for (i = 0; i < layerNames.length; i++) {
		visible(layerNames[i]);
	}
}


function getWidth() {
	if (document.all && document.all.body) {
		// assume <body id=body> tag 
		return document.all.body.offsetWidth;
	} else if (window.innerWidth) {
		return window.innerWidth;
	}
	return 720; // ..920
}

function getHeight() {
	if (document.all && document.all.body) {
		// assume <body id=body> tag 
		return document.all.body.offsetHeight;
	} else if (window.innerHeight) {
		return window.innerHeight;
	}
	return 540; //..690
}
//-->

