function loadinc(myUrl,myField,options) 
{
num =   Math.ceil(Math.random()*1000000);
strurl = '/showinclude.cfm?include=' + myUrl + '&' + options + '&n=' + num;

var Field = document.getElementById(myField); // selects the given element
	Field.innerHTML = 'loading...';

	if(window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest(); 
	} else if(window.ActiveXObject) {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		return false;
	}	
	
	num =   Math.ceil(Math.random()*1000000);
	xmlhttp.open("GET", strurl,true);

	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState == 4) { 
			Field.innerHTML = xmlhttp.responseText; // puts the result into the element
		}
	
	}
	xmlhttp.send(null); 
}


function confirmDelete(obj)
{
	return confirm('Delete this record?');
}

//show/hide div within a group
function showHideDiv(divID) {
	//hide all other plus/minus images
	allImgs = document.all.tags("img");
	for(i=0; i<allImgs.length; i++) {
			if (allImgs[i].name.indexOf("form") != -1 && allImgs[i].id != "imgform" + divID) {
			allImgs[i].src = "images/false.gif";
		}
	}
	//hide all other divs
	allDivs = document.all.tags("div");
	for (i=0; i<allDivs.length; i++) {
		if (allDivs[i].id.indexOf("form") != -1 && allDivs[i].id != "divform" + divID) {
			allDivs[i].style.display = "none";			
		} 
	}
	
	//get reference to active div & image	
	activeDiv = document.getElementById("divform" + divID);	
	activeImg = document.getElementById("imgform" + divID);
	
	if (activeDiv.style.display == "block") {	
		activeImg.src = "images/false.gif";   
		activeDiv.style.display = "none";		
	}
	else {
		activeImg.src = "images/true.gif";
		activeDiv.style.display = "block";
	}
}


