d = document;function loadCompany(theCompany,id) {			if (d.getElementById) {				// delete any existing company info div		var oldCompanyInfo = d.getElementById('company_record');		if (oldCompanyInfo != null) {			var oldCompany = oldCompanyInfo.parentNode;			oldCompany.removeChild(oldCompanyInfo);		}				// loop through and reset all company list records		var node = d.getElementById('company_list');		var tag = "div";		var companyDivs = node.getElementsByTagName(tag);		var companyCount = companyDivs.length;		for (i = 0; i < companyCount; i++) {			//  turn off the "on" class that highlights the record			if (companyDivs[i].className == "company_link") {				var parent = companyDivs[i].parentNode;				parent.className = "";			}		}			// activate the clicked company, and create the holder div		theCompany.parentNode.className  = "on";		var infoHolder = d.createElement('div');		infoHolder.setAttribute('id','company_record');		theCompany.parentNode.appendChild(infoHolder);		var theLink = 'companyrecord.asp?id=' + id;		ahah(theLink,'company_record');	}}// Set up and call Behavior js library to add onclick handlers to the companiesvar rules = {	'div.company_link' : function(el){		el.onclick = function(){			var href = this.firstChild.href;			var qString = href.split('id=');			var splitQString = qString[1].split('&');			var id = splitQString[0];			loadCompany(this,id);			return false;		}	}};Behaviour.register(rules);
