
var DnaCls={ajaxUrl:"/ajax/dna.php",tipInfoFun:function(content,ifReload){if(typeof content=="undefined"||content=="")return;try{this.pop_window.close();}catch(e){}
ifReload=(typeof ifReload=="undefined")?false:true;this.pop_window=new Popup({contentType:2,isReloadOnClose:ifReload,width:250,height:100,isSupportDraging:false});this.pop_window.setContent("title","提示信息");this.pop_window.setContent("contentHtml","<div style='margin-top:35px;margin-bottom:40px;margin-left:20px;margin-right:20px;font-size:14px'>"+content+"</div>");this.pop_window.setContent("time_out",2000);this.pop_window.build();this.pop_window.show();},popFun:function(title,url,height,width,ifReload){if(typeof(url)=="undefined")return;try{this.pop_window.close();}catch(e){}
ifReload=(typeof ifReload=="undefined")?false:true;this.pop_window=new Popup({contentType:1,isReloadOnClose:ifReload,width:typeof(width)=="undefined"?500:width,height:typeof(height)=="undefined"?400:height});this.pop_window.setContent("title",typeof(title)=="undefined"?"基因":title);this.pop_window.setContent("contentUrl",url);this.pop_window.build();this.pop_window.show();},lastCheckName_no:'',lastCheckName_yes:'',logoNums:0,existLogoNums:0,existGeneId:'',existGeneLogoId:'',nameChecked:false,checkGeneName:function(){if(isnull("geneName"))return;if($("geneName").value==this.lastCheckName_yes){$("existArea_1").style.display="none";$("btnReset").style.display="";$("btn_0").value="添加基因";$("btn_0").onclick=function(){DnaCls.doAddGene(3);}
return;}else if($("geneName").value==this.lastCheckName_no){$("exist_gene").style.display="none";$("existArea_1").style.display="";$("btnReset").style.display="none";$("btn_0").onclick=function(){DnaCls.doAddGene(1);}
return;}
new AjaxCls("/ajax/dna.php",[function(temp){switch(temp.rtn_code){case'0':$("existArea_1").style.display="";$("exist_gene").style.display="none";$("btn_0").value="下一步";$("btn_0").onclick=function(){DnaCls.doAddGene(1);}
$("btnReset").style.display="none";DnaCls.lastCheckName_no=$("geneName").value;DnaCls.nameChecked=true;$('exist_gene').style.display="none";$("existArea_2").style.display="none";break;case'1':$("geneLogoArea").src=static_url_prefix+"/"+temp.userpath+"/60X60/"+temp.logoname;$("geneNameArea").innerHTML=temp.genename;$("geneDescArea").innerHTML=temp.genedesc;$("geneUseNumsArea").innerHTML=temp.geneusenums;DnaCls.existLogoNums=temp.logonums;DnaCls.existGeneId=temp.geneid;$("existArea_1").style.display="none";$("existArea_2").style.display="";$('exist_gene').style.display="none";$("btn_0").value="添加基因";$("btn_0").onclick=function(){DnaCls.doAddGene(3);}
$("btnReset").style.display="";DnaCls.lastCheckName_yes=$("geneName").value;DnaCls.nameChecked=true;break;break;case'2':DnaCls.nameChecked=false;DnaCls.tipInfoFun("基因的名字只能是中文、英文、数字！");break;case'3':DnaCls.nameChecked=false;DnaCls.tipInfoFun("你提交的内容中含有敏感字符！");break;case'4':$("existArea_1").style.display="";$("btnReset").style.display="none";DnaCls.lastCheckName_no=$("geneName").value;DnaCls.nameChecked=true;var dnaListStr=temp.content;var dnaListLength=dnaListStr.length;$("existArea_2").style.display="none";$("btn_0").value="下一步";$("btn_0").onclick=function(){DnaCls.doAddGene(1);}
var dnaHtml='<div class="tuijian_dna p_top10" style="margin-top:40px;">你想创建的是这些基因吗？可以直接添加哦~</div>';dnaHtml+='<div class="zj_add_jy m_top10">';for(var i=0;i<dnaListLength;i++){dnaHtml+='<div class="add_br" style="margin-left:5px;">';dnaHtml+='<div class="add_br_hh" style="background:url('+static_url_prefix+'/'+dnaListStr[i].userPath+'/60X60/'+dnaListStr[i].logoname+')" onmouseover="this.style.border=\'1px solid red\';" onmouseout="this.style.border=\'1px solid #CCCCCC\';"><a href="javascript:;" onClick="DnaCls.geneExistAdd(\''+dnaListStr[i].id+'\','+dnaListStr[i].logonums+',\''+dnaListStr[i].name+'\');" title="点击添加"></a></div>';dnaHtml+='<p style="width:62px;"><a href="javascript:;" onClick="DnaCls.geneExistAdd(\''+dnaListStr[i].id+'\','+dnaListStr[i].logonums+',\''+dnaListStr[i].name+'\');" title="点击添加">'+dnaListStr[i].name+'</a></p>';dnaHtml+='</div>';}
dnaHtml+='<div style="clear:both;"></div></div>';$('exist_gene').innerHTML=dnaHtml;$('exist_gene').style.display="";break;}}],{act:"check"},{genename:$("geneName").value});},geneLikeSearchList:function(){new AjaxCls("/ajax/dna.php",[function(temp){switch(temp.rtn_code){case'1':var dnaListStr=temp.content;var dnaListLength=dnaListStr.length;var dnaHtml='<div class="tuijian_dna p_top10" style="margin-top:40px;">你想创建的是这些基因吗？可以直接添加哦~</div>';dnaHtml+='<div class="zj_add_jy m_top10">';for(var i=0;i<dnaListLength;i++){dnaHtml+='<div class="add_br" style="margin-left:5px;">';dnaHtml+='<div class="add_br_hh" style="background:url('+static_url_prefix+'/'+dnaListStr[i].userPath+'/60X60/'+dnaListStr[i].logoname+')" onmouseover="this.style.border=\'1px solid red\';" onmouseout="this.style.border=\'1px solid #CCCCCC\';"><a href="javascript:DnaCls.geneExistAdd(\''+dnaListStr[i].id+'\','+dnaListStr[i].logonums+',\''+dnaListStr[i].name+'\');"  title="点击添加"></a></div>';dnaHtml+='<p style="width:62px;"><a href="javascript:DnaCls.geneExistAdd(\''+dnaListStr[i].id+'\','+dnaListStr[i].logonums+',\''+dnaListStr[i].name+'\');"  title="点击添加">'+dnaListStr[i].name+'</a></p>';dnaHtml+='</div>';}
dnaHtml+='<div style="clear:both;"></div></div>';$('exist_gene').innerHTML=dnaHtml;$('exist_gene').style.display="";break;}}],{act:"getexistgene"},{genename:$("geneName").value},{t:Math.random()});},geneExistAdd:function(geneid,logonums,genename){DnaCls.existGeneId=geneid;DnaCls.existLogoNums=logonums;$("btn_0").value="添加基因";$("btn_0").onclick=function(){DnaCls.doAddGene(3);}
$("btnReset").style.display="";$("geneName").value=genename;DnaCls.lastCheckName_yes=$("geneName").value;DnaCls.nameChecked=true;},geneReset:function(){$("btn_0").value="下一步";$("btn_0").onclick=function(){DnaCls.doAddGene(1);}
$("geneName").select();$("existArea_1").style.display="none";$("existArea_2").style.display="none";$("btnReset").style.display="none";},flashupdone:function(rtn){$("tempGeneLogoArea").src=static_url_prefix+"/tempPics/"+rtn.logoname;this.geneLogo=rtn.logoname;$("geneLogo3").src=static_url_prefix+"/tempPics/"+rtn.logoname+"?rand="+Math.random();$("tempGeneLogoArea").src=static_url_prefix+"/tempPics/"+rtn.logoname+"?rand="+Math.random();},geneLogo:"",uploadfromfile:function(){var url=this.ajaxUrl+"?act=upload";DnaCls.tipInfoFun("请稍候。。。");ajaxUploadImageCls.uploadFile({formAction:url,formEnctype:"multipart/form-data",formId:"uploadForm",error:function(info){loadCls.End();DnaCls.tipInfoFun("错误，请重新操作！");},success:function(obj){switch(obj.rtn_code){case'0':if($("genegrouplogopage")&&$("genegrouplogopage").value==1){parent.location.href=parent.location.href;return;}
if($("uploadtype")&&$("uploadtype").value==1){DnaCls.tipInfoFun("更新成功！");setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},500);}else{DnaCls.geneLogo=obj.logoname;$("tempGeneLogoArea").src=static_url_prefix+"/tempPics/"+obj.logoname;var uploadHTML='<div id="bxHole" class="fleft" onselectstart="return(false)" ondragstart="return(false)" onmousedown="return(false)" oncontextmenu="return(false)" class="upload_mainphoto" style="width:'+obj.geneLogoWidth+'px;height:'+obj.geneLogoHeight+'px;"><img  id="drag_photo1" src="'+static_url_prefix+'/tempPics/'+obj.logoname+'"/></div>';$("div_uploaded_container").innerHTML=uploadHTML;$("div_uploaded_container").style.display='';editPhoto.startTag();$("logotips").style.display="";$("btnsaveedit").onclick=function(){DnaCls.saveedit(obj.logoname);}}
break;case'7':parent.DnaCls.getDnaAndGene(obj.geneid,obj.genelogoid);break;default:DnaCls.tipInfoFun("错误，请重新操作！");}
try{DnaCls.pop_window.close();}catch(e){}}});},saveedit:function(picname){if($("save_mainphoto_ok"))
$("save_mainphoto_ok").innerHTML="正在更新,请稍候!";if($("btnsaveedit"))
$("btnsaveedit").disabled=true;var par=new Array();var pars="act=saveeditdnalogo";var boxpos=editPhoto.getPos($("drag_photo1"));var tagpos=editPhoto.getPos($("tagframe1"));var x_x=Math.ceil(tagpos.x-boxpos.x);var y_y=Math.ceil(tagpos.y-boxpos.y+document.body.scrollTop);par.push(pars);pars="x="+x_x;par.push(pars);pars="y="+y_y;par.push(pars);pars="w="+editPhoto.frameHeight;par.push(pars);pars="h="+editPhoto.frameHeight;par.push(pars);pars="dw=120";par.push(pars);pars="dh=120";par.push(pars);pars="picname="+picname;par.push(pars);pars=par.join("&");var url="/ajax/dna.php";new Ajax.Request(url,{method:'post',parameters:pars,onComplete:function(e){try{if($("btnsaveedit"))
$("btnsaveedit").disabled=false;temp=eval("("+e.responseText+")");if(temp.rtn_code=="nosession"){login_user_ajax();}else if(temp.rtn_code=="false"){if($("save_mainphoto_ok"))
$("save_mainphoto_ok").innerHTML="<font color='red'>截图失败，请重新截图</font>";}else{if($("save_mainphoto_ok"))
$("save_mainphoto_ok").innerHTML="<font color='red'>基因LOGO保存成功!</font>";DnaCls.geneLogo=temp.logoname;$("geneLogo3").src=static_url_prefix+"/tempPics/"+temp.logoname+"?rand="+Math.random();$("tempGeneLogoArea").src=static_url_prefix+"/tempPics/"+temp.logoname+"?rand="+Math.random();}}catch(e){alert(e);}}});},initDrag:function(){for(var i=1;i<12;i++){if($("revertbox_"+i).getAttribute("dnageneid")=="")continue;new Draggable('revertbox_'+i,{elementId:'revertbox_'+i,scroll:window,ghosting:true,snap:function(x,y,draggable){function constrain(n,lower,upper){if(n>upper)return upper;else if(n<lower)return lower;else return n;}
element_dimensions=Element.getDimensions(draggable.element);parent_dimensions=Element.getDimensions(draggable.element.parentNode);return[constrain(x,0,parent_dimensions.width-element_dimensions.width),constrain(y,0,parent_dimensions.height-element_dimensions.height)];},onStart:function(a,b,c){var oldPos=Position.positionedOffset($(this.elementId));DnaCls.oldStyle=[oldPos[0],oldPos[1]];this.revert=DnaCls.ifrevert=true;},onEnd:function(){this.revert=DnaCls.ifrevert;}});}
for(var i=1;i<12;i++){Droppables.add('revertbox_'+i,{hoverclass:"box_hover",onDrop:function(element,dropon){DnaCls.ifrevert=false;DnaCls.swapPos(dropon.id,element.id);}})}},ifrevert:true,swapPos:function(pos1,pos2){var sort1=$(pos1).getAttribute("sort");var sort2=$(pos2).getAttribute("sort");$(pos1).setAttribute("sort",sort2);$(pos2).setAttribute("sort",sort1);new Effect.Parallel([new Effect.Move(pos2,{x:Position.positionedOffset($(pos1))[0]-Position.positionedOffset($(pos2))[0],y:Position.positionedOffset($(pos1))[1]-Position.positionedOffset($(pos2))[1],sync:true,queue:{scope:'_draggable',position:'end'}}),new Effect.Move(pos1,{x:this.oldStyle[0]-Position.positionedOffset($(pos1))[0],y:this.oldStyle[1]-Position.positionedOffset($(pos1))[1],sync:true,queue:{scope:'_draggable',position:'end'}})],{duration:0.5,queue:{scope:'_draggable',position:'end'}});},submitPos:function(){var geneidsArr=[];for(var i=1;i<12;i++){var curSort=$("revertbox_"+i).getAttribute("sort");var curGeneId=$("revertbox_"+i).getAttribute("dnageneid");if(curSort!=i&&curGeneId!=""){geneidsArr.push(curSort+"_"+curGeneId);}}
var geneids=geneidsArr.join(",");if(geneids==""){DnaCls.tipInfoFun("使用鼠标拖动变换位置！");}
new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("更新成功！");setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},2000);break;default:DnaCls.tipInfoFun("请重新操作！");break;}}],{act:"pos",geneids:geneids});},showDnaDetail:function(){this.popFun("修改基因排序","/modules/dna.php?act=sort",370,460);},showAddGene:function(geneSort){geneSort=(typeof geneSort=="undefined")?'':geneSort;this.popFun("添加新的基因","/modules/dna.php?act=addgene&genesort="+geneSort,470,463);},doAddGene:function(step){if(step==1){if(isnull("geneName")||!DnaCls.nameChecked){$("geneName").focus();return;}
$("stepArea_1").style.display="none";$("stepArea_2").style.display="";$("stepArea_3").style.display="none";$("geneName2").innerHTML=$("geneName").value;}else if(step==2||step==6){if(isnull("geneName"))return;if(typeof this.geneLogo=="undefined"||this.geneLogo==""){this.tipInfoFun("请上传图片！");return;}
if(this.curCategoryid.length==0){this.tipInfoFun("请选择分类！");return;}
var geneSort=$("geneSort").value;loadCls.Begin("btn_1");new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':if(step==2){DnaCls.tipInfoFun("基因已经成功保存在你的DNA中！");setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},2000);}else
parent.DnaCls.getDnaAndGene(temp.geneid);break;case'9':DnaCls.tipInfoFun("你的基因位置已经满啦，请自己选择你要添加的位置！");break;default:DnaCls.tipInfoFun("请重新操作！");break;}}],{act:"addgene",genelogo:this.geneLogo,step:step,genesort:geneSort,dnaCateid:this.curCategoryid},{genename:$("geneName").value,genedesc:$("geneDesc").value});}else if(step==3){if(DnaCls.existLogoNums>0){this.getGeneLogo(this.existGeneId,1);return;}
var geneSort=$("geneSort").value;new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("成功！");setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},2000);break;}}],{act:"addgene",geneid:this.existGeneId,genesort:geneSort});}else if(step==4){var geneSort=$("geneSort").value;new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("成功！");setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},2000);break;case'9':DnaCls.tipInfoFun("你的基因位置已经满啦，请自己选择你要添加的位置！");break;}}],{act:"addgene",genelogoid:this.existGeneLogoId,geneid:this.existGeneId,genesort:geneSort});}else if(step==5){parent.parent.DnaCls.getDnaAndGene(parent.DnaCls.existGeneId,parent.DnaCls.existGeneLogoId);}else if(step==0){$("stepArea_1").style.display="";$("stepArea_2").style.display="none";$("stepArea_3").style.display="none";}else if(step==7){$("stepArea_1").style.display="none";$("stepArea_2").style.display="none";$("stepArea_3").style.display="";$("geneName3").innerHTML=$("geneName").value;$("cateid").onclick=function(){DnaCls.getCatelistDiv(2);}}},getGeneLogo:function(geneId,where,dnaId,geneSort){if(where==1)
this.popFun("选择logo库中的基因","/modules/dna.php?act=logo&geneid="+geneId+"&where="+where,260,400);else if(where==2){this.popFun("选择logo库中的基因","/modules/dna.php?act=logo&geneid="+geneId+"&where="+where+"&dnaid="+dnaId+"&sort="+geneSort,360,400);}else{this.popFun("选择基因LOGO添加到我的DNA","/modules/dna.php?act=logo&geneid="+geneId+"&where="+where+"&dnaid="+dnaId+"&sort="+geneSort,260,400);}},getGeneLogo_page:function(url,pageName,logoType){if(typeof pageName!="undefined"&&pageName!="")
var url=this.ajaxUrl+"?"+pageName;else
var url=this.ajaxUrl;var groupPage=0;if($("grouppage")&&$("grouppage").value==1)
groupPage=1;if(typeof logoType!="undefined"&&logoType==1){if($("ifdel"))$("ifdel").value=1;$("logoAllBtn").className='m_left5';$("logoPartBtn").className='m_left5 font_bold';}else if(typeof logoType!="undefined"&&logoType==0){if($("ifdel"))$("ifdel").value=0;$("logoAllBtn").className='m_left5 font_bold';$("logoPartBtn").className='m_left5';}
var ifDel=$("ifdel")?$("ifdel").value:0;new AjaxCls(url,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("geneLogoArea").innerHTML=temp.content;break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"logo",geneid:$("geneId").value,grouppage:groupPage,ifdel:ifDel},{},"get");},getUseGene_page:function(url,pageName){if(typeof pageName!="undefined"&&pageName!="")
var url=this.ajaxUrl+"?"+pageName;else
var url=this.ajaxUrl;new AjaxCls(url,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("useGeneArea").innerHTML=temp.content;break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"usegene",geneid:$("geneId").value},{},"get");},getDnaAndGene:function(geneId,geneLogoId){geneId=(typeof geneId=="undefined")?'':geneId;geneLogoId=(typeof geneLogoId=="undefined")?'':geneLogoId;this.popFun("选择基因位置","/modules/dna.php?act=relation&geneid="+geneId+"&genelogoid="+geneLogoId,380,530);},useGeneLogoId:function(geneId){this.getDnaAndGene(geneId,this.existGeneLogoId);},doDnaAndGene:function(dnaId,geneId,geneLogoId,geneSort){if($("geneSort")&&$("geneSort").value==""){DnaCls.tipInfoFun("请选择一个位置！");return;}
if($("btn_"+geneId))
loadCls.Begin("btn_"+geneId);new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case"nosession":login_user_ajax();break;case'0':if(($("ifreload")&&$("ifreload").value==1)||(parent.$("ifreload")&&parent.$("ifreload").value==1)){top.location.href=top.location.href;}
try{$("dnagene_"+geneSort).src=$("geneLogoImg").src.replace("60X60","120X120");}catch(e){}
DnaCls.tipInfoFun("添加基因成功！");if(dnaId==""&&geneLogoId==""&&geneSort=="")break;setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},2000);break;case'7':DnaCls.getDnaAndGene(geneId,geneLogoId);break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"relation",dnaid:dnaId,geneid:geneId,genelogoid:geneLogoId,genesort:geneSort});},getDnaDetail:function(userId){try{parent.parent.DnaCls.pop_window.close();}catch(e){}
try{parent.DnaCls.pop_window.close();}catch(e){}
try{this.pop_window.close();}catch(e){}
new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':try{$("updateDnaDetailArea").innerHTML=temp.content;}catch(e){parent.$("updateDnaDetailArea").innerHTML=temp.content;}
break;}}],{act:"getdna",uid:userId});},delAndGene:function(){this.popFun("解除基因","/modules/dna.php?act=del",380,450);},delSelectGeneArr:[],doDelAndGene:function(dnaId){var delSelect=this.delSelectGeneArr.join(",");new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("解除成功！");setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},2000);break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"deldnagene",geneids:delSelect,dnaid:dnaId});},changeDnaStyle:function(){this.popFun("更换DNA外框","/modules/dna.php?act=style",360,450);},selectDnaStyle:'',doChangeDnaStyle:function(dnaId){if(this.selectDnaStyle==''){DnaCls.tipInfoFun("请选择一个外框！");return;}
new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("更换成功！");setTimeout(function(){try{parent.DnaCls.getDnaDetail('');}catch(e){DnaCls.getDnaDetail('');}},2000);break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"change",dnaid:dnaId,style:this.selectDnaStyle});},delGene:function(geneId,useNums){if(useNums>0){DnaCls.tipInfoFun("有koo友正在使用，不能删除！");return;}
this.pop_window=new Popup({contentType:3,isReloadOnClose:true,width:250,height:100});this.pop_window.setContent("title","信息提示");this.pop_window.setContent("confirmCon","确定要删除所选基因吗？");this.pop_window.setContent("callBack",DnaCls.doDelGene.bind(this));this.pop_window.setContent("parameter",Array(geneId));this.pop_window.build();this.pop_window.show();},doDelGene:function(param){new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("删除成功！",true);break;case'1':DnaCls.tipInfoFun("有koo友正在使用，不能删除！");break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"delgene",geneid:param[0]});},editGene:function(geneId){geneId=(typeof geneId=="undefined")?'':geneId;this.popFun("编辑基因","/modules/dna.php?act=edit&geneid="+geneId,360,400);},doEditGene:function(geneId){var geneLogo=this.geneLogo;var geneDesc=$("geneDesc").value;var cateid=$("cateGoryId").value;if(this.curCategoryid.length>0){cateid=this.curCategoryid;}
new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':setTimeout(function(){DnaCls.tipInfoFun("编辑成功！");parent.location.href=parent.location.href;},0);break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"editgene",geneid:geneId,genelogo:geneLogo,cateid:cateid,genelogoid:this.existGeneLogoId},{genedesc:geneDesc});},searchGene:function(objId){if(isnull(objId)||$(objId).value=="输入你想找的基因"){DnaCls.tipInfoFun("请输入关键字！");$(objId).select();$(objId).focus();return;}
location.href="/modules/dna.php?act=search&genename="+encodeURI($(objId).value);},showSimilarList:function(userId,obj){if($("list_"+userId).style.display=="none"){$("list_"+userId).style.display="";obj.src=obj.src.replace("17","16");}else{$("list_"+userId).style.display="none";obj.src=obj.src.replace("16","17");}},showSpaceModule:function(id){new AjaxCls("/ajax/profile.php",[function(temp){switch(temp.rtn_code){case"nosession":login_user_ajax();break;case'0':DnaCls.tipInfoFun("DNA模块已经成功添加在你的空间里~");break;case'1':DnaCls.tipInfoFun("DNA模块已经存在在你的空间里~");break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"showspacemodules",id:id});},curShowTipId:'',showTip:function(objId,direction,event){if($(this.curShowTipId+"_menu"))$(this.curShowTipId+"_menu").style.display='none';this.curShowTipId=objId;var objIdOffset=Position.cumulativeOffset($(objId));var menuDimensions=Element.getDimensions(objId+"_menu");$(objId+"_menu").style.position="absolute";$(objId+"_menu").style.left=objIdOffset[0]+"px";if(direction==0){$(objId+"_menu").style.top=(objIdOffset[1]-menuDimensions.height-document.body.scrollTop+14)+"px";}else{var menuDimensions_element=Element.getDimensions(objId);$(objId+"_menu").style.top=(objIdOffset[1]+menuDimensions_element.height)+"px";}
$(objId+"_menu").style.zIndex=600;$(objId+"_menu").style.display='';var ie6ScrollFun=function(){if(is_ie&&is_ie<7)Event.stopObserving(document.body,"scroll",this.ie6ScrollFunHandler);Event.stopObserving(is_ie?document.body:window,"click",this.ie6ScrollFunHandler);$(objId+"_menu").style.display='none';}
this.ie6ScrollFunHandler=ie6ScrollFun.bind(this);if(is_ie&&is_ie<7)Event.observe(document.body,"scroll",this.ie6ScrollFunHandler);Event.observe(is_ie?document.body:window,"click",this.ie6ScrollFunHandler);Event.stop(event);},geneGroup_page:function(url,pageName){if(typeof pageName!="undefined"&&pageName!="")
var url=this.ajaxUrl+"?"+pageName;else
var url=this.ajaxUrl;var param_2={}
if(this.ifSearch){param_2={topictype:$("topicType_1").checked?1:2,keyword:$("keyword").value};if(isnull("keyword")){param_2={};this.ifSearch=false;}}
if(DnaCls.ifJing){param_2={jing:1};}
new AjaxCls(url,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("geneGroupTopicArea").innerHTML=temp.content;break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"genetopic",geneid:$("geneid").value,orderby:$("orderby").value},param_2,"get");},ifSearch:false,ifJing:false,searchGroupTopic:function(){this.ifSearch=true;this.geneGroup_page();},searchGroupTopicJing:function(){DnaCls.ifJing=true;DnaCls.geneGroup_page();$("JingHua").value='全部帖子';$("JingHua").onclick=DnaCls.searchAlltopic;},searchAlltopic:function(){DnaCls.ifJing=false;DnaCls.geneGroup_page();$("JingHua").value='精华帖';$("JingHua").onclick=DnaCls.searchGroupTopicJing;},getGeneJing_page:function(url,pageName){if(typeof pageName!="undefined"&&pageName!="")
var url=this.ajaxUrl+"?"+pageName;else
var url=this.ajaxUrl;new AjaxCls(url,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("jingContentArea").innerHTML=temp.content;break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"jing",geneid:$("geneid").value},{},"get");},getGeneMyTopic_page:function(url,pageName){if(typeof pageName!="undefined"&&pageName!="")
var url=this.ajaxUrl+"?"+pageName;else
var url=this.ajaxUrl;new AjaxCls(url,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("myTopicContentArea").innerHTML=temp.content;break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"mytopic"},{},"get");},getGeneGroupMember_page:function(url,pageName,memberType){if(typeof pageName!="undefined"&&pageName!="")
var url=this.ajaxUrl+"?"+pageName;else
var url=this.ajaxUrl;if(typeof memberType=="undefined"){memberType=$("memberType").value;}else
$("memberType").value=memberType;new AjaxCls(url,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("geneGroupMemberArea").innerHTML=temp.content;if(memberType==2){var len=DnaCls.managerSelectUser.length;for(var i=0;i<len;i++){if($("member_"+DnaCls.managerSelectUser[i]))$("member_"+DnaCls.managerSelectUser[i]).checked=true;}
$("geneGroupMemberArea_display").style.display='';}
break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"member",geneid:$("geneid").value,type:memberType},{username:$("userName")?$("userName").value:''},"get");},colorSet:function(obj,type){if(type==1){$("assistColorPreview").style.backgroundColor=obj.style.backgroundColor;$('assistColor').value=obj.getAttribute("color");}else{$("mainColorPreview").style.backgroundColor=obj.style.backgroundColor;$('mainColor').value=obj.getAttribute("color");}},curDescValue:'',modifyGeneDesc:function(){this.curDescValue=$("geneDescArea").innerHTML.unescapeHTML();var htmlContent='<textarea style="width:400px; height:80px;" id="geneDesc_text" onblur="DnaCls.doGeneDesc();">'+this.curDescValue+'</textarea>';$("geneDescArea").innerHTML=htmlContent;$('geneDesc_text').focus();},doGeneDesc:function(){if(this.curDescValue==$("geneDesc_text").value){$("geneDescArea").innerHTML=$("geneDesc_text").value;return;}
new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("geneDescArea").innerHTML=$('geneDesc_text').value;break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"modifygroupdesc",geneid:$("geneid").value},{desc:$("geneDesc_text").value});},getCatelistDiv:function(type){var url=this.ajaxUrl;if($("catelist").style.display!="none"){return;}
new AjaxCls(url,[function(temp){switch(temp.rtn_code){case'0':$("catelist").style.display="";$("catelist").innerHTML=temp.content;var cateListClass=$("catelist").className.toString();if(cateListClass.indexOf("clearfix")==-1){$("catelist").className=cateListClass+" clearfix";}
var ids=$("cateGoryId").value;if(ids!=""){DnaCls.curCategoryid=DnaCls.oldCategoryId=ids.split(",");DnaCls.curCategoryName=DnaCls.oldCategoryName=$("cateids").innerHTML.split(",");var obj=$("catelist").getElementsByTagName("input");var len=obj.length;for(var i=0;i<len;i++){if(obj[i].value==DnaCls.curCategoryid[0]||obj[i].value==DnaCls.curCategoryid[1]||obj[i].value==DnaCls.curCategoryid[2]){obj[i].checked=true;}}}else{DnaCls.curCategoryid=new Array();DnaCls.oldCategoryId=new Array();DnaCls.curCategoryName=new Array();DnaCls.oldCategoryName=new Array();}
break;default:DnaCls.tipInfoFun("获取基因分类失败，请重新选择！");}}],{act:"getgenecategory",type:type},{},"get");},oldCategoryId:　new Array(),curCategoryid:new Array(),oldCategoryName:new Array(),curCategoryName:new Array(),selectedCategoryId:function(obj){if(obj.checked==true){if(this.curCategoryid.length>=3){DnaCls.tipInfoFun("最多选择 3 个分类！");obj.checked=false;return;}
this.curCategoryid.push(obj.value);}else{if(this.curCategoryid.length!=this.curCategoryid.without(obj.value).length){this.curCategoryid=this.curCategoryid.without(obj.value);}}
var len=this.curCategoryid.length;this.curCategoryName=new Array();for(var i=0;i<len;i++){this.curCategoryName.push($("categoryName_"+this.curCategoryid[i]).innerHTML);}
$("cateids").innerHTML=this.curCategoryName.join(",");},cancelModify:function(){$('catelist').style.display='none';$("cateids").innerHTML=this.oldCategoryName;},modifyCategory:function(){new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("修改成功！");$("cateGoryId").value=DnaCls.curCategoryid.join(",");$("catelist").style.display="none";break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"modifycategory",geneid:$("geneid").value},{cateid:DnaCls.curCategoryid.join(",")});},selectedCate:function(){$("cateGoryId").value=this.curCategoryid.join(",");$("catelist").style.display="none";},onclickSave:'',modifyGroupName:function(){this.onclickSave=$("modifyGroupNameBtn").onclick;$("modifyGroupNameBtn").onclick='';var htmlContent='<input type="text" style="width:400px;" id="geneGroupName_text" onblur="DnaCls.doGeneGroupName();"></input>';this.curGroupName=$("groupNameArea").innerHTML.unescapeHTML();$("groupNameArea").innerHTML=htmlContent;$("geneGroupName_text").value=(this.curGroupName=='未设置')?'':this.curGroupName;$('geneGroupName_text').focus();},doGeneGroupName:function(){if(this.curGroupName==$("geneGroupName_text").value){$("groupNameArea").innerHTML=$("geneGroupName_text").value;$("modifyGroupNameBtn").onclick=this.onclickSave;return;}
new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("groupNameArea").innerHTML=$('geneGroupName_text').value==''?(DnaCls.curGroupName=='未设置'?DnaCls.curGroupName:'未设置'):$('geneGroupName_text').value;new Effect.Highlight("groupNameArea");$("modifyGroupNameBtn").onclick=DnaCls.onclickSave;break;case'4':DnaCls.nameChecked=false;DnaCls.tipInfoFun("基因的名字只能是中文、英文、数字！");break;case'1':DnaCls.tipInfoFun("你提交的内容中含有敏感字符！");break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"modifygroupname",geneid:$("geneid").value},{name:$("geneGroupName_text").value});},doGeneGroupColor:function(type){var mainColor='';var assistColor='';if(type!='0'){mainColor=$("mainColor").value;assistColor=$("assistColor").value;}
new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':location.href="/modules/dna.php?act=manager&geneid="+$("geneid").value;break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"color",geneid:$("geneid").value,main:mainColor,assist:assistColor},{},"get");},doGeneGroupColordefault:function(){this.pop_window=new Popup({contentType:3,isReloadOnClose:true,width:320,height:100});this.pop_window.setContent("title","信息提示");this.pop_window.setContent("confirmCon","你确定要将基因组的风格恢复到默认风格？");this.pop_window.setContent("callBack",DnaCls.doGeneGroupColor.bind(this));this.pop_window.setContent("parameter",'0');this.pop_window.build();this.pop_window.show();},addGeneLogo:function(geneId,dnaId){this.popFun("添加基因logo库","/modules/dna.php?act=addlogo&geneid="+geneId+"&dnaid="+dnaId,150,400);},managerSelectUser:[],newAddManagerSelectUser:[],managerSelectUserNickName:[],addManagerSelected:function(obj,userId){var len=this.managerSelectUser.length;if(obj.checked&&len==5){this.tipInfoFun("一个基因组只能有5个副组长！");obj.checked=false;return;}
if(len==this.managerSelectUser.without(userId).length){this.managerSelectUser.push(userId);this.newAddManagerSelectUser.push(userId);this.managerSelectUserNickName[userId]=$("member_name_"+userId).title;if($("allManagerArea_"+userId))
$("allManagerArea_"+userId).style.display='';else
$("allManagerArea").innerHTML+="<span class='font_12' id='allManagerArea_"+userId+"'>"+$("isManager_"+userId).innerHTML+"</span>";}else{$("allManagerArea_"+userId).style.display='none';this.managerSelectUser=this.managerSelectUser.without(userId);}},modifyGroupManager:function(type){this.pop_window=new Popup({contentType:3,isReloadOnClose:false,width:320,height:100});this.pop_window.setContent("title","信息提示");var userNickName='';var len=this.managerSelectUser.length;for(var i=0;i<len;i++){userNickName+=this.managerSelectUserNickName[this.managerSelectUser[i]];if(i+1<len)userNickName+="、";}
if(type==0){this.pop_window.setContent("confirmCon","真的取消所有副组长？");}else{if(userNickName=='')
this.pop_window.setContent("confirmCon","真的取消所有副组长？");else
this.pop_window.setContent("confirmCon","真的要把 "+userNickName+" 设为副组长？");}
this.pop_window.setContent("callBack",DnaCls.doModifyGroupManager.bind(this));this.pop_window.setContent("parameter",[type]);this.pop_window.build();this.pop_window.show();},doModifyGroupManager:function(param){if(param[0]==0){var users='';}else{var users=this.managerSelectUser.join(',');}
new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("修改成功！");if(param[0]==0){var spanObj=$("allManagerArea").getElementsByTagName("span");var len=spanObj.length;for(var i=0;i<len;i++){spanObj[i].style.display='none';}
$("cancelAllManagerBtn").style.display='none';DnaCls.newAddManagerSelectUser=[];DnaCls.managerSelectUser=[];}else{$("cancelAllManagerBtn").style.display='';}
$("geneGroupMemberArea_display").style.display='none';DnaCls.newAddManagerSelectUser=[];break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"manager",geneid:$("geneid").value,userids:users});},cancelModifyGroupManager:function(){var len=this.newAddManagerSelectUser.length;if(len==0){$("geneGroupMemberArea_display").style.display="none";return;}
for(var i=0;i<len;i++){$("allManagerArea_"+this.newAddManagerSelectUser[i]).style.display='none';}
$("geneGroupMemberArea_display").style.display="none";},saveArr:[],showPao:function(obj,geneId,geneSort,type){if(is_ie&&document.readyState!="complete"){return;}
var theEvent=window.event||arguments.callee.caller.arguments[0];if(typeof type!="undefined"&&type==1){this.existGeneLogoId=geneId;DnaCls.showMenu(obj,$("showPaoArea").innerHTML,theEvent);return;}
if(geneId!=''){if(DnaCls.saveArr[geneId]){DnaCls.showMenu(obj,DnaCls.saveArr[geneId],theEvent);return;}}else{if(DnaCls.saveArr['kong']){DnaCls.showMenu(obj,DnaCls.saveArr['kong'],theEvent);return;}}
new AjaxCls(this.ajaxUrl,[function(temp){switch(temp.rtn_code){case'0':if(geneId==''){DnaCls.saveArr['kong']=temp.content;}else{DnaCls.saveArr[geneId]=temp.content;}
DnaCls.showMenu(obj,temp.content,theEvent);break;}}],{act:"paopao",geneid:geneId,navflag:$("navflag").value,genesort:geneSort},{},"get");},menuObj:"",showMenu:function(obj,content,theEvent){if(DnaCls.menuObj==""){DnaCls.menuObj=new ShowMenuCls();}
DnaCls.menuObj.start(obj,content,theEvent);},groupTab:function(){var objId=this.getElementObj().id;if(objId=="joinGroup"){$("joinGroup").className='fleft tab11 m_left5 m_right5 font_bold font_color_jiyin';$("managerGroup").className='fleft tab12 font_color_jiyin';$("joinGroup_menu").style.display='';$("managerGroup_menu").style.display='none';}else if(objId=="managerGroup"){$("joinGroup").className='fleft tab12 font_color_jiyin';$("managerGroup").className='fleft tab11 m_left5 m_right5 font_bold font_color_jiyin';$("joinGroup_menu").style.display='none';$("managerGroup_menu").style.display='';}},casuallyLook:function(){loadCls.Begin("casuallyBtn");new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("casuallyLookArea").innerHTML=temp.content;break;}}],{act:"look"},{},"get");},delGeneLogo:function(geneLogoId){this.pop_window=new Popup({contentType:3,isReloadOnClose:false,width:250,height:100});this.pop_window.setContent("title","信息提示");this.pop_window.setContent("confirmCon","确定要删除基因组logo吗？");this.pop_window.setContent("callBack",DnaCls.doDelGeneLogo.bind(this));this.pop_window.setContent("parameter",Array(geneLogoId));this.pop_window.build();this.pop_window.show();},doDelGeneLogo:function(param){var geneLogoId=param[0];loadCls.Begin(geneLogoId+"_btn");new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("删除成功！");$(geneLogoId).parentNode.removeChild($(geneLogoId));break;case'3':DnaCls.tipInfoFun("有人正在使用这个logo！");break;}}],{act:"delgenelogo",genelogoid:geneLogoId},{},"get");},uploadBackGround:function(){var url=this.ajaxUrl+"?act=background";DnaCls.tipInfoFun("请稍候。。。");ajaxUploadImageCls.uploadFile({formAction:url,formEnctype:"multipart/form-data",formId:"uploadForm",error:function(info){loadCls.End();DnaCls.tipInfoFun("错误，请重新操作！");},success:function(obj){switch(obj.rtn_code){case'0':$("backgroundArea").src=static_url_prefix+obj.filename+"?"+Math.random();$("delBackgroundBtn").style.display='';break;default:DnaCls.tipInfoFun("错误，请重新操作！");}
try{DnaCls.pop_window.close();}catch(e){}}});},delBackGround:function(geneId){new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("删除成功！");$("backgroundArea").src=static_url_prefix+'/images/dna/group_background_none.gif';$("delBackgroundBtn").style.display='none';break;}}],{act:"delbackground",geneid:geneId},{},"get");},getElementObj:function(){var theEvent=window.event||arguments.callee.caller.arguments[0]||arguments.callee.caller.caller.arguments[0];var obj=theEvent.srcElement?theEvent.srcElement:theEvent.target;return obj;},ifShows:0,showDnaHotTopic:function(){if(this.ifShows==0)
{$("geneHotTopic").style.display="none";this.ifShows=1;$("hotTopic_showorhidden").title='展开';}else{$("geneHotTopic").style.display="";this.ifShows=0;$("hotTopic_showorhidden").title='折叠';}},getcommendGene:function(){new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("commendgenelist").innerHTML=temp.content;break;}}],{act:"commendgene"},{},"get");},getCategoryGene_page:function(url,pageName){if(typeof pageName!="undefined"&&pageName!="")
var url=this.ajaxUrl+"?"+pageName;else
var url=this.ajaxUrl;new AjaxCls(url,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':$("categoryArea").innerHTML=temp.content;Element.scrollTo_ie6hack("categoryArea");break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"categorygene",cateid:$("cateIdArea").value},{},"get");},leadsData:new Array(),selectLeadsData:function(obj){var categoryId=obj.getAttribute('idv');if(obj.className.indexOf("leads_selected")>-1){this.leadsData=this.leadsData.without(categoryId);obj.className="automake_img";}else{this.leadsData.push(categoryId);obj.className="leads_selected";}},doLeads:function(){if(this.leadsData.length==0){DnaCls.tipInfoFun("请选择图片！");return;}
loadCls.Begin("leadBtn");new AjaxCls(this.ajaxUrl,[function(temp){loadCls.End();switch(temp.rtn_code){case'0':DnaCls.tipInfoFun("做DNA成功！");setTimeout(function(){location.href='/modules/dna.php';},2000);break;case'1':DnaCls.tipInfoFun("您已经制作过一套DNA了，快去看看吧！！");setTimeout(function(){location.href='/modules/dna.php';},2000);break;default:DnaCls.tipInfoFun("请重新操作！");}}],{act:"leads",data:this.leadsData.join(",")},{},"post");}}
var AjaxCls=Class.create();Object.extend(AjaxCls.prototype,{waitAjax:[],initialize:function(){if(arguments[0]=="")return;if(Ajax.activeRequestCount!=0){this.waitAjax.push(arguments);this.waitAjaxArr=[];this.waitAjaxArr.push(1);this.timer=setInterval(this.queue.bind(this),500);return;}
this.setParam(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]);this.start();},start:function(){var temp_funName=function(e){if(!this.funName)return;var temp=eval("("+e.responseText+")");if(typeof(this.funName)=="string")eval(this.funName.toString()+"(temp,'"+this.funParam+"')");else this.funName(temp);}
new Ajax.Request(this.url,{method:this.method,parameters:this.pars,onComplete:temp_funName.bind(this)});},queue:function(){if(this.waitAjax.length==0){if(this.timer)clearInterval(this.timer);return;}
var waitAjaxArguments=this.waitAjax.shift();this.setParam(waitAjaxArguments[0],waitAjaxArguments[1],waitAjaxArguments[2],waitAjaxArguments[3],waitAjaxArguments[4]);this.start();},setParam:function(url,funName,noEncodeParam,encodeParam,method){this.url=url;if(funName){this.funName=funName.shift();this.funParam=funName.join("','");}
this.method=method=="get"?"get":"post";var member,par=new Array();for(member in noEncodeParam){par.push(member+"="+noEncodeParam[member]);}
for(member in encodeParam){par.push(member+"="+encodeURIComponent(encodeParam[member]));}
this.pars=par.join("&");}});var ShowMenuCls=Class.create();Object.extend(ShowMenuCls.prototype,{busying:false,initialize:function(param){this.viewImageArea="viewImageArea";this.createElement();},start:function(eventObj,eventContent,event){if(this.busying)return;var eventObj=eventObj;if(typeof eventObj!="object")eventObj=$(eventObj);var eventObjOffset=Position.cumulativeOffset(eventObj);this.divObj.innerHTML=eventContent;var menuDimensions=Element.getDimensions(this.divObj);var clientWidth=(document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth)-10;var clientHeight=(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight)-10;if(clientWidth<(eventObjOffset[0]+menuDimensions.width)){var divLeft=clientWidth-menuDimensions.width;if($("zhishi"))$("zhishi").style.backgroundPosition=(eventObjOffset[0]+menuDimensions.width)-clientWidth+'px';}else{var divLeft=eventObjOffset[0];if($("zhishi"))$("zhishi").style.backgroundPosition="20px";}
this.divObj.style.left=divLeft+"px";if(navigator.userAgent.toLowerCase().indexOf('chrome')!=-1)
this.divObj.style.top=eventObjOffset[1]-menuDimensions.height+"px";else
this.divObj.style.top=eventObjOffset[1]-menuDimensions.height-document.body.scrollTop+14+"px";this.divObj.style.display='';var ie6ScrollFun=function(){if(is_ie&&is_ie<7)Event.stopObserving(document.body,"scroll",this.ie6ScrollFunHandler);Event.stopObserving(is_ie?document.body:window,"click",this.ie6ScrollFunHandler);$(this.viewImageArea).style.display='none';}
this.ie6ScrollFunHandler=ie6ScrollFun.bind(this);if(is_ie&&is_ie<7)Event.observe(document.body,"scroll",this.ie6ScrollFunHandler);Event.observe(is_ie?document.body:window,"click",this.ie6ScrollFunHandler);Event.stop(event);},afterFinishFun:function(){this.busying=false;},beforeStartFun:function(){this.busying=true;},createElement:function(){if(this.divObj){this.divObj.innerHTML="";return;}
this.divObj=document.createElement("div");this.divObj.setAttribute("id",this.viewImageArea);this.divObj.style.position="absolute";this.divObj.style.display="none";document.body.appendChild(this.divObj);}});function getTopicByOrder(order){$('orderby').value=order;DnaCls.geneGroup_page('','',order)}