sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

function openWin(URL) {
	awindow = window.open(URL,"thewindow","width = 850, height = 650, scrollbars = yes, location=yes, directories=no,  copyhistory=no, status=yes, menubar=no, resizable = yes, toolbar=no");
}

           
     function nextPicture() {
         // Hide current picture
         object = document.getElementById('slide' + current);
         object.style.display = 'none';
               
         // Show next picture, if last, loop back to front
         if (current == last) { current = 1; }
         else { current++ }
         object = document.getElementById('slide' + current);
         object.style.display = 'block';
      }

      function previousPicture() {
         // Hide current picture
         object = document.getElementById('slide' + current);
         object.style.display = 'none';
               
         if (current == first) { current = last; }
         else { current--; }
         object = document.getElementById('slide' + current);
         object.style.display = 'block';
     }
