var oldzap;
var IE 		= (navigator.appName=="Microsoft Internet Explorer") ? true : false;
function zapFaq(zap)
{
	var faq 	= document.getElementById(zap).style;
	if(oldzap)
		var oldfaq 	= document.getElementById(oldzap).style;

	// IE browser crashes on SlideDown with relative position
	if(IE)
	{
		// IE can not handle the position relative, so hide the footer, to prevent garbled text
		document.getElementById('footer').style.display 	= "none";

    	if (faq.display == "none") {
			faq.display		= "block";
			if(oldzap && zap != oldzap)
				oldfaq.display 	= "none";
    	} else {

    		faq.display 	= "none";
    		document.getElementById('footer').style.display 	= "block";
		}
	}else{
		if (faq.display == "none") {
			if(oldzap && zap != oldzap)
				new Effect.SlideUp(oldzap, { duration: 0.5 });
			setTimeout("new Effect.SlideDown(oldzap, { duration: 0.5 });",500);
		} else {
				new Effect.SlideUp(zap, { duration: 0.5 });
		}
	}

	oldzap	= zap;
	return false;
}

function domRollover()
{

	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	var imgarr=document.getElementsByTagName('img');
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<imgarr.length;i++){
		if (imgarr[i].className.indexOf('domroll')!=-1){
			imgSrc[i]=imgarr[i].getAttribute('src');
			imgClass[i]=imgarr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/domroll (\S+)/)) {
				imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]
			}
			imgarr[i].setAttribute('xsrc', imgSrc[i]);
			imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/domroll (\S+)/)[1])
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}


function slide(toSlide)
{
	if(toSlide==menuID)
	{
		new Effect.SlideUp(menuID, { duration: 1 });
		menuID	= '';
		return false;
	}
	setTimeout("new Effect.SlideUp(menuID, { duration: 1 })",500);
	menuID	= toSlide;
	return true;
}
