 /* jQuery functions begin here - used in the welcome page for FAQs */
$(function() {
  // hide answers from view:
  $("div.answer").hide();

  // function displays the answers when the corresponding question link is clicked:
  $("a.question").click(function() {
    // use fact that question links have ids = some integer and corresponding answers have
    // ids = that same integer:
    var answer = $("#a" + $(this).attr('id'));
    answer.slideToggle("fast");
  });

  $("#openAll").click(function() {
    $("div.answer").each(function() {
      $(this).slideDown("fast");
    });
  });

  $("#closeAll").click(function() {
    $("div.answer").slideUp("fast");
  });

    



/*$("div.AccordionContainer").corner("tl tr round 10px");*/
/*$("div.AccordionTitle").hover(function() {
   $(this).css({backgroundColor: 'red'});
});*/

 /* $("dd:not(:first)").hide();*/
	          $('#accordion dd').hide();
		       $("dt a").click(function(){
			$("dd:visible").slideUp("slow");
			$(this).parent().next().slideDown("slow");
			return false;
		});

});


// The below are for countyInddetail.jsp file
function showHideItems(myItem, myButton)
{

    //this is the ID of the hidden item
    var myitem = document.getElementById(myItem);
    //this is the ID of the plus/minus button image
    var mybutton = document.getElementById(myButton);
    if (myitem.style.display != "none") {
    //items are currently displayed, so hide them
    myitem.style.display = "none";

    swapImage(mybutton,"plus");
    }
    else {

    //items are currently hidden, so display them
    myitem.style.display = "block";
    swapImage(mybutton,"minus");
    }
 }


//function to swap an image based on its current state
function swapImage(myImage, state) {

if (state == "minus") {

myImage.src = "images/minus.gif";
}

else {
myImage.src = "images/plus.gif";
}

}




function ffhelpWindow()
 {
  mywindow = open('html/ffhelp.htm', 'myname', 'resizable=no, scrollbars=yes, width=560, height=620');
  if(mywindow.opener == null) mywindow.opener=self;
 }





