var cancelled=0;var cancelled_prog="";var screen_X=0;var screen_Y=0;var LMargin=0;var TMargin=0; var _focused_form=0; if(!window["attach"])attach=function(obj,type,func){ if(obj.attachEvent)obj.attachEvent('on'+type,func); else obj.addEventListener(type,func,false); } if(!window["detach"])detach=function(obj,type,func){ if (obj.detachEvent)obj.detachEvent('on'+type,func); else obj.removeEventListener(type,func,false); } function init_screen(){ var obj;var _alt_l=0;var _alt_t=0;var count;var obj1; if(obj=document.body){ for(count=0;count2)year=0;var count; for(count=0;count1))return; var nam;var win; if(frm&&!frm.getAttribute){alert("Problema 3, soobschit Yure");} if(frm&&(nam=(frm.id||frm.getAttribute("name", 0)))&&((content_window&&content_window["_prog"])||(nam.match(/^c_/)))){ if(nam.match(/^c_/)){ nam=nam.replace(/^c_/,""); win=(content_window["_prog"])?content_window["_prog"].Window:content_window; } else content_window=win=(content_window)?((content_window["_prog"])?content_window["_prog"].Window:content_window):find_window_object(frm); content_window=find_window_object(frm);nam=nam.replace(/^field@/,""); if(win._prog._Felder[nam])return new DB_Auswahl(content_window,parobj,win,win._prog._Felder[nam],frm,is_constr,func,func1,wid,hei,dx,dy,ob,vor_hei); } else { var str=""; if(frm){ if((nam=(frm.id||frm.getAttribute("name", 0)))){ if(content_window){ if(content_window["_prog"]); else str+="|no_prog"; } else str+="|no_content_window"; } else str+="|no_nam"; } else str+="|no_frm"; content_window=(content_window)?content_window:find_window_object(frm);} return new Auswahl(content_window,parobj,frm,is_constr,func,func1,wid,hei,dx,dy,ob,vor_hei); } function init_bild_info(content_window,parobj,cont_obj,obj,feld,val){//if(ot)otlaadka("init_bild_info"); var table_obj=create_bild_tab(content_window,obj,cont_obj||obj,feld,val); return new BildInfo(content_window,parobj,cont_obj,obj,feld,val,table_obj); } function init_meldung(win,parobj,str1,wid,hei,typ,func){//if(ot)otlaadka("init_meldung"); if(win["current_meldung"]&&(win["current_meldung"].is_typ==typ))return; return new Meldung(win,parobj,self,str1,wid,hei,typ,func); } function init_dragger(content_window,parobj,frm,is_constr,func,func1,wid,hei){//if(ot)otlaadka("init_dragger"); if(_draggers[frm]){return -1;} return new Dragger(content_window,parobj,frm,is_constr,func,func1,wid,hei); } function change_bild(src,wind){//if(ot)otlaadka("change_bild"); var trgt=find_window(wind); if(trgt!=self)return trgt.change_bild(src,""); current_bildinfo.update(src,1); } function change_size(anz,win,typ,extrawid,wind){//if(ot)otlaadka("change_size"); var hhh;var obj;var elem; if(!(typ&&typ.length))typ="auswahl"; var trgt=find_window(wind); if(trgt!=self)return trgt.change_size(anz,win,typ,extrawid,""); var obj=window["current_"+typ]; if(obj){ if(anz==-1)hhh=obj.hei; else hhh=(((anz<12)||obj["show_all"])?((((anz)?anz:1)*14)+2):176); if(win)obj.tab=win; obj.listdiv.style.height=(hhh+10)+"px"; obj.windowHeight=hhh; elem=obj.listdiv.firstChild.rows[0].cells[0].firstChild; elem.parentNode.style.height=(hhh)+"px"; elem.style.height=(elem.parentNode.offsetHeight-1)+"px"; obj.listdiv.firstChild.rows[0].cells[1].style.height="10px"; obj.listdiv.firstChild.rows[1].cells[0].style.height=((hhh>10)?(hhh-10):1)+"px"; if(extrawid&&((extrawid>-1)||(obj.formfeldpos[obj.wert_feld]<(widths.length-1)))){ var neu_wid=(extrawid!=-1)?extrawid:parseInt(widths[formfeldpos[obj.wert_feld]])+parseInt(widths[formfeldpos[obj.wert_feld]+1]); obj.listdiv.style.width=neu_wid+"px"; } if(win.get_style){ var xxx=obj.listdiv.offsetWidth;var yyy=obj.listdiv.offsetHeight; var arr1=win.get_style(); var tab=obj.listdiv.firstChild; tab.rows[1].cells[0].style.height=(yyy+arr1[0]-9)+"px"; obj.listdiv.style.width=(xxx+arr1[1]+9)+"px"; obj.listdiv.style.height=(yyy+arr1[0]+9)+"px"; //win.frameElement.parentNode.style.width=(xxx+arr1[1])+"px";win.frameElement.parentNode.style.height=(yyy+arr1[0])+"px"; win.frameElement.style.width=(xxx+arr1[1])+"px";win.frameElement.style.height=(yyy+arr1[0])+"px"; if(win.get_color)tab.rows[0].cells[0].style.backgroundColor=win.get_color(); } obj.set_pos(obj.listdiv); if(typ=="auswahl"){ obj.started(); if(win&&win.change_style){ if(((anz>=12)&&(!obj["show_all"]))&&(extrawid<=1)){ obj.listdiv.style.width=(parseInt(obj.listdiv.offsetWidth)+20)+"px"; } win.change_style(); } } if(win)win.scr_hei=win.frameElement.offsetHeight; } return last_key; } function info_click(wind,par){//if(ot)otlaadka("info_click"); var trgt=find_window(wind); if(trgt!=self)return trgt.info_click("",par); reset_feld(par); } function set_wert_pos(wind,pos){//if(ot)otlaadka("set_wert_pos"); var trgt=find_window(wind); if(trgt!=self)return trgt.set_wert_pos("",pos); window.current_auswahl.wert_pos=pos; } function _loaded(wind){//if(ot)otlaadka("_loaded"); var trgt=find_window(wind); if(trgt!=self)return trgt._loaded(""); window.current_auswahl._loaded(); } function s(wind,wert,ob){//if(ot)otlaadka("s"); var trgt=find_window(wind); if(trgt!=self)return trgt.s("",wert,ob); window.current_auswahl.select(wert,ob); } function sel_reset(wind,wert,ob){//if(ot)otlaadka("sel_reset"); var trgt=find_window(wind); if(trgt!=self)return trgt.sel_reset(wind,wert,ob); if(window.current_auswahl["sel_reset"])window.current_auswahl.sel_reset(wert,ob); } function select_end(wind){//if(ot)otlaadka("select_end"); var trgt=find_window(wind); if(trgt!=self)return trgt.select_end(""); window.current_auswahl.end(0,1); } function do_focus(wind){//if(ot)otlaadka("do_focus"); var trgt=find_window(wind); if(trgt!=self)return trgt.do_focus(""); if((last_key==38)||(last_key==40)||(last_key==13))window.current_auswahl.update_cursor(); } function floatWindow(content_window,parobj,typ,obj,wid,hei,x,y){//if(ot)otlaadka("floatWindow"); if(content_window===null)return; this.parobj=parobj; this.busy=0;this.content_window=content_window; this.typ=typ;this.window=content_window; this.events=new Array(); this.dx=0;this.dy=0; this.initX=0;this.initY=0; this.listdiv=0;this.tempdiv=0;this.tempdiv_timer=0;this.start_alpha=0;this.switched_div=0; this.wid=wid;this.hei=hei;this.x=x;this.y=y; this.windowHeight=hei; this.expanded=0; if(!this.id)this.id=""; if(!this.window["_"+this.typ+"s"]){this.window["_"+this.typ+"s"]=new Array();} this.pos=add_to_Array(this.window["_"+this.typ+"s"],this,this.id); if(!this["name"])this.name=((typeof obj)=="string")?((this.id)?this.id:this.pos):((obj.id)?obj.id:obj.getAttribute("name", 0)); this.label=(this.name.length)?this.name:this.id; this.window["_"+this.typ+"s"][this.name]=this; this.windows=((this.typ=="bildinfo"))?get_window(this.window):""; this.form=obj; this.window["_"+this.typ+"s"][this.name]=this.window["_"+this.typ+"s"][this.pos]=this; } floatWindow.prototype._loaded=function(){//if(ot)otlaadka("floatWindow.prototype._loaded"); this.busy=0; } floatWindow.prototype.resize=function(){ this.listdiv.style.visibility="hidden"; this.set_pos(this.listdiv); this.listdiv.style.visibility="visible"; } floatWindow.prototype.detach=function(trgt,eve){//if(ot)otlaadka("floatWindow.prototype.detach"); var count; if(this.events[eve]){ for(count=0;(this.events[eve]&&(count"+ ""+ ""+ ""+str+""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""; return str1; } function Meldung(content_window,parobj,win,str,wid,hei,is_typ,func){//if(ot)otlaadka("Meldung"); this.win=content_window; this.mittig=1; this.div2=0; this.tab=0; this._start_func=func; this.is_typ=(is_typ)?is_typ:""; floatWindow.call(this,win,parobj,"meldung",str,wid,hei); this.start(); } Meldung.prototype=new floatWindow(null); Meldung.prototype.constructor=Meldung; Meldung.prototype.yesno=function(val){//if(ot)otlaadka("Meldung.prototype.yesno"); this.remove(); this.win.yesno(val); } Meldung.prototype.end=function(obj,muss){//if(ot)otlaadka("Meldung.prototype.end"); if(!floatWindow.prototype.end.call(this,obj,muss))return; this.content_window.meldung_started=0; this.content_window.document.getElementById("platz").removeChild(this.div2); this.div2=null; } Meldung.prototype.start=function(ob,muss){//if(ot)otlaadka("Meldung.prototype.start"); this.content_window.meldung_started=1; var _scroll_pos=scroll_pos(self); this.div2=create_element(self,'DIV',['STYLE',window["div_style"]]); this.content_window.document.getElementById("platz").appendChild(this.div2); floatWindow.prototype.start.call(this,this.form,ob,muss); var _doc_size=doc_size(self); this.div2.style.height=(_doc_size[1]+_scroll_pos[1]-10)+"px"; this.div2.style.width=(_doc_size[0]+_scroll_pos[0]-420)+"px"; } Meldung.prototype.start_func=function(val,direc){//if(ot)otlaadka("Meldung.prototype.start_func"); var str=""+ ""+ ""+ ""+ "
 

"+this.form+"

 
"; if(this.is_typ=='1'){ str+= "
"+ "
"+ "
"; } else { str+="
"; if(this.is_typ=='3'){ str+=" "; } } str+="
 
"; return [str,-1]; } function Auswahl(content_window,parobj,obj,is_typ,func,func1,wid,hei,dx,dy,show_all,vor_hei){//if(ot)otlaadka("Auswahl"); if(content_window===null)return; this.tab=0; this.show_all=(show_all)?show_all:0; this.vor_hei=(vor_hei)?vor_hei:0; this.start_art=0; this.window=this.prog_window=content_window; this.wert_pos=0;this.wert_feld=0;this.wert_form=0;this.start_val_form=0; this.is_typ=(is_typ)?is_typ:"";this.func=func;this.func1=func1; this.wert_feld=(obj.id||obj.getAttribute("name", 0)).replace(/^c_/,"").replace(/^field@/,""); floatWindow.call(this,content_window,parobj,"auswahl",obj,(wid)?wid:0,(hei)?hei:0); if(dx>0)this.dx=dx;if(dy>0)this.dy=dy; this.form_id=""; if((obj.getAttribute("name", 0)==(this.name+"_butt"))|| (obj.name==(this.name+"_butt"))){this.butt=obj;} else {this.butt=this.window.document.getElementById(this.name+"_butt");} if(this.butt){ var cl=""; if(this.is_typ.indexOf("styler")!=-1)cl=""; else if(this.is_typ.indexOf("datum")!=-1)cl="cal"; else if(this.is_typ.indexOf("bildaus")!=-1)cl="bildaus"; else if(this.is_typ.indexOf("tabbed1")!=-1)cl="tau1"; else if(this.is_typ.indexOf("tabbed2")!=-1)cl="tau2"; else cl="aus"; this.butt.className=cl+"_butt0"; this.butt.style.cursor="pointer"; this.butt.setAttribute('ALT',"liste auf",0); this.attach(this.butt,"click","auswahl_onclick"); //if((this.butt.tagName=="IMG")||(this.butt.style.backgroundImge)){ attach(this.butt,"mouseover",mover); attach(this.butt,"mouseout",mout); //} } this.form.setAttribute('AUTOCOMPLETE',"OFF",0); if((this.is_typ.indexOf("datum")==-1)){ this.attach(this.form,"keydown","auswahl_keydown"); this.attach(this.form,"keyup","auswahl_keyup"); } this.attach(this.form,"paste","auswahl_cut_paste"); this.attach(this.form,"cut","auswahl_cut_paste"); } Auswahl.prototype=new floatWindow(null); Auswahl.prototype.constructor=Auswahl; Auswahl.prototype.auswahl_onclick=function(e){//if(ot)otlaadka("auswahl_onclick"); if(!e)e=window.event; last_key=0; if(this.expanded)this.end(e); else this.start(1); return; } Auswahl.prototype.auswahl_keydown=function(e){//if(ot)otlaadka("auswahl_keydown"); if(!e)e=window.event; if(e.keyCode==13){ if((last_key==40)||(last_key==38)){if(this.tab&&this.tab.enter)this.tab.enter();} else if(this.is_typ.indexOf("constrain")!=-1){ this.end(); this.window.vor_constrain(e); } else if(this.form.tagName!="TEXTAREA"){ this.end(); //if((this.feld.is_formel)&&(this.func))return (this["func"])(this.form,val); //changed(this.form,0,0,0,0,0,"sel_reset"); } } return; } Auswahl.prototype.auswahl_keyup=function(e){//if(ot)otlaadka("auswahl_keyup"); if(!e)e=window.event; if(((e.keyCode!=13)||(this.form.tagName=="TEXTAREA"))&& (e.keyCode!=37)&&(e.keyCode!=16)&&(e.keyCode!=39)&&(e.keyCode!=40)&&(e.keyCode!=38)){ if(this.form.tagName=="TEXTAREA")this.window.update_height(this.form); this.start(0,1); } else if((this.is_typ.indexOf("constrain")!=-1)&&(e.keyCode==13)){ this.end(); if(this.window.constrain_rec)this.window.constrain_rec(-1); return; } if((e.keyCode==40)||(e.keyCode==38)){ last_key=e.keyCode; if(this.tab&&this.tab.updown)this.tab.updown(e.keyCode); else if(!this.expanded){this.start(1,1); } } else last_key=0; } Auswahl.prototype.auswahl_cut_paste=function(obji){//if(ot)otlaadka("auswahl_cut_paste"); var obj=this;last_key=0; setTimeout(function(){obj.start(0,1);},0); return; } Auswahl.prototype.started=function(){//if(ot)otlaadka("Auswahl.prototype.started"); if(!this.content_window.document.getElementById("frame_aus")){ return; } if(!this.content_window.document.getElementById("frame_aus").contentWindow.is_ok)this.end(); if(this.start_art)return; if((last_key==38)||(last_key==40)||(last_key==13))this.update_cursor(); } Auswahl.prototype.update_cursor=function(){//if(ot)otlaadka("Auswahl.prototype.update_cursor"); if(this.form.getAttribute("DISABLED"))return; if((this.form.tagName=="INPUT")||(this.form.tagName=="TEXTAREA")){ this.form.focus(); if(this.window["set_cursor"])this.window.set_cursor(this.form); } } Auswahl.prototype.start_func=function(val,direc){//if(ot)otlaadka("Auswahl.prototype.start_func"); return ""; } Auswahl.prototype.select=function(val,ob){//if(ot)otlaadka("Auswahl.prototype.select"); if(!ob){this.end(0,1);this.update_cursor();} var f_val;if(!(val&&val.join)){f_val=val;val=new Array();val[this.wert_pos]=f_val;} else f_val=val[this.wert_pos] this.form.value=f_val; if(this.func)return ((this["func"])(0,val)); if(this["_select"])this._select(val,ob); } Auswahl.prototype.add_list=function(par1,par2){//if(ot)otlaadka("floatWindow.prototype.add_list"); var wind=this.content_window; var _ww;var _hh;var obj=this; if((this.is_typ.indexOf("datum")!=-1)){_ww=148;_hh=141;} else { _ww=(this.wid)?this.wid:(this.form?this.form.offsetWidth+((is_ie)?9:10):1); if(!_ww)_ww=1; _hh=(this.vor_hei?this.vor_hei:(this.hei?this.hei:175)); if(!_hh)_hh=1; } wind.document.getElementById("platz").appendChild(this.tempdiv= create_element(wind,'DIV',['style',"background-color:white;visibility:hidden;margin:0;position:absolute;left:0;top:0;height:"+_hh+"px;width:"+_ww+"px;"])); this.set_pos(this.tempdiv); this.start_alpha=0;this.switched_div=0; if(is_ie)this.tempdiv.style.filter = "Alpha(opacity=0)"; else { this.tempdiv.style.opacity=0; this.tempdiv.style.MozOpacity =0; } this.tempdiv.style.visibility="visible"; this.tempdiv_timer=wind.setInterval(function(){obj.alpha_list();},10); return floatWindow.prototype.add_list.call(this,par1,par2); } Auswahl.prototype.alpha_list=function(){ var was=0;var obj;var _alpha=this.start_alpha+((is_ie)?10:0.1); if(_alpha<((is_ie)?100:1))this.start_alpha=_alpha; else was=1; if(((!this.switched_div)&&this.tab&&this.tab.is_ok)){ this.content_window.document.getElementById("platz").removeChild(this.tempdiv); this.tempdiv=null; this.switched_div=1; } obj=(this.switched_div)?(is_ie?this.tab.frameElement:this.listdiv):this.tempdiv; if(is_ie)obj.style.filter = "Alpha(opacity="+this.start_alpha+")"; else { obj.style.opacity=this.start_alpha; obj.style.MozOpacity =this.start_alpha; } if(this.switched_div){ this.listdiv.style.visibility="visible"; } if(this.switched_div&&was){ this.content_window.clearInterval(this.tempdiv_timer); if(this.tab&&this.tab.updown)this.tab.updown(last_key); } } Auswahl.prototype.start=function(ob,muss,url,is_bool){//if(ot)otlaadka("Auswahl.prototype.start"); if(!url)url=""; var ret="";var par=""; if((this.func1)&&(ret=(this.func1)(this))){ if(ret==-1)return this.end(0,1); ret=ret.split(":"); if(ret.length>1)par=ret[1]; if(ret.length>2)this.form_id=ret[2]; url=ret[0]; } floatWindow.prototype.start.call(this,this.form.value,ob,muss); if(this.butt)this.butt.setAttribute('ALT','liste zu',0); if(url=="list")url="lists/list.php"; else if(url.length); else if(this.is_typ.indexOf("datum")!=-1){ ob=0; url="lists/calendar.php"; } else { var nam=this.wert_feld.toLowerCase(); nam=nam.replace(/\W+/g,"_").replace(/_+$/,""); url="lists/list.php"; } par+=(par.length?"&":"")+"form="+this.name; par+=(this.windows)?((par.length?"&":"")+"wind="+this.windows):""; if(is_bool)par+=(par.length?"&":"")+"bool=1" if(this["feld"])par+=(par.length?"&":"")+"plusnull=1" this.wert_form= create_element(this.prog_window,"INPUT",["name","wert_feld","value",this.wert_feld,"type","hidden",'AUTOCOMPLETE',"OFF","style","height:19px"]); this.prog_window.document.getElementById("forms").appendChild(this.wert_form); this.start_art=ob; if(!ob){ this.start_val_form= create_element(this.prog_window,"INPUT",["name","start_val","value",this.form.value.replace(/%$/,""),"type","hidden",'AUTOCOMPLETE',"OFF","style","height:19px"]); this.prog_window.document.getElementById("forms").appendChild(this.start_val_form); } else par+=(par.length?"&":"")+"sa=1"; par+=(par.length?"&":"")+"ff="+((is_ie)?0:1); par+=(this.form_id.length)?"&form_id="+this.form_id:""; var olds=[this.prog_window.document.forms[0].method,this.prog_window.document.forms[0].target,this.prog_window.document.forms[0].action]; this.prog_window.document.forms[0].method="POST"; this.prog_window.document.forms[0].target="frame_aus"; //azert(url+((url.indexOf("?")==-1)?"?":"&")+par); this.prog_window.document.forms[0].action=(url+((url.indexOf("?")==-1)?"?":"&")+par); this.prog_window.document.forms[0].submit(); this.prog_window.document.forms[0].method=olds[0]; this.prog_window.document.forms[0].target=olds[1]; this.prog_window.document.forms[0].action=olds[2]; } Auswahl.prototype.end=function(obj,muss){//if(ot)otlaadka("Auswahl.prototype.end"); last_key=0; if(!floatWindow.prototype.end.call(this,obj,muss))return 0; if(this.wert_form){ this.prog_window.document.getElementById("forms").removeChild(this.wert_form); this.wert_form=null; } if(this.start_val_form){ this.prog_window.document.getElementById("forms").removeChild(this.start_val_form); this.start_val_form=null; } if(this.butt)this.butt.setAttribute('ALT','liste auf',0); return 1; } Auswahl.prototype.remove=function(){//if(ot)otlaadka("Auswahl.prototype.remove"); floatWindow.prototype.remove.call(this); if(this.butt){ this.detach(this.butt,"click"); detach(this.butt,"mouseover",mover); detach(this.butt,"mouseout",mout); } this.butt=null; if((this.is_typ.indexOf("datum")==-1)){ this.detach(this.form,"keydown"); this.detach(this.form,"keyup"); } this.detach(this.form,"paste"); this.detach(this.form,"cut"); this.form=null; } function DB_Auswahl(content_window,parobj,win,feld,obj,is_typ,func,func1,wid,hei,dx,dy){//if(ot)otlaadka("DB_Auswahl"); if(content_window===null)return; this.db_typ=0; this.feld=feld; this.query=""; this.felder=new Array(); this.tabs=new Array(); this.wheres=new Array(); this.constrs=new Array(); this.key_constrs=new Array(); this.queform=0; Auswahl.call(this,content_window,parobj,obj,is_typ,func,func1,wid,hei,dx,dy);// this.prog_window=win; if((feld.is_formel||!feld.Table.is_main_tab)&&(feld.is_unique)&&(!feld.is_key)){ this.build_query();} else { this.db_typ=1; this.felder[0]=feld.feld; if(feld.Table){ if(!(feld.Table.is_main_tab&&(this.is_typ.indexOf("datum")!=-1))){ this.tabs[0]=feld.Table.get_query(); if(feld.is_constr)this.constrs[0]=feld.feld; } } } } DB_Auswahl.prototype=new Auswahl(null); DB_Auswahl.prototype.constructor=DB_Auswahl; DB_Auswahl.prototype.sel_reset=function(val,ob){//if(ot)otlaadka("DB_Auswahl.prototype.sel_reset"); if(this.is_typ.indexOf("constrain")!=-1){ if(ob){this.end(0,1);this.update_cursor();} this.form.value=val; return this.window.vor_constrain(this.form,0,0,0,0,!ob); } if(ob){this.form.value=val;this.end(0,1);} if(this.feld.is_formel&&this.func)return (this["func"])(this.form,val); this.prog_window.changed(this.form,0,0,0,0,0,"sel_reset"); } DB_Auswahl.prototype._select=function(val,ob){//if(ot)otlaadka("DB_Auswahl.prototype._select"); this.form.value=val[this.wert_pos]; if(this.is_typ.indexOf("constrain")!=-1)return this.window.vor_constrain(0,this.form,this.felder,val,1); if(this.func)return ((this["func"])(this.felder,val))?this.prog_window.changed(0,this.felder,val,0,0,1,"select"):0; this.prog_window.changed(0,this.felder,val,0,0,1,"select"); } DB_Auswahl.prototype.compare_auswahls=function(obj){//if(ot)otlaadka("DB_Auswahl.prototype.compare_auswahls"); this.feld.get_query(this.felder,this.tabs,this.wheres,this.constrs,this.key_constrs,1); if(compare_Arrays(this.felder,obj.felder))this.felder.sort(this.prog_window.felder_sort); compare_Arrays(this.tabs,obj.tabs); compare_Arrays(this.wheres,obj.wheres); compare_Arrays(this.constrs,obj.constrs); compare_Arrays(this.key_constrs,obj.key_constrs); } DB_Auswahl.prototype.build_query=function(){//if(ot)otlaadka("DB_Auswahl.prototype.build_query"); this.feld.get_query(this.felder,this.tabs,this.wheres,this.constrs,this.key_constrs,1); } DB_Auswahl.prototype.start=function(ob,muss){//if(ot)otlaadka("DB_Auswahl.prototype.start"); var url="";var where="";var val;var count;var group=""; if((this.is_typ.indexOf("constrain")==-1)&&this.prog_window["proparr"]&&(!(this.prog_window.has_curr_rec())||( this.content_window.cancelled&&(this.content_window.cancelled_prog!=this.prog_window["dbtable"]))))return -1; if(this.tabs.length){ if(this.constrs.length){ for(count=0;count=val.length))continue; } where+=(where.length?" AND ":"")+this.constrs[count]+" LIKE '"+ (this.prog_window.is_datum[this.constrs[count]]?fix_constr_date(val):val+"%")+"'"; } } if(this.key_constrs.length){ for(count=0;count1)par=ret[1]; if(ret.length>2)this.form_id=ret[2]; url=ret[0]; } if(url.length); else if(!this.feld.is_formel)url="lists/list.php"; } Auswahl.prototype.start.call(this,ob,muss,url,this.prog_window["is_bool"]&&this.prog_window["is_bool"][this.feld.feld]); } DB_Auswahl.prototype.end=function(obj,muss){//if(ot)otlaadka("DB_Auswahl.prototype.end"); if(!Auswahl.prototype.end.call(this,obj,muss))return 0; if(this.is_typ.indexOf("constrain")==-1){ if(!muss&&this.prog_window["sper_change"]&&this.prog_window["sper_change"][this.wert_feld]){ this.prog_window.set_form(this.form,this.prog_window.dbarr_backup[this.wert_feld],this.wert_feld); } } if(this.queform){ this.prog_window.document.getElementById("forms").removeChild(this.queform); this.queform=null; } } function ColorPicker(div,frm,frm1,prop,start_val,func){ this.div=div; this.form=frm; this.RGBform=frm1; this.Prop=prop; this.func=func; this.col=start_val;this._col=new Array() this.COLORS=new Array( "#000000","#800000","#008000","#808000","#000080","#800080","#008080","#c0c0c0", "#808080","#ff0000","#00ff00","#ffff00","#0000ff","#ff00ff","#00ffff","#ffffff"); this.COLNAM=new Array( 'black','maroon','green','olive','navy','purple','teal','silver', 'gray','red','lime','yellow','blue','fuchsia','aqua','white'); this.col_to_nam=new Array(); var count;for(count=0;count"; } BildInfo.prototype.start=function(ob,muss){//if(ot)otlaadka("BildInfo.prototype.start"); floatWindow.prototype.start.call(this,this.form,ob,muss); this.init_btimer(); var coord=get_coords(this.image,0,0,self); var _scroll_pos=scroll_pos(self); this.startX=coord[0]-_scroll_pos[0]; this.startY=coord[1]-_scroll_pos[1]-this.image.offsetHeight; this.endX=this.startX+this.image.offsetWidth; this.endY=this.startY+this.image.offsetHeight; change_size(-1,this.window,'bildinfo',0,""); attach(this.listdiv,"mousemove",check_pos); } BildInfo.prototype.erase=function(){//if(ot)otlaadka("BildInfo.prototype.erase"); if(this.window["is_bild_tab"])del_rec(); else this.update('',1,"erase"); } BildInfo.prototype.reload_btimer=function(){//if(ot)otlaadka("BTimer.prototype.reload"); if(this.val&&this.val.length)this.src=this.val; else { this.src="images/nobild.jpg"; this.image.onmouseover=null; } this.load_start(); } BildInfo.prototype.load_start=function(){//if(ot)otlaadka("BTimer.prototype.load_start"); this.image1=new Image(); this.image1.src=this.src; if(this.load_timer); else { this.load_timer=this.window.setInterval('self.check("'+this.windows+'","'+this.pos+'")',1); } } BildInfo.prototype.init_btimer=function(){//if(ot)otlaadka("BTimer.prototype.init"); var w=parseInt(this.image1.width); var h=parseInt(this.image1.height); var ratio=w/h; var w_max=this.max_wid-36;var h_max=this.max_hei-10; var orig_ratio=w_max/h_max; if(ratiobinfo.endX)||(ybinfo.endY)){ binfo.image.onmouseover=null; binfo.end(); } } } function Dragger(content_window,parobj,obj,is_typ,func,func1,wid,hei){//if(ot)otlaadka("Dragger"); this.mittig=1; this.tab=0; this.drag=0; this.id=obj; this.is_typ=(is_typ)?is_typ:"";this.func=func;this.func1=func1; floatWindow.call(this,content_window,parobj,"dragger",obj,((wid)?wid:0),((hei)?hei:0)); } Dragger.prototype=new floatWindow(null); Dragger.prototype.constructor=Dragger; Dragger.prototype.set_pos=function(anz){//if(ot)otlaadka("Dragger.prototype.set_pos"); this.x=anz*20;this.y=anz*20; floatWindow.prototype.set_pos.call(this,this.listdiv); } Dragger.prototype.create_tab=function(str){//if(ot)otlaadka("Dragger.prototype.create_tab"); return ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ "
"+this.label+""+ "
"+str+"
  
"; } Dragger.prototype.start_func=function(val,direc){//if(ot)otlaadka("Dragger.prototype.start_func"); var res=""; if(val.join){ var typ=val[0]; if(typ==0)res=""; else res=val[1]; } else res=val; return res; } Dragger.prototype.start=function(ob,muss){//if(ot)otlaadka("Dragger.prototype.start"); floatWindow.prototype.start.call(this,(this.func)?(this["func"])(this.form):"",ob,muss); this.drag=new dragger(self,0,this,this.label); this.listdiv.onselectstart=function(e){if(!e)e=window.event;if (e && e.preventDefault)e.preventDefault();else e.returnValue = false;return false;} } Dragger.prototype.remove=function(){//if(ot)otlaadka("Dragger.prototype.remove"); floatWindow.prototype.remove.call(this); } function dragger(win,_typ,parent_obj,nam){//if(ot)otlaadka("dragger"); this.startX=0;this.startY=0; this.scrolling=0; this.maxX=-1;this.maxY=-1; this.start_drag_X1=-1;this.start_drag_Y1=-1; this.start_drag_X2=-1;this.start_drag_Y2=-1; this.typ=_typ; this.dragging=0; this.div2=0; this.min_pos=0; this.id=nam; this.alone=0; this.to_scale=0; this.is_move=1; this.is_max=1; this.pos=add_to_Array(win._dragobjes,this,this.id); this.bound_drag=0; this.dragdiv=0; this.parent_obj=parent_obj; this.winframe=win; this.eventobjekt=0; this.coord_curr=new Array(0,0); this.events=new Array(); if(win.current_drag)win.current_drag.dragdeinit(); if(!this.typ){ this.closer=self.document.getElementById(this.id+"_close");this.closer.style.cursor="pointer"; this.mover=self.document.getElementById(this.id+"_move");this.mover.style.cursor="pointer"; this.min_maxer=self.document.getElementById(this.id+"_min");this.min_maxer.style.cursor="pointer"; this.attach(this.closer,"click","close"); this.attach(this.mover,"click","move"); this.attach(this.min_maxer,"click","min_max"); this.dragdiv=self.document.getElementById(this.id+"_dragger"); var obj; if(obj=this.content_window.document.getElementById(this.id+"_frame")){ //this.attach(obj,"scroll","frame_scroll"); this.attach(obj,"load","frame_loaded"); setTimeout(get_func(this,"find_bounded"), 1); } else if(obj=this.content_window.document.getElementById(this.id+"_cont")){ obj=obj.childNodes[0]; this.alone=1; this.find_bounded(1); setTimeout(get_func1(this,"resize",obj), 1); } } else setTimeout(get_func(this,"find_bounded"), 1); } dragger.prototype.move=function(e){//if(ot)otlaadka("dragger.prototype.move"); if(!this.is_max)return; this.is_move=Math.abs(this.is_move-1); this.mover.src="images/"+(this.is_move?"":"no_")+"move.png"; } dragger.prototype.release=function(ob){//if(ot)otlaadka("dragger.prototype.release"); delete_from_Array(this.winframe._dragobjes,this.pos,this.id); if(ob){this.winframe.release_window();this.winframe._dragobjes=null;this.dragdiv=null;} if(this.winframe["remove"])(this.winframe["remove"])(); if(this.winframe.current_drag==this)this.winframe.current_drag=null; this.winframe=null; this.bound_drag=null; this.eventobjekt=null; } dragger.prototype.close=function(e){//if(ot)otlaadka("dragger.prototype.close"); var obj;this.winframe.current_dragger=this.parent_obj; if(!this.is_max)this.do_max(1); this.dragstop(); this.dragdeinit(); this.bound_drag.release(1); this.detach(this.eventobjekt,"mousedown"); this.detach(this.closer,"click"); this.detach(this.mover,"click"); this.detach(this.min_maxer,"click"); this.closer=this.mover=this.min_maxer=null; this.release(); if(obj=this.content_window.document.getElementById(this.id+"_frame")){ obj.parentNode.removeChild(obj); if(obj=this.content_window.document.getElementById(this.id+"_frame"))alert("Problema 5, soobschit Yure"); } this.parent_obj.remove(); } dragger.prototype.do_max=function(nur_update){//if(ot)otlaadka("dragger.prototype.do_max"); var count;var obj; var delta=this.dragdiv.offsetHeight*this.to_scale+10; if(!nur_update){ if(!is_ie)this.dragdiv.style.MozTransform=null; else this.dragdiv.style.zoom=null; this.dragdiv.style.top=this.coord_curr[1]; this.dragdiv.style.left=this.coord_curr[0]; } for(count=0;countthis.min_pos){ obj.min_pos--; obj.dragdiv.style.top=parseInt(obj.dragdiv.style.top)-delta; } } this.min_pos=0; minis--; } dragger.prototype.do_min=function(_x,_y){//if(ot)otlaadka("dragger.prototype.do_min"); if(!(_x||_y)){ _x=parseInt(this.dragdiv.style.left); _y=parseInt(this.dragdiv.style.top); } this.coord_curr[1]=_y;this.coord_curr[0]=_x; var w_muss=250;var count=0;var y_muss=0;var obj; var w_has=parseInt(this.dragdiv.offsetWidth); var h_has=parseInt(this.dragdiv.offsetHeight); var x_muss=((this.content_window.innerWidth)?this.content_window.innerWidth:this.content_window.document.body.clientWidth)-w_muss-((is_ie)?10:30); for(count=0;count1){ for(count=1;count(hei-80)){hh=hei-80;ww+=10;d_hei+=10;}if(ww>(wid-40)){ww=wid-40;hh+=10;d_wid+=10} heis[0]=hh; wids[0]=ww; objes[0]=obj; d_hei+=10;d_wid+=(is_ie)?15:-15; while(obj){ obj=obj.offsetParent||obj.frameElement; win=find_window_object(obj);_doc_size=doc_size(win); hei=((win.innerHeight)?win.innerHeight:_doc_size[1]); wid=((win.innerWidth)?win.innerWidth:_doc_size[0]); hh=obj.offsetHeight+d_hei;ww=obj.offsetWidth+d_wid;if(hh>(hei-50))hh=hei-50;if(ww>(wid-20))ww=wid-20; if(hh=0;count--){ obj=objes[count]; obj.style.height=obj.height=heis[count]+"px"; obj.style.width=obj.width=wids[count]+"px"; } this.dragdiv.style.paddingLeft="3px";this.dragdiv.style.paddingTop="3px";//this.dragdiv.style.backgroundColor="blue"; this.parent_obj.set_pos(this.pos); if(!this.typ)this.coord_curr=get_coords(this.dragdiv,0,0-this.dragdiv.offsetHeight,self); } dragger.prototype.dragdeinit=function(obj){//if(ot)otlaadka("dragger.prototype.dragdeinit"); var obj=(this.typ)?this.bound_drag:this;var obj1; if(obj.winframe.current_drag&&((obj1=obj.winframe.current_drag)==obj)){ obj1.dragdiv.style.zIndex=1000+obj1.pos; obj.winframe.current_drag=0; } } dragger.prototype.draginit=function(obj){//if(ot)otlaadka("dragger.prototype.draginit"); var obj=(this.typ)?this.bound_drag:this;var obj1; if(obj.winframe.current_drag&&((obj1=obj.winframe.current_drag)!=obj)){ obj1.dragdiv.style.zIndex=1000+obj1.pos; } obj.winframe.current_drag=obj; obj.dragdiv.style.zIndex=1001+obj.winframe._dragobjes.length; } dragger.prototype.detach=function(trgt,eve){//if(ot)otlaadka("dragger.prototype.detach"); var count; if(this.events[eve]){ for(count=0;(this.events[eve]&&(countthis.maxX)||(realY>this.maxY))return this.dock(); return this.drag(dx,dy); } dragger.prototype.drag1=function(e){ if(!e)e=window.event; if(this.scrolling)return; if((this.start_drag_X1==-1)&&(this.start_drag_Y1=-1)){ this.start_drag_X1=e.screenX;this.start_drag_Y1=e.screenY; } var dx=(e.screenX-this.start_drag_X1);var dy=(e.screenY-this.start_drag_Y1); this.start_drag_X1=e.screenX;this.start_drag_Y1=e.screenY; if((e.screenX<10)||(e.screenY<10))return this.dragstop(); if((e.screenX>this.maxX)||(e.screenY>this.maxY))return this.dock(); return this.drag(dx,dy); } dragger.prototype.drag=function(dx,dy){ if(this.scrolling)return; this.startX+=dx;this.startY+=dy; this.dragdiv.style.left =this.startX+ "px"; this.dragdiv.style.top =this.startY+ "px"; return; }