// JavaScript Document
function OpenNewOverlay(id, id2){

document.getElementById(id).style.display = 'block';
document.getElementById(id2).style.display = 'block';
document.getElementById(id).style.position = 'absolute';

cw = document.body.clientWidth;
ch = document.body.clientHeight;

ow = document.getElementById(id).offsetWidth;
oh = document.getElementById(id).offsetHeight;

if(id == "votingAlertId1"){
	ow = 302;
	oh = 98;
	}
	
lt = (cw-ow)/2;
tp = (ch-oh)/2;
sw= document.body.scrollWidth;	
	
	if(oh>ch){
				document.getElementById(id).style.top = 20+'px';
				
				if(navigator.appName == "Microsoft Internet Explorer")
					{
					sh= document.body.scrollHeight;
					
					document.getElementById(id2).style.height = sh+'px';
					}	
			}
		else
			{
				document.getElementById(id).style.top = tp+'px';
				sh= document.body.scrollHeight;
				if(id == "votingAlertId1"){
					sh = sh+100;
					if(navigator.appName == "Microsoft Internet Explorer"){
						sh = sh+150;
						}
				}
				document.getElementById(id2).style.height = sh+'px';
			}
	
	if(ow>cw){
				document.getElementById(id).style.left = 10+'px';
		
				if(navigator.appName == "Microsoft Internet Explorer")//IDENTIFY IE
				{
						document.getElementById(id2).style.width = sw+(ow-sw)+20+'px';
						document.getElementById(id2).style.height = sh+'px';
						document.getElementById(id).style.left = 10+'px';
				}
			}
			else
			{
				document.getElementById(id).style.left = lt+'px';
				sh= document.body.scrollHeight;
				document.getElementById(id2).style.width = sw+'px';
			}
			
	window.scrollTo(0,0);
	//return false;
}

function CloseNewOverlay(id,id2){
document.getElementById(id).style.display = 'none';
document.getElementById(id2).style.display = 'none';
}


