// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// @license: Mad4Media Javascipt License - copyright Mad4Media - Fahrettin Kutyol - All rights reserved    ++
// (re-) publishing or forking for any purpose of commercial or non-commercial use is not allowed.		   ++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var ProformsAppMenu={first:0,app:null,jids:null,appSelect:null,init:function(){this.jids=dojo.byId("urlparamsjid");this.appSelect=dojo.byId("urlparamsapp");var _1=document.getElementsByName("link")[0].value;if(_1.indexOf("app=")!==-1){var _2=_1.split("&app=");this.app=_2[1];if(this.app.indexOf("&")!==-1){var _3=this.app.split("&");this.app=_3[0];}}dojo.connect(this.jids,"onchange",function(){ProformsAppMenu.load(this.value);});this.load(this.jids.value);},load:function(_4){dojo.xhrGet({url:"index.php?option=com_proforms&section=xhr&xhr=appmenu&jid="+_4,handleAs:"json",preventCache:true,load:dojo.hitch(this,function(_5){this.appSelect.innerHTML=_5.inner;if(!this.first){console.log("first");this.first=1;if(this.app){this.appSelect.value=this.app;}}})});}};dojo.addOnLoad(function(){ProformsAppMenu.init();});