// here we define global variable
var ajaxdestination="";

function getdata(what,where) { // get data from source (what)
 try {
   xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e) { /* do nothing */ }

 document.getElementById(where).innerHTML ="<center><img src='images/loadingAnimation.gif'></center>";
// we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
 ajaxdestination=where;
 xmlhttp.onreadystatechange = triggered; // when request finished, call the function to put result to destination DIV
 xmlhttp.open("GET", what);
 xmlhttp.send(null);
  return false;
}

function triggered() { // put data returned by requested URL to selected DIV
  if (xmlhttp.readyState == 4) if (xmlhttp.status == 200) 
    document.getElementById(ajaxdestination).innerHTML =xmlhttp.responseText;
}

function paghome() {
	getdata('home.asp','content1');	
}

function pagrelease() {
	getdata('release.html','content1');	
}

function pagshows() {
	getdata('shows.asp','content1');	
}

function pageventos() {
	getdata('eventos.asp','content1');	
}

function pagfotos() {
	getdata('fotos.asp','content1');	
}

function pagrecados() {
	getdata('recados.asp','content1');	
}

function paginacao(name) {
	getdata(name,'content1');	
}

function pagdownloads() {
	getdata('downloads.asp','content1');	
}

function pagcontato() {
	getdata('contato.asp','content1');	
}
function pagenviarecado() {
	getdata('recados_enviar.asp','content1');	
}


