/*
** Resize the parts iframe
*/
function resize_iframe() {
        if($.browser.msie){
           doc = document.frames("basefrm").document;
           win = document.frames("basefrm").contentWindow;
               viewportwidth  = $(doc.body).innerWidth();
               viewportheight = $(doc.body).innerHeight();
        }
        else {
           iframe = document.getElementById('basefrm')
           doc = iframe.contentDocument;
           win = iframe.contentWindow;
               viewportwidth  = win.innerWidth;
               viewportheight = win.innerHeight;
        }

        path = (doc.URL).split('/');
        filestr =(path[path.length -1]);
        var regx = /\d\d.htm/

        if (regx.test(filestr) ) {

           //////////////////////////////////////////////////////////
           if (0) {
              if (el = doc.getElementById('parts')) {
                 height = viewportheight - $(el).offset().top ;
                 $(el).css({ display:'block', height:height+'px'});
              }

              if (el = doc.getElementById('panel')) {
                 width = viewportwidth - 175;
                 height += 0;
                 $(el).css({ width:width+'px', height:height+'px'});
              }

              if (el = doc.getElementById('viewport') ) {
                 $(el).css({ width:width+'px', height:height+'px'});
              }
           }
           //////////////////////////////////////////////////////////

           if(1) {
            // the new image iframe is in this document.
            // try to triger the resize event on that element.
            // this is obviously an annoying dependency (so is this file.)

              if (el = doc.getElementById('parts')) {
                 height = viewportheight - $(el).offset().top ;
                 $(el).css({ display:'block', height:height+'px'});
              }

              if (el = doc.getElementById('panel')) {
                 width = viewportwidth - 175;
                 height = viewportheight - $(el).offset().top ;
                 $(el).css({ width:width+'px', height:height+'px'});
              }
              if (el = doc.getElementById('imageframe')) {
                 $(el).css({ width:width+'px', height:height+'px'});
              }
           }
        }
}
