function openPage (which) {
	newWindow = window.open(which,"New","scrollbars=yes,resizable=yes,width=450,height=450");
}
// Open Pop-Up Window
function openWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}

function bookmarkPage(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

// !Subnav control
window.addEvent('domready', function() {
	$$('.flood').each(function(item, index){	
		var div = item.getParent('.subnav');
		var li = div.getParent();
		if(div && li){
			div.setStyle('display', 'block');
			var sub = new Fx.Slide(item, { duration: 500, link: 'cancel', transition: 'quad:out' }).hide();
			var subFx = new Fx.Tween(item, { duration: 500, link: 'cancel' });
			li.addEvents({
		    	'mouseenter': function(){
			    	this.addClass('hover');
			    	subFx.cancel();
			    	sub.cancel();
			    	subFx.set('opacity', 1);
			    	sub.slideIn();
			    },
			    'mouseleave': function(){
			    	this.removeClass('hover');
			    	subFx.cancel();
			    	sub.cancel();
			     	subFx.start('opacity', 0);
			     	sub.slideOut();
			    }
			});
		}
	});
});


// !Lightboxes
window.addEvent('domready', function() {
	var mbox = new multiBox({ mbClass: '.mb' });	
});


function showPic(whichpic,whichurl) {
  if (!document.getElementById("placeholder")) return true;
  var source = whichpic.getAttribute("href");
  var placeholder = document.getElementById("placeholder");
  var placeholderlink = document.getElementById("placeholderlink");
  placeholder.setAttribute("src",source);
  placeholderlink.setAttribute("href",whichurl);
  if (!document.getElementById("description")) return false;
  if (whichpic.getAttribute("title")) {
    var text = whichpic.getAttribute("title");
  } else {
    var text = "";
  }
  var description = document.getElementById("description");
//  if (description.firstChild.nodeType == 3) {
//    description.firstChild.nodeValue = text;
//  }
//  return false;
}

