function openWindow(URL, winName, width, height){

	if(height=='' || !height)
	height=screen.height/2
	height_factor = ((screen.height/100)*85)
	if(height>=height_factor)
		height=height_factor;


	if(width=='' || !width)
		width=screen.width/2
	width_factor = ((screen.width/100)*95)
	if(width>=width_factor)
		width=width_factor;

	var top=((screen.height-height)/2)-(screen.height/20)
	var left=(screen.width - width) / 2 ;

		win=window.open(URL, winName, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=2,resizable=1,copyhistory=0,width='+width+',height='+height+',top='+top+',left='+left+'');
		win.resizeTo(width, height);
		win.moveTo(left, top);
		win.focus();
}

function CheckEmail(src) {
     var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
     var regex = new RegExp(emailReg);
     return regex.test(src);
}

function placeDiv()
{
	if(document.all)
	{
		poll.style.left=(document.body.clientWidth-770)/2;
		poll.style.visiblity="visible";
	}
	else
	{
		poll.style.left=(window.innerWidth-770)/2;
		poll.style.visiblity="visible";
	}
	return true;
}

