
function popupImageCenter(title, imageUrl, width, height) {
        var url = "/ebt/detailImage?detail=" + imageUrl + "&productName=" + title + "&encoding=N";        
        
        if (width == null) width = 500;
        if (height == null) height = 375;
        
        image_1 = new Image();
        //image_1.onload = onloadimage;
        image_1.src = imageUrl;
        
        w = image_1.width;
        h = image_1.height;
        
        if (image_1.width < 1) w = width;
        if (image_1.height < 1) h = height;
        
        w+=30;
        h+=45;
        
        winL = Math.round((screen.width - w) / 2);
        winT = Math.round((screen.height - h) / 2);
        
        var win = window.open(url, "detailImage", "left="+winL+", top="+winT+", width="+w+",height="+h+", resizable=yes");
        win.focus();
    } 


function popupImageCenterx(imageTitle, imageSrc) { 
    fileName = '/images/template.htm?' + escape(imageSrc) + '&' + escape(imageTitle);
    win = window.open(fileName,'detailImage','directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes, width=0, height=0');
    win.focus();
}

function popupUrl(title, wName, pageUrl, width, height) {
    winL = Math.round((screen.availWidth - width) / 2);
    winT = Math.round((screen.availHeight - height) / 2);
    oldWin=window.open(pageUrl, wName, "toolbar=0,location=0,history=1,directories=0,status=1,menubar=0,scrollbars=1,left="+winL+",top=" + winT + ",width=" + width +",height=" + height + ",resizable=yes");
    if (oldWin) oldWin.focus();
}
