// JavaScript Document
var h_list=new Array(10);//声明用来存储页面历史信息的数组（最大记录10次历史操作）
var h_page=new Array(10);//声明用来存储页面分页的数组（最大记录10次历史操作）

var h_index=0;//声明用来指定当前浏览历史记录的指针

//记录历史记录
function saveHistory(id,name){
	if(document.getElementById('hisStoryFrame'))
	{
		if(h_index==9)
		{
		h_index=0;
		}else{
		h_index++;
		}
	//document.getElementById('hisStoryFrame').src='11.jsp?'+name;
		h_list[h_index]=name;
	//alert(h_list[h_index]);
		//单页
		if(id==1){
			document.getElementById('hisStoryFrame').src='11.htm?'+h_index;
		}
		//列表
		if(id==2){
			document.getElementById('hisStoryFrame').src='12.htm?'+h_index;
		}
		//文章
		if(id==3){
			document.getElementById('hisStoryFrame').src='13.htm?'+h_index;
		}
		//楼盘新闻
		if(id==5){
			document.getElementById('hisStoryFrame').src='15.htm?'+h_index;
		}
		//楼盘
		if(id==6){
			document.getElementById('hisStoryFrame').src='16.htm?'+h_index;
		}
	}
}

function savePage(name,id){
	if(document.getElementById('hisStoryFrame'))
	{
		if(h_index==9)
		{
		h_index=0;
		}else{
		h_index++;
		}
	//document.getElementById('hisStoryFrame').src='11.jsp?'+name;
		h_list[h_index]=name;
		h_page[h_index]=id;
		document.getElementById('hisStoryFrame').src='14.htm?'+h_index;
	}
}
//读取历史记录的方法
function getHisStory0(curIndex)
{
	doContent();
 }
 


function getHisStory(curIndex)
{
 if(curIndex!=h_index)
 {
  if(h_list[curIndex])
  {
       h_index=curIndex;
      // document.getElementById("info").innerHTML=h_list[curIndex];
	  //alert(h_list[curIndex]);
	  doContent(h_list[curIndex]);
    }
  }
 }

function getHisStory2(curIndex)
{
 if(curIndex!=h_index)
 {
  if(h_list[curIndex])
  {
       h_index=curIndex;
      // document.getElementById("info").innerHTML=h_list[curIndex];
	  //alert(h_list[curIndex]);
	  doContentIsList(h_list[curIndex]);
    }
  }
 }

function getHisStory3(curIndex)
{
 if(curIndex!=h_index)
 {
  if(h_list[curIndex])
  {
       h_index=curIndex;
      // document.getElementById("info").innerHTML=h_list[curIndex];
	  //alert(h_list[curIndex]);
	  doListOneContent(h_list[curIndex]);
    }
  }
 }

function getHisStory4(curIndex)
{
 if(curIndex!=h_index)
 {
  if(h_list[curIndex])
  {
       h_index=curIndex;
      // document.getElementById("info").innerHTML=h_list[curIndex];
	 // alert(h_list[curIndex]);
	  doContentIsListPage(h_list[curIndex],h_page[curIndex]);
    }
  }
 }
 
function getHisStory5(curIndex)
{

	 //doContent(0);
 }
 
function getHisStory6(curIndex)
{
 if(curIndex!=h_index)
 {
  if(h_list[curIndex])
  {
       h_index=curIndex;
      // document.getElementById("info").innerHTML=h_list[curIndex];
	  //alert(h_list[curIndex]);
	  doContentInLoupan(h_list[curIndex]);
    }
  }
 }

function showHide(id){
	document.getElementById('topnav1').style.display='none'; 
	document.getElementById('topnav2').style.display='none'; 
	document.getElementById('topnav3').style.display='none'; 
	document.getElementById('topnav4').style.display='none'; 
	document.getElementById('topnav5').style.display='none'; 


	if (id!=null){
		document.getElementById(id).style.display='block'; 
	}
}

function showHide1(id){
	document.getElementById('cl1').style.display='none'; 
	document.getElementById('cl2').style.display='none'; 
	document.getElementById('cl3').style.display='none'; 
	document.getElementById('cl4').style.display='none'; 
	document.getElementById('cl5').style.display='none'; 
	document.getElementById('cl6').style.display='none'; 
	document.getElementById('cl7').style.display='none'; 
	document.getElementById('cl8').style.display='none'; 
	document.getElementById('cl9').style.display='none'; 
	document.getElementById('cl10').style.display='none'; 


	if (id!=null){
		document.getElementById(id).style.display='block'; 
	}
}