var request = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
  request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    request = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    request = false;
  }
}
@end @*/
if (!request && typeof XMLHttpRequest != 'undefined') {
  request = new XMLHttpRequest();
}

function ajaxSwitch(content) {

/*the name of your page with the content goes here */
var url = "/ajaxcontent.php?showit=" + escape(content);
request.open("GET", url, true);
request.onreadystatechange = go;
request.send(null);
}

function go() {
  if (request.readyState == 4) {
	  if (request.status == 200) {
		var response = request.responseText;
/* 'ajaxcontent' is the name of my div that will contain the info */
		document.getElementById("ajaxcontent").innerHTML = response;
	  }
  }
}

function showIt() {
	var aTags=document.getElementById('options').getElementsByTagName('a');
	for (i=0; i<aTags.length; i++) {
		aTags[i].onclick=function() {
			var show=this.href.split('content=')[1];
			if(typeof(show)!='undefined'){
				ajaxSwitch(show);
				return false;
			}
		}
	}
}
window.onload=showIt;
	
