function scAdClick(code) {	    
	var s=s_gi(s_account);   
	s.products=';' + code;   
	s.eVar12=code;   
	s.events='event11';   
	s.linkTrackVars='eVar12,products,events';   
	s.linkTrackEvents='event11';   
	s.tl(this,'o','Ad Click');
}

var currentMenuId = 'menuprod'; 
function startList(elem) {
//if (document.all&&document.getElementById) {
if (document.getElementById) {
  navRoot = document.getElementById(elem);
  if(navRoot) {
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover = function() {
          document.getElementById(currentMenuId).className="";
          if(this.className != "current") {
            this.className+=" over";
            this.className+=" current";
            currentMenuId = this.id;
          }
        }
        node.onmouseout = function() {
        document.getElementById(currentMenuId).className += "current";
      }
     }
    }
  }
 }
}

function getCurrentMenuId() {
if (document.getElementById) {
  if(document.getElementById("nav")) {
    navRoot = document.getElementById("nav");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        if (node.id.indexOf("current") > -1) {
          currentMenuId = node.id;
        }
      }
    }
    return currentMenuId;
    }
  }
}

function focusInput() {
//if (document.all&&document.getElementById) {
if (document.all&&document.getElementById) {
  nodes = document.getElementsByTagName("INPUT");
  for (i=0; i<nodes.length; i++) {
    node = nodes[i];

    if(node.getAttribute('type') != 'submit') {
      node.onfocus = function() {
        this.className += " inputFocus";
      }
      node.onblur = function() {
				var removeClassExpr = /inputFocus/;											
        this.className = this.className.replace(removeClassExpr, '');
      }
    } 
  }
 }
}

function replaceActionLink() {
	    var orderForm = document.getElementById('orderProducts');
		var actionLink = document.getElementById('actionLink');
		if (actionLink && orderForm) {
			var actionText = document.getElementById('actionLinkButton');			
			var button = orderForm.getElementsByTagName('button');
			var action = button[0].title;
			actionText.innerHTML = action;
			actionLink.style.display = "";
		}
}

function submitProductOrderForm() {	
	document.forms[0].submit();
	return false;
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(getCurrentMenuId);
addLoadEvent(focusInput);
addLoadEvent(replaceActionLink);
addLoadEvent(function() {
  startList('nav');
});


// Function to add a link to favourites
// For Opera/Mozilla use the rel and title tags 
// i.e. <a href="http://www.melbourneit.com.au" rel="sidebar" title="Melbourne IT">Bookmark me</a>
function addToFavourites(urlAddress,pageName) { 
  if (window.sidebar) { // Mozilla Firefox Bookmark
    //window.sidebar.addPanel(pageName,urlAddress,"");
    return true;
  } else if(window.opera && window.print) { // Opera Hotlist
    return true;  
  } else if (window.external) { // IE
    window.external.AddFavorite(urlAddress,pageName);  
  }
}

