////////////////////////////////////
// No Spam email
////////////////////////////////////
function noSpamMailto (s) {
//this is before the '@'
  var x = "db"
//this is the server
  var y = "djbgroup"
//its location - .com or .com.au
  var z = "com.au"
  var xyz = x+"@"+y+"."+z
  if (s != "")
    subject = "?subject="+s
  else
    subject = " "

  document.write ('<a href="mailto:'+xyz+subject+'" title=\"Please contact us\">email djb</a>')
}

////////////////////////////////////
// Contact Open
////////////////////////////////////
function openContact(){
var theElement = document.getElementById("contact");
if (theElement.className=="closed"){
	theElement.className='open';}

	else{theElement.setAttribute("class", "closed");theElement.className='closed';}
	
}

////////////////////////////////////
// Turn Menu off
////////////////////////////////////
function OnOffPG(whichone){
	mitem = document.getElementById(whichone);
    if (mitem!=null){mitem.style.display = (mitem.style.display==''||mitem.style.display=='block')?'none':'block';}
}

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

addLoadEvent(function() {
  OnOffPG('subMenu');
});

