// JavaScript Document

// Function to kick IE into action for CSS Rollovers
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("dmenu");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
				this.className+=" over";
				}
				node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function showPic (whichpic, strImageID) {
 if (document.getElementById) {
 var strThumb, strLarge;
  strThumb= document.getElementById(strImageID).src;
  strLarge = document.getElementById('ImagePlaceholder').src;
  document.getElementById(strImageID).src = strLarge;
  document.getElementById('ImagePlaceholder').src = strThumb;
  document.getElementById('ImageLarge').href = "javascript:PopupPic('" + whichpic.name + "')";
  return false;
 } else {
  return true;
 }
}

function confirmDelete(link)
{
	var agree=confirm("Are you sure you wish to continue?");
	if(agree){
		if(link){
			return window.location=link;
		}else{
			return true;
		}
	}else{
		return false;
	}
}

function PopupPic(sPicURL) { 
	window.open(sPicURL, "", "resizable=1,height=200,width=200");
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}