session.Page=new Page();
session.Page.Name="accommodation";
session.Page.DataService="Package.aspx";
function LocationResult(){
this.Id=null;
this.Name=null;
this.Url=null;
this.CountryName=null;
this.CountryCode=null;
this.CountryUrl=null;
this.RegionName=null;
this.RegionCode=null;
this.RegionUrl=null;
this.ContinentName=null;
this.ContinentCode=null;
this.ReviewScore=null;
this.ReviewUrl=null;
}
function LocationResult(id,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d){
this.Id=id;
this.Name=_2;
this.Url=_3;
this.CountryName=_4;
this.CountryCode=_5;
this.CountryUrl=_6;
this.RegionName=_7;
this.RegionCode=_8;
this.regionUrl=_9;
this.ContinentName=_a;
this.ContinentCode=_b;
this.ReviewScore=_c*1;
if(this.ReviewScore>10){
this.ReviewScore=this.ReviewScore/10;
}
this.ReviewUrl=ReviewUrl;
}
function LocationResult(_e){
this.Id=_e.Id;
this.Name=_e.Name;
this.CountryName=_e.CountryName;
this.CountryCode=_e.CountryCode;
this.RegionName=_e.RegionName;
this.RegionCode=_e.RegionCode;
this.ContinentName=_e.ContinentName;
this.ContinentCode=_e.ContinentCode;
this.ReviewScore=_e.ReviewScore*1;
if(this.ReviewScore>10){
this.ReviewScore=this.ReviewScore/10;
}
this.ReviewUrl=_e.ReviewUrl;
}
function GetCustomProperty(_f,key){
if(_f&&_f.CustomProperties){
for(var i=0;i<_f.CustomProperties.length;i++){
if(_f.CustomProperties[i].Name==key){
return _f.CustomProperties[i].Value;
}
}
}
return null;
}
function SupplierResult(id,_13,_14){
this.Id=id;
this.Name=_13;
this.Logo=_14;
}
SupplierResult.prototype.GetClassName=function(){
return SupplierHandler.GetClassName(this.Id,this.Name);
};
function VacationTypeResult(_15,_16){
this.Code=_15;
this.Name=_16;
}
function PackageResult(){
this.Id=null;
this.Code=null;
this.UniqueCode=null;
this.Name=null;
this.TransportType=null;
this.Stars=null;
this.Supplier=null;
this.Description=null;
this.SmallPicture=null;
this.AccommodationTypeCode=null;
this.AccommodationType=null;
this.VacationTypeCode=null;
this.VacationType=null;
this.VacationTypes=[];
this.Boarding=null;
this.BoardingCode=null;
this.Trips=[];
}
function PackageResult(_17){
this.Id=_17.Id;
this.Code=_17.Code;
this.UniqueCode=_17.UniqueCode;
this.Name=_17.Name;
this.TransportType=_17.TransportType;
if(this.TransportType.toLowerCase()=="owntransport"||this.TransportType.toLowerCase()=="none"||this.TransportType.toLowerCase()=="onbekend"){
this.TransportType=null;
}
this.Stars=_17.STARS;
this.Supplier=new SupplierResult(_17.SupplierId,_17.SupplierName,_17.SupplierLogo);
this.Description=_17.SmallDescription;
this.SmallPicture=_17.SmallPicture;
this.AccommodationTypeCode=_17.AccommodationTypeCode;
this.AccommodationType=_17.AccommodationType;
this.VacationTypes=[];
if(_17.VacationTypes){
for(var i=0;i<_17.VacationTypes.length;i++){
this.VacationTypes.push(new VacationTypeResult(_17.VacationTypes[i].Code,_17.VacationTypes[i].Name));
}
}
this.Boarding=_17.BoardingCode;
this.BoardingCode=_17.BoardingName;
this.Trips=[];
for(var i=0;i<_17.Trips.length;i++){
this.Trips.push(new TripResult(_17.Trips[i]));
}
}
function TripResult(){
this.Id=null;
this.DepartureDate=null;
this.Days=null;
this.TotalPrice=null;
this.BookingUrl=null;
this.Filter=null;
this.PriceType=null;
this.CalculatedPrice=null;
}
function TripResult(_19){
this.Id=_19.Id;
this.DepartureDate=_19.DepartureDate;
this.Days=_19.Days;
this.TotalPrice=new TotalPriceResult(_19.Price.Value,_19.Price.Currency);
this.BookingUrl=_19.BookingUrl;
this.Filter=_19.Filter;
this.PriceType=_19.PriceType;
this.CalculatedPrice=_19.CalculatedPrice;
}
function TotalPriceResult(_1a,_1b){
this.Value=_1a;
this.Currency=_1b;
}
function TransportTypeHolder(){
this.Code=null;
this.Packages=[];
}
function VacationOverview(){
this.TransportType=null;
this.AccommodationTypeCode=null;
this.Ranking=0;
this.SupplierOverviews=[];
}
function SupplierOverview(){
this.Supplier=null;
this.Price=null;
this.Description=null;
}
VacationOverview.prototype.GetRanking=function(){
var _1c=0;
if(this.AccommodationTypeCode){
var _1d=this.AccommodationTypeCode.toLowerCase();
switch(_1d){
case "hotel":
case "hot":
case "albergaria":
case "alb":
case "clubdorp":
case "clu":
case "estalagem":
case "est":
case "gasthof":
case "ghf":
case "motel":
case "mot":
case "pousada":
case "pou":
case "resort":
case "rso":
case "suite":
case "ste":
case "lodgeinn":
case "inn":
_1c+=1;
break;
case "appartement":
case "appartment":
case "app":
case "aparthotel":
case "apo":
case "maisonette":
case "mai":
case "residential":
case "res":
case "penthouse":
case "pnt":
_1c+=2;
break;
case "hostel":
case "hos":
_1c+=3;
break;
case "chalet":
case "cha":
case "huis":
case "hui":
case "vakantiewoning":
case "wng":
case "villa":
case "vil":
_1c+=4;
break;
case "bedbreakfast":
case "bed":
case "gasthuis":
case "guesthouse":
case "gue":
case "pension":
case "pen":
_1c+=5;
break;
case "camping":
case "cam":
case "stacaravan":
case "car":
case "tent":
case "tnt":
_1c+=6;
break;
case "bungalow":
case "bng":
_1c+=7;
break;
default:
case "uknown":
case "niet bekend":
case "nietbekend":
case "bijzonder":
case "boerderij":
case "bry":
case "camper":
case "cpr":
case "cruise":
case "cru":
case "kasteel":
case "cas":
case "schipbootbotel":
case "sch":
_1c+=99;
break;
}
}else{
_1c+=0;
}
if(this.TransportType){
var _1d=this.TransportType.toLowerCase();
switch(_1d){
case "flight":
_1c+=100;
break;
case "bus":
_1c+=200;
break;
case "train":
_1c+=300;
break;
case "ferry":
_1c+=400;
break;
case "cruise":
_1c+=500;
break;
}
}else{
_1c+=0;
}
return _1c;
};
function SortSupplierOverviewOnRanking(a,b){
return a.Ranking-b.Ranking;
}
function AccommodationResult(){
this.Id=null;
this.Name=null;
this.ReviewScore=null;
this.ReviewUrl=null;
this.Remark=null;
this.Stars=null;
this.Description=null;
this.PhotoUrl=null;
this.AccommodationTypeCode=null;
this.AccommodationType=null;
this.Location=null;
this.Packages=[];
this.VacationOverviews=[];
}
AccommodationResult.prototype.SetProperties=function(_20){
this.Id=_20.Id;
this.Name=_20.Name;
this.ReviewScore=_20.ReviewScore*1;
if(this.ReviewScore>10){
this.ReviewScore=this.ReviewScore/10;
}
this.ReviewUrl=_20.ReviewUrl;
this.Remark=_20.Remark;
this.Stars=_20.Stars;
this.Description=_20.Description;
this.PhotoUrl=_20.PhotoUrl;
this.AccommodationTypeCode=_20.AccommodationTypeCode;
this.AccommodationType=_20.AccommodationType;
this.Location=new LocationResult(_20.Location);
this.Location.Url=GetCustomProperty(_20,"LocationUrl");
this.Location.CountryUrl=GetCustomProperty(_20,"CountryUrl");
this.Location.RegionUrl=GetCustomProperty(_20,"RegionUrl");
for(var i=0;i<_20.Packages.length;i++){
this.Packages.push(new PackageResult(_20.Packages[i]));
}
this.ProcessSuppliers();
};
AccommodationResult.prototype.ProcessSuppliers=function(){
if(this.Packages){
for(var i=0;i<this.Packages.length;i++){
var _23=false;
for(var x=0;x<this.VacationOverviews.length;x++){
if(this.VacationOverviews[x].TransportType==this.Packages[i].TransportType&&this.VacationOverviews[x].AccommodationTypeCode==this.AccommodationTypeCode){
var _25=null;
if(this.VacationOverviews[x].SupplierOverviews){
for(var y=0;y<this.VacationOverviews[x].SupplierOverviews.length;y++){
if(!this.VacationOverviews[x].SupplierOverviews[y]||!this.VacationOverviews[x].SupplierOverviews[y].Supplier){
continue;
}
if(this.Packages[i].Supplier.Id==this.VacationOverviews[x].SupplierOverviews[y].Supplier.Id){
_25=this.VacationOverviews[x].SupplierOverviews[y];
this.VacationOverviews[x].SupplierOverviews.splice(y,1);
break;
}
}
}
if(!_25){
_25=new SupplierOverview();
_25.Supplier=this.Packages[i].Supplier;
}
_25=this.GetCheapestTrip(this.VacationOverviews[x].TransportType,this.Packages[i].Trips,_25);
this.VacationOverviews[x].SupplierOverviews.push(_25);
_23=true;
break;
}
}
if(!_23){
var _27=new VacationOverview();
_27.TransportType=this.Packages[i].TransportType;
_27.AccommodationTypeCode=this.AccommodationTypeCode;
_27.Ranking=_27.GetRanking();
var _25=new SupplierOverview();
_25.Supplier=this.Packages[i].Supplier;
_25=this.GetCheapestTrip(this.Packages[i].TransportType,this.Packages[i].Trips,_25);
_27.SupplierOverviews.push(_25);
this.VacationOverviews.push(_27);
}
}
}
if(this.VacationOverviews){
this.VacationOverviews.sort(SortSupplierOverviewOnRanking);
}
};
AccommodationResult.prototype.GetCheapestPrice=function(_28,_29){
var _2a={Price:null,Description:null};
for(var i=0;i<this.VacationOverviews.length;i++){
if(this.VacationOverviews[i].TransportType==_28&&this.VacationOverviews[i].AccommodationTypeCode==_29){
for(var j=0;j<this.VacationOverviews[i].SupplierOverviews.length;j++){
if(!this.VacationOverviews[i].SupplierOverviews[j]||!this.VacationOverviews[i].SupplierOverviews[j].Price){
continue;
}
if(!_2a.Price||!_2a.Price.Amount||(this.VacationOverviews[i].SupplierOverviews[j].Price.Amount<_2a.Price.Amount)){
_2a.Price=this.VacationOverviews[i].SupplierOverviews[j].Price;
_2a.Description=this.VacationOverviews[i].SupplierOverviews[j].Description;
}
}
}
}
return _2a;
};
AccommodationResult.prototype.GetCheapestPackage=function(){
var _2d={Supplier:null,Price:null};
for(var i=0;i<this.VacationOverviews.length;i++){
for(var j=0;j<this.VacationOverviews[i].SupplierOverviews.length;j++){
if(!this.VacationOverviews[i].SupplierOverviews[j]||!this.VacationOverviews[i].SupplierOverviews[j].Price){
continue;
}
if(!_2d.Price||!_2d.Price.Amount||(this.VacationOverviews[i].SupplierOverviews[j].Price.Amount<_2d.Price.Amount)){
_2d.Price=this.VacationOverviews[i].SupplierOverviews[j].Price;
_2d.Supplier=this.VacationOverviews[i].SupplierOverviews[j].Supplier;
}
}
}
return _2d;
};
AccommodationResult.prototype.GetCheapestTrip=function(_30,_31,_32){
for(var i=0;i<_31.length;i++){
var _34={Price:null,Description:null};
_34.Price=_31[i].CalculatedPrice.Value;
if(!_30||_30.toUpperCase()=="NONE"||_30.toUpperCase()=="OWNTRANSPORT"){
_34.Description=Language.Texts.GetText("PRICE_PER_NIGHT");
}else{
_34.Description=Language.Texts.GetText("PRICE_VACATION");
}
if(!_32.Price||(_34.Price<_32.Price.Amount)){
_32.Price=new Price(_31[i].CalculatedPrice.Currency,_34.Price);
_32.Description=_34.Description;
}
}
return _32;
};
AccommodationResult.prototype.Render=function(_35){
var _36=$("<li></li>").attr({id:"item_"+this.Id}).addClass("resultItem");
var _37=$("<div></div>").addClass("headerHolder").append("<h4><a id=\"name;"+this.Id+"\" title=\""+this.Name+"\" href=\""+this.Remark+"\" onclick=\"Analytics.TrackAccommodation(event);\">"+this.Name.Shorten(50-this.Stars,true)+"</a></h4>");
if(this.Stars&&this.Stars>0){
var _38=$("<ul></ul>").addClass("stars");
for(var i=0;i<this.Stars;i++){
_38.append("<li><img alt=\""+Language.Texts.GetText("POPUP_LOCATION_RESTAURANT_STAR")+"\" src=\"css/specific/"+session.Data.SiteName+"/imgs/icon/star/ico_star.gif\" /></li>");
}
_37.append(_38);
}
var _3a=$("<p></p>");
if(this.Location){
var _3b="&nbsp;|&nbsp;";
var _3c=null;
if(this.Location.ReviewScore>0){
_3c=Language.Texts.GetText("RATING").replace("{0}",this.Location.Name);
}else{
_3c=Language.Texts.GetText("NO_RATING_AVAILABLE").replace("{0}",this.Location.Name);
}
var _3d=this.Location.CountryUrl?"<a href=\""+this.Location.CountryUrl+"\">"+this.Location.CountryName+"</a>":this.Location.CountryName;
var _3e=this.Location.Url?"<a href=\""+this.Location.Url+"\">"+this.Location.Name+"</a>":this.Location.Name;
_3a.html(_3e+"&nbsp;(&nbsp;");
var _3f=$("<span></span>").html((this.Location.ReviewScore>0?this.Location.ReviewScore.toPrecision(2):"--")).addClass("rating").attr({title:_3c});
if(this.Location.ReviewUrl){
_3a.append($("<a></a>").addClass("rate").attr({href:this.Location.ReviewUrl,target:"_blank",rel:"nofollow"}).append(_3f));
}else{
_3a.append(_3f);
}
_3a.html(_3a.html()+"&nbsp;)");
if(this.Location.RegionName){
var _40=50;
var _41=this.Location.RegionName;
if((this.Location.Name+this.Location.RegionName+this.Location.CountryName).length>_40){
var _42=(this.Location.Name+this.Location.RegionName+this.Location.CountryName).length-_40;
if(_42>0&&_42<this.Location.RegionName.length){
_41=this.Location.RegionName.Shorten(this.Location.RegionName.length-_42,true);
}else{
_41=this.Location.RegionName.Shorten(3,true);
}
}
if(_41){
_41=this.Location.RegionUrl?"<a href=\""+this.Location.RegionUrl+"\">"+_41+"</a>":_41;
}
_3a.html(_3a.html()+_3b+_41+_3b+_3d);
}else{
_3a.html(_3a.html()+_3b+_3d);
}
}
_37.append(_3a);
_36.append(_37);
_37=null;
var _43=$("<div></div>").addClass("accommodationImgHolder");
if(this.PhotoUrl){
_43.append("<a href=\""+this.Remark+"\" onclick=\"Analytics.TrackAccommodation(event);\"><img src=\""+this.PhotoUrl+"\" alt=\""+this.Name+"\" title=\""+this.Name+"\" /></a>");
}
_36.append(_43);
_43=null;
_36.append($("<div></div>").addClass("accommodationDescription").append($("<p></p>").addClass("description").html(this.Description?this.Description:"")));
var _44=$("<div></div>").addClass("accommodationRating rating"+Math.ceil(this.ReviewScore));
if(this.ReviewScore&&Math.round(this.ReviewScore)>0){
var _45=$("<span></span>").addClass("rating");
var _46=$("<small></small>").html(this.ReviewScore.toPrecision(2));
if(this.ReviewUrl){
_45.append($("<a></a>").attr({href:this.ReviewUrl,target:"_blank",rel:"nofollow"}).append(_46));
}else{
_45.append(_46);
}
_44.append($("<span></span>").html("Beoordeling:"));
_44.append(_45);
}
_36.append(_44);
_44=null;
var _47=$("<div></div>").addClass("supplierHolder").append("<span>Verkrijgbaar bij o.a.:</span>");
var _48=$("<ul></ul>").addClass("suppliersBig");
var _49=this.GetSuppliers(3);
for(var i=0;i<_49.length;i++){
_48.append("<li><a href=\""+_49[i].Supplier.Logo+"\" target=\"_blank\" rel=\"nofollow\" title=\""+_49[i].Supplier.Name+(_49[i].Price?" - "+_49[i].Description+" "+_49[i].Price.GetTitleValue():"")+"\"><span class=\""+_49[i].Supplier.GetClassName()+"\">"+_49[i].Supplier.Name+"</span></a></li>");
}
_47.append(_48);
_36.append(_47);
_47=null;
if(this.VacationOverviews){
var _4a=$("<ul></ul>").addClass("vacationTypes");
for(var i=0;i<this.VacationOverviews.length;i++){
var _4b=$("<li></li>");
if((!this.VacationOverviews[i].TransportType)&&(this.VacationOverviews[i].AccommodationTypeCode)){
_4b.addClass("accommodation");
}else{
if((this.VacationOverviews[i].TransportType)&&(!this.VacationOverviews[i].AccommodationTypeCode)){
_4b.addClass("transport");
}else{
_4b.addClass("accommodationWithTransport");
}
}
if(i==this.VacationOverviews.length-1){
_4b.addClass("last-child");
}
var _4c=$("<ul></ul>").addClass("vacationDetails");
if(this.VacationOverviews[i].AccommodationTypeCode){
_4c.append($("<li></li>").addClass(this.VacationOverviews[i].AccommodationTypeCode.CreateClassName()).append("<span title=\""+Language.Texts.GetText(this.VacationOverviews[i].AccommodationTypeCode.toUpperCase()).replace(/&amp;/g,"&")+"\">"+Language.Texts.GetText(this.VacationOverviews[i].AccommodationTypeCode.toUpperCase())+"</span>"));
}
if(this.VacationOverviews[i].TransportType&&this.VacationOverviews[i].AccommodationTypeCode&&this.VacationOverviews[i].TransportType!=this.VacationOverviews[i].AccommodationTypeCode){
_4c.append($("<li></li>").html(" + ").addClass("spacer"));
}
if(this.VacationOverviews[i].TransportType&&(!this.VacationOverviews[i].AccommodationTypeCode||(this.VacationOverviews[i].AccommodationTypeCode&&(this.VacationOverviews[i].TransportType!=this.VacationOverviews[i].AccommodationTypeCode)))){
_4c.append($("<li></li>").addClass(this.VacationOverviews[i].TransportType.CreateClassName()).append("<span title=\""+Language.Texts.GetText(this.VacationOverviews[i].TransportType.toUpperCase())+"\">"+Language.Texts.GetText(this.VacationOverviews[i].TransportType.toUpperCase())+"</span>"));
}
_4b.append(_4c);
_4b.append($("<p></p>").html((this.VacationOverviews[i].SupplierOverviews.length>=5?5+" of meer":this.VacationOverviews[i].SupplierOverviews.length)+" aanbieder(s)"));
var _4d=$("<dl></dl>").addClass("price");
var _4e=this.GetCheapestPrice(this.VacationOverviews[i].TransportType,this.VacationOverviews[i].AccommodationTypeCode);
if(_4e&&_4e.Price){
_4d.append($("<dt></dt>").html(_4e.Description)).append($("<dd></dd>").append($("<a></a>").html(_4e.Price.GetValue()).addClass("priceArrow").attr({href:this.Remark,title:this.Name}).click(function(e){
Analytics.TrackAccommodation();
})));
}
_4b.append(_4d);
_4a.append(_4b);
}
_36.append(_4a);
_4a=null;
}
_35.append(_36);
_36=null;
};
AccommodationResult.prototype.GetSuppliers=function(_50){
var _51=[];
var _52=[];
for(var i=0;i<this.VacationOverviews.length;i++){
for(var y=0;y<this.VacationOverviews[i].SupplierOverviews.length;y++){
if((!this.VacationOverviews[i].TransportType)&&(this.VacationOverviews[i].AccommodationTypeCode)){
_52.push(this.VacationOverviews[i].SupplierOverviews[y]);
}else{
if((this.VacationOverviews[i].TransportType)&&(!this.VacationOverviews[i].AccommodationTypeCode)){
}else{
_51.push(this.VacationOverviews[i].SupplierOverviews[y]);
}
}
}
}
var _55=[];
for(var i=0;i<_51.length&&_55.length<_50;i++){
_55.push(_51[i]);
}
for(var i=0;i<_52.length&&_55.length<_50;i++){
var _56=false;
for(var j=0;j<_55.length;j++){
if(_55[j].Supplier.Id==_52[i].Supplier.Id){
_56=true;
break;
}
}
if(!_56){
_55.push(_52[i]);
}
}
return _55;
};
function AccommodationTeaserResult(){
this.AccommodationTeasers=[];
}
AccommodationTeaserResult.prototype.SetProperties=function(_58){
this.AccommodationTeasers=null;
};
AccommodationTeaserResult.prototype.Render=function(){
};
AccommodationTeaserResult.prototype.Remove=function(){
};
function AccommodationTeaser(_59,_5a){
this.Code=_59;
this.Accommodation=null;
}
AccommodationTeaser.prototype.GetDOM=function(){
if(!this.Accommodation){
return;
}
return;
};
function AvailableFilterCategory(id,_5c,_5d,_5e,_5f,_60,_61){
this.Id=id;
this.Name=_5c;
this.Items=_5d;
this.ParentId=_5e;
this.Active=_5f;
this.IsOrFilter=_60;
this.ExactMatch=_61;
}
AvailableFilterCategory.prototype.GetDOM=function(){
if(this.Items.length==0){
return;
}
var _62=$("<dl></dl>").append($("<dt></dt>").html(""+this.Name.Shorten(22,true)));
if(this.Active){
var _63=0;
for(var i=0;i<this.Items.length;i++){
if(this.Items[i].Active){
_62.append(this.Items[i].GetDOM());
_63++;
}
}
if(this.Items&&this.Items.length>0&&this.Items.length>_63){
var _65=$("<a></a>").html(Language.Texts.GetText("FILTER_MORE_OPTIONS"+(this.IsOrFilter?"_OR":"_AND"))).attr({href:"#"}).addClass("more").bind("click",{obj:this},this.ToggleHidden);
}
}else{
if(this.Items.length>0){
for(var i=0;i<this.Items.length;i++){
if(i<5||this.Items.length<=6){
_62.append(this.Items[i].GetDOM());
}else{
var _65=$("<a></a>").html(Language.Texts.GetText("FILTER_MORE_OPTIONS")).attr({href:"#"}).addClass("more").bind("click",{obj:this},this.ToggleHidden);
break;
}
}
}
}
var _66=$("<li></li>").attr({id:this.Id}).append(_62);
if(_65){
_66.append(_65);
}
return _66;
};
AvailableFilterCategory.prototype.ToggleHidden=function(e){
e.preventDefault();
var _68=e.data.obj;
var _69=$(jq(_68.Id));
if($(jq("extraFilters_"+_68.Id)).length>0){
var _6a=_69.children("a.more");
_6a.toggle();
var _6b=$(jq("extraFilters_"+_68.Id));
if($.browser.msie6){
if(_6b.height()==0){
_6b.height("auto").css("overflow","visible");
}else{
_6b.height(0).css("overflow","hidden");
}
}else{
_6b.toggle();
}
}else{
var _6c=[];
if(_68.Active){
for(var i=0;i<_68.Items.length;i++){
if(!_68.Items[i].Active){
_6c.push(_68.Items[i]);
}
}
}else{
for(var i=5;i<_68.Items.length;i++){
_6c.push(_68.Items[i]);
}
}
var _6e=$("<dl></dl>");
for(var i=0;i<_6c.length;i++){
var _6f=_6c[i].GetDOM("dd");
_6e.append(_6f);
}
var _70=$("<li></li>").addClass("extraFilters").attr({id:"extraFilters_"+_68.Id}).append($("<div></div>").append(_6e));
var _6a=$(e.target).hide();
_70.append($("<a></a>").html(Language.Texts.GetText("FILTER_HIDE_OPTIONS")).attr({href:"#"}).addClass("more").bind("click",{obj:_68},_68.ToggleHidden));
_69.parent().append(_70);
_69.after(_70);
var _71=$.browser.msie?90:82;
if(_6e.height()>_71){
_6e.height(_71);
}
}
return false;
};
function AvailableFilterItem(id,_73,_74,_75){
this.Id=id;
this.Name=_73;
this.Amount=_74;
this.Active=_75;
}
AvailableFilterItem.prototype.GetDOM=function(_76,_77,_78){
if(!_76||typeof (_76)=="undefined"||_76=="undefined"){
_76="dd";
}
var _79=$("<"+_76+"></"+_76+">").attr({id:this.Id});
var _7a=this.Name;
if(!_77&&_7a&&_7a.length>19){
_7a=_7a.Shorten(19,true);
}
if(_7a){
_7a=_7a.replace(" ","&nbsp;");
_7a=_7a.replace("-","&#0045;");
}
if(this.Active){
_79.addClass("active");
}
var _7b=$("<input />").attr({type:"checkbox",defaultChecked:this.Active,id:"chk;"+this.Id,name:"chk;"+this.Id});
if(this.Active){
_7b.attr("checked","checked");
if(!_77){
_7b.bind("click",{},FilterHandler.RemoveFilter);
}
}else{
if((this.Amount==-1||this.Amount>0)&&!_77){
_7b.bind("click",{},FilterHandler.AddFilter);
}else{
if(_77){
}else{
_7b.attr("disabled","disabled");
}
}
}
_79.append(_7b);
if(this.Active||_77){
var _7c=$("<span></span>").html(_7a).attr({title:this.Name});
if(_77){
var _7d=$("<small></small>").html("&nbsp;("+_78+")");
_7c.append(_7d);
}
_79.append(_7c);
}else{
var _7e=$("<a></a>").html(_7a);
if(_7a!=this.Name){
_7e.attr("title",this.Name);
}
var _7f=$("<small></small>").html("("+this.Amount+")");
if((this.Amount==-1||this.Amount>0)){
_7e.attr("href","#").bind("click",{},FilterHandler.AddFilter);
}else{
_7e.addClass("disabled");
_7f.addClass("disabled");
}
_79.append(_7e);
if(!_77&&(this.Amount!=-1&&this.Amount>0)){
_7f.click(function(e){
FilterHandler.AddFilter(e);
});
_79.append(_7f);
}
}
return _79;
};
function ActiveFilter(id,_82,_83,_84,_85,_86){
this.Id=id;
this.Name=_82;
this.Category=_83;
this.ParentFilterId=_84;
this.CategoryId=_85;
this.NonRemovable=_86?_86:false;
}
ActiveFilter.prototype.GetDOM=function(_87){
var _88=null;
var _89=null;
if($("flt;"+jq(this.Category)).length>0&&$("flt;"+jq(this.Category)+" > dl:first").length>0){
_89=$("#flt;"+this.Category);
_88=$("#flt;"+this.Category+" > dl:first");
}else{
_89=$("<li></li>").attr({id:"flt;"+this.Category});
_88=$("<dl></dl>");
}
if(!_87){
this.GetCatDOM(_88);
}
this.GetNameDOM(_88);
_89.append(_88);
return _89;
};
ActiveFilter.prototype.GetCatDOM=function(_8a){
var _8b=this.Category;
_8b=_8b.replace(" ","&nbsp;");
_8b=_8b.replace("-","&#0045;");
var _8c=false;
var cat=$("<dt></dt>").html(_8b.Shorten(25,true)+":").attr({title:this.Category});
_8a.append(cat);
};
ActiveFilter.prototype.GetNameDOM=function(_8e){
if(!_8e){
return;
}
var _8f=this.Name.Shorten(25,true);
var _90=$("<dd></dd>");
var _91=$(_8e).children("dd");
if(!_91||_91.size()==0){
_90.addClass("first-child");
}
_90.attr("id",this.Id);
_8f=_8f.replace(" ","&nbsp;");
if(!this.NonRemovable){
_90.append($("<a></a>").addClass("deleteFilter").attr({href:"#",title:Language.Texts.GetText("FILTER_REMOVE")}).html(_8f).bind("click",{},FilterHandler.RemoveFilter));
}else{
_90.append($("<div></div>").addClass("name").attr({title:this.Name}).html(_8f));
}
_8e.append(_90);
};
function WordGroup(_92,_93){
this.Text=_92;
this.Ambiguous=_93;
this.Type=null;
this.Items=[];
}

