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; }
 
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function TeamPopUp(url, title) {
var w = window.open(url, title, "location=no,resizable=yes,toolbar=no,scrollbars=yes,width=600,height=400");
}

function ImagesPopUp(url, title) {
var w = window.open(url, title, "location=no,resizable=yes,toolbar=no,scrollbars=yes,width=800");
}

function checkall (thestate) {
	var theform=document.aspnetForm;
	for (i=0; i < theform.elements.length; i++) {
		if (theform.elements[i].type == "checkbox") {
			//alert (form.elements\[i\].type);
			theform.elements[i].checked = thestate;
		}	
	}
}

function ServicePopUp(url, title) {
    var w = window.open(url, title, "location=no,resizable=yes,toolbar=no,scrollbars=yes,width=300,height=200");
}

function PopUp(url) {
	newwindow=window.open(url, '', 'width=500,height=300,scrollbars=yes,resizable=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
      } 
} 

