



var didnum=0;

function popover(state) {
			switch(state) {
				case 1:
                                  window.clearTimeout(timer);
				  new Effect.Appear('homepopover', {duration:0.6});				  
				  new Effect.Morph('homepopover', {
  						style:'display:block; overflow:visible; width:900px; height:700px; top: 70px; margin-left: -730px;',
  						duration:0.4}
  						);
 				break;

				default:
						new Effect.Fade('homepopover', {duration:0.8});	
						new Effect.Morph('homepopover', {
  						style:'top:570px; overflow:hidden; width:0px; height:0px; margin-left:208px;',
  						duration:0.5}
  						);
                                setTimeout("swappanels("+ pc + ")", 3500);
			}
}

function popoverstat(state) {
			switch(state) {
				case 1:
				  new Effect.Appear('homepopover', {duration:0.6});				  
				  new Effect.Morph('homepopover', {
  						style:'display:block; overflow:visible; width:900px; height:700px; top: 70px; margin-left: -480px;',
  						duration:0.4}
  						);
 				break;

				default:
						new Effect.Fade('homepopover', {duration:0.8});	
						new Effect.Morph('homepopover', {
  						style:'top:570px; overflow:hidden; width:0px; height:0px; margin-left:208px;',
  						duration:0.5}
  						);
			}
}

 var mc = 0;
 function swapqlhome(mc){
  	panelobj = document.getElementById('mainpanel');
 	panelobj.innerHTML = '<div id="h2text"><h2><span class="whitelarge">'+txtpanel[mc]+'</span></h2></div><img src="images/core/main-panel-border.png" alt="promotional area"/><style type="text/css">#mainpanel { background: #fff url('+imgpanel[mc]+') 3px 5px no-repeat; }</style><div id="h2link"><a href="'+link[mc]+'">FIND OUT MORE</a></div>';



 	if (mc < (imgpanel.length -1)) { mc++; }
	else { mc=0;}
sIFR.replace(dinreg, {
    selector: 'h2', wmode: 'transparent', fitExactly: 'true', forceWidth: 'true',
	
	css: '.sIFR-root { text-align: center; font-size: 18px; letter-spacing: 1; leading: 0; text-decoration: none; text-transform: uppercase; color: #636363;} .whitelarge {color: #ffffff; font-size: 140%; } a:visited { color: #636363; text-decoration: none; }; a:link { color: #636363; text-decoration: none; }; a:hover { color: #636363; text-decoration: none;}; .activeparent { color: #636363; text-decoration: none;}; .currentpage { color: #636363; text-decoration: none;}; }'
});
	qltimer = setTimeout("swapqlhome("+ mc + ")", 7000);
 }

function getfaq(dir) {
         if (didyouknowarray) {
             switch(dir) {
                case 1:
                   didnum++;
                break;

                case 0: 
                    didnum--;
                break;
                default:
             }
             
            if(didnum >= didyouknowarray.length) {
                 didnum=0;
            }
            if(didnum < 0) {
                 didnum=didyouknowarray.length-1;
            }
           document.getElementById('didyouknowtext').innerHTML = didyouknowarray[didnum];
         }
}

 var pc = 0;
 function swappanels(pc){
  	txtobj = document.getElementById('glancepanel');
 	txtobj.innerHTML = '<h2>'+ txtpanel[pc] + '<br />At a Glance</h2><a onclick="popover(1);"><img id="popoveropen" src="images/core/plusicon.png" alt="" /></a>' + imgpanel[pc];
 	imgobj = document.getElementById('subpanel');
 	imgobj.innerHTML = '<a href="'+link[pc]+'"><img src="images/core/small-panel-border.png" alt="promotional area" /><style type="text/css">#subpanel { background: #fff url('+ subpanel[pc] +') 3px 4px no-repeat; }</style></a>';
 	popobj = document.getElementById('popovercontent');
 	popobj.innerHTML = poppanel[pc] +'<map name="map" id="map"><area shape="rect" coords="584,486,778,637" href="'+link[pc] +'" alt="" /></map><div id="popoverclosearea"><a onclick="popover(0);"><img id="popoverclose" src="images/core/minusicon.png" alt="" /></a>';
 	if (pc < (txtpanel.length -1)) { pc++; }
	else { pc=0;}
sIFR.replace(dinreg, {
    selector: 'h2', wmode: 'transparent', css: {
      '.sIFR-root': {'color': '#636363', 'font-size' : '18px', 'leading' : '0', 'text-transform': 'uppercase', 'letter-spacing' : '1'}
	      }
});
	timer = setTimeout("swappanels("+ pc + ")", 7000);
 }


function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

function resetflashscale() {
cwidth = f_clientWidth();
if (cwidth > 1024 && origwidth <= 1024) {   var so = new SWFObject("uploads/Flash/quantum-leap-home-tour.swf", "tour", "100%", "100%", "8");   so.addParam("scale", "noScale");
   so.addParam("wmode", "window");   so.addParam("allowScriptAccess", "always");   so.addParam("name", "tourintro");   so.addParam("swLiveConnect", "true");   so.addParam("loop", "false");   so.addParam("allowFullScreen", "true");   so.write("flashcontent");}if (cwidth <= 1024 && origwidth > 1024)  {   var so = new SWFObject("uploads/Flash/quantum-leap-home-tour.swf", "tour", "100%", "100%", "8");   so.addParam("scale", "showAll");
   so.addParam("wmode", "window");   so.addParam("allowScriptAccess", "always");   so.addParam("name", "tourintro");   so.addParam("swLiveConnect", "true");   so.addParam("loop", "false");   so.addParam("allowFullScreen", "true");   so.write("flashcontent");}
origwidth = f_clientWidth();}



