﻿var ptClassName ="mac_os_x";
var ptWindows = new Object;

ptWindows.m0100 = null;

ptWindows.m0200 = null;

ptWindows.m0300 = null;
ptWindows.m0301 = null;
ptWindows.m0302 = null;
ptWindows.m0303 = null;
ptWindows.m0304 = null;
ptWindows.m0305 = null;

ptWindows.m0400 = null;
ptWindows.m0401 = null;
ptWindows.m0402 = null;
ptWindows.m0403 = null;
ptWindows.m0404 = null;
ptWindows.m0405 = null;
ptWindows.m0406 = null;
ptWindows.m0407 = null;
ptWindows.m0408 = null;

ptWindows.m0500 = null;
ptWindows.m0501 = null;
ptWindows.m0502 = null;
ptWindows.m0503 = null;
ptWindows.m0504 = null;

ptWindows.m0600 = null;
ptWindows.m0601 = null;
ptWindows.m0602 = null;

ptWindows.m0700 = null;

function loadWindow(id,title,url,width,height,modal,center,top,left)
{
   if (id != null && id != "")
   {
      if (ptWindows[id] == null)
      {
            
         if (url == null || url == "")
         {
            url = "tbd.htm";   
         }
         
         if (width == null || width < 100)
         {
            width = 400;   
         }
         
         if (height == null || height < 100)
         {
            height = 400;   
         }
         
         if (modal == null) 
         {
            modal = false;
         }
         
         //ptWindows[id] = new Window(id,{className: ptClassName, title: title, url: url,width: width, height: height, minimizable: false, maximizable: false});
         ptWindows[id] = new Window(id,{className: ptClassName, title: title,width: width, height: height, minimizable: false, maximizable: false});
         ptWindows[id].setZIndex(1000000);
      }
      
      ptWindows[id].setURL(url);
      
      if (modal == false)
      {
         Windows.closeAll();
      }
      
      if (center != null)
      {
         ptWindows[id].showCenter(modal,top,left);
      }
      else
      {
         ptWindows[id].show(modal);
      }
      
   }
}