// JavaScript Document
// Функции для работы с клиентом
//							автор: Шевцов Евгений sitespring.ru
//
//	Список функций
//  ==============
//
// function getClientWidth() - получает ширину экрана браузера
// function getClientHeight() - получает высоту экрана браузера
// function getBodyScrollTop() - прокрутка от верха
// function getBodyScrollLeft() - прокрутка слева
// function getClientCenterX() - координата центра X
// function getClientCenterY() - координата центра Y

function getClientWidth()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}




function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}




function getBodyScrollTop()
{
	return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
}




function getBodyScrollLeft()
{
	return self.pageXOffset || (document.documentElement && document.documentElement.scrollLeft) || (document.body && document.body.scrollLeft);
}





function getClientCenterX()
{
	return parseInt(getClientWidth()/2);
}




function getClientCenterY()
{
	return parseInt(getClientHeight()/2);
}


