//the main function, call to the effect object
function init(){

	var stretchers = document.getElementsByClassName('stretcher'); //div that stretches
	var toggles = document.getElementsByClassName('faq'); //h3s where I click on

	//accordion effect
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: true, duration: 500}
	);

	//hash function
	
	function checkHash(){
		var found = false;
		toggles.each(function(h3, i){
			if (window.location.href.indexOf(h3.title) > 0) {
				myAccordion.showThisHideOpen(stretchers[i]);
				found = true;
			}
		});
		return found;
	}
	
	if (!checkHash()) myAccordion.showThisHideOpen(stretchers[0]);
}

function showDiv(strDivName)
{
	objElement = document.getElementById(strDivName).style;
	
	objElement.display = "block";
}

function RunFlash(strFlashFile, strWidth, strHeight)
{
    document.write('<object type="application/x-shockwave-flash" data="' + strFlashFile + '" width="' + strWidth + '" height="' + strHeight + '">\n');
    document.write('<param name="movie" value="' + strFlashFile + '" />\n');
    document.write('<param name="quality" value="high" />\n');
    document.write('</object>\n');
}
