/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this script and the associated (x)html
is available at http://www.stunicholls.com/menu/pro_concertinaslide_2.html
Copyright (c) 2005-2008 Stu Nicholls. All rights reserved.
This script and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */

var getdd = document.getElementById('slide').getElementsByTagName("DD");
var getdt = document.getElementById('slide').getElementsByTagName("DT");

	for (var i=0; i<getdt.length; i++) {
		getdt[i].onclick=function() {
	if (this.id.indexOf('item') != -1) {
	for (var z=0; z<getdd.length; z++) {
		if (getdd[z].id.indexOf(this.id) !=-1 && getdd[z].className=='') {
		eNext = getdd[z].firstChild;
		while (eNext.nodeType!=1) {eNext = eNext.nextSibling;}
		ulHeight = eNext.offsetHeight;
		expand (0,ulHeight,getdd[z].id)
		}
		else {
		eNext = getdd[z].firstChild;
		while (eNext.nodeType!=1) {eNext = eNext.nextSibling;}
		ulHeight = eNext.offsetHeight;
		if (getdd[z].offsetHeight > 0) {
		contract (ulHeight,0,getdd[z].id)
		}
		}
		if (getdd[z].id.indexOf(this.id) !=-1 && getdd[z].className=='') {
			getdd[z].className='selected'; 
			this.className='slide';
			}
		else {
			getdd[z].className='';
			getdt[z+1].className='';
			}
		}
	}
	}
}
function expand (cY, fY, subY) {
cY=cY+2;;
if (cY <= fY) {
document.getElementById(subY).style.height = cY + "px";
setTimeout ("expand("+cY+","+fY+",'"+subY+"')", 5);
}
}

function contract (cZ, fZ, subZ) {
cZ=cZ-2;
if (cZ >= fZ) {
document.getElementById(subZ).style.height = cZ + "px";
setTimeout ("contract("+cZ+","+fZ+",'"+subZ+"')", 5);
}
}




function inquire(listing, w, h){ 
 var width  = w;
 var height = h;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 var urlx =  "help.asp?id=" + listing;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(urlx,'windowname5', params);
 if (window.focus) {newwin.focus()}
}

function demoalert() {
	alert("Sorry, this is not permitted \nwhile using website in \demo mode.");
}
