function submitbutton(pressbutton){submitform(pressbutton);}
function submitform(pressbutton){var form=document.jaForm;if(pressbutton){document.jaForm.task.value=pressbutton;var action=form.action+"?";if(form.controller.value!=''){action+='controller='+form.controller.value;}
if(form.task.value!=''){action+='&task='+form.task.value;}
document.jaForm.action=action;}
try{document.jaForm.onsubmit();}
catch(e){}
document.jaForm.submit();}
function delSelectedFromList(id){var srcList=document.getElementById(id);for(i=0,n=srcList.length;i<n;i++){if(srcList.options[i].selected){srcList.options[i]=null;}}}
function copyOptionsFromList(src_id,tgt_id){var srcList=document.getElementById(src_id);var tgtList=document.getElementById(tgt_id);for(i=0,n=srcList.length;i<n;i++){opt=new Option(srcList.options[i].text,srcList.options[i].value);tgtList.options.add(opt);}}
function addSelectedToList(src_id,tgt_id){var srcList=document.getElementById(src_id);var tgtList=document.getElementById(tgt_id);for(i=0,n=srcList.length;i<n;i++){if(srcList.options[i].selected){opt=new Option(srcList.options[i].text,srcList.options[i].value);tgtList.options.add(opt);}}}
function executeTask(id,task){var form=document.jaForm;cb=eval('form.'+id);if(cb){for(i=0;true;i++){cbx=eval('form.cb'+i);if(!cbx)break;cbx.checked=false;}
cb.checked=true;submitbutton(task);}
return false;}
function isChecked(isitchecked){if(isitchecked==true){document.jaForm.boxchecked.value++;}
else{document.jaForm.boxchecked.value--;}}
function update(option,path,hash,framework,text){$.get("index2.php?option="+option+"&controller=updates&task=apply&no_html=1",{path:path,hash:hash,framework:framework},function(data){if(data.length>0){alert(data);}else{document.getElementById(hash).innerHTML=text;}});}