function getNewHTTPObject()
{
        var xmlhttp;
        /** Special IE only code ... */
        /*@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 @*/

        /** Every other browser on the planet */
        if (!xmlhttp && typeof XMLHttpRequest != 'undefined'){
            try{
                xmlhttp = new XMLHttpRequest();
            }
            catch (E){
                xmlhttp = false;
            }
        }
        return xmlhttp;
}

var xmlHttp = getNewHTTPObject();

function callbackFunction()
{
	//alert("readystate" + xmlHttp.readyState);
  if (xmlHttp.readyState != 4){
    return;
	} else {
  var result = xmlHttp.responseText;
  alert(result);

	
 }
}



//-----------------

var ajaxVar = getNewHTTPObject();

function showNext(page){
	var params="page="+page;
	var page = "../displays/updatePortfolio.php?"+params;
	//alert(page);
	ajaxVar.open('GET', page, true);
	ajaxVar.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	ajaxVar.onreadystatechange = updatePort;
	ajaxVar.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	ajaxVar.send(null);
}
function updatePort()
{
	//alert("readystate" + xmlHttp.readyState);
  if (ajaxVar.readyState != 4){
  window.status = "Deleting";
    return;
  }
  else {
	window.status = "";
	var result = ajaxVar.responseText;
	document.getElementById('webdevportfolio').innerHTML = result;
	bindThickBoxEvents();
  }
}
function removeThickBoxEvents() {
		//alert("removing");
        $('.thickbox').each(function(i) {
            $(this).unbind('click');
        });
    }

function bindThickBoxEvents() {
				//alert("Here");
        removeThickBoxEvents();
        tb_init('a.thickbox, area.thickbox, input.thickbox');
    }