function toggle(div_id,n) {
	var el = document.getElementById(div_id+n);
	if ( el.style.display == 'none' ) {	el.style.display = 'block';}
	else {el.style.display = 'none';}
}
function blanket_size(popUpDivVar,n) {
	var blanket_height = document.documentElement.clientHeight;
	var blanket = document.getElementById('blanket'+n);
	blanket.style.height = blanket_height + 'px';
	var popUpDiv = document.getElementById(popUpDivVar+n);
	popUpDiv_height=blanket_height/2-200;//150 is half popup's height
	popUpDiv.style.top = popUpDiv_height + 'px';
	var ss = popUpDiv.style.top;
	//alert(blanket_height)
}
function window_pos(popUpDivVar,n) {
	var window_width = document.documentElement.clientWidth;
	var popUpDiv = document.getElementById(popUpDivVar+n);
	window_width=window_width/2-300;//150 is half popup's width
	popUpDiv.style.left = window_width + 'px';
}
function popup(windowname,n) {
	//alert(n)
	blanket_size(windowname,n);
	window_pos(windowname,n);
	toggle('blanket',n);
	toggle(windowname,n);		
}
