function detailed (id) {
    info_x = document.getElementById('the_info');
    info_x.style.display = "block";

        var arrayPageSize = getPageSize();
  	  shutter_x = document.getElementById('shutter');
        shutter_x.style.width = arrayPageSize[0] + 'px';
	shutter_x.style.height = arrayPageSize[1] + 'px';
	 shutter_x.className = "shutter";

    shutter_x.onclick = hideShutter;
	 info_x.className = "info";

    // AJAX stuff
    
    if (getAJAX.readyState == 4 || getAJAX.readyState == 0) {
        getAJAX.open("GET","data.php?id=" + id, true);
        
        getAJAX.onreadystatechange = function () {
			if (getAJAX.readyState == 4)
    	   info_x.innerHTML = getAJAX.responseText;
     }
  	
  	getAJAX.send(null);

    }
    
}

function terms () {
    info_x = document.getElementById('the_info');
    info_x.style.display = "block";

    shutter_x = document.getElementById('shutter');
	 shutter_x.className = "shutter";

    shutter_x.onclick = hideShutter;
	 info_x.className = "info";

    // AJAX stuff
    
    if (getAJAX.readyState == 4 || getAJAX.readyState == 0) {
        getAJAX.open("GET","tc.php", true);
        
        getAJAX.onreadystatechange = function () {
			if (getAJAX.readyState == 4)
    	   info_x.innerHTML = getAJAX.responseText;
     }
  	
  	getAJAX.send(null);

    }
    
}


function hideShutter () {
	shutter_x = document.getElementById('shutter');
	info_x = document.getElementById('the_info');
	// clear info
	info_x.innerHTML = "";
	info_x.className = "";
	shutter_x.className = "";

        shutter_x.style.width = 0 + 'px';
	shutter_x.style.height = 0 + 'px';
	
	info_x.style.display = "none";
}


window.onload =  function () {
    //more onLoad stuff
    
    getAJAX = getHTTPObject();
    
}


//initiates the XMLHttpRequest object
//as found here: http://www.webpasties.com/xmlHttpRequest
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}


//get page size
function getPageSize () {
	        
	     var xScroll, yScroll;
		
		if (window.innerHeight && window.scrollMaxY) {	
			xScroll = window.innerWidth + window.scrollMaxX;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		
		var windowWidth, windowHeight;
		
		if (self.innerHeight) {	// all except Explorer
			if(document.documentElement.clientWidth){
				windowWidth = document.documentElement.clientWidth; 
			} else {
				windowWidth = self.innerWidth;
			}
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}	
		
		// for small pages with total height less then height of the viewport
		if(yScroll < windowHeight){
			pageHeight = windowHeight;
		} else { 
			pageHeight = yScroll;
		}
	
		// for small pages with total width less then width of the viewport
		if(xScroll < windowWidth){	
			pageWidth = xScroll;		
		} else {
			pageWidth = windowWidth;
		}

		return [pageWidth,pageHeight];
	}