var nWindow = 0
function pwin(d,w,h,s,p) {
// p position, s = scrollbars
// 1 = top left, 2 = top right, 3 = bottom left, 4 = bottom right, 5 = top middle 0 = center
if (nWindow) {
if(!nWindow.closed) nWindow.close();
  }
if (p == 1) {
tx = 10; 
ty = 10;
}
else
if (p == 2) {
tx = (screen.width - (w+10));
ty = 0;
}
else
if (p == 3) {
tx = 10;
ty = (screen.height - (h+65));
}
else
if (p == 4) {
tx = (screen.width - (w+10));
ty = (screen.height - (h+65));
}
else
if (p == 5) {
tx = (screen.width - w) / 2;
ty = 100; //(screen.height - (h+65));
}
else {
tx = (screen.width - w) / 2;
ty = (screen.height - h) / 2;
}
	 nWindow = window.open(d,"popup","width="+w+",height="+h+",top="+ty+",left="+tx+",titlebar=0,resizable=1,status=0,menubar=0,scrollbars="+s+",fullscreen=0");
	 nWindow.focus() 
}
function hideMe(el) {
if (mDisp = document.getElementById(el)) {
mDisp.style.visibility="hidden";}
}
function showMe(el){
if (mDisp = document.getElementById(el)) {
mDisp.style.visibility="visible";}
}
