var newwindow;
function popNew(url,name,wt,ht)
{
	newwindow=window.open(url,name,'height='+ht+',width='+wt+',left=100,top=100,resizable=no,scrollbars=no,toolbar=no,status=no');
	 
	if (window.focus) {newwindow.focus()}
}
function popNewSc(url,name,wt,ht)
{
	newwindow=window.open(url,name,'height='+ht+',width='+wt+',left=100,top=100,resizable=no,scrollbars=yes,toolbar=no,status=no');
	 
	if (window.focus) {newwindow.focus()}
}
function popNewWin(url)
{
	newwindow=window.open(url,'clientwin');
	 
	if (window.focus) {newwindow.focus()}
}


function popUp(URL, width, height) {

	currentDate = new Date();
	var id = currentDate.valueOf();
	
	wWidth = width
	wHeight = height
	
	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 - wWidth)/2, yOffset = (yMax - wHeight)/2;
	
	eval("page"+id+" = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+wWidth+',height='+wHeight+',top='+yOffset+',left='+xOffset);");
	}

function popUpResize(URL, width, height) {

	currentDate = new Date();
	var id = currentDate.valueOf();

	wWidth = width
	wHeight = height

	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 - wWidth)/2, yOffset = (yMax - wHeight)/2;

	eval("page"+id+" = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+wWidth+',height='+wHeight+',top='+yOffset+',left='+xOffset);");
	}


function popUpExtra(URL, width, height,toolbar,scrollbars,location,statusbar,menubar,resizable) {

	currentDate = new Date();
	var id = currentDate.valueOf();
	
	wWidth = width
	wHeight = height
	
	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 - wWidth)/2, yOffset = (yMax - wHeight)/2;
	
	eval("page"+id+" = window.open(URL, '" + id + "', 'toolbar='+toolbar+',scrollbars='+scrollbars+',location='+location+',statusbar='+statusbar+',menubar='+menubar+',resizable='+resizable+',width='+wWidth+',height='+wHeight+',top='+yOffset+',left='+xOffset);");
	}

