﻿//Alternative message for browsers that don't support window.print
function printPage(){
  if (window.print){
    window.print();
  }else{
    alert("Sorry, your browser does not support this feature. To print the page choose Print from your browser's menu (usually File > Print). Windows users can also use 'CTRL + P' and Mac users can also use 'Command + P'.");
  }
}

//Writes out the print page icon and link - x is for all the pages, y is for the home page
function printlink(){
    var x, y
    
    if (document.getElementById("printpage") != null ) {
        x = document.getElementById("printpage");
        x.innerHTML = '<p><a class="print" href="#" onclick="printPage();return false;" title="Print this page">Print this page</a></p>';
    }
    if (document.getElementById("printhomepage") != null ) {
        y = document.getElementById("printhomepage");
        y.innerHTML = '<a href="#" onclick="printPage();return false;" title="Print this page"><img src="/templates/common/images_structure/icon_print_page.gif" width="14" height="13" alt="Print this page" /> <span class="hidden">Print this page</span></a>';    
    }
}


sfHover = function() {
  var sfEls = document.getElementById("nav").getElementsByTagName("LI");
  for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      if (this.className != 'home') {
        if (window.attachEvent) {
          this.className+=" sfhover";
          // Hide form elements
          for (y=1; y<document.forms.length; y++) {
            if (document.forms[y].name != 'hdrSearch') {
              for (x=0; x<document.forms[y].elements.length; x++) {
                //alert('Type: ' + document.forms[y].elements[x].type + ', Name: ' + document.forms[y].elements[x].name);
                document.forms[y].elements[x].style.visibility = 'hidden';
              }
            }
          }
        }
        // Hide video
        var elmVideo = document.getElementById('vidcontainer')
        if (elmVideo != null) { elmVideo.style.visibility = 'hidden' }
      }
    }  
    sfEls[i].onmouseout=function() {
      if (this.className != 'home') {
        if (window.attachEvent) {
          this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
          // Show form elements
          for (y=1; y<document.forms.length; y++) {
            if (document.forms[y].name != 'hdrSearch') {
              for (x=0; x<document.forms[y].elements.length; x++) {
                //alert('Type: ' + document.forms[y].elements[x].type + ', Name: ' + document.forms[y].elements[x].name);
                document.forms[y].elements[x].style.visibility = 'visible';
              }
            }
          }
        }
        // Show video
        var elmVideo = document.getElementById('vidcontainer')
        if (elmVideo != null) { elmVideo.style.visibility = 'visible' }
      }
    }
  }  
  printlink();
}
window.onload = sfHover;
 

/* Last published: 2008-12-08 07:31:31 */