
function ResizeImg(_myImg,_maxwidth,_maxheight,_isAllowZoonIn)
    {
      var _curImg=new Image();
      if(_curImg.src!=_myImg.src)
      {
        _curImg.src=_myImg.src;
      }
      var _oldwidth,_oldheight,_newwidth,_newheight;
      _oldwidth=_curImg.width;
      _oldheight=_curImg.height;
      _newwidth=_oldwidth;
      _newheight=_oldheight;
      if(_oldheight>_maxheight || _oldwidth>_maxwidth || _isAllowZoonIn)
      {
        if(_oldheight/_oldwidth>_maxheight/_maxwidth)
        {
      	  _newwidth=_oldwidth/_oldheight*_maxheight;
          _newheight=_maxheight;
        }
        else
        {
          _newwidth=_maxwidth;
          _newheight=_oldheight/_oldwidth*_maxwidth;
        }
      }
      _myImg.width=_newwidth;
      _myImg.height=_newheight;
	  /*
      alert('oldwidth:'+_oldwidth+'\n'+'oldheight:'+_oldheight
             +'\n\n'
             +'maxwidth:'+_maxwidth+'\n'+'maxheight:'+_maxheight
    		 +'\n\n'
             +'newwidth:'+_newwidth+'\n'+'newheight:'+_newheight);
	  */
	  return true;
    }

function PutWare(strID,strCurrMenu){Shopwin=window.open("shopping.asp?action=add&spid="+strID+"&PtCount=1&mnid="+strCurrMenu,'WareList','width=600,height=350,scrollbars=yes,resizable=yes');Shopwin.focus();};
function $(id) { return document.getElementById(id); }
function multiOnload(FuncName){var oldProc=window.onload?window.onload.toString ():"";if(oldProc.indexOf("anonymous()")>0){oldProc=oldProc.substring(oldProc.indexOf("{")+1,oldProc.lastIndexOf("}"))+"; ";};oldProc+=FuncName;window.onload=new Function(oldProc);};
function multiOnloadEx(FuncName,HtmlObj,EveName){if(EveName==null||EveName=="")EveName="onload";var oldProc;oldProc=eval("HtmlObj."+EveName+" ? HtmlObj."+EveName+".toString() : \"\"");if(oldProc.indexOf("anonymous()")>0){oldProc=oldProc.substring(oldProc.indexOf("{")+1,oldProc.lastIndexOf("}"))+"; ";};oldProc+=FuncName;eval("HtmlObj."+EveName+" = new Function (oldProc);");};
