// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// @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 m4jIconOver=function(e){this.style.border="2px solid #28ac00";this.style.margin="-1px -1px 10px 10px";};var m4jIconOut=function(e){this.style.border="";this.style.margin="";};var loadCallBack=function(_1){parseInfoTips(dojo.byId("layoutAttributes"));};var m4jIconClick=function(e){dojo.byId("currentLayout").value="layout01";dojo.byId("activeLayout").id="";this.id="activeLayout";var _2=XHRURL+"layout01"+XHRURLLID+"&nocache="+Math.random();_LoadTo(_2,dojo.byId("layoutAttributes"),loadCallBack);};var layoutIcons=dojo.query(".m4jLayoutIcon",dojo.byId("m4jLayoutWrap"));layoutIcons.forEach(function(el){dojo.connect(el,"onmouseover",m4jIconOver);dojo.connect(el,"onmouseout",m4jIconOut);dojo.connect(el,"onclick",m4jIconClick);});var checkBasicData=function(){var _3=dojo.byId("name");var _4=_3.value.replace(/\s+$/,"").replace(/^\s+/,"");if(_4!=""){return true;}else{alert(errorNoName);return false;}};var submitOnNew=function(){if(checkBasicData()){m4j_submit("new");}else{return false;}};var submitOnUpdateApply=function(){if(checkBasicData()){dojo.byId("apply").value=1;m4j_submit("update");}else{return false;}};var submitOnUpdate=function(){if(checkBasicData()){dojo.byId("apply").value=0;m4j_submit("update");}else{return false;}};var submitOnUpdateProceed=function(){if(checkBasicData()){m4j_submit("updateproceed");}else{return false;}};dojo.addOnLoad(function(){var _5=INITXHR+"&nocache="+Math.random();_LoadTo(_5,dojo.byId("layoutAttributes"),loadCallBack);});