if(typeof(MYJRJ)=="undefined"||!MYJRJ){var MYJRJ={}}MYJRJ.util=MYJRJ.util||{};MYJRJ.util.isFunction=function(A){return Object.prototype.toString.apply(A)==="[object Function]"};MYJRJ.util.now=function(){var A=new Date();return A.getTime()};MYJRJ.util.param=function(D){if(D==null){return""}var B=[];function C(E,F){B[B.length]=encodeURIComponent(E)+"="+encodeURIComponent(F)}for(var A in D){C(A,D[A])}return B.join("&")};MYJRJ.util.getJSON=function(C){var D={url:"",params:null,cache:-1,charset:"gbk"};for(property in C){D[property]=C[property]}var B=document.createElement("script");B.setAttribute("type","text/javascript");if(D.charset){B.setAttribute("charset",D.charset)}if(typeof D.params!=="string"){D.params=MYJRJ.util.param(D.params)}if(D.params!=""){D.url+=(D.url.match(/\?/)?"&":"?")+encodeURI(D.params)}var E=new Date();var A;if(D.cache==0){D.url+=(D.url.match(/\?/)?"&_=":"?")+E.getTime()}else{if(D.cache>0){A=E.getDate()+""+E.getHours()+""+Math.round(E.getMinutes()/D.cache);D.url+=(D.url.match(/\?/)?"&_=":"?")+A}}B.setAttribute("src",D.url);if(document.all){B.onreadystatechange=function(){if(this.readyState==4||this.readyState=="complete"||this.readyState=="loaded"){B.onreadystatechange=null;document.body.removeChild(B)}}}else{B.onload=function(){B.onload=null;document.body.removeChild(B)}}document.body.appendChild(B)};MYJRJ.face={};MYJRJ.face.path="http://api.jrj.com.cn/face.jspa";MYJRJ.face.mutiLoad=function(C,F,A){var E='{"params":{"uid":"'+C+'","callback":"'+F+'"},';E+='"methods":{';for(var B=0;B<A.length;B++){if(B!=A.length-1){E+=A[B]+","}else{E+=A[B]+"}"}}E+="}";var D={params:E,cache:5};D.url=MYJRJ.face.path;MYJRJ.util.getJSON(D)};MYJRJ.relation={};MYJRJ.relation.checkFriendPath="http://i.jrj.com.cn/app/friend/action/friendcheck.jspa";MYJRJ.relation.addFriendPath="http://i.jrj.com.cn/app/friend/action/friendaction.jspa";MYJRJ.relation.checkFriend=function(A,C,D){var B={params:{friendID:C,callback:D},cache:0};B.url=MYJRJ.relation.checkFriendPath;MYJRJ.util.getJSON(B)};MYJRJ.relation.addFriend=function(B,D,A,E){var C={params:{friendID:D,type:"apply",cont:A,callback:E},cache:0};C.url=MYJRJ.relation.addFriendPath;MYJRJ.util.getJSON(C)};

