    function img_resize(idx, img, width, height){
        try{
            setImage(idx, width, height);
        }catch(e){
            //alert(e.description);
        }
    }

    function setImage(idx, width, height) {
        try {
            var img = new Image();
            var oImg = document.getElementById("img_"+idx);
            img.src = oImg.src;
            if (img.width == 0 || img.height == 0) {
                setTimeout("setImage(" + idx + ", "+width + ", " + height + ")", 1000);
                return;
            }

            if (img.width > img.height){
                if (img.width > width) {
                    oImg.width = width;
                }
                if (img.height > height) {
                    oImg.height = height;
                }
            }
            if (img.height > img.width){
                if (img.height > height) {
                    oImg.height = height;
                }
                if (img.width > width) {
                    oImg.width = width;
                }
            }
            if (img.width == img.height){
                if (img.height > height) {
                    oImg.height = height;
                }
            }
            oImg.style.display = "";
        }catch(e) {
            //alert(e.description);
        }
    }


    function redirect_alert_str(str,url){
        try{
            ans = confirm(str)
            if(ans == true){
                location=url;
            }
        }catch(e){
            alert(e.description);
        }
    }

    function redirect_alert_cart(str){
        try{
            var form = document.form;
            ans = confirm(str)
            if(ans == true){
                document.form._pageNumber.value = '100034';
                document.form._action.value = 'NewMyCart';
                document.form._view.value = 'NewMyCart';
                form.submit();   
            }
        }catch(e){
            alert(e.description);
        }
    }

    function redirect_alert_wish(str){
        try{
            var form = document.form;
            ans = confirm(str)
            if(ans == true){
                document.form._pageNumber.value = '100035';
                document.form._action.value = 'NewWishList';
                document.form._view.value = 'NewWishList';
                form.submit();   
            }
        }catch(e){
            alert(e.description);
        }
    }

    function doBlink() {
        try{
          var blink = document.all.tags("BLINK")
          for (var i=0; i < blink.length; i++)
             blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
        }catch(e){
            alert(e.description);
        }
    }

    function doBlink() {
        try{
          var blink = document.all.tags("BLINK")
          for (var i=0; i < blink.length; i++)
             blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
        }catch(e){
            alert(e.description);
        }
    }
    function startBlink() {
        try{
            if (document.all)
                setInterval("doBlink()",300)
        }catch(e){
            alert(e.description);
        }
    }

