
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_setTextOfLayer(objName,x,newText) { //v3.0 updated by Robert Lee with " && document.layers" for NS6 compatibility
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (navigator.appName=='Netscape' && document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function SDIG_toggleDisplay(objName) { // changes style's display attribute between 'none' & 'block'
  var obj = MM_findObj(objName);
	if  (obj.style.display == 'none') obj.style.display = 'block';
	else obj.style.display = 'none';
}


function SDIGdigiClock(){
	var plush;
	var plusm;
	var pluss;
	var digiClock;
	now=new Date();
	if(now.getHours()<10){plush="0"}else plush='';
	if(now.getMinutes()<10){plusm="0"}else plusm='';
	if(now.getSeconds()<10){pluss="0"}else pluss='';
	digiClock=plush + now.getHours() + ':' + plusm + now.getMinutes() + ':' + pluss + now.getSeconds();
	document.getElementById('digiClock').innerHTML=digiClock;
	setTimeout("SDIGdigiClock()",1000)
}

function SDIGtoggleCheckboxes(idString) {
	var inputs = document.getElementsByTagName("input");
	var c = idString.length;
	for(index = 0; index < inputs.length; index++){
		if(inputs[index].id.substring(0,c) == idString){
			if(inputs[index].checked == 0) inputs[index].checked = 1;
			else if(inputs[index].checked == 1) inputs[index].checked = 0;
		}
	}
}

function SDIGcheckAllCheckboxes(idString) {
	var inputs = document.getElementsByTagName("input");
	var c = idString.length;
	for(index = 0; index < inputs.length; index++){
		if(inputs[index].id.substring(0,c) == idString){
			inputs[index].checked = 1;
		}
	}
}

function SDIGuncheckAllCheckboxes(idString) {
	var inputs = document.getElementsByTagName("input");
	var c = idString.length;
	for(index = 0; index < inputs.length; index++){
		if(inputs[index].id.substring(0,c) == idString){
			inputs[index].checked = 0;
		}
	}
}

function SDIGclearAllTextInputs(formId) {
	var form, elements, i, elm;
	form = document.getElementById ? document.getElementById(formId) : document.forms[formId]; 
	if(document.getElementsByTagName){
		elements = form.getElementsByTagName('input');
		for(i=0, elm; elm=elements.item(i++);){
			if(elm.getAttribute('type') == "text"){
				elm.value = '';
			}
		}
	}else{
		elements = form.elements;
		for(i=0, elm; elm=elements[i++];){
			if(elm.type == "text"){
				elm.value ='';
			}
		}
	}
}




function SDIGchangeSelectOptions(formName, selectName, selector){
	s=document.forms[formName][selectName];
	s.length=selectItems[selector].length;
	for(i=0;i<s.length;i++){
 		s.options[i]=new Option(selectItems[selector][i][1],selectItems[selector][i][0]);
	}
	if(s.length==1) document.forms[formName][selectName].disabled=true;
	else document.forms[formName][selectName].disabled=false;
}
