﻿///////////////////////////////////////////////////////////////////////////////
//
//  wcoDefault.js
//
// © 2007-2010 Wco iEnterprise Solutions. All Rights Reserved.
// This file is licensed as part of the DataPortal 3.0 Managed Web Presence Solution, for details look here: http://www.wco.com.au
//
///////////////////////////////////////////////////////////////////////////////

function init() {
  //window.resizeTo(1024, 768);   // old 15" & 17" monitor
  //window.resizeTo(1280, 1024);  // standard 17" & 19" monitor
  //window.resizeTo(1355, 768);   // widescreen 15" laptop monitor
  //window.resizeTo(1440, 900);   // widescreen 19" monitor
  //window.resizeTo(1600, 1200);  // standard 20" monitor
  //window.resizeTo(1680, 1050);  // widescreen 20" & 22" monitor
  //window.moveTo(0, 0);  window.resizeTo(1920, 1200);  // widescreen 24" & 27" monitor

  // instantiate a global working copy of the PageManager object
  window.pageManager = new HtmlPageManagerObject();
  // and hook up the window resize event with the PageManager's redoLayout method
  //window.onresize = positioning.createDelegate(pageManager, pageManager.redoLayout);

  // now initialise and activate the global PageManager
  //pageManager.splash();
  pageManager.init();

}

function preloadImages() {
  if (document.images) { //check for compatible browser
    var imgFiles = preloadImages.arguments; //get the array of images to be preloaded into memory
    if (document.preloadArray == null) { document.preloadArray = new Array(); } //create the document array to hold the images
    var i = document.preloadArray.length; //create the array counter

    //load the images into the document array
    with (document) {
      for (var j = 0; j < imgFiles.length; j++) {
        preloadArray[i] = new Image();
        preloadArray[i++].src = imgFiles[j];
      }
    }
  }
}
