';
},
onSuccess: function(responseText){
if(responseText){
document.id('se206_after_cat_'+parent).innerHTML = responseText;
document.id('se206_cat_'+parent).value=a_parent;
}else{
document.id('se206_after_cat_'+parent).innerHTML = '';
document.id('se206_cat_'+parent).value=a_parent;
}
var mod_classes = document.id('mod_djcf_search206').className.split(" ");
mod_classes.each(function(mod_class,index){
if(mod_class.lastIndexOf('cat_lvl')>-1){
document.id('mod_djcf_search206').removeClass(mod_class);
}
});
var cat_level = document.getElements("#mod_djcf_search206 .search_cats select").length;
if(cat_level>0){
document.id('mod_djcf_search206').addClass('cat_lvl'+cat_level);
}
if(c_path != 'null'){
if(c_path.length>0){
var first_path = c_path[0].split(',');
c_path.shift();
se206_new_cat(first_path[0],first_path[1],c_path);
}
}
},
onFailure: function(){}
});
myRequest.send();
/*if(se206_cats[a_parent]){
//alert(se_cats[v]);
document.id('se206_after_cat_'+parent).innerHTML = se206_cats[a_parent];
document.id('se206_cat_'+parent).value=a_parent;
}else{
document.id('se206_after_cat_'+parent).innerHTML = '';
document.id('se206_cat_'+parent).value=a_parent;
}*/
}
function se206_getFields(cat_id){
var el = document.getElementById("search206_ex_fields");
var before = document.getElementById("search206_ex_fields").innerHTML.trim();
//if(cat_id!=0){
el.innerHTML = '
';
var url = 'https://osteklenie-balkonov.su/index.php?option=com_djclassifieds&view=item&task=getSearchFields&cat_id=' + cat_id;
var myRequest = new Request({
url: 'https://osteklenie-balkonov.su/index.php',
method: 'post',
data: {
'option': 'com_djclassifieds',
'view': 'item',
'task': 'getSearchFields',
'mod_id': '206',
'cat_id': cat_id
},
onRequest: function(){
//myElement.set('html', '
loading...
');
},
onSuccess: function(responseText){
el.innerHTML = responseText;
if(responseText){
el.removeClass('no_fields');
}else{
el.addClass('no_fields');
}
var calendars = jQuery('#search206_ex_fields').find('.field-calendar');
if (calendars.length > 0) {
calendars.each(function(){
JoomlaCalendar.init(jQuery(this)[0]);
});
}
var djfields_accordion_o = document.getElements('#search206_ex_fields .djfields_accordion_o');
if(djfields_accordion_o){
djfields_accordion_o.each(function(djfields_acc_o,index){
new Fx.Accordion(djfields_acc_o.getElements('.label'),
djfields_acc_o.getElements('.se_checkbox'), {
alwaysHide : true,
display : 0,
duration : 100,
onActive : function(toggler, element) {
toggler.addClass('active');
element.addClass('in');
},
onBackground : function(toggler, element) {
toggler.removeClass('active');
element.removeClass('in');
}
});
})
}
var djfields_accordion_c = document.getElements('#search206_ex_fields .djfields_accordion_c');
if(djfields_accordion_c){
djfields_accordion_c.each(function(djfields_acc_c,index){
new Fx.Accordion(djfields_acc_c.getElements('.label'),
djfields_acc_c.getElements('.se_checkbox'), {
alwaysHide : true,
display : -1,
duration : 100,
onActive : function(toggler, element) {
toggler.addClass('active');
element.addClass('in');
},
onBackground : function(toggler, element) {
toggler.removeClass('active');
element.removeClass('in');
}
});
})
}
},
onFailure: function(){
// myElement.set('html', 'Sorry, your request failed, please contact to ');
}
});
myRequest.send();
/*}else{
el.innerHTML = '';
//el.innerHTML='Категория';
}*/
return null;
}