function gGetObject(id) {
	return document.getElementById(id);
}

leftAttributes = new Array();
leftAttributes[0] = '.style.pixelLeft';
leftAttributes[1] = '.style.left';

topAttributes = new Array();
topAttributes[0] = '.style.pixelTop';
topAttributes[1] = '.style.top';

clientWidthAttributes = new Array();
clientWidthAttributes[0] = 'document.body.clientWidth';
clientWidthAttributes[1] = 'window.innerWidth';

visibilityAttributes = new Array();
visibilityAttributes[0] = '.style.visibility';
visibilityAttributes[1] = '.visibility';

function gSetPixelLeft(id, x) { 
	for(leftAttributeCtr=0; leftAttributeCtr<leftAttributes.length; leftAttributeCtr++)
		eval('gGetObject("'+id+'")'+leftAttributes[leftAttributeCtr]+' = '+x);
}

function gSetPixelTop(id, y) {
	for(topAttributeCtr=0; topAttributeCtr<leftAttributes.length; topAttributeCtr++)
		eval('gGetObject("'+id+'")'+topAttributes[topAttributeCtr]+' = '+y);
}

function gSetPixelPos(id, x, y) {
	gSetPixelLeft(id, x);
	gSetPixelTop(id, y);
}

function gGetClientWidth() {
	width = 0;
	for(clientWidthIndex=0; clientWidthIndex<clientWidthAttributes.length; clientWidthIndex++) {
		eval('width = '+clientWidthAttributes[clientWidthIndex]);
		if(width != 0) break;
	}
	return width;
}

function gSetVisibility(id, visibility1) {
	if(visibility1) value = '"visible"';
	else value = '"hidden"';
	for(visibilityCtr=0; visibilityCtr<visibilityAttributes.length; visibilityCtr++)
		eval('gGetObject("'+id+'")'+visibilityAttributes[visibilityCtr]+' = '+value);
}