js.tanbody=function(act,title,w,h,can1){ var H = (document.body.scrollHeightwinWb())w=winWb()-50; var s = '
'; s+='
'; s+=' '; s+=' '; s+=' '; s+='
'+title+'
'; s+='
'; s+='
'+can.html+'
'; s+='
 '; for(i=0; i'+d.text+''; } s+=' '; s+=' '; s+='
'; s+='
'; var str = '
'+s+'
'; $('body').append(str); if(can.closed=='none'){ $('#'+act+'_spancancel').remove(); $('#'+act+'_spancancel1').remove(); } if(can.bbar=='none'){ var o1d = $('#'+act+'_bbar'); o1d.html(''); o1d.css({'height':'5px','background':'white'}); } this.resizetan(act); } js.alert=function(msg,tit,fun,slx){ if(!tit)tit='系统提示'; var btn=[{text:'确定'}],act = 'alert'; if(get(''+act+'_main'))act=''+act+''+this.getrand()+''; if(slx)btn.push({text:'取消',bgcolor:'gray'}); this.tanbody(act,tit,400,300,{closed:'none',html:'
'+msg+'
',btn:btn}); $('#'+act+'_btn0').click(function(){ var val = $('#rockpromptinput').val(),fbo=true; if(fun)fbo=fun('yes', val, act); if(fbo!==false)js.tanclose(act); }); $('#'+act+'_btn1').click(function(){ var val = $('#rockpromptinput').val(); js.tanclose(act); if(fun)fun('no', val, act); }); $('#'+act+'_spancancel1').remove(); } js.alertclose=function(){ this.tanclose('alert'); } js.confirm=function(msg,fun,tit){ js.alert(msg,fun,tit,1); } js.prompt=function(tit,msg,fun, txt,lxs){ if(!txt)txt=''; var msg1 = '
'+msg+'
'; if(!lxs)msg1 +=''; if(lxs)msg1 +=''; msg1 += '
' js.alert(msg1,fun,tit,2); setTimeout("get('rockpromptinput').focus()",100); } js.resizetan=function(act){ var mid = ''+act+'_main'; var o1 = $('#'+mid+''); var h1 = o1.height(); var w1 = o1.width(); var l=(winWb()-w1)*0.5,t=(winHb()-h1-10)*0.5;if(t<0)t=5; o1.css({'left':''+l+'px','top':''+t+'px'}); } js.tanclose=function(act){ $('#amain_'+act+'').remove(); }