var app = navigator.appName;
// Function: winH()
// Return window height
function winH() {
	if(window.innerHeight!==undefined)
		winDim = [window.innerWidth,window.innerHeight]; 
	else {
		var D = (document.body.clientWidth)?document.body:document.documentElement;
		winDim = [D.clientWidth,D.clientHeight];
	}
	return winDim[1];
}

// Function: winW()
// Return window W
function winW() {
	if(window.innerHeight!==undefined)
		winDim = [window.innerWidth,window.innerHeight]; 
	else {
		var D = (document.body.clientWidth)?document.body:document.documentElement;
		winDim = [D.clientWidth,D.clientHeight];
	}
	return winDim[0];
}

// Function: getX()
function getX(elem) {
	var obj = (typeof(elem) == 'string')?document.getElementById(elem):elem;
	var curleft = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft;
		while (obj = obj.offsetParent) 
			curleft += obj.offsetLeft
	}
	return curleft;
}

// Function getY()
function getY(elem) {
	var obj = (typeof(elem) == 'string')?document.getElementById(elem):elem;
	var curtop = 0;
	if (obj.offsetParent) {
		curtop = obj.offsetTop;
		while (obj = obj.offsetParent) 
			curtop += obj.offsetTop;
	}
	return curtop;
}

// Function: setX(elem,x)
function setX(elem,x) {
	var obj = (typeof(elem) == 'string')?document.getElementById(elem):elem;
	if(app.indexOf("Microsoft")!=-1) obj.style.left = x;
	else obj.style.left = x+"px";
}

// Function: setY(elem,y)
function setY(elem,y) {
	var obj = (typeof(elem) == 'string')?document.getElementById(elem):elem;
	if(app.indexOf("Microsoft")!=-1) obj.style.top = y;
	else obj.style.top = y+"px";
}

// Function: setW(elem,w)
function setW(elem,w) {
	var obj = (typeof(elem) == 'string')?document.getElementById(elem):elem;
	if(app.indexOf("Microsoft")!=-1) obj.style.width = w;
	else obj.style.width = w+"px";
}

// Function: getW(elem)
function getW(elem) {
	var obj = (typeof(elem)=='string')?document.getElementById(elem):elem;
	return obj.offsetWidth;
}

// Function: setH()
function setH(elem,h) {
	var obj = (typeof(elem)=='string')?document.getElementById(elem):elem;
	if(app.indexOf("Microsoft")!=-1) obj.style.height = h;
	else obj.style.height = h+"px";
	
}

// Function: getH(elem)
function getH(elem) {
	var obj = (typeof(elem)=='string')?document.getElementById(elem):elem;
	return obj.style.height;
}