
function new_win(aid)
{
if(new_win.open==true)
{
new_win.close();
}
else
{
var new_window = window.open(aid+".html","html_name","resizable=yes,width=785,height=600,scrollbars=yes,scrolling=yes"); 
new_window.focus()
}
}

function centerWindow(aid){
if (document.all) {var xMax = screen.width, yMax = screen.height
} else 
if (document.layers) {
var xMax = window.outerWidth, yMax = window.outerHeight} else {var xMax = 640, yMax=480}; var xOffset = (xMax - 785)/2, yOffset = (yMax - 500)/2; 
var new_window=window.open(aid+'.html','html_name','resizable=yes,width=785,height=500,scrollbars=yes,scrolling=yes,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
new_window.focus()
}

function centerWindow1(url){
if (document.all) {var xMax = screen.width, yMax = screen.height
} else 
if (document.layers) {
var xMax = window.outerWidth, yMax = window.outerHeight} else {var xMax = 640, yMax=480}; var xOffset = (xMax - 785)/2, yOffset = (yMax - 500)/2; 
var new_window=window.open(url,'html_name','resizable=yes,width=785,height=500,scrollbars=yes,scrolling=yes,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
new_window.focus()
}

