var GuestShowPerson=1;$(document).ready(function(){inputfocus()});function defineClick(){if(!(jQuery.browser.msie)){HTMLElement.prototype.click=function(){var evt=this.ownerDocument.createEvent("MouseEvents");evt.initMouseEvent("click",true,true,this.ownerDocument.defaultView,1,0,0,0,0,false,false,false,false,0,null);this.dispatchEvent(evt)}}}function inputfocus(){if(jQuery.browser.msie){$("input[@type='text'], input[@type='password'], textarea").focus(function(){$(this).addClass("iefocus")}).blur(function(){$(this).removeClass("iefocus")})}}function G(id){return document.getElementById(id)}function getCookie(aFolder,aName){var sSearch=" "+aFolder+"=";var acookie=" "+window.document.cookie+";";if(acookie.length>0){var iOffset=acookie.indexOf(sSearch);if(iOffset!=-1){iOffset+=sSearch.length;var iEnd=acookie.indexOf(";",iOffset);if(iEnd==-1){iEnd=acookie.length}acookie="&"+acookie.substring(iOffset,iEnd)+"&";sSearch="&"+aName+"=";iOffset=acookie.indexOf(sSearch);if(iOffset!=-1){iOffset+=sSearch.length;iEnd=acookie.indexOf("&",iOffset);if(iEnd==-1){iEnd=acookie.length}var s=acookie.substring(iOffset,iEnd);if(IsNumeric(s))return s;else return unescape(s)}}}return null}var lastUID="ready";var uidTimer=null;function getUserID(){var uid=getCookie("oASK","UID");if(!uid)return 0;if(IsNumeric(uid)==false)return 0;return uid.valueOf()}function IsLogined(){if(getUserID()>0){return true}else{return false}}function oEditorCallback(){if(IsLogined()==false){alert("只有本站的注册用户才能使用本按钮的功能！");return false}else{return true}}function IsSender(){var UID=getUserID();if(UID==0){var qqq=getCookie("oASK%5F0","QQQ");if(!qqq)return false;qqq=","+qqq+",";return(qqq.indexOf(","+qid+",")!=-1)}else{return(UID==senderid)}}function IsReplyer(rid,replyerid){var UID=getUserID();if(UID==0){var rrr=getCookie("oASK%5F0","RRR");if(!rrr)return false;rrr=","+rrr+",";return(rrr.indexOf(","+rid+",")!=-1)}else{return(UID==replyerid)}}function check_loginform(f){if(f.name.value==""||f.name.value.length<=0){alert("请输入用户名");f.name.focus();return false}if(f.pwd.value==""||f.pwd.value.length<=0){alert("请输入密码");f.pwd.focus();return false}if(f.vcode){if(f.vcode.value==""||f.vcode.value.length<=0){alert("请输入验证码");f.vcode.focus();return false}}}function ShowLogin_New(msg,js){var surl=weburl+"login.asp";if(js)surl=surl+"?js="+js;if(msg){msg="用户登陆 ("+msg+")"}else{msg="用户登陆"}openWindow(surl,400,180,msg)}function ShowLogin(msg,js){lastUID="ready";if(msg){msg="用户登陆 -- "+msg}else{msg="用户登陆"}var surl="?TB_login=true&TB_vcode=0&height=130&width=320";if(js)surl=surl+"&js="+js;TB_show(msg,surl,false)}function openWindow(_sUrl,_sWidth,_sHeight,_sTitle){if(!_sUrl)return false;if(!_sTitle)_sTitle="oASK系统提示";if(_sUrl.indexOf("?")>-1){_sUrl=_sUrl+"&TB_iframe=true&height="+_sHeight+"&width="+_sWidth}else{_sUrl=_sUrl+"?TB_iframe=true&height="+_sHeight+"&width="+_sWidth}try{window.top.TB_show(_sTitle,_sUrl,false)}catch(e){TB_show(_sTitle,_sUrl,false)}}function openWindow_Self(_sUrl,_sWidth,_sHeight,_sTitle){if(!_sUrl)return false;if(!_sTitle)_sTitle="oASK系统提示";if(_sUrl.indexOf("?")>-1){_sUrl=_sUrl+"&TB_iframe=true&height="+_sHeight+"&width="+_sWidth}else{_sUrl=_sUrl+"?TB_iframe=true&height="+_sHeight+"&width="+_sWidth}TB_show(_sTitle,_sUrl,false)}function dlg(_sText,_sWidth,_sHeight,_sTitle){if(!_sText)return false;if(!_sTitle)_sTitle="oASK系统提示";var surl="#TB_message?height="+_sHeight+"&width="+_sWidth+"&msgtext="+escape(_sText);try{window.top.TB_show(_sTitle,surl,false)}catch(e){TB_show(_sTitle,surl,false)}}function closeWindow(){try{dialogBoxClose.click()}catch(e){try{window.top.dialogBoxClose.click()}catch(e){}}}function openWindow2(_sUrl,_sWidth,_sHeight,_sTitle){if(getUserID()==0){ShowLogin("登录后您才能执行此操作!")}else{openWindow(_sUrl,_sWidth,_sHeight,_sTitle)}return false}function openScript(url,width,height){window.open(url,"openScript",'width='+width+',height='+height+',resizable=1,scrollbars=yes,menubar=yes,status=yes')}function openScript2(url,width,height){window.open(url,"openScript",'width='+width+',height='+height+',resizable=1,scrollbars=no,menubar=no,status=no')}function ReadSMS(id){openWindow2(weburl+"sms.asp?act=read&smsid="+id,610,450,"站内短信")}function EditSMS(id){openWindow2(weburl+"sms.asp?act=edit&smsid="+id,610,450,"站内短信")}function NewSMS(to,aTitle,aContent){if(IsLogined()==false){alert("登录后才能使用站内短信功能");return false}var u=weburl+"sms.asp?act=new";if(to)u=u+"&touser="+to;if(aTitle)u=u+"&title="+aTitle;if(aContent){var re=/\n/g;aContent=aContent.replace(re,"<br>");u=u+"&content="+aContent}openWindow2(u,610,500,"站内短信")}function ShowPerson(id){if(GuestShowPerson==0&&getUserID()==0){ShowLogin("登录后您才能查看别人的资料!")}else{openScript(weburl+"showperson.asp?id="+id+"",600,400,"用户信息中心")}}function ShowPerson2(name){if(!name)return false;if(GuestShowPerson==0&&getUserID()==0){ShowLogin("登录后您才能查看别人的资料!")}else{openScript(weburl+"showperson.asp?name="+name+"",600,400,"用户信息中心")}}function ShowIP(IP){if(GuestShowPerson==0&&getUserID()==0){ShowLogin("登录后您才能查看别人的资料!")}else{openWindow(weburl+"ip.asp?ip="+IP,400,200,"用户最后登陆的IP地址")}}function ShowDealBtn(divid,replyerid){if(IsSender()==true&&jie==0&&replyerid!=senderid){show_hidden(divid,1)}else{show_hidden(divid,0)}return}function ClickDeal(obj,qid,rid){if(IsSender()==false){ShowLogin("您尚未登录，或者此问题不是您提问的!")}else{if(confirm('确实要把这个回复选择为最佳答案吗?  ')){location.href=weburl+"modify.asp?act=deal&qid="+qid+"&rid="+rid;return true}else{return false}}}function ShowAnswerBtn(){if(IsSender()==true||jie==1){show_hidden("AnswerBtn",0)}else{show_hidden("AnswerBtn",1)}return}function ShowModifyReBtn(divid,replyerid){if(IsReplyer(rid,replyerid)==false||jie!=0){show_hidden(divid,0)}else{show_hidden(divid,1)}return}var lastUID="ready";function getUserID(){if(lastUID=="ready")lastUID=getCookie("oASK","UID");if(!uidTimer)setInterval(function(){lastUID="ready"},5000);if(!lastUID)lastUID=0;return lastUID}var loginTimer=null;function ShowLoginDiv(divid,ReRunInTimer){var UID=getUserID();if(UID>0){show_hidden(divid,0);clearTimeout(loginTimer);if(ReRunInTimer){var UserBar=$("#UserBar");if(UserBar)UserBar.html("")}}else{show_hidden(divid,1);clearTimeout(loginTimer);loginTimer=setTimeout(function(){ShowLoginDiv(divid,1)},3000)}return}function show_hidden_new(idname,v){var oObj=G(idname);if(!oObj){return false}if(v==0){oObj.style.display="none";return true}else{oObj.style.display="";return true}return false}function show_hidden(idname,v){var oObj=$("#"+idname);if(!oObj)return false;if(v)oObj.css({display:"block"});else oObj.css({display:"none"});return true}function RefreshParent(){if(window.top.dialogBoxClose)window.top.dialogBoxClose.click();window.top.location=window.top.location}function IsNumeric(s){if(s=="")return false;var r,re;re=/\d*/i;r=s.match(re);return(r==s)?true:false}function regInput(obj,reg,inputStr){var docSel=document.selection.createRange();if(docSel.parentElement().tagName!="INPUT")return false;oSel=docSel.duplicate();oSel.text="";var srcRange=obj.createTextRange();oSel.setEndPoint("StartToStart",srcRange);var str=oSel.text+inputStr+srcRange.text.substr(oSel.text.length);return reg.test(str)}function ShowErr(msg,act,aurl){var re=/\n/g;document.write("<center>"+msg.replace(re,"<br>")+"</center>");if(act=="close"){try{window.parent.dialogBoxClose.click()}catch(e){}if(msg.length>0)alert(msg)}else if(act=="refresh"){try{window.parent.dialogBoxClose.click()}catch(e){}top.location.reload()}else if(act=="back"){if(msg.length>0)alert(msg);history.back()}else if(act=="goto"&&aurl.length>0){if(msg.length>0)alert(msg);window.top.location=aurl}else{if(msg.length>0)alert(msg)}}function enableReplyButton(){try{top.document.hd.ok.disabled=false}catch(e){}}function check_replyform(aform,MaxReplyLengh){var uid=getUserID();if(uid==0){if(WhoCanAnswer==0){var b=confirm("您还没有登陆，\n如果匿名回答，您将不能获得任何积分奖励，\n建议您先去注册一下。\n\n继续使用游客身份匿名回答吗？");if(b==false){return false}}else{ShowLogin("请登录后再回答","4");return false}}else if(WhoCanAnswer==2){if(MasterC==""||MasterC.indexOf(","+cid+",")==-1){alert("只有专家用户才能回答本分类的问题！");return false}}if(!MaxReplyLengh)MaxReplyLengh=4000;if(!aform.co.value){alert("回答内容不能为空！");return false}else if(aform.co.value.length>MaxReplyLengh){alert("回答内容的长度不能超过"+MaxReplyLengh+"个字");return false}else{if(EnableAntiSpam==1){PrepareAntiSpam(aform,"REPLY")}try{top.document.hd.ok.disabled=true}catch(e){}show_hidden("da_loading",1);return true}}function ShowIMG(imgsrc,maxw,maxh){try{var img=new Image;img.src=imgsrc;var w=img.width;var h=img.height;img=null;var r=parseInt(w)/parseInt(h);if(!maxw)maxw=500;if(!maxh)maxh=800;if(w>maxw){w=maxw;h=maxw/r}if(h>maxh){h=maxh;w=maxh*r}if(w<1)w=100;if(h<1)h=100;document.write("<a href='"+imgsrc+"' target='_blank'><img width="+w+" height="+h+" src='"+imgsrc+"' /></a>")}catch(e){document.write("<a href='"+imgsrc+"' target='_blank'><img src='"+imgsrc+"' /></a>")}}function resizeme(aimg,maxw,maxh){try{var img=new Image();img.src=aimg.src;img.resized=true;var w=img.width;var h=img.height;img=null;var r=parseInt(w)/parseInt(h);if(!maxw)maxw=500;if(!maxh)maxh=800;if(w>maxw){w=maxw;h=maxw/r}if(h>maxh){h=maxh;w=maxh*r}if(w<1)w=100;if(h<1)h=100;$(aimg).css("width",w);$(aimg).css("height",h)}catch(e){}}function trim(s){return s.replace(/(^\s*)|(\s*$)/g,"")}function showit(id){$("#"+id).css("display","")}function hideit(id){$("#"+id).css("display","none")}function hideifblank(id){var s=$("#"+id).text();if(!s||trim(s)==""){hideit(id)}}function ShowEmot(p){var o=G("emot");if(!o)return;var Emots='01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|';Emots=Emots.split("|");var ps=12;var pc;var ec=Emots.length-1;if(ec%ps==0)pc=(ec)/ps;else pc=Math.floor((ec)/ps)+1;p=parseInt(p);if(p<1)p=1;if(p>pc)p=pc;var istr;var s=' ';var ep=weburl+'img/emot/em';if(p!=1&&pc>1){s+='<img style="cursor: pointer;" onClick="ShowEmot('+(p-1)+');" src="'+weburl+'img/'+'Previous.gif" width="14" height="14" title="上一页"> '}for(i=(p-1)*ps;i<(p-1)*ps+ps;i++){if(i==ec)break;if(i<9)istr='em0'+(i+1);else istr='em'+(i+1);s+='<img title="'+istr+'" style="cursor: pointer;" onClick=putEmot("'+istr+'"); src="'+ep+Emots[i]+'.gif"> '}if(p!=pc){s+='<img style="cursor: pointer;" onClick="ShowEmot('+(p+1)+');" src="'+weburl+'img/'+'Next.gif" width="14" height="14" title="下一页"> '}s+='分页：<b>'+p+'</b>/<b>'+pc+'</b>，共<b>'+(ec)+'</b>个';s+="<select id=emotpage onchange=\"ShowEmot(this.value);\">";for(i=1;i<=pc;i++)s+="<option value=\""+i+"\">"+i;s+="<\/select>";o.innerHTML=s;G('emotpage').options[p-1].selected=true}function putEmot(thenNo){var ToAdd='['+thenNo+']';var co=G("co_emot");try{if(!co)co=hd.co}catch(e){}if(co)co.value=co.value+ToAdd}function reset_vcd(){try{var obj=G("oask_vcdimg");obj.src=obj.src}catch(e){}}function SearchBar(key,searchword){document.write("<form action='search.asp' method='get'>");document.write("<input type='hidden' name='spage' value='2' />");document.write("<input type='hidden' name='isword' value='0' />");document.write("<img src='img\/search.gif' width='85' height='32' border='0' align='middle'\/>");document.write("<input type='text' value='"+key+"' maxlength='100' size='40' name='q' id='otherQjs' \/>");document.write("<input name='submit' type='submit' class='btn4' onClick=\"if(this.form.q.value)this.form.action='search.asp'; else{alert('请输入要搜索的内容');return false;}\" value='搜索答案'\/>");document.write("<input type='button' class='btn4' onClick=\"if(this.form.q.value)top.location='ask.asp?q='+this.form.q.value;else{alert('请输入要提问的标题');return false;}\" value='我要提问'\/>");if(searchword){document.write("<input type='submit' class='btn4' onClick=\"if(this.form.q.value)this.form.isword.value=1;else{alert('请输入要搜索的内容');return false;}\" value='搜索词条'\/>");document.write("<input type='button' class='btn4' onClick=\"if(this.form.q.value)top.location='wordadd.asp?wordname='+this.form.q.value;else{alert('请先输入词条名称');return false;}\" value='添加词条'\/>")}document.write("<\/form>")}function SearchBar_google(keyword){document.write("<form method='get' action='http://www.google.cn/custom' target='_top'><table><tr><td nowrap='nowrap' valign='middle' align='left' height='32'><img src='"+weburl+"img/search.gif' border='0' align='middle'></img><input type='text' name='q' size='25' maxlength='255' value='"+keyword+"' id='sbi'></input> ");document.write("<input onClick=\"this.form.action='http://www.google.cn/custom';\" type='submit' class='btn' name='sa' value='Google搜索' id='sbb'></input> ");document.write("<input onClick=\"this.form.action='"+weburl+"search.asp';\" type='Submit' class='btn' value='问答搜索'></input> ");document.write("<input onClick=\"this.form.action='"+weburl+"ask.asp';\" type='Submit' class='btn' value='我要提问'></input> ");document.write("<input type='hidden' name='Keyword' /><Input type='hidden' name='ModuleName' value='Article'><input type='hidden' name='client' value='pub-8006215866575392'></input><input type='hidden' name='forid' value='1'></input><input type='hidden' name='channel' value='6976134779'></input><input type='hidden' name='ie' value='GB2312'></input><input type='hidden' name='oe' value='GB2312'></input><input type='hidden' name='cof' value='GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1'></input><input type='hidden' name='hl' value='zh-CN'></input></td></tr></table></form>")}function AskTools(){if(jie!=0&&jie!=4)return false;var s="";if(IsSender()){s="<div id='AskTools' class='btnDIV'><span><a class='buttona' href='#' onClick=\"return openWindow('"+weburl+"modify.asp?act=bu&qid="+qid+"',500,250,'问题补充')\" title='可以对您的提问补充细节，以得到更准确的答案'><span>问题补充</span></a></span><span><a class='buttona' href='#' onClick=\"return openWindow('"+weburl+"modify.asp?act=tg&qid="+qid+"',400,160,'提高悬赏')\" title='提高悬赏分，以提高问题的关注度'><span>提高悬赏</span></a></span><span><a class='buttona' href='#' onClick=\"return openWindow('"+weburl+"modify.asp?act=wu&qid="+qid+"',440,140,'无满意答案')\" title='没有满意的回答，还可直接结束提问，关闭问题'><span>无满意答案</span></a></span>"}else if(CanShowReply()){s="<div class='btnDIV'><a class='buttona' href='#ireply'><span>我来回答</span></a>"}document.write(s+"</div><div class='clear'></div>")}function AdminTools(cid){try{if(!cid)return;if(IsLogined()==false)return;if(!MasterC)return;if(MasterC.indexOf(","+cid+",")>-1){document.write("<div id='AdminTools' class='btnDIV'><a class='buttona' href='#' onClick=\"this.href='"+weburl+"answerit.asp?qid="+qid+"'\"><span>管理此问题</span></a></div>")}}catch(e){}}function CheckSenderTools(){if(jie!=0&&jie!=4)return false;var uid=getUserID();if(IsSender()){var AskTools=G("AskTools");if(AskTools)AskTools.style.display=""}else if(CanShowReply()){var IWillReply=G("IWillReply");if(IWillReply)IWillReply.style.display=""}try{if(!cid||uid==0||!MasterC)return;if(MasterC.indexOf(","+cid+",")>-1){var AdminTools=G("AdminTools");if(AdminTools)AdminTools.style.display=""}}catch(e){}}function DealTools(rid,ruid){if((jie==0||jie==4)&&getUserID()!=ruid&&IsSender()){document.write("<span class='btnDIV'><a href='#' class='buttona' id='deal' onClick='return ClickDeal(this,"+qid+","+rid+")'><span>采纳</span></a></span>")}}function AnswerTools(rid,ruid){if(jie==0&&IsReplyer(rid,ruid)){var s;s="<div id='AnswerTools' class='btnDIV'>";s=s+"<a class='buttona' href='#' onClick=\"return openWindow('"+weburl+"modify.asp?act=mr&qid="+qid+"&rid="+rid+"', '500', '400', '修改答复')\"><span>修改答复</span></a> ";s=s+"</div>";document.write(s)}}function CanShowReply(){if(jie!=0&&jie!=4)return false;var uid=getUserID();if(WhoCanAnswer==2){if(uid==0||MasterC==""||MasterC.indexOf(","+cid+",")==-1)return false}else if(WhoCanAnswer==1){if(uid==0)return false}else if(WhoCanAnswer==0&&SenderCanReply==0&&uid==0){var qqq=getCookie("oASK%5F0","QQQ");if(qqq&&qqq.indexOf(","+qid+",")>-1)return false}if(SenderCanReply==0&&IsSender()==true)return false;if(ReplyOnce==1){if(uid>0&&rus.indexOf(","+uid+",")>-1)return false;if(uid==0&&rus.indexOf(",0,")>-1)try{var rrr=getCookie("oASK%5F0","RRR");if(!rrr)return false;var arr_r=rrr.split(",");var id_r="";while(id_r!=undefined){id_r=arr_r.pop();if(id_r&&ridlist.indexOf(","+id_r+",")>-1){return false}}}catch(e){}}return true}function ShowIReplyDiv(){if(CanShowReply()){show_hidden("ireply",1)}else{show_hidden("ireply",0)}}function Ping(atype,rid){if(EnableGuestPing==0&&getUserID()==0){ShowLogin("登录后您才能做出评价!")}else{var s;if(atype==1){s='做出好评'}else{s='做出坏评'}openWindow(weburl+"modify.asp?act=pj&type="+atype+"&qid="+qid+"&rid="+rid,'400','150',s)}}function AddPinglun(divid,ping,isSender){try{if(ping){var re=/\n/g;ping.replace(re,"<br>");if(isSender==1){$("#pinglun").html("<hr size='1'>提问人的评论："+ping);return}else{top.location=weburl+'result.asp?act=pl&cid='+cid+'&qid='+qid}}if(!isSender){var n=$("#"+divid).text().valueOf();n++;$("#"+divid).text(n.toString())}}catch(e){}}function Show_Nav(id,aCount,num){for(var i=1;i<=aCount;i++){if(num==i){G("Nav_"+id+"_"+i).className="nav"+id+"_sel";G("NavContent_"+id+"_"+i).style.display=""}else{G("Nav_"+id+"_"+i).className="nav"+id+"_unsel";G("NavContent_"+id+"_"+i).style.display="none"}}}function cutText(jsonText){if(typeof(document.getElementsByTagName('body')[0].style.textOverflow)!='undefined'&&typeof(window.opera)!='undefined'){return}var sName,iWidth;for(sName in jsonText){if(!sName)return;iWidth=jsonText[sName];var elems=document.getElementsByName(sName);for(var i=elems.length-1;i>=0;i--){if(elems[i].scrollWidth>iWidth)elems[i].innerHTML+="...";else return;while(elems[i].scrollWidth>iWidth){elems[i].innerHTML=elems[i].innerHTML.substr(0,elems[i].innerHTML.length-4)+"...";if(elems[i].innerHTML=="...")return}}}}function cutText2(jsonText){var sName,iLen;for(sName in jsonText){if(!sName)return;iLen=jsonText[sName];var elems=document.getElementsByName(sName);for(var i=elems.length-1;i>=0;i--){if(elems[i].innerHTML.length<=iLen)return;elems[i].innerHTML=elems[i].innerHTML.substr(0,iLen-3)+"..."}}}function WriteClouds(aDivID,aMinValue,aMaxValue){var MinFontSize=12;var MaxFontSize=24;var clrs=new Array('#00C0FF','#20C0FF','#60C0FF','#60C0C0','#40A0FF','#60A0FF','#40C0C0','#60FFA0','#60C0C0','#A0C080','#C0C040','#A0C000','#80A060','#80A040','#80A000','#A0A080','#A0A060','#A0A060','#A0A020','#808040 ','#808000','#608040','#608000','#406060','#406040','#406000','#204020','#204000','#404080','#404060','#802000','#C00000 ','#FF40A0','#FF0000');var iClrCount=clrs.length;var CountRange=aMaxValue-aMinValue;var FontSizeRange=MaxFontSize-MinFontSize;var iFontSize,iClrIndex;var iUseCount;$("#"+aDivID+" > a").each(function(i){iUseCount=$(this).attr("rel").valueOf();if(iUseCount<aMinValue)iUseCount=aMinValue;else if(iUseCount>aMaxValue)iUseCount=aMaxValue;iFontSize=(iUseCount-aMinValue)*FontSizeRange/CountRange+MinFontSize;var iClrIndex=(iUseCount-aMinValue)*(iClrCount-1)/CountRange;iClrIndex=Math.round(iClrIndex,0);if(iClrIndex<0)iClrIndex=0;else if(iClrIndex>=iClrCount)iClrIndex=iClrCount-1;$(this).css("fontSize",iFontSize.toString()+'px').css("height",iFontSize.toString()+'px').css("lineHeight",iFontSize.toString()+'px');try{$(this).css("color",clrs[iClrIndex])}catch(e){}})}function PrepareAntiSpam(f,p){if(!p)p="";var html=$.ajax({url:weburl+"js/ajaxServer.asp?lei=1&type="+p,async:false}).responseText;$("#inputsn").remove();$(f).append(html)}function changeHDM(group,count,index){for(var i=1;i<=count;i++){if(i==index){G("hdm-btn-"+group+"-"+i).className="active hdm-sel";G("hdm-"+group+"-"+i).style.display=""}else{G("hdm-btn-"+group+"-"+i).className="hdm-unsel";G("hdm-"+group+"-"+i).style.display="none"}}}function changeHDM2(group,count,index){for(var i=1;i<=count;i++){if(i==index){G("hdm2-btn-"+group+"-"+i).className="active";G("hdm2-"+group+"-"+i).style.display="block"}else{G("hdm2-btn-"+group+"-"+i).className="";G("hdm2-"+group+"-"+i).style.display="none"}}}var rollspeed=50;function MarqueeV(ooRollV,ooRollV1,ooRollV2){if(ooRollV2.offsetTop-ooRollV.scrollTop<=0){ooRollV.scrollTop-=ooRollV1.offsetHeight}else{ooRollV.scrollTop++}}function StartRollV(divMain,div1,div2){var myInter;var ooRollV=G(divMain);var ooRollV1=G(div1);var ooRollV2=G(div2);if(ooRollV&&ooRollV1&&ooRollV2){if(parseInt(ooRollV.style.height)>=ooRollV2.offsetTop){ooRollV.style.height=ooRollV2.offsetTop;return}ooRollV2.innerHTML=ooRollV1.innerHTML;myInter=setInterval(function(){MarqueeV(ooRollV,ooRollV1,ooRollV2)},rollspeed);ooRollV.onmouseover=function(){clearInterval(myInter)};ooRollV.onmouseout=function(){myInter=setInterval(function(){MarqueeV(ooRollV,ooRollV1,ooRollV2)},rollspeed)}}}function MarqueeH(ooRollH,ooRollH1,ooRollH2){if(ooRollH2.offsetLeft-ooRollH.scrollLeft<=0){ooRollH.scrollLeft-=ooRollH1.offsetWidth}else{ooRollH.scrollLeft++}}function StartRollH(divMain,div1,div2){var myInter;var ooRollH=G(divMain);var ooRollH1=G(div1);var ooRollH2=G(div2);if(ooRollH&&ooRollH1&&ooRollH2){if(parseInt(ooRollH.style.width)>=ooRollH2.offsetLeft){oRollH.style.width=oRollH2.offsetLeft;return}ooRollH2.innerHTML=ooRollH1.innerHTML;myInter=setInterval(function(){MarqueeH(ooRollH,ooRollH1,ooRollH2)},rollspeed);ooRollH.onmouseover=function(){clearInterval(myInter)};ooRollH.onmouseout=function(){myInter=setInterval(function(){MarqueeH(ooRollH,ooRollH1,ooRollH2)},rollspeed)}}}(function($){$.fn.corner=function(o){var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function sz(el,p){return parseInt($.css(el,p))||0};function hex2(s){var s=parseInt(s).toString(16);return(s.length<2)?'0'+s:s};function gpc(node){for(;node&&node.nodeName.toLowerCase()!='html';node=node.parentNode){var v=$.css(node,'backgroundColor');if(v.indexOf('rgb')>=0){if($.browser.safari&&v=='rgba(0, 0, 0, 0)')continue;var rgb=v.match(/\d+/g);return'#'+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2])}if(v&&v!='transparent')return v}return'#ffffff'};function getW(i){switch(fx){case'round':return Math.round(width*(1-Math.cos(Math.asin(i/width))));case'cool':return Math.round(width*(1+Math.cos(Math.asin(i/width))));case'sharp':return Math.round(width*(1-Math.cos(Math.acos(i/width))));case'bite':return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case'slide':return Math.round(width*(Math.atan2(i,width/i)));case'jut':return Math.round(width*(Math.atan2(width,(width-i-1))));case'curl':return Math.round(width*(Math.atan(i)));case'tear':return Math.round(width*(Math.cos(i)));case'wicked':return Math.round(width*(Math.tan(i)));case'long':return Math.round(width*(Math.sqrt(i)));case'sculpt':return Math.round(width*(Math.log((width-i-1),width)));case'dog':return(i&1)?(i+1):width;case'dog2':return(i&2)?(i+1):width;case'dog3':return(i&3)?(i+1):width;case'fray':return(i%2)*width;case'notch':return width;case'bevel':return i+1}};o=(o||"").toLowerCase();var keep=/keep/.test(o);var cc=((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc=((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width=parseInt((o.match(/(\d+)px/)||[])[1])||10;var re=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var fx=((o.match(re)||['round'])[0]);var edges={T:0,B:1};var opts={TL:/top|tl/.test(o),TR:/top|tr/.test(o),BL:/bottom|bl/.test(o),BR:/bottom|br/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR)opts={TL:1,TR:1,BL:1,BR:1};var strip=document.createElement('div');strip.style.overflow='hidden';strip.style.height='1px';strip.style.backgroundColor=sc||'transparent';strip.style.borderStyle='solid';return this.each(function(index){var pad={T:parseInt($.css(this,'paddingTop'))||0,R:parseInt($.css(this,'paddingRight'))||0,B:parseInt($.css(this,'paddingBottom'))||0,L:parseInt($.css(this,'paddingLeft'))||0};if($.browser.msie)this.style.zoom=1;if(!keep)this.style.border='none';strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=$.curCSS(this,'height');for(var j in edges){var bot=edges[j];if((bot&&(opts.BL||opts.BR))||(!bot&&(opts.TL||opts.TR))){strip.style.borderStyle='none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');var d=document.createElement('div');$(d).addClass('jquery-corner');var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!='auto'){if($.css(this,'position')=='static')this.style.position='relative';ds.position='absolute';ds.bottom=ds.left=ds.padding=ds.margin='0';if($.browser.msie)ds.setExpression('width','this.parentNode.offsetWidth');else ds.width='100%'}else if(!bot&&$.browser.msie){if($.css(this,'position')=='static')this.style.position='relative';ds.position='absolute';ds.top=ds.left=ds.right=ds.padding=ds.margin='0';var bw=0;if(ie6||!$.boxModel)bw=sz(this,'borderLeftWidth')+sz(this,'borderRightWidth');ie6?ds.setExpression('width','this.parentNode.offsetWidth - '+bw+'+ "px"'):ds.width='100%'}else{ds.margin=!bot?'-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px':(pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px'}for(var i=0;i<width;i++){var w=Math.max(0,getW(i));var e=strip.cloneNode(false);e.style.borderWidth='0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';bot?d.appendChild(e):d.insertBefore(e,d.firstChild)}}}})};$.fn.uncorner=function(o){return $('.jquery-corner',this).remove()}})(jQuery);
