function ListCore() { this.ident =''; this.Filter = function(action,id) { var data = new Object(); data['country'] = id; data['act'] = action; data['widget'] = 'filter_freelancers'; this.InitializeRequest('POST', '/ajax.php'); this.Commit(postquery(data)); } this.OnSuccess = function() { //alert(this.GetResponseText()); eval(this.GetResponseText()); // fade(0,"form_"+this.ident); // $("loading_"+this.ident).style.display = 'none'; } } ListCore.prototype = new ajax(); List = new ListCore(); var speed = 2; function closeBlock(id) { height = $('group_'+id).offsetHeight; height -= speed; $('group_'+id).style.height = height+"px"; if (height == 0) { $('group_'+id).style.display='none'; return; } else { setTimeout('closeBlock(\''+id+'\')',1); } } function openBlock(id) { height = $('group_'+id).offsetHeight; height += speed; $('group_'+id).style.height = height+"px"; // alert (window.groups[arr[1]]); if (height == window.groups[id]) { return; } else { setTimeout('openBlock(\''+id+'\')',1); } } function collapseBlock(id) { height = $('group_'+id).offsetHeight; if (height == 0) { //$('marker_'+id).style.background = '#528EB8'; $('group_'+id).style.height = 0; $('group_'+id).style.display = 'block'; openBlock(id); } else { //$('marker_'+id).style.background = ''; closeBlock(id); } }