/***
	处理分页JS,此方法页面必须要实现。
**/
/*rewinjson.client.getData = function(){
	new rewinjson.rewinAjax("/JSONService/rewinJsonInfoListMore.jsp",
			new rewinjson.tool.parameter("json_3","classid="+request.QueryString('classid')+"&pageIndex="+pageIndex,"/ghzq/public/infoDetail.html?"+"classid="+request.QueryString('classid'),"1=1"),
			rewinjson.client.InfoListMoreText,
			"POST",
			"rewinjson_info_45"
			);
}*/

//显示翻页信息
rewinjson.client.FenYe = function (pageIndex,totalCounts,pageSize){
	new rewinjson.rewinAjax("/JSONService/fenye.jsp",
			new rewinjson.tool.parameter("style","pageIndex="+pageIndex+"&totalCounts="+totalCounts+"&pageSize="+pageSize,"","1=1"),
			rewinjson.client.StyleText,
			"GET",
			"rewinjson_fenye"
			);
}


//用于在显示分页之后加上总文章数
/*rewinjson.client.setTotalResults = function (){
	rewinJSON_$('_tempTotalResults').innerHTML = totalCounts;
}*/

//加载完top,left之后显示当前位置
rewinjson.client.getlocation = function (){
	localobj = rewinJSON_$("rewinjson_current");  //当前位置
	var temptitle = "西部证券欢迎您";
	var tempHtml = "当前位置：<a href='/xbzq/index.html'>西部证券首页</a>";
	myobj = rewinJSON_$("location1temp");   //一级栏目
	myobj2 = rewinJSON_$("location2_1temp");//二级栏目

	//一级栏目
	if(myobj){
		//temptitle += "| " + myobj.innerHTML;
		if(myobj2){//还有子栏目 当前位置的此位置就需要带链接
			tempHtml += " >> <a href=\"" + myobj.href + "\">" + myobj.innerHTML + "</a>";
		}else{
			tempHtml += " >> " + myobj.innerHTML ;
		}
	}

	//二级栏目
	if(myobj2){
		//temptitle += "| " + myobj2.innerHTML;
		tempHtml += " >> " + myobj2.innerHTML ;
	}

	localobj.innerHTML = tempHtml;
	document.title = temptitle;
	
}

//获取信息列表
/**
	objId   回填的id
	classid 信息id
	method  回掉的方法
	pageIndex 页数
	param     其他参数 不以&开头
**/
var jsonStatic = 100;
var isfrom = true; //表示数据来自静态页面
rewinjson.client.notFund = function(objName,method,param){
	isfrom = false;
	new rewinjson.rewinAjax("/JSONService/rewinJsonInfoListMore.jsp",
			param,
			method,
			"POST",
			objName.id
			);
}
//获取list的数据
rewinjson.client.getData  = function(objId,classid,method,pageIndex,param){
	var rewinjson_divnum = objId.substring(objId.lastIndexOf("_")+1);
	if(!isNaN(rewinjson_divnum)){
		var nowCount = pageIndex*(parseInt(rewinjson_divnum));
		
		if(nowCount>jsonStatic){//需要从动态页面获取
			isfrom = false;
			new rewinjson.rewinAjax("/JSONService/rewinJsonInfoListMore.jsp",
			new rewinjson.tool.parameter("json","classid="+classid+"&pageIndex="+pageIndex,"",""),
			method,
			"POST",
			objId
			);
		}else{//可以从静态文件中获取
			isfrom = true;
			new rewinjson.rewinAjax("/classHTML/"+classid+".html",
					new rewinjson.tool.parameter("json","classid="+classid+"&pageIndex="+pageIndex,"",""),
					method,
					"POST",
					objId,
					rewinjson.client.notFund
					);
		}
	}else{
		return;
	}
	
	
}
