rightClickWarning = "All photos are Copyright Andrew Murdoch. Unauthorised use is prohibited."

/* Move photobar to bottom */
SM.PhotoBar.config.position = 'bottom'; 

/* Add referral code to smugmug link in footer */
function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer=bUJAJL4qDlhIo";
  }
}
YE.onAvailable('footer', AddReferralCode);

/* email protection */
function norobotmail(aUser, aDomain) { 
       document.location = "mailto:" + aUser + "@" + aDomain;
    }

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
function createSWF( w, h, params) {
 var args = "";
 for (var i in params) {
     args += i + "=" + params[i] + "&amp;";
 }
 document.writeln('<object width="100%" height="100%" align="middle">'+
'<param name="movie" value="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'"/>'+
'<param name="wmode" value="transparent" />'+
'<embed src="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'" wmode="transparent" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all"/></object>');
return 1;
} 

/* redirection of dna to andrew */
function redirectPath() { 
  re = /((www.)?dna.smugmug.com)/; 
  tmp = window.location.href; 
  if (re.test(tmp)) { 
    tmp = tmp.replace(re, 'www.andrewmurdoch.com.au'); 
    window.location.href = tmp; 
  } 
}
redirectPath(); 


/* Swapping subcats and galleries */
function swapBoxes() {
   box1 = YD.get("subcategoriesBox");
   box2 = YD.get("galleriesBox");
   if (box1 && box2)
   {
      swap = box1.innerHTML;
      box1.innerHTML = box2.innerHTML;
      box2.innerHTML = swap;
   }
}

/*Google Maps */
/*  Set the map coordinates and zoom level */
function UpdateMap()
   {
   map.setCenter(new GLatLng(20.61218944780605, -105.23392796516418), 13);
   }

/* If this is the Find page, add a listener for the map's load event */
if(hasPath("find"))
   GEvent.addListener(map, "load", UpdateMap);