function getWindowParams() 
{
	this.width = 100;
	if(window.innerWidth) this.width = window.innerWidth; // Mozilla, Opera, NN4
	else if(document.documentElement && document.documentElement.clientWidth)
	{ // eLe¦ IE
		this.width = document.documentElement.clientWidth;
	}
	else if(document.body && document.body.clientWidth)
	{
		this.width = document.body.clientWidth;
	}
	
	this.height = 100;
	if(window.innerHeight) this.height =  window.innerHeight; // Mozilla, Opera, NN4
	else if(document.documentElement && document.documentElement.clientHeight)
	{ // eLe¦ IE
		this.height =  document.documentElement.clientHeight;
	}
	else if(document.body && document.body.clientHeight)
	{
		this.height = document.body.clientHeight;
	}
	
	this.scrollX = 0;
	if(window.scrollX) this.scrollX = window.scrollX; // Moziila
	if(window.pageXOffset) this.scrollX = window.pageXOffset; // Opera, NN4
	if(document.documentElement && document.documentElement.scrollLeft)
	{ // eLe¦ IE
		this.scrollX = document.documentElement.scrollLeft;
	}
	else if(document.body && document.body.scrollLeft)
	{
		this.scrollX = document.body.scrollLeft;
	}
	
	this.scrollY = 0;
	if(window.scrollY) this.scrollY = window.scrollY; // Mozilla
	if(window.pageYOffset) this.scrollY = window.pageYOffset; // Opera, NN4
	if(document.documentElement && document.documentElement.scrollTop)
	{ // eLe¦ IE
		this.scrollY = document.documentElement.scrollTop;
	}
	else if(document.body && document.body.scrollTop)
	{
		this.scrollY = document.body.scrollTop;
	}

	this.centerLeft = Math.floor(this.width / 2) + this.scrollX;
	this.centerTop = Math.floor(this.height / 2) + this.scrollY;

	return this;
}

function getEl(objID)
{
	this.obj = document.getElementById? document.getElementById(objID): document.all? document.all[objID]: document.layers? eval("document.layers." +objID): null;
	this.getSize();
	this.visible = false;
	return this;
}

getEl.prototype.getSize = function()
{
	this.width = document.layers? this.obj.clip.width : (this.obj.offsetWidth||this.obj.style.pixelWidth||0);
	this.height = document.layers? this.obj.clip.height:(this.obj.offsetHeight||this.obj.style.pixelHeight||0);
}

getEl.prototype.setPos = function(left, top)
{
	if (this.obj != null)
	{
		if(document.layers) // NN4
		{
			this.obj.moveTo(left, top);
		}
		else if (typeof this.obj.style.left != "undefined" && typeof this.obj.style.left == "string") // IE5+, Mozilla, Opera 7
		{
			this.obj.style.left = left;
			this.obj.style.top = top;
		}
		else if(typeof this.obj.style.pixelLeft!="undefined") // IE4, Opera 6
		{
			this.obj.style.pixelLeft = left;
		    this.obj.style.pixelTop = top;
		}
		else
		{
			this.obj.left = left;
			this.obj.top = top;
		}
	}
}

getEl.prototype.show = function()
{
	if (!this.visible && this.obj != null)
	{
		(this.obj.style||this.obj).visibility=(window.opera && !document.documentElement)?'visible':'inherit';
		this.visible = true;
	}
}

getEl.prototype.hide = function()
{
	if (this.visible && this.obj != null)
	{
		(this.obj.style||this.obj).visibility = 'hidden';
		this.visible = false;
	}
}

var popupObj = null;

function movePollPopup()
{
	var WindowSize = new getWindowParams();
	if (popupObj == null)
		popupObj = new getEl('pollpopup');
	if (popupObj.visible && popupObj.obj != null)
	{
		popupObj.setPos(WindowSize.centerLeft - popupObj.width / 2, WindowSize.centerTop - popupObj.height / 2);
	}
}
function showPollPopup()
{
	var WindowSize = new getWindowParams();
	if (popupObj == null)
		popupObj = new getEl('pollpopup');
	if (popupObj.obj != null)
	{
		popupObj.show();
		popupObj.setPos(WindowSize.centerLeft - popupObj.width / 2, WindowSize.centerTop - popupObj.height / 2);
	}
//	setTimeout('hidePollPopup()', 10000);
}
function hidePollPopup()
{
	if (popupObj == null)
		popupObj = new getEl('pollpopup');
	if (popupObj.obj != null)
		popupObj.hide();
}