//-----------------------------------------------------------------------------
// The print Version
//-----------------------------------------------------------------------------
function insertprintdiv()
{
 
 document.write ('<div id="printer"  style="position:absolute; left:667px; top:52px; width:125px; height:18px; z-index:0">');
 document.write ('<table><tr><td><a href="/cgi-bin/print.cgi"><img src="/images/common/printer.gif" width=21 height=20 alt="" border=0></a></td><td align="center"><font face="Arial, Helvetica, sans-serif" size="1"><a href="/cgi-bin/print.cgi">Printer-friendly<br>version</a></font></td></tr></table></div>');
}

//-----------------------------------------------------------------------------
// Checking Layers
//-----------------------------------------------------------------------------

function WM_checkIn(id) {

  if (document.all) {
    return document.all[id].style;
    
  } else if(document.layers) {
    return document.layers[id];
  }
}

//-----------------------------------------------------------------------------
// Move Search Layer
//-----------------------------------------------------------------------------

function WM_moveSearch(daObject, endLeft, endTop, numSteps, delay, endFunction) {

/*

WM_moveSearch()

Moves an object from its current location to a new location and optionally fires a function when it's done.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

Usage: WM_moveSearch('objectName', endingLeft, endingTop, numberOfSteps, delayBetweenSteps, 'functionToFire()'); 

*/

  // Declare variables.
  var leftInc, topInc, daObj = new Object;
  // The first time through, create document.WM.WM_moveSearch
  if (typeof document.WM == 'undefined'){
  	
    document.WM = new Object;
    document.WM.WM_moveSearch = new Object;
  } else if (typeof document.WM.WM_moveSearch == 'undefined') {
  	
    document.WM.WM_moveSearch = new Object;
  }
  // Store endFunction to execute when the move is finished.
  if(endFunction) document.WM.WM_moveSearch.endFunction = endFunction;
  // Get a good object reference (call it daObj) from WM_checkIn().
  // But if we've already done so, don't check it in again.
    if (daObject == "sameObj") {
    	
      daObj = document.WM.WM_moveSearch.daObj;
    } else {
    	
      daObj = WM_checkIn(daObject);
      document.WM.WM_moveSearch.daObj = daObj;
    }
  // If this is the last step, go to the end point and run endFunction.
  if (numSteps == 1) {
    daObj.left = endLeft;
    daObj.top = endTop;
    // If an endFunction was set, execute it and then delete it.
    if(document.WM.WM_moveSearch.endFunction) {
      daFunction = document.WM.WM_moveSearch.endFunction;
      document.WM.WM_moveSearch.endFunction = '';
      eval(daFunction);
    }
  } else {
    // Otherwise, figure out how far to move.
    leftInc = (endLeft - parseInt(daObj.left)) / numSteps;
    topInc = (endTop - parseInt(daObj.top)) / numSteps;
    // Then move, decrement numSteps, and do it all again.
    daObj.left = parseInt(daObj.left) + leftInc;
    daObj.top = parseInt(daObj.top) + topInc;
    numSteps--;
    setTimeout ('WM_moveSearch(\'sameObj\', ' + endLeft + ', ' + endTop + ', ' + numSteps + ', ' + delay + ')', delay);
  }
}


//-----------------------------------------------------------------------------
// Move Worldwide Layer
//-----------------------------------------------------------------------------

function WM_moveWorld(daObject, endLeft, endTop, numSteps, delay, endFunction) {

/*

WM_moveWorld()

Moves an object from its current location to a new location and optionally fires a function when it's done.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

Usage: WM_moveWorld('objectName', endingLeft, endingTop, numberOfSteps, delayBetweenSteps, 'functionToFire()'); 

*/

  // Declare variables.
  var leftInc, topInc, daObj = new Object;
  // The first time through, create document.WM.WM_moveWorld
  if (typeof document.WM == 'undefined'){
    document.WM = new Object;
    document.WM.WM_moveWorld = new Object;
  } else if (typeof document.WM.WM_moveWorld == 'undefined') {
    document.WM.WM_moveWorld = new Object;
  }
  // Store endFunction to execute when the move is finished.
  if(endFunction) document.WM.WM_moveWorld.endFunction = endFunction;
  // Get a good object reference (call it daObj) from WM_checkIn().
  // But if we've already done so, don't check it in again.
    if (daObject == "sameObj") {
      daObj = document.WM.WM_moveWorld.daObj;
    } else {
      daObj = WM_checkIn(daObject);
      document.WM.WM_moveWorld.daObj = daObj;
    }
  // If this is the last step, go to the end point and run endFunction.
  if (numSteps == 1) {
    daObj.left = endLeft;
    daObj.top = endTop;
    // If an endFunction was set, execute it and then delete it.
    if(document.WM.WM_moveWorld.endFunction) {
      daFunction = document.WM.WM_moveWorld.endFunction;
      document.WM.WM_moveWorld.endFunction = '';
      eval(daFunction);
    }
  } else {
    // Otherwise, figure out how far to move.
    leftInc = (endLeft - parseInt(daObj.left)) / numSteps;
    topInc = (endTop - parseInt(daObj.top)) / numSteps;
    // Then move, decrement numSteps, and do it all again.
    daObj.left = parseInt(daObj.left) + leftInc;
    daObj.top = parseInt(daObj.top) + topInc;
    numSteps--;
    setTimeout ('WM_moveWorld(\'sameObj\', ' + endLeft + ', ' + endTop + ', ' + numSteps + ', ' + delay + ')', delay);
  }
}


//-----------------------------------------------------------------------------
// Move Main Layer
//-----------------------------------------------------------------------------

function WM_moveMain(daObject, endLeft, endTop, numSteps, delay, endFunction) {

/*

WM_moveMain()

Moves an object from its current location to a new location and optionally fires a function when it's done.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

Usage: WM_moveMain('objectName', endingLeft, endingTop, numberOfSteps, delayBetweenSteps, 'functionToFire()'); 

*/

  // Declare variables.
  var leftInc, topInc, daObj = new Object;
  // The first time through, create document.WM.WM_moveMain
  if (typeof document.WM == 'undefined'){
    document.WM = new Object;
    document.WM.WM_moveMain = new Object;
  } else if (typeof document.WM.WM_moveMain == 'undefined') {
    document.WM.WM_moveMain = new Object;
  }
  // Store endFunction to execute when the move is finished.
  if(endFunction) document.WM.WM_moveMain.endFunction = endFunction;
  // Get a good object reference (call it daObj) from WM_checkIn().
  // But if we've already done so, don't check it in again.
    if (daObject == "sameObj") {
      daObj = document.WM.WM_moveMain.daObj;
    } else {
      daObj = WM_checkIn(daObject);
      document.WM.WM_moveMain.daObj = daObj;
    }
  // If this is the last step, go to the end point and run endFunction.
  if (numSteps == 1) {
    daObj.left = endLeft;
    daObj.top = endTop;
    // If an endFunction was set, execute it and then delete it.
    if(document.WM.WM_moveMain.endFunction) {
      daFunction = document.WM.WM_moveMain.endFunction;
      document.WM.WM_moveMain.endFunction = '';
      eval(daFunction);
    }
  } else {
    // Otherwise, figure out how far to move.
    leftInc = (endLeft - parseInt(daObj.left)) / numSteps;
    topInc = (endTop - parseInt(daObj.top)) / numSteps;
    // Then move, decrement numSteps, and do it all again.
    daObj.left = parseInt(daObj.left) + leftInc;
    daObj.top = parseInt(daObj.top) + topInc;
    numSteps--;
    setTimeout ('WM_moveMain(\'sameObj\', ' + endLeft + ', ' + endTop + ', ' + numSteps + ', ' + delay + ')', delay);
  }
}
function WM_moveMain1(daObject, endLeft, endTop, numSteps, delay, endFunction) {

/*

WM_moveMain()

Moves an object from its current location to a new location and optionally fires a function when it's done.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

Usage: WM_moveMain('objectName', endingLeft, endingTop, numberOfSteps, delayBetweenSteps, 'functionToFire()'); 

*/

  // Declare variables.
  var leftInc, topInc, daObj = new Object;
  // The first time through, create document.WM.WM_moveMain
  if (typeof document.WM == 'undefined'){
    document.WM = new Object;
    document.WM.WM_moveMain = new Object;
  } else if (typeof document.WM.WM_moveMain == 'undefined') {
    document.WM.WM_moveMain = new Object;
  }
  // Store endFunction to execute when the move is finished.
  if(endFunction) document.WM.WM_moveMain.endFunction = endFunction;
  // Get a good object reference (call it daObj) from WM_checkIn().
  // But if we've already done so, don't check it in again.
    if (daObject == "sameObj") {
      daObj = document.WM.WM_moveMain.daObj;
    } else {
      daObj = WM_checkIn(daObject);
      document.WM.WM_moveMain.daObj = daObj;
    }
  // If this is the last step, go to the end point and run endFunction.
  if (numSteps == 1) {
    daObj.left = endLeft;
    daObj.top = endTop;
    // If an endFunction was set, execute it and then delete it.
    if(document.WM.WM_moveMain.endFunction) {
      daFunction = document.WM.WM_moveMain.endFunction;
      document.WM.WM_moveMain.endFunction = '';
      eval(daFunction);
    }
  } else {
    // Otherwise, figure out how far to move.
    leftInc = (endLeft - parseInt(daObj.left)) / numSteps;
    topInc = (endTop - parseInt(daObj.top)) / numSteps;
    // Then move, decrement numSteps, and do it all again.
    daObj.left = parseInt(daObj.left) + leftInc;
    daObj.top = parseInt(daObj.top) + topInc;
    numSteps--;
    setTimeout ('WM_moveMain(\'sameObj\', ' + endLeft + ', ' + endTop + ', ' + numSteps + ', ' + delay + ')', delay);
  }
}


function MM_preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function MM_swapImgRestore() { //v2.0
  if (document.MM_swapImgData != null)
    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}

function MM_swapImage() { //v2.0
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; //used for restore
}

function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

//-----------------------------------------------------------------------------
// preloads and swaps, version 3
//-----------------------------------------------------------------------------

function AN_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.AN_p) d.AN_p=new Array();
    var i,j=d.AN_p.length,a=AN_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.AN_p[j]=new Image; d.AN_p[j++].src=a[i];}}
}

function AN_swapImgRestore() { //v3.0
  var i,x,a=document.AN_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function AN_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=AN_findObj(n,d.layers[i].document); return x;
}

function AN_swapImage() { //v3.0
  var i,j=0,x,a=AN_swapImage.arguments; document.AN_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=AN_findObj(a[i]))!=null){document.AN_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

