window.name='main'

function popitupfromForm(form,winName,h,w)
{
	newwindow=window.open("",winName,'height='+h+',width='+w);
	form.target=winName;
	form.submit();
	centerPage(newwindow);
}

function popitupfromForm2(form,winName,features)
{
	newwindow=window.open("",winName,features);
	form.target=winName;
	form.submit();
	centerPage(newwindow);
}





function popitup(action,winName,h,w)
{
	newwindow=window.open(action,winName,'height='+h+',width='+w);
	centerPage(newwindow);
}

function popitup(url,features)
{
	newwindow=window.open(url,'name',features);
	centerPage(newwindow);
}

function popitup(url,name,features)
{
	newwindow=window.open(url,name,features);
	centerPage(newwindow);
}

function popitup2(url,name,h,w)
{
	newwindow=window.open(url,name,'height='+h+',width='+w+',scrollbars=yes');
	centerPage(newwindow);
}


var NS=document.all;

function centerPage(page)
{
     if(!NS){
     	page.moveTo((page.screen.width - page.outerWidth) / 2, (page.screen.height - page.outerHeight) / 2);
     }
     else{
     	page.moveTo((page.screen.width-document.body.clientWidth) / 2, (page.screen.height-document.body.clientHeight) / 2);
     }
     page.focus();
}



