//{{{ 1k DHTML API
d=document;ts=2;ti=60;px='px'
var browser = navigator.appName;var ie = browser.indexOf("Microsoft") > -1 ? true : false;
var op =  browser.indexOf("pera") > -1 ? true : false;
var platform = navigator.platform;var mac = platform.indexOf("ac") > -1 ? true : false;
function gE(e,f){return d.getElementById(e);}
function sE(e){e.style.visibility='visible';}
function hE(e){e.style.visibility='hidden';}
function sZ(e,z){e.style.zIndex=z;}
function sX(e,x){e.style.left=x+'px';}
function sY(e,y){e.style.top=y+'px';}
function sW(e,w){e.style.width=w+'px';}
function sH(e,h){e.style.height=h+'px';}
function sC(e,t,r,b,x){e.style.clip='rect('+t+px+' '+r+px+' '+b+px+' '+x+px+')';}
function gX(e){var x=e.offsetLeft;var op=e.offsetParent;while(op!=null){x+=op.offsetLeft;op=op.offsetParent;}return x;}
function gY(e){var y=e.offsetTop;var op=e.offsetParent;while(op!=null){y+=op.offsetTop;op=op.offsetParent;}return y;}
//function gY(e){return e.offsetTop;}
function wH(e,h){e.innerHTML=h;}
function gW(e){return e.offsetWidth}
//function gW(e){return e.style.width;}
function gH(e){return e.offsetHeight}
function gpX(e){var x=e.offsetLeft;var ep=e.offsetParent;while(ep!=null){x+=ep.offsetLeft;op=ep.offsetParent;}return x;}
function gpY(e){var y=e.offsetTop;var ep=e.offsetParent;while(ep!=null){y+=ep.offsetTop;ep=ep.offsetParent;}return y;}
// my extensions
function gcH(e){var h = (ie && mac) ? e.offsetHeight : e.scrollHeight; return h;}
function gsT()
{
  var sT=(ie && mac)? d.body.scrollTop : ie ? d.documentElement.scrollTop : d.body.scrollTop;
  return sT;
}
function gwH()
{
  var wH=(ie && mac) ? d.body.clientHeight : ie ? d.documentElement.clientHeight : self.innerHeight;
  return wH;
}
function gwW()
{
  var wW=(ie && mac) ? d.body.clientWidth : ie ? d.documentElement.clientWidth : self.innerWidth;
  return wW;
}
function gbH()
{
  //var bH=(ie && mac) ? d.body.clientHeight : ie ? d.documentElement.clientHeight : d.body.clientHeight;
  var bH=(ie && mac) ? d.body.clientHeight : ie ? d.documentElement.clientHeight : self.innerHeight;
  return bH;
}
function gbW()
{
  //var bW=(ie && mac) ? d.body.clientWidth : ie ? d.documentElement.clientWidth : d.body.clientWidth;
  var bW=(ie && mac) ? d.body.clientWidth : ie ? d.documentElement.clientWidth : self.innerWidth;
  return bW;
}
function sS(e,sprop,svalue)
{
  eval("e.style." + sprop + "='" + svalue + "'");
}
// greg bells' create element extension (modified)
function cE(i,s)
{
  var X='<div';X=i?X+' id="'+i+'"':X;X=s?X+' style="'+s+'"':X;X+='>';
  var Y=d.createElement("DIV");
  if(Y){Y.innerHTML=X;d.body.appendChild(Y);Y = gE(i);}
  return Y;
}
function cN(e,i,s)
{
  var X='<div';X=i?X+' id="'+i+'"':X;X=s?X+' style="'+s+'"':X;X+='>';
  var Y=d.createElement("DIV");
  if(Y){Y.innerHTML=X;e.appendChild(Y);Y = gE(i);}
  return Y;
}
// end of API
//}}}

// default extension for web pages
var extension = ".shtml";

// name of the index page
//  this helps the breadcrumbs decided whether we're on
//  an index page or not
var indexName = "index" + extension;

// style sheet selected flag
var styleSelected = false;

// read the style cookie
var cookie = readCookie("style");
//alert("style:" + cookie);
if(cookie == "widescreen") {
  useWidescreenStyle();
  styleSelected = true;
} else if(cookie == "normal") {
  styleSelected = true;
}

// page initialization stuff
function pageStart(doNavStuff) {
  //alert("page start:" + styleSelected);
  // see if we need to select the stylesheet
  if(! styleSelected) {
    checkWidescreen();
  } else {
    //alert("cookie:" + cookie);
    if(cookie == "widescreen") {
      useWidescreenStyle();
    }
  }

  // do the navigation stuff if if appropriate
  if(doNavStuff) {
    navStart();
  }

} // end of pageStart() function

//{{{ menu dropdown stuff

// holding tank for the last header item turned on
var lha = null;

// holding tank for the last menu drop down turned on
var lma = null;

// the name of the last menu drop down turned on
var lman = "";

// the height of the menu bars
var menuHeight = ie ? 24 : 23;

// the background color when a menu header is turned on
var menuOn = "rgb(164,186,225) url(/images/bluetopnav_on.gif) top left no-repeat";

// the background color when a menu item is turned off
var menuOff = "#869ac5 url(/images/bluetopnav_off.gif) top left no-repeat";

// a holding tank for the menu timer object
var menuTimer = null;

// do all the dropdown navigation startup stuff
function navStart() {
  var navTable = gE("topNav");
  // get all the tds in the table
  var tds = navTable.getElementsByTagName("a");
  for(var tdi = 0; tdi < tds.length; tdi++)
  {
    var td = tds[tdi];
    if(td.className == "menuHeader")
    {
      // see if it has a submenu and attach the handlers if it does
      var submenuName = td.getAttribute("submenu");
      if(submenuName != null) {
        td.onmouseover = menuHeaderOn;
        td.onmouseout = menuHeaderOff;
        // get the dropdown menu for this header and attach
        //  handlers to it as well
        var dd = gE(submenuName);
        if(dd != null) {
          dd.onmouseover = clearMenuTimer;
          dd.onmouseout = setMenuTimer;
        }
      }
    }
  }

}// end of navStart() function

// this function changes the background color of a top-level
//  menu item to the appropriate and turns on the submenu dropdown at
//  the same time. It also turns off any menus that may
//  be on before it does anything else
function menuHeaderOn(event)
{
  var smn = this.getAttribute("submenu");
  // see if we need to turn of any previously displayed menus
  if(smn != lman)
  {
    hideMenus();
  } else {
    clearMenuTimer();
  }
  //if we've gone to a new menu, do some stuff
  if(smn != null && smn != lman)
  {
    // set the background color of the header and save
    //  the header for turning it off later
    lha = this;
    lha.style.background = menuOn;
    // get the position of the header to position the dropdown
    var mx = gX(this);
    var my = gY(this);
    var sme = gE(smn);
    sX(sme,mx);
    sY(sme,my + menuHeight);
    sE(sme);
    lma = sme;
    lman = smn;
    clearMenuTimer();
  }
  lman = smn;
} // end of function menuHeaderOn()

// this function sets the timer to turn
//  of the all the menus
function menuHeaderOff(event)
{
  setMenuTimer();
}

// clears the menu turn-off timer
function clearMenuTimer(){
  clearInterval(menuTimer);
}

// turn all the navigation menus off
function hideMenus()
{
  if(lha != null ) {
    lha.style.background = menuOff;
    lha = null;
  }
  if(lma != null)
  {
    hE(lma);
    lma = null;
    lman = null;
  }
  clearMenuTimer();
} // end of hideMenus() function

// sets a timer to turn off the menus
function setMenuTimer(){
  menuTimer = setInterval(hideMenus,250);
}
//}}}

//{{{ printBreadCrumbs code
// print the document breadcrumbs unless we're at the home page
function printBreadCrumbs(doNavStuff) {
  // see if we need to select the stylesheet
  if(! styleSelected) {
    checkWidescreen();
  } else {
    //alert("cookie:" + cookie);
    if(cookie == "widescreen") {
      useWidescreenStyle();
    }
  }

  // holding tank for the document path
  var windowURL = document.URL;
  // holding tank for the port (if any)
  var windowPort = location.port;
  // holding tank for the document title
  var windowTitle = document.title;
  // holding path for the document domain
  var windowDomain = document.domain;
  // make sure we don't have a colon in the domain
  //alert("domain:" + windowDomain + ":");
  // get the file name from the path
  var domainIndex = windowURL.indexOf(windowDomain);
  var domainLength = windowDomain.length;
  var windowPath = windowURL.substr(domainIndex + domainLength + 1);
  // make sure we don't print bread crumbs for the home page
  if(windowPath != "" && windowPath != indexName) {
    var urlSegs = windowPath.split("/");
    var segsLength = urlSegs.length;
    segsLength --;
    var isIndexPage = false;
    // make sure we aren't driving off a cliff
    if(segsLength > 0) {
      // isolate the page name and see if it's an index page or not
      var pageName = urlSegs[segsLength];
      // if we have any parameters at the end of the page name
      //  we need to strip them off now
      if(pageName.indexOf("?") != -1) {
        pageName = pageName.substr(0,pageName.indexOf("?"));
      }
      isIndexPage = (pageName == indexName || pageName.length == 0) ? true : false;
      //alert(pageName + ":"+  isIndexPage);
      var bc = gE("breadCrumbs");
      var crumbs = '<a href="/">Home</a> &gt; ';
      for(i = 0; i < segsLength; i++) {
        var seg = urlSegs[i];
        //alert("Segment:" + seg + ":");
        if(seg == windowPort) {
          continue;
        }
        // we'll propercase the segment so it will look nice on the bar
        var firstLetter = seg.substr(0,1);
        var remainder = seg.substr(1);
        var crumbTitle = firstLetter.toUpperCase() + remainder.toLowerCase();
        // If we're doing an index page and this is the last segment
        //  we'll print, we won't make a link. Otherwise we'll make a link
        //  to this part of site
        if(isIndexPage && i == (segsLength - 1)) {
          crumbs += "&nbsp;&nbsp;&nbsp;&nbsp;" + crumbTitle;
        } else {
          crumbs += '<a href="/' + seg + '">' + crumbTitle + '</a>&nbsp;&gt;&nbsp';
        }
      }
      if(! isIndexPage ) {
        crumbs += "&nbsp;&nbsp;&nbsp;&nbsp;" + windowTitle;
      }
      wH(bc,crumbs);
    }
  }
  // do the nav stuff if appropriate
  if(doNavStuff) {
    navStart();
  }

} // end of printBreadCrumbs() function
//}}}

//{{{ image switcher
//your basic switch image on function
function imageOn(imageName) {
  document.images[imageName].src = "/images/" + imageName + "_on.jpg";
}

//your basic switch image off function
function imageOff(imageName) {
  document.images[imageName].src = "/images/" + imageName + "_off.jpg";
}
//}}}

//{{{ initial solutions stuff
/*
*
* Beginning of solutions index page interactivity code
*
*/

// path to the images directory
var imagesDir = "/images/";

// a timer to turn off all the solutions stuff
var solutionTimer = null;

// the solutions image element on the left side of the page
var solutionsLeft = null;

// the title element of the blurb box in the sidebar
var solutionTitle = null;

// a default title for the right sidebar
var defaultTitle = "Sigma Solutions";

// the text element of the blurb box right sidebar
var solutionText = null;

// default text for the right sidebar
var defaultText = "Sigma offers a complete set of solutions for your catalog, web store, call center and point of sale business.<br /><br />Roll over or click on any image for more information.";

// the array containing the table cells that were turned on
//  most recently
var lastCellsOn = null;

// save the image that we last turned on
var lastImageOn = null;

// the last sidebar title we had
var lastSidebarTitle = "";

// the last sidebar text we had
var lastSiderbarText = "";

// the cells that we will turn on when the catalog image is rolled over
var catalogCells = new Array("catalogmanagement","callcenter","email");

// the cells that we will turn on when the point of sale image is rolled over
var pointOfSaleCells = new Array("warehousemanagement","pointofsale","crm");

// the cells that we will turn on when the ecommerce image is rolled over
var ecommerceCells = new Array("ecommerce","webstore","traffic");

// the cells that we will turn on when the integration image is rolled over
var ordermanagementCells = new Array("ordermanagement","catalogmanagement",
                                      "offermanagement","warehousemanagement",
                                      "merchandisemanagement","callcenter");

// stuff we do as soon as the page is loaded
function solutionsStart(doNavStuff) {
  // print the bread crumbs like we do on the rest of the pages
  printBreadCrumbs();
  // start the dropdown navigation stuff
  navStart();
  // get the sidebar title element
  solutionTitle = gE("solutionTitle");
  // get the sidebar text element
  solutionText = gE("solutionText");
  // get the left image table element
  solutionsLeft = gE("solutionsLeft");
  // get the images and attach the appropriate handlers
  var solutionImages = solutionsLeft.getElementsByTagName("img");
  //alert(solutionImages.length);
  for(var i = 0; i < solutionImages.length; i++) {
    // attach the handlers to the image
    var solutionImage = solutionImages[i];
    solutionImage.onmouseover = solutionOn;
    solutionImage.onmouseout = setSolutionTimer;
    solutionImage.onmousedown = solutionGoTo;
  }
  // do the nav stuff if we need to
  if(doNavStuff) {
    navStart();
  }

} // end of solutionsStart() function

// turn on a solution image and attach the appropriate
//  handlers to its associated table cells in the right
//  side table
function solutionOn() {
  // turn of the last stuff we turned on
  solutionOff();
  // get the sidebar title for the image
  var imageTitle = this.getAttribute("title");
  lastSidebarTitle = imageTitle;
  wH(solutionTitle, imageTitle);

  // get the sidebar text for the image
  var imageText = this.getAttribute("text");
  lastSidebarText = imageText;
  wH(solutionText, imageText);

  // get the name of this image
  var imageName = this.getAttribute("name");
  // set the image we last turned on
  lastImageOn = this;
  // strip out the prefix and make up the path for the image
  var imagePath = imagesDir + "solutions_" + imageName.substr(4) + "_on.jpg";
  //alert("on: " + imagePath + ":");
  // turn the image on
  document.images[imageName].src = imagePath;
  // get the proper cells to turn on and turn them on
  switch(imageName) {
    case 'img_catalog':
      lastCellsOn = catalogCells;
      break;
    case 'img_pointofsale':
      lastCellsOn = pointOfSaleCells;
      break;
    case 'img_ecommerce':
      lastCellsOn = ecommerceCells;
      break;
    case 'img_ordermanagement':
      lastCellsOn = ordermanagementCells;
      break;
  }
  //alert("cells " + lastCellsOn.length);
  //turn on the appropriate cells on the right side of the page
  for(var i = 0; i < lastCellsOn.length; i++) {
    var onCell = gE("td_" + lastCellsOn[i]);
    onCell.className = "solutionsOn";
    // enable the following two lines if you want the cell to light
    //onCell.onmouseover = solutionCellOn;
    //onCell.onmouseout = solutionCellOff;
    // disabling the goto thing for now
    //onCell.onmousedown = solutionGoTo;
    onCell.onmousedown = gndn;
  }

} // end of solutionOn() function

// turn off a solution image and reset the appropriate
//  table cells in the right side table
function solutionOff() {
  //alert("off");
  // turn off the last stuff we turned if there is one
  if(lastImageOn != null) {
    // get the last image we turned on
    var lastOn = lastImageOn;
    // get the name from the image
    var imageName = lastOn.getAttribute("name");
    // strip out the prefix and make up the path for the image
    var imagePath = imagesDir + "solutions_" + imageName.substr(4) + "_off.jpg";
    //alert("on: " + imagePath + ":");
    // turn the image off
    document.images[imageName].src = imagePath;
    //turn off the appropriate cells on the right side of the page
    for(var i = 0; i < lastCellsOn.length; i++) {
      var offCell = gE("td_" + lastCellsOn[i]);
      offCell.className = "solutionsOff";
      offCell.onmouseover = gndn;
      offCell.onmouseout = gndn;
      offCell.onmousedown = gndn;
    }
    // replace the title in the right sidebar with the default
    wH(solutionTitle, defaultTitle);
    // replace the text in the right sidebar with the default
    wH(solutionText, defaultText);

  }
  clearSolutionTimer();

} // end of solutionOff() function

// redirect to another page when a solutions cell is clicked
function solutionGoTo() {
  // get the destination
  var newPage = this.getAttribute("link");
  window.location = newPage;
}

// highlight a solution table cell
function solutionCellOn() {
  this.className = "solutionsOver";
  // get the title for the sidebar
  var sidebarTitle = this.getAttribute("title");
  wH(solutionTitle, sidebarTitle);
  //get the text for the siderbar
  var sidebarText = this.getAttribute("text");
  wH(solutionText, sidebarText);

  clearSolutionTimer();
}

// un-highlight a solution table cell
function solutionCellOff(){
  this.className = "solutionsOn";
  // replace the title in the right sidebar with the default
  wH(solutionTitle, lastSidebarTitle);
  // replace the text in the right sidebar with the default
  wH(solutionText, lastSidebarText);

  setSolutionTimer();
}

// dummy function
function gndn(){
  return false;
}

// sets a timer to turn off the solutions stuff
function setSolutionTimer(){
  solutionTimer = setInterval(solutionOff ,2000);
}

// clears the solution turn-off timer
function clearSolutionTimer(){
  clearInterval(solutionTimer);
}


/*
* end of solutions index page interactivity code
*/
//}}}

//{{{ stylesheet selection stuff
function checkWidescreen() {
  //alert("stuff1");
  var browser = navigator.appName;
  var ie = browser.indexOf("Microsoft") > -1 ? true : false;
  var op =  browser.indexOf("pera") > -1 ? true : false;
  var platform = navigator.platform;
  var windows = platform.indexOf("ac") > -1 ? false : true;
  var screenWidth = screen.width;
  var screenHeight = screen.height;
  var aspect = screenWidth / screenHeight;
  //var widescreen = aspect > 1.4 ? true : false;
  var widescreen = aspect < 1.25 || aspect > 1.4 ? true : false;
  //alert("stuff");
  var square = gE("square");
  var dpi = gW(square);
  //alert(dpi);
  if(windows && ie && widescreen && dpi > 96) {
    useWidescreenStyle();
  } else {
    createCookie("style", "normal", 365);
  }
  styleSelected = true;
}

function useWidescreenStyle() {
  //alert("widescreen on");
  var i, a, main;

  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == "widescreen") {
        a.disabled = false;
      }
    }
  }
  createCookie("style", "widescreen", 365);
}
//}}}


// style sheet switching stuff
function setStyle(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title)
      {
        a.disabled = false;
        if((title != "default")  && moz)
        {
          location.reload();
        }
      }
    }
  }
}


function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  /*
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
  */
  //alert("here");
  var styleTitle = "";
  if(checkWidescreen()) {
    styleTitle = "widescreen";
  } else {
    styleTitle = "normal";
  }
  //alert(styleTitle);
  return styleTitle;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

/*
window.onload = function(e) {
  alert("start");
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();setStyle(title);
}
*/

/*
window.onunload = function(e) {
  alert("unload");
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}
*/

//var cookie = readCookie("style");
//alert("style:" + cookie);
//var title = cookie ? cookie : getPreferredStyleSheet();
if(cookie != null) {
  styleSelected = true;
  //if(cookie == "widescreen") {
  //  useWidescreen();
  //}
}

//setStyle(title);

// jEdit folding commands
// :folding=explicit:collapseFolds=1
//



//=====================================================================================
// THIS SCRIPT IS FOR THE DROP-DOWN SUBMENU
// Script inserted by Joseph Bastin on 03/26/2007
//=====================================================================================

function subMenuDisplay(obj,view){
	if (view!=1){		
		document.getElementById(obj).style.visibility='hidden';
	}else{
		document.getElementById(obj).style.visibility='visible';
	}
}



//=====================================================================================
// THIS SCRIPT IS FOR THE SLIDESHOW IN THE HOMEPAGE
// Script inserted by Joseph Bastin on 03/02/2007
//=====================================================================================

/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["/images/mastheadstmt0.jpg", "", ""] //plain image syntax
fadeimages[1]=["/images/mastheadstmt1.jpg", "", ""] //plain image syntax
fadeimages[2]=["/images/mastheadstmt2.jpg", "", ""] //plain image syntax
fadeimages[3]=["/images/mastheadstmt3.jpg", "", ""] //plain image syntax

var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["/images/mastheadstmt0.jpg", "", ""] //plain image syntax
fadeimages2[1]=["/images/mastheadstmt1.jpg", "", ""] //plain image syntax
fadeimages2[2]=["/images/mastheadstmt2.jpg", "", ""] //plain image syntax
fadeimages2[3]=["/images/mastheadstmt3.jpg", "", ""] //plain image syntax
 
var fadebgcolor="transparent"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

//=====================================================================================
//THIS SCRIPT IS FOR PRE-LOADING IMAGES
// Script inserted by Joseph Bastin on 03/02/2007
//=====================================================================================

var myimages=new Array()
function preloadimages()
	{
	for (i=0;i<preloadimages.arguments.length;i++)
		{
		myimages[i]=new Image()
		myimages[i].src=preloadimages.arguments[i]
		}
	}

preloadimages("/images/mastheadbg.jpg","/images/mastheadstmtbegin.jpg","/images/mastheadsc.jpg","/images/mastheadmodules.jpg","/images/mastheadend.jpg")
