// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// 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("img/popup.htm?"+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;
}
var bo_ns_id = 0;
function startIeFix(){  
	if(isIE()){    
		document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');  
	}
}
function endIeFix(){  
	if(isIE()){
	    document.write('</div>');
	    var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);    
		var theCode = theObject.innerHTML;    
		theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))    
		document.write(theCode);  
	}
}
function isIE(){  
	// only for Win IE 6+  
	// But not in Windows 98, Me, NT 4.0, 2000  
	var strBrwsr= navigator.userAgent.toLowerCase();  
	if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){    
		if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){
		      return false;   
		}    
		if(strBrwsr.indexOf("win98") > -1 ||       
			strBrwsr.indexOf("win 9x 4.90") > -1 ||
			strBrwsr.indexOf("winnt4.0") > -1 ||
			strBrwsr.indexOf("windows nt 5.0") > -1)    
		{      
			return false; 
		}   
		return true;  
	}else{
		return false;
	}
}