function Form2_MultipleSelection_ToggleSelectAll(a,b){blnAllSelected=document.getElementById(b+"_selectAll").style.display=="none";for(i=0;i<eval("document."+a+"."+b+".length");i++){eval("document."+a+"."+b+".options["+i+"].selected = "+!blnAllSelected)}Form2_MultipleSelection_UpdateOptions(a,b)};function Form2_MultipleSelection_UpdateOptions(a,b){blnAllSelected=true;for(i=0;i<eval("document."+a+"."+b+".length");i++){if(eval("document."+a+"."+b+".options["+i+"].selected")==false){blnAllSelected=false;break}}if(blnAllSelected){document.getElementById(b+"_selectAll").style.display="none";document.getElementById(b+"_deselectAll").style.display="block"}else{document.getElementById(b+"_selectAll").style.display="block";document.getElementById(b+"_deselectAll").style.display="none"}};function Form2_Overview(c){var d=new Array();var e=c;var f=new Array();this.addMandatoryField=function(a,b){d[a][d[a].length]=b};this.addTable=function(a){f[f.length]=a;d[a]=new Array()};this.getName=function(){return e};this.getTables=function(){return f};this.getTableSuccessor=function(a){for(i=0;i<f.length;i++){if(f[i]==a&&i<f.length-1){return f[i+1]}}return null};this.isMandatoryFilled=function(a){for(i=0;i<d[a].length;i++){if(document.getElementById(d[a][i]).value==""){return false}}return true}};function Form2_SelectionDialog(b,c,d,e){var f="SelectionDialog";var g=c;var h;var i=e;var j=b;var k;this.close=function(){if(k!=null){k.close();k=null}this.variables_write();if(i!=null){if(opener){opener.eval(i)}else{eval(i)}}if(opener){window.close();opener.focus()}else{window.focus()}};this.open=function(){k=window.open(j,f,"width=740,height=600,left=100,top=100,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,dependent=yes,hotkeys=no");k.selectionDialog=this;k.focus()};this.serialize=function(){strOutput="";strOutput+=g.toString();strOutput+="+++";strOutput+=i.replace(/;/g,"semicolon");return strOutput};this.variables_set=function(a){h=a};this.variables_write=function(){for(var a in h){objDocument=opener?opener.document:document;if(objDocument.getElementsByName(g[a])[0].type=="checkbox"){objDocument.getElementsByName(g[a])[0].checked=h[a]=="1"?"checked":""}else{objDocument.getElementsByName(g[a])[0].value=h[a]}}};if(d==null||d){this.open()}};function Form2_SelectionDialog_unserialize(a){arrPieces=a.split("+++");arrParams=arrPieces[0].split(",");strToEvalAtClosure=arrPieces[1].replace(/semicolon/g,";");objDialog=new Form2_SelectionDialog("",arrParams,false,strToEvalAtClosure);return objDialog};function Form2_StarRating_updateDisplay(a,b){blnFound=false;for(var i=b.length-1;i>=0;i--){if(document.getElementById(a+'_value').value==b[i])blnFound=true;document.getElementById(a+'_'+b[i]).style.display=blnFound?'none':'block';document.getElementById(a+'_'+b[i]+'_filled').style.display=blnFound?'block':'none'}};function Form2_SubmitInternal(a){document.getElementById(a.getName()+"_internalSubmit").value="1";page_scroll_offset_save();eval("document."+a.getName()+".submit();")};function Form2_Wizard_DisplayNext(a,b){strNextElementId=null;if(b){strNextElementId=a.getTableSuccessor(b)}else if(a.getTables().length>0){strNextElementId=a.getTables()[0]}if(strNextElementId){if(b==null||a.isMandatoryFilled(b)){document.getElementById(strNextElementId).style.visibility="visible";Form2_Wizard_DisplayNext(a,strNextElementId)}}};
