if (!PlusImg) {
	var PlusImg = "#";
}
if (!MinusImg) {
	var MinusImg = "#";
}

function ToggleLayer(oLayer) {
  if (document.getElementById) {
    var LayerStyle = document.getElementById(oLayer).style;
    LayerStyle.display = LayerStyle.display? "" : "none";
  }
  else if (document.all) {
    var LayerStyle = document.all[oLayer].style;
    LayerStyle.display = LayerStyle.display? "" : "none";
  }
  else if (document.layers) {
    var LayerStyle = document.layers[oLayer].style;
    LayerStyle.display = LayerStyle.display? "" : "none";
  }
  if(document.getElementById(oLayer+'_stat')) {
     var bShow = false;
     if(LayerStyle.display == "") { bShow = true; }
     ToggleImage(bShow, document.getElementById(oLayer+'_stat'));
  }
}

function ToggleAllLayers(bShow) {
  var DivList = Array();
  var Show = '';
  if(bShow == false) { Show = "none"; }
  if (document.getElementsByTagName) {
    var DivList = document.getElementsByTagName("div");
  }
  else if (document.all.tags) {
    var DivList = document.all.tags("div");
  }
  for(i=0; i<DivList.length; i++) {
    if(DivList[i].id.substr(0,4) == 'div_') {
      DivList[i].style.display = Show;
      if(document.getElementById(DivList[i].id+'_stat')) {
         ToggleImage(bShow, document.getElementById(DivList[i].id+'_stat'))
      }
    }
  }
}

function ToggleAllSectionLayers(bShow) {
  var DivList = Array();
  var Show = '';
  if(bShow == false) { Show = "none"; }
  if (document.getElementsByTagName) {
    var DivList = document.getElementsByTagName("div");
  }
  else if (document.all.tags) {
    var DivList = document.all.tags("div");
  }
  for(i=0; i<DivList.length; i++) {
    if(DivList[i].id.substr(0,8) != 'div_faq_' && DivList[i].id.substr(0,4) == 'div_') {
      DivList[i].style.display = Show;
      if(document.getElementById(DivList[i].id+'_stat')) {
         ToggleImage(bShow, document.getElementById(DivList[i].id+'_stat'))
      }
    }
  }
}

function ToggleLayerPointer(sID, sColor, sCursor) {
    if (document.getElementById(sID) && document.getElementById(sID).style) {
      document.getElementById(sID).style.backgroundColor = sColor;
      document.getElementById(sID).style.cursor = sCursor;
    }
}

function ToggleImage(bShow, oImage) {
  if(bShow == false) { oImage.src = PlusImg; }
  else { oImage.src = MinusImg; }
}
 /*
function getXHRObject(){
	var xhr = null;
	try
	{  // Firefox, Opera 8.0+, Safari  
		xhr =new XMLHttpRequest();  
	}
	catch (e)
	{  // Internet Explorer  
		try
	  	{
	  		xhr =new ActiveXObject("Msxml2.XMLHTTP");
	  	}
	 	catch (e)
		{    
			try
		  	{
				xhr =new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
		  	{      
				alert("Your browser does not support AJAX!");      
      
		  	}    
		}  
	} 

	return xhr;

}

function swapDiv(place, url)
{
	var xmlHttp = getXHRObject();
		  
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState=="4")
	  	{
			document.getElementById(place).innerHTML=xmlHttp.responseText;
	  	}
	}
  	xmlHttp.open("GET", url, true);
  	xmlHttp.send(null); 
}*/

function toggle_display(d){
	theSection = document.getElementById(d);
	if(theSection.style.display=='none'){
		theSection.style.display='block';
	}else{
		theSection.style.display='none';
	}
}
 /*
function swapimg(id)
{
	for (var i=1; i<7; i++)
	{
		img = "m" + i;
		document.getElementById(img).src = "images/" + img + ".gif";
	}
	document.getElementById(id).src = "images/" + id + "_act.gif";
}   */

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
