//  pass the url  and  optionally a width, height, and window name
function spawnWindow(url,name,w,h){
	if(w == undefined) w = 320;
	if(h == undefined) h = 240;
	if(name == undefined) name = "popWindow";
	var newWindow = window.open(url,name,"toolbar=0,scrollbars=1,resizable=1,width="+w+",height="+h+"\"");		
 }
 function spawnJukebox(){
	var newWindow = window.open("content/jukebox.php",'jb',"toolbar=0,scrollbars=1,resizable=1,width=300,height=250");		
 }
 function ifExists(val, htmlOut, other){
	if (typeof other=='undefined') other = "";
	
	if (val.length && val != "false" && val !="/echotools/images/spacer.gif"){
	document.write (htmlOut);
	}else{
		if(other.length)
		{
			document.write (other);
		}
	}
}

if(!$){
	alert ('this FAQ uses jquery - which does not appear to be accesible on this page!\nRemove the js or get jquery going')
}
$(document).ready(function() {
	// Stuff to do as soon as the DOM is ready;
	$('div.faqAnswer').hide();
	$('div.faqQuestion').click(function() {
	                   faqToggle(this);})
});

function faqToggle(e){
	$(e).siblings('div.faqAnswer').toggle('slow');
	$(e).toggleClass('active');
}
