 function toggle(div_id) {
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) {	el.style.display = 'block';}
	else {el.style.display = 'none';}
}
function blankettw_size(popUpDivtwVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportheight = 20;
	} else {
		viewportheight = 20;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
		blankettw_height = 20;
	} else {
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
			blankettw_height = 20;
		} else {
			blankettw_height = 20;
		}
	}
	var blankettw = document.getElementById('blankettw');
	blankettw.style.height =20;
	var popUpDivtw = document.getElementById(popUpDivtwVar);
	popUpDivtw_height=blankettw_height/2-150;//150 is half popup's height
	popUpDivtw.style.top = popUpDivtw_height + 'px';
}
function window_pos(popUpDivtwVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = 20;
	} else {
		viewportwidth = 20;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
		window_width = 20;
	} else {
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
			window_width = 20;
		} else {
			window_width = 20;
		}
	}
	var popUpDivtw = document.getElementById(popUpDivtwVar);
	window_width=window_width/2-150;//150 is half popup's width
	popUpDivtw.style.left = window_width + 'px';
}
function popuptw(windowname) {
	blankettw_size(windowname);
	window_pos(windowname);
	toggle('blankettw');
	toggle(windowname);		
}