var eventsFilterSliderSquarePrecision = 300;
var eventsFilterSliderPricePrecision = 15000000;
var eventsFilterSliderPriceArea = 100000000;
jQuery(function($)
{
//------------------------->
$("#country").hide();
$("#ctype").hide();
$("#stype").hide();
$("#gtype").hide();
$("#ptype").hide();
$("#ltype").hide();
$("#type").hide();
$("#type2").hide();
$("#price-area").hide();
if($("select[name='type'] option:selected").val()==1)
{
$("#type").show();
$("#no-storage").show();
$("#no-storage-1").show();
$("#floor").show();
$("#ned-b").show();
$("#square").show();
}
if($("select[name='type'] option:selected").val()==2)
{
$("#type").hide();
$("#type2").show();
$("#no-storage").show();
$("#no-storage-1").show();
$("#floor").show();
$("#ned-b").show();
$("#square").show();
}
if($("select[name='type'] option:selected").val()==3)
{ $("#type").hide();
$("#no-storage").show();
$("#no-storage-1").show();
$("#floor").hide();
$("#ned-b").hide();
$("#square").show();
$("#country").show();
}
if($("select[name='type'] option:selected").val()==4)
{
$("#type").hide();
//$("#show-content").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#square").hide();
$("#ltype").show();
}
if($("select[name='type'] option:selected").val()==5)
{
$("#price-all").hide();
$("#price-area").show();
$("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#ctype").show();
}
if($("select[name='type'] option:selected").val()==6)
{ $("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#stype").show();
}
if($("select[name='type'] option:selected").val()==7)
{ $("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#gtype").show();
}
if($("select[name='type'] option:selected").val()==8)
{ $("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#ptype").show();
}
$("#workplace li a").click(function(){
//alert($(this).attr('rel'));
if($("#workplace li:first").hasClass('active')){
$("#workplace li:first").toggleClass('active');
}
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$("#seller li a").click(function(){
if($(this).parent("li").hasClass("separator")!=true){
if($("#seller li:first").hasClass('active')){
$("#seller li:first").toggleClass('active');
}
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;}
});
$("select[name='type']").change(function(){
$("#type").hide();
$("#type2").hide();
$("#country,").hide();
$("#ctype").hide();
$("#stype").hide();
$("#gtype").hide();
$("#ptype").hide();
$("#ltype").hide();
$("#price-area").hide();
if($("select[name='type'] option:selected").val()==1)
{
$("#type").show();
$("#no-storage").show();
$("#no-storage-1").show();
$("#floor").show();
$("#ned-b").show();
$("#square").show();
}
if($("select[name='type'] option:selected").val()==2)
{
$("#type").hide();
$("#type2").show();
$("#no-storage").show();
$("#no-storage-1").show();
$("#floor").show();
$("#ned-b").show();
$("#square").show();
}
if($("select[name='type'] option:selected").val()==4)
{
//$("#show-content").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#square").hide();
$("#ltype").show();
}
if($("select[name='type'] option:selected").val()==3)
{ $("#type").hide();
$("#no-storage").show();
$("#no-storage-1").show();
$("#floor").hide();
$("#ned-b").hide();
$("#square").show();
$("#country").show();
}
if($("select[name='type'] option:selected").val()==5)
{
$("#price-all").hide();
$("#price-area").show();
$("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#ctype").show();
$("#square").show();
}
if($("select[name='type'] option:selected").val()==6)
{ $("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#stype").show();
$("#square").show();
}
if($("select[name='type'] option:selected").val()==7)
{ $("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#gtype").show();
$("#square").show();
}
if($("select[name='type'] option:selected").val()==8)
{ $("#type").hide();
$("#no-storage").hide();
$("#no-storage-1").hide();
$("#ptype").show();
$("#square").show();
}
realtyFilterProcess();
});
$("select[name='action']").change(function(){
realtyFilterProcess();
});
$("select[name='seller']").change(function(){
realtyFilterProcess();
});
$(".ned-box-1 .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".ned-box-1 .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".ned-box-2 .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".ned-box-2 .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".ned-box-3 .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".ned-box-3 .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
//----------------Дополнительные критерии
$(".krit-box-1 .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".krit-box-1 .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".krit-box-2 .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".krit-box-2 .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".krit-box-3 .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".krit-box-3 .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".krit-box-4 .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".krit-box-4 .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$("input[name='bfloor']").change(function(){
// alert($("select[name='area']")[0].options);
realtyFilterProcess();
});
$("input[name='efloor']").change(function(){
// alert($("select[name='area']")[0].options);
realtyFilterProcess();
});
$("input[name='notfirst']").change(function(){
// alert($("select[name='area']")[0].options);
realtyFilterProcess();
});
$("input[name='notlast']").change(function(){
// alert($("select[name='area']")[0].options);
realtyFilterProcess();
});
$("input[name='nonumber']").change(function(){
// alert($("select[name='area']")[0].options);
realtyFilterProcess();
});
$(".dslider#dslider-square").slider({
range: true,
step: 1,
min: 0,
max: eventsFilterSliderSquarePrecision,
values: [$("input[name='square_min_pos']").val(), $("input[name='square_max_pos']").val()],
change: function(e, ui)
{//
dsliderRedrawGauge($(this));
var trueValues = [0, 0];
trueValues[0] = eventsFilterSliderTimeTrueValue(ui.values[0]);
trueValues[1] = eventsFilterSliderTimeTrueValue(ui.values[1]);
// alert(trueValues);
$("input[name='square_min']").val(trueValues[0]);
$("input[name='square_max']").val(trueValues[1]);
$("input[name='square_min_pos']").val(ui.values[0]);
$("input[name='square_max_pos']").val(ui.values[1]);
realtyFilterProcess();
}
});
setTimeout(function(){
dsliderRedrawGauge($(".dslider#dslider-square"));
}, 10);
$("input[name='square_min'], input[name='square_max']").change(function(){
$(".dslider#dslider-square").slider("option", "values",
[
eventsFilterSliderTimeImaginaryValue(parseInt($("input[name='square_min']").val())),
eventsFilterSliderTimeImaginaryValue(parseInt($("input[name='square_max']").val()))
]
);
});
$(".dslider#dslider-price").slider({
range: true,
step: 100000,
min: 0,
max: eventsFilterSliderPricePrecision ,
values: [$("input[name='price_min_pos']").val(), $("input[name='price_max_pos']").val()],
change: function(e, ui)
{
dsliderRedrawGauge($(this));
var trueValues = [0, 0];
trueValues[0] = eventsFilterSliderPriceTrueValue(ui.values[0]);
trueValues[1] = eventsFilterSliderPriceTrueValue(ui.values[1]);
$("input[name='price_min']").val(trueValues[0]);
$("input[name='price_max']").val(trueValues[1]);
$("input[name='price_min_pos']").val(ui.values[0]);
$("input[name='price_max_pos']").val(ui.values[1]);
realtyFilterProcess();
}
});
setTimeout(function(){
dsliderRedrawGauge($(".dslider#dslider-price"));
}, 10);
$("input[name='price_min'], input[name='price_max']").change(function(){
$(".dslider#dslider-price").slider("option", "values",
[
eventsFilterSliderPriceImaginaryValue(parseInt($("input[name='price_min']").val())),
eventsFilterSliderPriceImaginaryValue(parseInt($("input[name='price_max']").val()))
]
);
});
$(".dslider#dslider-price-area").slider({
range: true,
step: 1000000,
min: 0,
max: eventsFilterSliderPriceArea ,
values: [$("input[name='price_min_pos_area']").val(), $("input[name='price_max_pos_area']").val()],
change: function(e, ui)
{
dsliderRedrawGauge($(this));
var trueValues = [0, 0];
trueValues[0] = eventsFilterSliderPriceTrueValue(ui.values[0]);
trueValues[1] = eventsFilterSliderPriceTrueValue(ui.values[1]);
$("input[name='price_min_area']").val(trueValues[0]);
$("input[name='price_max_area']").val(trueValues[1]);
$("input[name='price_min_pos_area']").val(ui.values[0]);
$("input[name='price_max_pos_area']").val(ui.values[1]);
realtyFilterProcess();
}
});
setTimeout(function(){
dsliderRedrawGauge($(".dslider#dslider-price-area"));
}, 10);
$("input[name='price_min_area'], input[name='price_max_area']").change(function(){
$(".dslider#dslider-price-area").slider("option", "values",
[
eventsFilterSliderPriceImaginaryValue(parseInt($("input[name='price_min_area']").val())),
eventsFilterSliderPriceImaginaryValue(parseInt($("input[name='price_max_area']").val()))
]
);
});
$(".events-filter-types .checklist li a.check").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
$(".events-filter-types .checklist li a.link").click(function(){
$(this).parent('li').toggleClass('active');
eventsFilterSubmit();
return false;
});
$(".dslider").each(function(){
$(this).find(".ui-slider-handle:eq(0)").addClass('left');
$(this).find(".ui-slider-handle:eq(1)").addClass('right');
});
$(".events-filter-flags a").click(function(){
$(this).parent('li').toggleClass('active');
realtyFilterProcess();
return false;
});
realtyFilterProcess();
});
function realtyFilterProcess()
{
var val=[];
$("#workplace li.active").each(function(){
val.push($(this).children('a').attr('rel'));
});
if (val.length == 0)
{
val.push(-1);
}
var sel=[];
$("#seller li.active").each(function(){
sel.push($(this).children('a').attr('rel'));
});
if (sel.length == 0)
{
sel.push(-1);
}
if( $("#country").is(":visible") )
{var country=[];
$("#country li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
country.push($(this).attr('rel'));
}
});
}
if( $("#ltype").is(":visible") )
{var ltype=[];
$("#ltype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
ltype.push($(this).attr('rel'));
}
});
}
if( $("#ctype").is(":visible") )
{var ctype=[];
$("#ctype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
ctype.push($(this).attr('rel'));
}
});
}
//alert(ctype);
if( $("#stype").is(":visible") )
{var stype=[];
$("#stype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
stype.push($(this).attr('rel'));
}
});
}
if( $("#gtype").is(":visible") )
{var gtype=[];
$("#gtype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
gtype.push($(this).attr('rel'));
}
});
}
if( $("#ptype").is(":visible") )
{var ptype=[];
$("#ptype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
ptype.push($(this).attr('rel'));
}
});
}
if( $("#type").is(":visible") )
{var types = [];
$(".ned-box-1 .flat-type li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
types.push($(this).attr('rel'));
}
});
}
if( $("#type2").is(":visible") )
{var types = [];
$(".ned-box-1 .flat-type li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
types.push($(this).attr('rel'));
}
});
}
var rooms_count = [];
$(".ned-box-2 .rooms-count li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
rooms_count.push($(this).attr('rel'));
}
});
//alert(rooms_count);
var condition = [];
$(".ned-box-3 .condition li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
condition.push($(this).attr('rel'));
}
});
var material = [];
$(".krit-box-1 .material li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
material.push($(this).attr('rel'));
}
});
var heat = [];
$(".krit-box-2 .heat li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
heat.push($(this).attr('rel'));
}
});
var wc = [];
$(".krit-box-3 .wc li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
wc.push($(this).attr('rel'));
}
});
var balcony = [];
$(".krit-box-4 .balcony li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
balcony.push($(this).attr('rel'));
}
});
if($("#ned-b").is(":visible")){
var efloor=$("input[name='efloor']").val();
var bfloor=$("input[name='bfloor']").val();
//alert(efloor);
}
//alert(efloor);
if($("#floor").is(":visible")){
var notfirst=$("input[name='notfirst']").attr("checked");
var notlast=$("input[name='notlast']").attr("checked");
}
if($("#square").is(":visible")){
var square_min=$("input[name='square_min']").val();
var square_max=$("input[name='square_max']").val();
}
if($("#price-all").is(":visible")){
var price_min=$("input[name='price_min']").val();
var price_max=$("input[name='price_max']").val();
}else{
var price_min=$("input[name='price_min_area']").val();
var price_max=$("input[name='price_max_area']").val();
}
$(".ned-found").html('...');
$.getJSON("/ajax/realty.filter.count", {
'type':$("select[name='type'] option:selected").val(),
'action':$("select[name='action'] option:selected").val(),
'seller':sel,
'bfloor':(typeof(bfloor))?bfloor :null,
'efloor':(typeof(efloor))?efloor :null,
'notfirst':(typeof(notfirst))?notfirst :null,
'notlast':(typeof(notlast))?notlast :null,
'nonumber':$("input[name='nonumber']").attr("checked"),
'chid':$("input[name='chid']").val(),
'area':val,
'types':types,
'rooms_count':rooms_count,
'condition':condition,
'material':material,
'heat':heat,
'wc':wc,
'balcony':balcony,
'square_min': square_min,
'square_max':square_max,
'price_min': price_min,
'price_max': price_max,
'country':(typeof(country))?country :null,
'ltype':(typeof(ltype))?ltype :null,
'ctype':(typeof(ctype))?ctype :null,
'stype':(typeof(stype))?stype :null,
'gtype':(typeof(stype))?gtype :null,
'ptype':(typeof(stype))?ptype :null,
}, function(e){
sidebarMapUpdate('realty', 0, e.found);
$(".ned-found,.ned-found-2, #filter-count").html('Найдено '+e.count);
if (e.count == null)
{
$(".ned-found").parent('.filter-count').addClass('zero');
}
else
{
$(".ned-found").parent('.filter-count').removeClass('zero');
}
});
}
function realtyFilterSubmit()
{
var val=[];
$("#workplace li.active").each(function(){
val.push($(this).children('a').attr('rel'));
});
if (val.length == 0)
{
val.push(-1);
}
var sel=[];
$("#seller li.active").each(function(){
sel.push($(this).children('a').attr('rel'));
});
if (sel.length == 0)
{
sel.push(-1);
}
if( $("#country").is(":visible") )
{var country=[];
$("#country li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
country.push($(this).attr('rel'));
}
});
}
if( $("#ltype").is(":visible") )
{var ltype=[];
$("#ltype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
ltype.push($(this).attr('rel'));
}
});
}
if( $("#ctype").is(":visible") )
{var ctype=[];
$("#ctype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
ctype.push($(this).attr('rel'));
}
});
}
if( $("#stype").is(":visible") )
{var stype=[];
$("#stype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
stype.push($(this).attr('rel'));
}
});
}
if( $("#gtype").is(":visible") )
{var gtype=[];
$("#gtype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
gtype.push($(this).attr('rel'));
}
});
}
if( $("#ptype").is(":visible") )
{var ptype=[];
$("#ptype li a.check").each(function()
{
if ($(this).parent('li').hasClass('active'))
{
ptype.push($(this).attr('rel'));
}
});
}
var types = [];
$(".ned-box-1 .flat-type li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
types.push($(this).attr('rel'));
}
});
var rooms_count = [];
$(".ned-box-2 .rooms-count li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
rooms_count.push($(this).attr('rel'));
}
});
//alert(rooms_count);
var condition = [];
$(".ned-box-3 .condition li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
condition.push($(this).attr('rel'));
}
});
var material = [];
$(".krit-box-1 .material li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
material.push($(this).attr('rel'));
}
});
var heat = [];
$(".krit-box-2 .heat li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
heat.push($(this).attr('rel'));
}
});
var wc = [];
$(".krit-box-3 .wc li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
wc.push($(this).attr('rel'));
}
});
var balcony = [];
$(".krit-box-4 .balcony li a.check").each(function(){
if ($(this).parent('li').hasClass('active'))
{
balcony.push($(this).attr('rel'));
}
});
if($("#ned-b").is(":visible")){
var efloor=$("input[name='efloor']").val();
var bfloor=$("input[name='bfloor']").val();
}
if($("#floor").is(":visible")){
var notfirst=$("input[name='notfirst']").attr("checked");
var notlast=$("input[name='notlast']").attr("checked");
}
if($("#square").is(":visible")){
var square_min=$("input[name='square_min']").val();
var square_max=$("input[name='square_max']").val();
}
if($("#price-all").is(":visible")){
var price_min=$("input[name='price_min']").val();
var price_max=$("input[name='price_max']").val();
}else{
var price_min=$("input[name='price_min_area']").val();
var price_max=$("input[name='price_max_area']").val();
}
var url =
'/realty/search/' +
'?type='+$("select[name='type'] option:selected").val()+
'&action='+$("select[name='action'] option:selected").val()+
'&seller='+sel+
'&chid='+$("input[name='chid']").val()+
'&nonumber='+$("input[name='nonumber']").attr("checked")+
'&area='+val+
'&types='+types+
'&rooms_count='+rooms_count+
'&condition='+condition+
'&material='+material+
'&heat='+heat+
'&wc='+wc+
'&balcony='+balcony+
'&price_min='+$("input[name='price_min']").val()+
'&price_max='+ $("input[name='price_max']").val();
if(typeof(notlast)!='undefined'){url=url+'¬last='+notlast;}
if(typeof(notfirst)!='undefined'){url=url+'¬first='+notfirst;}
if(typeof(bfloor)!='undefined'){url=url+'&bfloor='+bfloor;}
if(typeof(efloor)!='undefined'){url=url+'&efloor='+efloor;}
if(typeof(square_min)!='undefined'){url=url+'&square_min='+square_min;}
if(typeof(square_max)!='undefined'){url=url+'&square_max='+square_max;}
if(typeof(country)!='undefined'){url=url+'&country='+country;}
if(typeof(ltype)!='undefined'){url=url+'<ype='+ltype;}
if(typeof(ctype)!='undefined'){url=url+'&ctype='+ctype;}
if(typeof(stype)!='undefined'){url=url+'&stype='+stype;}
if(typeof(gtype)!='undefined'){url=url+'>ype='+country;}
if(typeof(ptype)!='undefined'){url=url+'&country='+ptype;}
url=url+"#result";
window.location = url;
}
function dsliderRedrawGauge(sender)
{
var lineLeft = 0;
sender.siblings('.line').each(function(){
$(this).css('left', lineLeft+'%');
lineLeft += 16.666;
});
sender.children('.dslider-gauge').children('.dslider-gauge-fill').css({
'left': sender.children('.ui-slider-handle.left').css('left'),
'width': parseFloat(sender.children('.ui-slider-handle.right').css('left')) - parseFloat(sender.children('.ui-slider-handle.left').css('left')) + '%'
});
}
function eventsFilterSliderTimeTrueValue(val)
{
var retVal = 0 + val;
return retVal;
}
function eventsFilterSliderTimeImaginaryValue(val)
{ return val;
//return val + 20;
/* if (val < 10) return val + 14
else return val - 10;*/
}
function eventsFilterSliderPriceTrueValue(val)
{
var retVal = 0 + val;
return retVal;
}
function eventsFilterSliderPriceImaginaryValue(val)
{
return val;
}
function windowRealtyBuying(sender)
{//hs.outlineType = 'rounded-white';
return hs.htmlExpand(sender, { contentId: 'window-realty-buying', align: 'center', width: 560 } );
}
function SendFormRealtyBuying(){
if (checkForm()!=false){
// sender.html('сохранить');
$.getJSON("/realty/buy.oreder", { 'name':$("input[name='name']").val(),
'buyer':$("select[name='buyer'] option:selected").val(),
'type':$("select[name='type'] option:selected").val(),
'contacts': $("input[name='contacts']").val(),
'message': $("textarea[name='message']").val(),
'nocache': Math.random() }, function(e){
if (e.ok)
{//alert("ok");
$(".padded #order-byer-accept").show();
$(".padded #order-byer-accept").html('Ваш запрос отправлен.
Заявка будет рассмотрена в ближайшее время.');
$(".padded #job-order-vacancy").hide();
// $("div").find("#job-order-vacancy").hide();
}
else
{$(".padded #order-byer-accept").show();
$(".padded #order-byer-accept").html('Заполнены не все поля.');
}
});
return false;}
}
function checkForm(){
var err;
if(($("input[name='name']").val()=="Введите ваше Ф. И. О.") ||($("input[name='name']").val()=='')||($("input[name='name']").val()=='Поле не заполнено')){
$("input[name='name']").css("color","red");
$("input[name='name']").val("Поле не заполнено");
err=true;
}
if(($("input[name='contacts']").val()=="Введите контактные данные") ||($("input[name='contacts']").val()=='')||($("input[name='contacts']").val()=='Поле не заполнено')){
$("input[name='contacts']").css("color","red");
$("input[name='contacts']").val("Поле не заполнено");
err=true;
}
if(err==true)return false; else return true;
}
//переключалка доски объявлений
function changeboard(cid,type)
{
$.getJSON("/ajax/realty.change.board", {
'cid': cid,
'type': type}, function(e){
$("#board").html("
