//functions
function popDialog(url){

var xmlHttp;
try
  {  // Firefox, Opera 8.0+, Safari  
  xmlHttp=new XMLHttpRequest();  }
catch (e)
  {  // Internet Explorer  
  try
    {    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    }
  catch (e)
    {    
	try
      {      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      }
    catch (e)
      {      alert("Your browser does not support AJAX!");      
	  return false;      
	  }    
	}  
  }
  
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
	  if (xmlHttp.status == 200) {
	     response = xmlHttp.responseText;
		 //alert (response);
		 //[0] = boxTitle; [1] = fill content div
	     responseParts = response.split("~~~");
		 document.getElementById('dialogcanvas').style.display = 'block';
		 document.getElementById('dialogwindow').style.display = 'block';
		 document.getElementById('boxTitle').value = responseParts[0]
		 document.getElementById('dialogcontent').innerHTML = responseParts[1];
		 }
		 else {
		 alert('There was a problem with the request.');
		 }
      }
    }
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}


function closeDialog () {
   //hide divs here
   document.getElementById('dialogcanvas').style.display = 'none';
   document.getElementById('dialogwindow').style.display = 'none';   
   }
