function send_Request(url) { 
	alert(window.location.hash);
	var new_hash = window.location.hash;
    var request_url =url; 
    var request_pars = null; 
    var myAjax = new Ajax.Request( 
        request_url, 
        { 
            method:'get', 
            parameters:'', 
            asynchronous:true,       //true---异步;false---同步.默认为true 
			onLoading  : loading,
            onComplete:processRequest 
		}     
    ); 
} 

function send_Request(url,param) {
//	if(param!="")  param = param.substr(1.param.length());
	var request_url;

	if(param==null)
		request_url =url; 
	else
		request_url =url+"?"+param; 

//	alert("url="+request_url);
    var request_pars = null; 
    var myAjax = new Ajax.Request( 
        request_url, 
        { 
            method:'get', 
            parameters:'', 
            asynchronous:true,       //true---异步;false---同步.默认为true 
			onLoading  : loading,
            onComplete:processRequest 
		}     
    ); 
} 

function loading(){
//	var el = document.getElementById("MainBody");
//	el.innerHTML = "正在加载数据...";
}

function processRequest(XML_Http_Request){ 
    var results = XML_Http_Request.responseText;
	var el = document.getElementById("MainBody");
	el.innerHTML = results;
}

function delArticle(url){
	if(!confirm("你确定要删除此文章吗?")){
		return;
	} else {    
		var request_url = url; 
		var request_pars = null; 
		var myAjax = new Ajax.Request( 
			request_url, 
			{ 
				method:'get', 
				parameters:'', 
				asynchronous:true,       //true---异步;false---同步.默认为true 
				onLoading  : loading,
				onComplete:delProcessRequest 
			}     
		); 
	}
}

function BackArticle(url){
	var request_url = url; 
	var request_pars = null; 
	var myAjax = new Ajax.Request( 
		request_url, 
		{ 
			method:'get', 
			parameters:'', 
			asynchronous:true,       //true---异步;false---同步.默认为true 
			onLoading  : loading,
			onComplete:delProcessRequest 
		}     
	); 
}

function delProcessRequest(){
	window.location.reload();
}

function displayTags(tags){
	var arrTag = new Array();
	arrTag = tags.split(" ");
	for(var i=0;i<arrTag.length;i++){
		document.write("<a href='/u/search/searchBlogArticle.do?toSearch=tags&pageNo=1&keyword="+arrTag[i]+"'>"+arrTag[i]+"</a> ");
	}
}

function DrawImage(ImgD,iwidth,iheight){ 
	var image=new Image(); 
	image.src=ImgD.src; 
	if(image.width>0 && image.height>0){ 
		if(image.width/image.height>= iwidth/iheight){ 
			if(image.width>iwidth){   
				ImgD.width=iwidth; 
				ImgD.height=(image.height*iwidth)/image.width; 
			}else{ 
				ImgD.width=image.width;   
				ImgD.height=image.height; 
			} 
			ImgD.alt=image.width+"×"+image.height; 
		} 
		else{ 
			if(image.height>iheight){   
				ImgD.height=iheight; 
				ImgD.width=(image.width*iheight)/image.height;      
			}else{ 
				ImgD.width=image.width;   
				ImgD.height=image.height; 
			} 
			ImgD.alt=image.width+"×"+image.height; 
		} 
	} 
} 

function delMsg(url) {
  var val = listGetValue();
  if (val == "") {
    alert("请选择需要删除的信息");
    return;
  }
  var tips = confirm("确定要删除吗？");
  if (tips)
	var request_url = url; 
	var request_pars = "id="+val; 
	var myAjax = new Ajax.Request( 
		request_url, 
		{ 
			method:'get', 
			parameters:request_pars, 
			asynchronous:true,       //true---异步;false---同步.默认为true 
			onLoading  : loading,
			onComplete:delProcessRequest 
		}     
	); 
}

function MsgDetail(url){
	showModalDialog(url,window,'dialogWidth:480px; dialogHeight:300px;help:0;status:0;resizable:yes;');
}