
function insertlocation(buildingform, roomform, buildingdiv, roomdiv, buildingvalue, roomvalue, menudiv) {
document.getElementById([buildingform]).value=buildingvalue;
document.getElementById([roomform]).value=roomvalue;
document.getElementById([buildingdiv]).innerHTML=buildingvalue;
document.getElementById([roomdiv]).innerHTML=roomvalue;
hidelayer(menudiv);
}

function clearlocation(formfield,div) {
	document.getElementById([formfield]).value='';
document.getElementById([div]).innerHTML='';
}

function changeClass(Elem, myClass) {
	var elem;
	if(document.getElementById) {
		var elem = document.getElementById(Elem);
	} else if (document.all){
		var elem = document.all[Elem];
	}
	elem.className = myClass;
}



function toggleMenu(objID) {
	if (!document.getElementById) return; 
	var ob = document.getElementById(objID).style; ob.display = (ob.display == 'block')? 'none': 'block';}


function handleResponse() {
  alert('this function is called from server.html')
}

// function used in Uploads.asp, Programs.asp, to show the 
function showImage(img_src) {
  document.images['documentimage'].src=img_src;
  showlayer('imagelayer');
}


function changeID(idnum) {
	if(document.getElementsByTagName){
     var el = document.getElementsByTagName('li');
     for(var i=0; i<el.length; i++){
		  if(el[i].parentNode.className=="dateul"){
      		el[i].id = "notselected"+i;
			el[idnum].id = "current"

      		}
		}
	}

}

// function used  to highlight a table row, and make it clicable
// give the table a class of class-'tbl'
  var elem = "TR";
   var rClick;

 window.onload = function(){
  if(document.getElementsByTagName){
   var el = document.getElementsByTagName(elem);
    for(var i=0; i<el.length; i++){
     if(el[i].childNodes[0].tagName != "TH"
     && el[i].parentNode.parentNode.className.indexOf("tbl") != -1){
     if(i%2 == 1){
      el[i].className = "on";
      el[i].oldClassName = "on";
      el[i].onmouseout  = function(){
	     this.className = "on";
      }
	 
    } else {
      el[i].className = "off";
      el[i].oldClassName = "off";
      el[i].onmouseout  = function(){
	     this.className = "off";
      }
	   
    }
      el[i].onmouseover = function(){
	     if(this.className == this.oldClassName)
	       {this.className = "hover";}
      }
      el[i].onclick = function(){

       if(rClick){
        rClick.className=rClick.oldClassName;
        rClick.onmouseout = function(){this.className = this.oldClassName};
       }
        this.className = "click";
        rClick = this;
        this.onmouseout = function(){return true};
       }
    }
  }
 }
}
  //-->

	//document.getElementById('documentimage').src = Imageurl;
	//showlayer('imagelayer');


function changedatetab(el) {
	//document.getElementById('datemenu1').id='datemenu1';
	//document.getElementById('datemenu2').id='datemenu2';
	//document.getElementById('datemenu3').id='datemenu3';
	//document.getElementById(el).id='current';
	document.getElementById(el).className='current';
}

////////////// Confimration Popup Boxes  ///////////////////
<!--
     NS4 = (document.layers);
     IE4 = (document.all);
    ver4 = (NS4 || IE4);   
   isMac = (navigator.appVersion.indexOf("Mac") != -1);
if (document.images) {
arImLoad = new Array (
"../art/b_left_over",
"../art/b_left_down",
"../art/b_right_over",
"../art/b_right_down");
arImList = new Array ();
for (counter in arImLoad) {
arImList[counter] = new Image();
arImList[counter].src = arImLoad[counter] + ".gif";
}}
function navOver(imName,dir,over) {
if (!document.images) {return};
whichIm = document.images[imName];
if (over) {whichIm.src = "../art/b_" + dir + "_over.gif"}
else {whichIm.src = "../art/b_" + dir + ".gif"}
}
function navPress(imName,dir,press) {
whichIm = document.images[imName];
if (press) {whichIm.src = "../art/b_" + dir + "_down.gif"}
else {whichIm.src = "../art/b_" + dir + ".gif"}
}
function newAlert(title,mess,icon,mods) {
   (IE4) ? makeMsgBox(title,mess,icon,0,0,mods) : alert(mess);
}


function newAlert(title,mess,icon,mods) {
   (IE4) ? makeMsgBox(title,mess,icon,0,0,mods) : alert(mess);
}
function newDeleteUserConfirm(title,mess,icon,defbut,mods,userid) {
   if (IE4) {
      icon = (icon==0) ? 0 : 2;
      defbut = (defbut==0) ? 0 : 1;
      retVal = makeMsgBox(title,mess,icon,4,defbut,mods);
      retVal = (retVal==6);
   }
   else {
      retVal = confirm(mess);
   }
  // alert(retVal);
   //return retVal;
   
   if (retVal) {
	   //	alert('place action here .... take 6');
   		//participant.action.value = 'delete'
		//alert(participant.action.value);
		//participant.submit();
		location.replace('v_deleteuser.asp?uid='+userid);
		}
		else
		{
		return retVal;
		}
}
function newPrompt(title,mess,def) {
   retVal = (IE4) ? makeInputBox(title,mess,def) : prompt(mess,def);
   return retVal;
}
function IEBox(title,mess,icon,buts,defbut,mods) {
   retVal = (IE4) ? makeMsgBox(title,mess,icon,buts,defbut,mods) : null;
   return retVal;
}
////////////////////////////




/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["RightsFrame"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller


//  Functions for Check All Checkboxes
//  This is Used in:   Archive Wizard (w_WZ_Archiveusers.asp)

function checkAll() {
	var selectAll = document.getElementById('SelectAll');
	var inputs = document.getElementsByTagName('input');
	for (var i = 0; i < inputs.length; i++)
	{
	if (inputs[i].type == 'checkbox' && inputs[i].name == 'Form_Users' ) {
	if(selectAll.checked==true)
	inputs[i].checked = true;
	else
	inputs[i].checked = false;
	}
	}
}

// replace textbox with text

function exchange(id, editmode){
	if (editmode =='edit') {
		var ie=document.all&&!window.opera? document.all : 0
		var frmObj=ie? ie[id] : document.getElementById(id)
		var toObj=ie? ie['Form_' +id] : document.getElementById('Form_' +id)
		//toObj.style.width=frmObj.offsetWidth+7+'px'
		frmObj.style.display='none';
		toObj.style.display='block';
		toObj.style.display='inline';
		toObj.value=frmObj.innerHTML
	}
	else
	{ alert('You are in view only mode, and are not allowed to make changes');}
	
}



//--><!]]>


