function breakOutOfFrames()
         {
          if(top.frames.length > 0)
            { 
             top.location.href = self.location.href;            
            }
         }  


function activateImage(strImgName,strStatusMessage)
         {
          window.document.images[strImgName].src = eval(strImgName + "Active.src");
          window.status = strStatusMessage;
         }


function deactivateImage(strImgName)
         {
          window.document.images[strImgName].src = eval(strImgName + "Inactive.src");
          window.status = "";
         }


function popupWindow(link, name, width, height, scrollbars, menubar, position)
         {
          if (position == "random")
             {
              leftPos=(screen.width)?Math.floor(Math.random()*(screen.width-width)):100;
              topPos=(screen.height)?Math.floor(Math.random()*((screen.height-height)-75)):100;
             }
          if (position == "center")
             {
              leftPos=(screen.width)?(screen.width-width)/2:100;
              topPos=(screen.height)?(screen.height-height)/2:100;
             }
          else if ((position!="center" && position!="random") || position==null)
                  {
                   leftPos=0;
                   topPos=20;
                  }
          settings = 'width=' + width + ',height=' + height + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=' + scrollbars + ',location=no,directories=no,status=no,menubar=' + menubar + ',toolbar=no,resizable=no';
          winPopup = window.open(link,name,settings);
          if (winPopup.focus)
             {
              winPopup.focus();
             }
         }


function print()
         {
          function stopError() { return true; };
          window.onerror = stopError;
          if (document.all)
             {
              var OLECMDID_PRINT = 6;
              var OLECMDEXECOPT_DONTPROMPTUSER = 2;
              var OLECMDEXECOPT_PROMPTUSER = 1;
              var WebBrowser = "<OBJECT ID=\"WebBrowser1\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>";
              document.body.insertAdjacentHTML("beforeEnd", WebBrowser);
              WebBrowser1.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER);
              WebBrowser1.outerHTML = "";
             }
          else
             {
              self.print();
             }
         } 

         
var winPopup=null; 
