var path = window.location.pathname;
	path.match("([^/]+)$");
var file = RegExp.$1;

if( !file ){ file = 'index.html'}

var swapLinks = {
	'#navbar a' : function(el){
		var href = el.getAttribute('href', 2);
		if(href==file){
			el.className = "active";
			el.removeAttribute('href');
		}
	}
};
Behaviour.register(swapLinks);

function alphaLoader(id) {
  var obj = document.getElementById(id);
  if(obj.runtimeStyle){
    var image = obj.src; 
    obj.src = "images/spacer.gif";
    obj.runtimeStyle.filter =
       'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
       + image + '", sizingmethod="image");';
  }
}
