function log(msg){}
var Util=new function(){this.displayLink=function(str){var urlPattern=/((http:\/\/)?([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?)/g;var result=str.replace(urlPattern,'<a href="$1" style="color:blue">$1</a>');return result;}
this.filterHtml=function(str){window.alert(str);return str.replace(/</g,"&lt;").replace(/>/g,"&gt;");}}
function getUrlParam(param){var hrefstr,pos,parastr,para,tempstr;hrefstr=window.location.href;pos=hrefstr.indexOf("?");end=hrefstr.indexOf("#");if(end<0)
end=hrefstr.length;parastr=hrefstr.substring(pos+1,end);para=parastr.split("&");tempstr="";for(i=0;i<para.length;i++){tempstr=para[i];pos=tempstr.indexOf("=");if(tempstr.substring(0,pos)==param){return tempstr.substring(pos+1);}}
return null;}
function isInArray(value,arr){for(var i=0;i<arr.length;i++){if(value==parseFloat(arr[i]))
return true;}
return false;}
function toQueryString(_params){if(!_params)
return"";var str=[];for(var key in _params){str[str.length]=key+"="+_params[key];}
return str.join("&");}
function loadjscssfile(filename,filetype){if(filetype=="js"){var fileref=document.createElement('script');fileref.setAttribute("language","javascript");fileref.setAttribute("type","text/javascript");fileref.text=getUrlContent(filename);}
else
if(filetype=="css"){var fileref=document.createElement("link");fileref.setAttribute("rel","stylesheet");fileref.setAttribute("type","text/css");fileref.setAttribute("href",filename);}
if(typeof fileref!="undefined")
document.getElementsByTagName("head")[0].appendChild(fileref);}
function getStyle(el,attr){var elem=document.getElementById(el);if(MzBrowser.ie){return elem.currentStyle[attr];}
else{return document.defaultView.getComputedStyle(elem,"").getPropertyValue(attr);}}
function refreshCode(id){if(!id)
id="verifyCodeImg";document.images[id].src="/getVerifyCodeAction.do?x="+Math.random();}
function numToWeek(inStr){switch(inStr){case'1':return'一';case'2':return'二';case'3':return'三';case'4':return'四';case'5':return'五';case'6':return'六';case'7':return'日';}}
function gotoWeb(cid,sid){window.open("/link.jsp?cid="+cid+"&sid="+sid+"&refer="+escape(window.location));}
function gotoWeb_app(cid,sid){if(cid==1)
{if(sid.indexOf("http://")==0)
window.open(sid);else{window.open("http://"+sid);}}
else{var ii=-1;try{ii=g_user.userId;}
catch(err){ii=-1;}
window.open("http://www.365rili.com/link.jsp?uid="+ii+"&cid="+cid+"&sid="+escape(sid)+"&refer="+escape(window.location));}}
function gotoBBS(cid){window.open("http://goto.365rili.com/link2bbs.jsp?cid="+cid);}
function gotoBBS(cid){window.open("http://goto.365rili.com/link2bbs.jsp?cid="+cid);}
function openCld(cid,p){if(!cid&&cid!=0)
return false;var location='/calendar.html?cid='+cid;if(p){location+='&p=true';}
else{try{var cld=CalendarData.loadedClds[cid];if(cld&&cld.isPublic)
location+='&p=true';}
catch(err){}}
window.open(location);}
function hideElement(srcId){$('#'+srcId).hide();}
function setSelectObjValue(selectObj,value){for(var i=0,len=selectObj.options.length;i<len;i++){if(selectObj.options[i].value==value){selectObj.options[i].selected=true;break;}}}