function showDialog(id){	
    var divObj = $("#"+id);
    var winWidth = $(window).width();
    var winHeight = $(window).height();
    var divWidth = divObj.css("width");
    var divHeight = divObj.css("height");
    var leftPx = parseInt((parseInt(winWidth)-parseInt(divWidth))/2);
    var topPx = parseInt((parseInt(winHeight)-parseInt(divHeight))/2);
    $.blockUI({
        message: divObj, fadeOut:0,
        css:{cursor:"default", border:"",backgroundColor:"",left:leftPx, top:topPx, width:divWidth, height:divHeight},
        overlayCSS:{cursor:"default", opacity: "0.4"}
    });
}

function closeDialog(){
    $.unblockUI({fadeOut:0});
}
function getFeedbackHtml(){
	$.ajax({url:"feedback.html",dataType:"html",data:"c=feedback&a=index",
		error:function(){alert("对不起,服务器暂时忙!");},
		success:function(v){
			$("#feedback_div").html(v);
		}
	});
}



function UrlEncode(str){ 
   var ret=""; 
   var strSpecial="!\"#$%&'()*+,/:;<=>?[]^`{|}~%"; 
   for(var i=0;i<str.length;i++){ 
   var chr = str.charAt(i); 
     var c=str2asc(chr); 
     if(parseInt("0x"+c) > 0x7f){ 
       ret+="%"+c.slice(0,2)+"%"+c.slice(-2); 
     }else{ 
       if(chr==" ") 
         ret+="+"; 
       else if(strSpecial.indexOf(chr)!=-1) 
         ret+="%"+c.toString(16); 
       else 
         ret+=chr; 
     } 
   } 
   return ret; 
}

