function ClientBrowse() { this.w=0; this.h=0;
if (self.screen) { this.w=screen.width; this.h=screen.height; }
else if (self.java) { var jkit=java.awt.Toolkit.getDefaultToolkit(); var scrsize=jkit.getScreenSize(); this.w=scrsize.width; this.h=scrsize.height; } return this; }
function OpenWin(url,nwin,w,h,s) { p=new ClientBrowse();
if (w) { leftPos=(p.w-w)/2; } else { w=p.w-100; leftPos=(p.w-w)/2; }
if (h) { topPos=(p.h-h)/2; } else { h=p.h-100; topPos=10; }
(s==1)?null:s=0; (nwin)?null:nwin="win"; var property="left="+leftPos+",top="+topPos+",width="+w+",height="+h+",scrollbars="+s;
return window.open (url,nwin,property); }


function get_flash1( goods_id ){
   var obj = get_http_obj();
   if( obj ){
      obj.open( "GET", "/cgi-bin/catalog/get_flash.pl?flash_id=1&goods_id=" + goods_id + '&' + parseInt( ( Math.random() * 1000000 + 1 ) ), true );
      obj.onreadystatechange = function(){
         if( obj.readyState== 4 && obj.responseText ) {
            container = document.getElementById( 'big_pic-container' );
            container.innerHTML = obj.responseText;
            
         } // End if
         
      } // End function
      
      obj.send( null )
      return true;
     
   } else {
      return false;
   } // End if

} // End function


function get_flash2( goods_id ){
   var obj = get_http_obj();
   if( obj ){
      obj.open( "GET", "/cgi-bin/catalog/get_flash.pl?flash_id=2&goods_id=" + goods_id + '&' + parseInt( ( Math.random() * 1000000 + 1 ) ), true );
      obj.onreadystatechange = function(){
         var width = 425;
         var height = 344;
         if( obj.readyState== 4 && obj.responseText ) {
            var re = new RegExp( "width=\"([0-9]+)\"", "mi" );
            if( re.exec( obj.responseText ) ) { width = parseInt( RegExp.$1 ); }
            re = new RegExp( "height=\"([0-9]+)\"", "mi" );
            if( re.exec( obj.responseText ) ) { height = parseInt( RegExp.$1 ); }
            var win = OpenWin( "about:blank", 'flash', width+20, height+30, 0 );
            win.document.write( obj.responseText );
            
         } // End if
         
      } // End function
      
      obj.send( null )
      return true;
     
   } else {
      return false;
   } // End if

} // End function