// here we define global variable
var ajaxdestination3="";

function getdata3(what,where) { // get data from source (what)

 try {
   xmlhttp3 = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e) { /* do nothing */ }

 document.getElementById(where).innerHTML ="<center><img src='/PF/loading.gif'></center>";
// we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
 ajaxdestination3=where;
 xmlhttp3.onreadystatechange = triggered3; // when request finished, call the function to put result to destination DIV
 xmlhttp3.open("GET", what);
 xmlhttp3.send(null);
  return false;
}

function triggered3() { // put data returned by requested URL to selected DIV
 var resposta
 if (xmlhttp3.readyState == 4) {
	 if (xmlhttp3.status == 200) {
 
  resposta=xmlhttp3.responseText;

  inicio=resposta.lastIndexOf('<!--');
  fim=resposta.lastIndexOf('-->');

  resposta=resposta.substring(inicio+4,fim);

  SizeId=resposta.substring(0,resposta.lastIndexOf('***'));
  ChangeForm('PFRootSizeID',SizeId);

  resposta=resposta.substring(resposta.lastIndexOf('***')+3,fim);

	document.getElementById("DivSizeLabel").innerHTML = resposta;
	document.getElementById(ajaxdestination3).innerHTML= xmlhttp3.responseText;

	 }
 }
	
}



