// Global jQuery functions by Alvin Olavarrieta
(function($) {

	// Execute popup window function
		$(function(){
			$("a.openWindow").openWindow();
		});
	//Pop up window function
		$.fn.openWindow = function() {
			$("a.openWindow").fancybox({
				'autoScale'			: false,
				'centerOnScroll'	: true,
				'autoDimensions'	: true,
				'padding'			:0,
				'margin'			:0,
				'type'				: 'ajax'
			});
		};
	
	// Toggle function.
		$(function() {
			$(".toggle").hide();
				$(".toggle").click(function () {
				$(this).next(".toggle").toggle(300);
			});
		});
	
})(jQuery); //End Load Doc



function toggleDiv(divid,linkid,closeit){
    if(document.getElementById(divid).style.display == 'none'){
		document.getElementById(divid).style.display = 'block';
		document.getElementById(linkid).style.backgroundImage = 'url(images/btn-minus.png)';
	  }else{
      document.getElementById(divid).style.display = 'none';
 	  document.getElementById(linkid).style.backgroundImage = 'url(images/btn-plus.png)';
    }
  }
  
  
  
//Toggoles Features and Support pages  
function toggleDiv(divid,swap,btn){
if(document.getElementById(divid).style.display == 'none'){
  document.getElementById(divid).style.display = 'block';
  document.getElementById(swap).style.backgroundImage = 'url(images/header-blue.gif)';
  document.getElementById(btn).style.backgroundImage = 'url(images/faq-close.png)';
  document.getElementById(btn).style.color = '#ffffff';
}else{
  document.getElementById(divid).style.display = 'none';
  document.getElementById(swap).style.backgroundImage = 'url(images/nav-btn-fill2.gif)';
  document.getElementById(btn).style.backgroundImage = 'url(images/faq-open.png)';
  document.getElementById(btn).style.color = '#4B8ABD';
}
}

function openAll(divid,swap,btn,maxNum){
  for (i=1; i<=maxNum;   )
  {
  document.getElementById(divid+i).style.display = 'block';
  document.getElementById(swap+i).style.backgroundImage = 'url(images/header-blue.gif)';
  document.getElementById(btn+i).style.backgroundImage = 'url(images/faq-close.png)';
  document.getElementById(btn+i).style.color = '#ffffff';
  i++;
  }
}

function closeAll(divid,swap,btn,maxNum){
  for (i=1; i<=maxNum;   )
  {
  document.getElementById(divid+i).style.display = 'none';
  document.getElementById(swap+i).style.backgroundImage = 'url(images/nav-btn-fill2.gif)';
  document.getElementById(btn+i).style.backgroundImage = 'url(images/faq-open.png)';
  document.getElementById(btn+i).style.color = '#4B8ABD';
 i++;
  }
}


function openAlt(name,maxNum){
  for (i=1; i<=maxNum;)
  {
   document.getElementById(i+name+'b').style.display = 'block';
   document.getElementById(i+name+'a').style.backgroundImage = 'url(images/btnFaqMinus.png)';
  i++;
  }
}

function closeAlt(name,maxNum){
  for (i=1; i<=maxNum;)
  {
  document.getElementById(i+name+'b').style.display = 'none';
  document.getElementById(i+name+'a').style.backgroundImage = 'url(images/btnFaqPlus.png)';
  i++;
  }
}

function toggleDiv2(num,name){
if(document.getElementById(num+name+'b').style.display == 'none'){
   document.getElementById(num+name+'b').style.display = 'block';
   document.getElementById(num+name+'a').style.backgroundImage = 'url(images/btnFaqMinus.png)';
}else{
  document.getElementById(num+name+'b').style.display = 'none';
  document.getElementById(num+name+'a').style.backgroundImage = 'url(images/btnFaqPlus.png)';
}
}
//End
