function stepStart(a){a.progessBar&&$("step-progressBar-"+a.group).setStyle("display","block"),$("buttonContainer-"+a.group).setStyle("display","block"),updateStepButtons(a)}function stepValidation(a,b){var c=!0;return Object.each(a.required[a.index],function(a,d){b.validateField(a,true)!=1&&(c=!1)}),c?!0:!1}function stepNext(a,b){stepValidation(a,b)&&(a.index++,a.max>=a.index&&(a.slider.display(a.index),updateStepButtons(a),a.max==a.index&&$("step-next-"+a.group).setStyle("display","none")),$("step-back-"+a.group).setStyle("display","inline"),stepUpdateProgressBar(a))}function updateStepButtons(a){$("step-next-span-"+a.group).set("text",a.nextButton[a.index])}function scrollToTopSlider(){var a=(new Fx.Scroll(window)).toElement("ce-custom-fields-container")}function stepBack(a){a.index--,a.index>=0&&(a.slider.display(a.index),updateStepButtons(a)),a.index<1&&$("step-back-"+a.group).setStyle("display","none"),$("step-next-"+a.group).setStyle("display","inline"),stepUpdateProgressBar(a)}function stepUpdateProgressBar(a){if(a.index>0)var b=a.index/a.max*100;else var b=0;$("step-progress-"+a.group).setStyle("width",b+"%"),a.progessBarText&&$("step-text-"+a.group).set("html",Joomla.JText._("COM_CONTACTENHANCED_PAGINATION_JS_STEP","Step")+" "+(a.index+1)+" "+Joomla.JText._("COM_CONTACTENHANCED_PAGINATION_JS_OF","of")+(a.max+1)),scrollToTopSlider(),typeof stepUpdateProgressBarCallback=="function"&&stepUpdateProgressBarCallback(a)}function stepDisableEnterKey(){var a=$$(".ce-cf-container input");$each(a,function(b,c){b.addEvent("keypress",function(b){b.key=="enter"&&(b.stop(),a[c+1]&&(!a[c].hasClass("required")||a[c].hasClass("required")&&a[c].get("value").length>0)&&a[c+1].focus())})})}