//---[ Get Object Height ]----------------------------------------------------------------
function getHeight(object) {
	if (object) {
		if (object.clientHeight) {
			return parseInt(object.clientHeight);
		}else if (window.getComputedStyle(object,null).getPropertyValue('height')) {
			return parseInt(window.getComputedStyle(object,null).getPropertyValue('height')) + parseInt(window.getComputedStyle(object,null).getPropertyValue('padding-top')) + parseInt(window.getComputedStyle(object,null).getPropertyValue('padding-bottom'));
		}
	}
	return 0;
}

//---[ Get Object Width ]-----------------------------------------------------------------
function getWidth(object) {
	if (object) {
		if (object.clientWidth) {
			return parseInt(object.clientWidth);
		}else if (window.getComputedStyle(object,null).getPropertyValue('width')) {
			return parseInt(window.getComputedStyle(object,null).getPropertyValue('width')) + parseInt(window.getComputedStyle(object,null).getPropertyValue('padding-left')) + parseInt(window.getComputedStyle(object,null).getPropertyValue('padding-right'));
		}
	}
	return 0;
}

//---[ Open a new window ]----------------------------------------------------------------
function openawindow(url, scrollbars) {
	if (isNaN(window.screenLeft)) {
		var offsetX = 0;
		var offsetY = 0;
	}else{
		var offsetX = window.screenLeft;
		var offsetY = window.screenTop;
	}
	var AWindow=window.open(url,"win","resizable=no,scrollbars="+scrollbars+ ",status=0,menubar=no,left="+(offsetX + 75)+ ",top="+(offsetY + 50)+ ",height=300,width=500");
	if (parseInt(navigator.appVersion)>=3) AWindow.focus();
}

//---[ Open a new window ]----------------------------------------------------------------
function openabigwindow(url, scrollbars,width) {
	if (isNaN(window.screenLeft)) {
		var offsetX = 0;
		var offsetY = 0;
	}else{
		var offsetX = window.screenLeft;
		var offsetY = window.screenTop;
	}
	var AWindow=window.open(url,"win","resizable=no,scrollbars="+scrollbars+ ",status=0,menubar=no,left="+(offsetX + 10)+ ",top="+(offsetY + 10)+ ",height=300,width="+width);
	if (parseInt(navigator.appVersion)>=3) AWindow.focus();
}

//---[ Resize a window ]------------------------------------------------------------------
function winresize() {
	if (window.opener) {
		var o_tabel = (document.getElementById) ? document.getElementById("tabel") : document.all["tabel"];
		var t_height = getHeight(o_tabel) + 3;
		var w_height = (window.innerHeight) ? window.innerHeight : document.body.clientHeight;
		if (t_height > 0 && w_height > 0) {
			window.resizeBy(0, t_height - w_height);
		}
	}
}


