function stateChanged() 
	{ 
	if (xmlHttp.readyState==4)
		{ 
		document.getElementById("page_contents").innerHTML=xmlHttp.responseText;
		$("a.thickbox").live("click",function() {
			tb_init('a.thickbox');
		});
		
		}
}
function GetXmlHttpObject()
	{
		var xmlHttp=null;
		try
		  {
		  // Firefox, Opera 8.0+, Safari
			 xmlHttp=new XMLHttpRequest();
		  }
		catch (e)
		  {
		  // Internet Explorer
		  try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
		  catch (e)
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		  }
		return xmlHttp;
	}
function removeThickBoxEvents() {
        $('.thickbox').each(function(i) {
            $(this).unbind('click');
        });
}

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

function pagination(page,type)
{
							jQuery.ajax({
								type:       "GET",
								url:        "test_sub.php",
								cache:      false,
								data:       "starting="+page+"&sid="+Math.random()+"&search_text="+document.form1.search_text.value+"&type="+type,
								loading:    jQuery('div#page_contents').html(),
								success:    function(html) {
									
												jQuery('#page_contents').html(html);
												//re-attach thickbox
												bindThickBoxEvents();
							
											}
							});
			 
}

