//	window.onload = initialize;
	function initialize() 
	{
	   dhtmlHistory.initialize();
	   dhtmlHistory.addListener(back_foward);

	   var currentLocation = dhtmlHistory.getCurrentLocation();
//	   alert(currentLocation)

	   if (currentLocation == "")
		   currentLocation = "?";
	   else
	   {
		   currentLocation = currentLocation.replace(/section\:/, "");
		   tasubpage1('process.php?'+currentLocation,'noidung');
	   }
	}
	
	function back_foward(newLocation) 
	{
	   if (newLocation == "") 
	   {
		  cid=getURLParamhref('cid');
		  $files = getURLParamhref();
		  newLocation = "cid=67";
		  tasubpage1('process.php?'+newLocation,'noidung');
	   }
	   else
	   {
		   newLocation = newLocation.replace(/section\:/, "");
		   tasubpage1('process.php?'+newLocation,'noidung');
	   }
	}
	
	function makeHistory(url,div)
	{
	   var modifiedLocation = url;
	   var historyData = modifiedLocation;
	   dhtmlHistory.add(modifiedLocation,historyData);
	   tasubpage1('process.php?'+url,div);
	}
	
	function makeHistory_new(div,url)
	{
	   var modifiedLocation = url;
	   var historyData = modifiedLocation;
	   dhtmlHistory.add(modifiedLocation,historyData);
	   tapage(div,'process.php?'+url);
	}
	
	function getURLParamhref(strParamName)
	{
		  var strReturn = "";
		  var strHref = window.location.href;
		  if ( strHref.indexOf("?") > -1 )
		  {
				var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
				var aQueryString = strQueryString.split("&");
				for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
				{
					  if (aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 )
					  {
							var aParam = aQueryString[iParam].split("=");
							strReturn = aParam[1];
							break;
					  }
				}
		  }
		  return unescape(strReturn);
	}
	
	
	