function displayWindow(url, width, height,order) {
    var Win = window.open(url,order,'width=' + width + ',height=' + height + ',resizable=no,top=0,left=0,scrollbars=yes,menubar=no,status=no' );
}
function pop(url, width, height) {
    var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=no,menubar=no,status=no,top=0,left=0' );
}
function popUp(URL) {
    var Win = window.open(URL);
}

var popUpWin = '';
var side = 550;
var tall = 400;


function prodPopUp(product_rn) {
    if (popUpWin && !popUpWin.closed) popUpWin.close();
    popUpWin = window.open('/webapp/commerce/command/ExecMacro/m_proddsp.d2w/report?product_rn='+ product_rn,
			   'newWin', 'height='+tall+',width='+side+',scrollbars=1,status=1,top=0,left=0');
    popUpWin.focus();
    if (!popUpWin.opener)
        popUpWin.opener = self;
}


function closeWin(){
    if (popUpWin && !popUpWin.closed)
        popUpWin.close();
}

function prodCSPopUp(url) {
    closeWin();
    popUpWin = window.open(url, 'newWin', 'height='+tall+',width='+side+',scrollbars=1,top=0,left=0,status=1');
    popUpWin.focus();
    if (!popUpWin.opener)
        popUpWin.opener = self;
}

function updatePaymentPop(url) {
    closeWin();
    popUpWin = window.open(url, 'newWin', 'height=365,width=160,scrollbars=0,top=0,left=0,status=0');
    popUpWin.focus();
    if (!popUpWin.opener)
        popUpWin.opener = self;
}

function go (which, URL)
{
	if (popUpWin && !popUpWin.closed) popUpWin.close();
	n = which.selectedIndex;
	if (n != 0)
	{
		if (n == 1)
		{
			popUpWin = window.open(URL, 'newWin', 'height=520,width=520,scrollbars=1,top=0,left=0,status=1');
    		popUpWin.focus();
		}
		else if (n == 2)
		{
			popUpWin = window.open(URL, 'newWin', 'height=365,width=160,scrollbars=0,top=0,left=0,status=0');
    		popUpWin.focus();
		}
		else
		{
			location.href = URL;
		}
	}
}


function verisign_popUp()
{
    url = "https://digitalid.verisign.com/as2/0d78640d0ed47026ad39339e110a1c8e";
    sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=720,height=450,top=0,left=0');
    self.name = "mainWin";
}
