function switch_content(cid)
{
	ajax();
	ajax_get('http://ows.membersmanager.org/index.php?cID=' + cid);
}

function switch_content_zip(dist,zip,cid)
{
	ajax();
  ajax_get('http://ows.membersmanager.org/index.php?zip=' + zip + '&dist=' + dist + '&cID=' + cid);
}
var req;

function ajax()
{
 if(window.XMLHttpRequest && !(window.ActiveXObject)) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Microsoft.XMLHTTP");
      	} catch(e) {
        	try {
          	req = new ActiveXObject("Msxml2.XMLHTTP");		
        	} catch(e) {
          		req = false;
        	}
		}
    }
    req.onreadystatechange = proc_ajax;
}

function ajax_get(url)
{
	
	req.open("GET", url, true);
  req.send("");
}

function proc_ajax()
{
	emid = document.getElementById("BRlistings");
	if (req.readyState == 4)
  {
  	if (req.status == 200)
    {
     // try {
	    	emid.innerHTML = req.responseText;
      //} catch(e) {
      	
      //}
    }
  } 	
}

function show_more( targetId )
{
	target = document.getElementById( targetId );
  target.style.display = "";
}
      
function hide_more( targetId )
{
	target = document.getElementById( targetId );
	target.style.display = "none";
}
      
