
//************BACK, FORWARD, REFRESH*************//
var sessionHistory=""; // default
window.onload = initialize;

function initialize() {
   // initialize the DHTML History framework
   dhtmlHistory.initialize();     
   // add ourselves as a DHTML History listener
   dhtmlHistory.addListener(handleHistoryChange);
	
		
	var currentLocation = dhtmlHistory.getCurrentLocation();   
    displayLocation(currentLocation, null); 
	   
}


/* Handles history change events. */
function handleHistoryChange(newLocation,historyData) {	
   // update the browser to respond to this
   // DHTML history change
   displayLocation(newLocation, historyData);
   
}


/* Displays the given location in the right-hand side content area. */
var isParams='';

function displayLocation(newLocation,sectionData) {	
	if(sectionData!=null && sectionData!=""){ // BACK FORWARD		
		var str = window.location.toString();
		str = str.split("&");		
		var divObj = getObject(str[str.length-1]);		
		if(divObj!=null){
			divObj.style.display = 'block';
			divObj.innerHTML = sectionData;				
		}
	}
	else // load default;
	{
		var str = window.location.toString();
		var params='edu=0';
		s=str.search("#");
		if(s!=-1){
			str=str.split("#");
			if(str[1].length>=8){
				s=str[1].search(",");
				if(s==4){
					str=str[1].split(",");
					if(str[0]=='news' && str.length==3){					
						params="edu=2&id_cate="+str[1]+"&id_news="+str[2];						
					}
				}
			}
		}
		if(isParams!=params && isParams!=""){	
			alert("Don't enter params here!");
			return;
		}
		else{
			isParams=params;
			objectBox.getPage(params,'main1_','main0_');		
		}
	}
}