var ns6=document.getElementById&&!document.all;
var ie=document.all;

function ie_calculateOffset(el, dir) {
	var offset;
	offset=0;
	if ( el.offsetParent ) {
		offset = ie_calculateOffset( el.offsetParent, dir );
	}
	if (dir == 'x') {
		return offset + el.offsetLeft;
	} else if (dir == 'y') {
		return offset + el.offsetTop;
	} else {
		return 0;
	}

}



function getRightDisplayLimit() {
	if (ie)
	{
		return  document.body.offsetWidth > 780 ? 780 + (document.body.offsetWidth-780)/2 : 780  ;
	} else if (ns6) {
		return  document.body.offsetWidth > 800 ? 800 + (document.body.offsetWidth-800)/2 : 800  ;
	}
}


function openWin(link, width, height ) {
	window.open(link, "popup", "width="+width+",height="+height+",scrollbars=0,resize=0,menu=0");
	return false;
}