﻿///////////////////////////////////////////////////////////////////////////////
//
//  csDefault.js
//
// © 2007-2009 Wco iEnterprise Solutions Pty Ltd. ALL RIGHTS RESERVED.
// This file is licensed as part of the DataPortal 2.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(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
  //alert(positioning.getBrowserLanguage());
  //pageManager.init(positioning.getBrowserLanguage());
  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];
      }
    }
  }
}

