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,adicional) {
//document.getElementById('cargador').innerHTML = "<img src=\"imag/cargando.gif\">";
/*the name of your page with the content goes here */
if(adicional != ""){
var url = "ajaxcontent.php?showit=" + escape(content) +"&res=" + escape(adicional);
} else  {
var url = "ajaxcontent.php?showit=" + escape(content);
}
request.open("GET", url, true);
request.onreadystatechange = go;
if (request.overrideMimeType) {  
    request.overrideMimeType('text/xml; charset=iso-8859-1');  
}   
request.send(null);
}

function go() {
  if (request.readyState == 4) {
	  if (request.status == 200) {
//	  document.getElementById('cargador').innerHTML = "";
		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];
//alert(show);
			ajaxSwitch(show);
			return false;
		}
	}
}

function showItflash(cual) {
/*	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];
			ajaxSwitch(cual);
			return false;
		}
	}
	*/
	ajaxSwitch(cual);
}
//window.onload=showIt;
	