	//?url??
	function encodeURL(url){
		//alert(url);
		 
		if(!url || url =="") return "";
		if(url.indexOf("?")>-1){
			var url_front = url.substr(0,url.indexOf("?"));
			var url_after = url.substr(url.indexOf("?")+1);
			var url_array = url_after.split("&");
			var u = "?";
			for(var i=0;i<url_array.length;i++){
				u+="&"+url_array[i].split("=")[0]+"="+encodeURIComponent(url_array[i].split("=")[1]);
			}
			return url_front+u;
		}
		  
		return url;
	}
	//????
	function loadPage(url,div,callback){
	    //alert("url="+url+"div="+div);
		$("#"+div).empty();
		$("#"+div).load(encodeURL(url),{},callback);
	}
	
	
	//????????? 
	function loadcenter(url){
		$("#advertisedivid").empty();
		loadPage(url,"center_content_id",function(){dirdivHeightAuto(); });
	}
	//????
	function loadadvertise(){
		loadPage(basePath+"news/parent/advertisement.jsp","advertisedivid");
	}
	//????????????
	function loadcenterwithadvertise(url){
		loadPage(url,"center_content_id",function(){
			$("#newsContent img").each(function(){
				if(this.style.width && parseInt(this.style.width)>700){
					var src_w = parseInt(this.style.width);
					var src_h = parseInt(this.style.height);
					var target_h = (700*src_h)/src_w;
					this.style.width=700+"px";;
					this.style.height=target_h+"px";
				}
			});
			
		});
		loadadvertise();
	}
	//????
	function loadPage2(url,clickObject){
		if(pid && (pid==17 || pid==30 || pid== 31) ){//???????
			//alert("---------------------");
			$("#contentId").load(encodeURL(basePath+url),{},function(){
				$("#dirid").find("dd").each(function(index, domEle){
					$(domEle).attr("class","");
				});
				$(clickObject.parentNode).attr('class','act');
				dirdivHeightAuto(); 
			}); 
		}else{//????????
			//alert(basePath+url);
			$("#contentId").load(encodeURL(basePath+url),{},function(){
				
				$("#dirid").find("li").each(function(index, domEle){
					$(domEle).attr("class","");
				});
				$(clickObject.parentNode).attr('class','act');
				dirdivHeightAuto(); 
			}); 
		}
	}
	//??div???
	function dirdivHeightAuto(){
		var contentdiv = document.getElementById("contentId");
		var dirMeu = document.getElementById("resizelengthdiv");
		var height = document.body.clientHeight;
		if(height && dirMeu && contentdiv ){
			document.getElementById("resizelengthdiv").style.height="400px";
			height = document.body.clientHeight;
			document.getElementById("resizelengthdiv").style.height=(height-300)+"px";
		}
	}
	//????
	function navigationSelect(navigationId){
		$("#navigationdiv .act").attr("class","");
		if(navigationId){
			pid = navigationId;
			$("#"+navigationId).attr("class","act");
		} 
	}
	//????
	function staticFward(url,selectedid){
		$("#advertisedivid").empty();
		loadPage(basePath+url,"center_content_id", function(){
			$("#"+selectedid).trigger("click");
		});
	}
	
	
	//?????-------------------------------------------------------------------------
	//????
	 function openList(centerCententURL){
		//var centerCententURL = basePath+"caiguofront/procurement/index/pro_list_main.jsp"
		//window.open(encodeURL(centerCententURL)); 
		//window.open(centerCententURL);  
		location.href(encodeURL(centerCententURL)); 
			 
	 }
	//??????
	function openInfo(centerCententURL){ 
		//var centerCententURL = basePath+"caiguofront/procurement/index/pro_info_page.jsp"
		//window.open(encodeURL(centerCententURL)); 
		location.href(encodeURL(centerCententURL));
	}
	 
