        
       
        function NewWindow(url, name, width, height, menuBar, resizable, scroll) 
        {
            (scroll == 0) ? showScrollBar = "no" : showScrollBar = "yes";
            (menuBar == 0) ? showMenuBar = "no" : showMenuBar = "yes";
            (resizable == 0) ? isResizable = "no" : isResizable = "yes";
            LeftPosition = (screen.width) ? (screen.width - width)/2 : 300;
            TopPosition = (screen.height) ? (screen.height - height)/2 : 300;
            Setting = 'copyhistory=0;status=0,directories=0,titlebar=0,toolbar=0,scrollbars=' + showScrollBar + ',location=0,statusbar=0,menubar=' + showMenuBar + ',resizable=' + isResizable + ',Width='+ width +',Height='+ height +',top='+ TopPosition +',left='+ LeftPosition;
            openwindow=window.open(url, name, Setting)
            openwindow.focus();
            return false;
        }
               
        function IsNumberKey(evt)
        {
        
            var charCode = (evt.which) ? evt.which : event.keyCode
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
                
            return true;            
        }
        
        function DetWnd(code, sender, name, catPath) 
        {
	        name = 'ProductDetail' + name;
            showScrollBar = "yes";
            showMenuBar = "no";
            isResizable = "yes";
                        
            if(sender == "F")   
                sender = "Searching";
            else
                if(sender == "B")   
                    sender = "Cart";      
                else
                    sender = "Catalog";                                      
                
            url = 'detail.aspx?PrimaryCode=' + code + '&Sender=' + sender + '&CatalogPath=' + catPath;
            width = 700;
            height = 600
            LeftPosition = (screen.width) ? (screen.width - width)/2 : 300;
            TopPosition = (screen.height) ? (screen.height - height)/2 : 300;
            Setting = 'copyhistory=0;status=0,directories=0,titlebar=0,toolbar=0,scrollbars=' + showScrollBar + ',location=0,statusbar=0,menubar=' + showMenuBar + ',resizable=' + isResizable + ',Width='+ width +',Height='+ height +',top='+ TopPosition +',left='+ LeftPosition;
            openwindow=window.open(url, name, Setting)
            openwindow.focus();
            return false;
        }
        
        function OrderDetWnd(orderId) 
        {
            showScrollBar = "yes";
            showMenuBar = "no";
            isResizable = "yes";
            url = 'OrderDetail.aspx?OrdetItemId=' + orderId;
            width = 700;
            height = 500
            LeftPosition = (screen.width) ? (screen.width - width)/2 : 300;
            TopPosition = (screen.height) ? (screen.height - height)/2 : 300;
            Setting = 'copyhistory=0;status=0,directories=0,titlebar=0,toolbar=0,scrollbars=' + showScrollBar + ',location=0,statusbar=0,menubar=' + showMenuBar + ',resizable=' + isResizable + ',Width='+ width +',Height='+ height +',top='+ TopPosition +',left='+ LeftPosition;
            openwindow=window.open(url, 'OrderDetail', Setting)
            openwindow.focus();
            return false;
        }
        
        function ImgWnd(name, type) 
        {
            showScrollBar = "yes";
            showMenuBar = "no";
            isResizable = "yes";
            if(type == "B")
                type = "Big";
            else
                type = "Small";
                
            url = 'imageview.aspx?ImageName=' + name + '&Type=' + type + '&Title=' + name;
            width = 800;
            height = 600
            LeftPosition = (screen.width) ? (screen.width - width)/2 : 300;
            TopPosition = (screen.height) ? (screen.height - height)/2 : 300;
            Setting = 'copyhistory=0;status=0,directories=0,titlebar=0,toolbar=0,scrollbars=' + showScrollBar + ',location=0,statusbar=0,menubar=' + showMenuBar + ',resizable=' + isResizable + ',Width='+ width +',Height='+ height +',top='+ TopPosition +',left='+ LeftPosition;
            openwindow=window.open(url, 'ImageViewPage', Setting)
            openwindow.focus();
            return false;
        }
        
         function NewWindowEmptyReturn(url, name, width, height, menuBar, resizable, scroll) 
         {
             (scroll == 0) ? showScrollBar = "no" : showScrollBar = "yes";
             (menuBar == 0) ? showMenuBar = "no" : showMenuBar = "yes";
             (resizable == 0) ? isResizable = "no" : isResizable = "yes";
             LeftPosition = (screen.width) ? (screen.width - width)/2 : 300;
             TopPosition = (screen.height) ? (screen.height - height)/2 : 300;
             Setting = 'copyhistory=0;status=0,directories=0,titlebar=0,toolbar=0,scrollbars=' + showScrollBar + ',location=0,statusbar=0,menubar=' + showMenuBar + ',resizable=' + isResizable + ',Width='+ width +',Height='+ height +',top='+ TopPosition +',left='+ LeftPosition;
             openwindow=window.open(url, name, Setting)
             openwindow.focus();
         }
       
   