var MAINDATABLOCKS = new Array('MAININFO','ADDITIONALSERVICES','DEPARTUREPOINTS','USEFULINFO','GALLERY','ACCOMMODATIONS'); var RelatedOffers_InfoPopboxState = false; var TextSize1 = 12; var TextSize2 = 11; var TextSize3 = 14; var TextSize4 = 16; $(document).ready(function() { PageReflow(); RenderAccommodation(); }); function PageReflow() { if (typeof GalleryImages !== 'undefined' && GalleryImages>0) { var MinHeight = 999; for (var i=0; i<=GalleryImages; i++) { if ($("#GALLERYIMAGE_"+i+"_1").length==0 || $("#GALLERYIMAGE_"+i+"_1").outerHeight()<=0) { continue; } if (MinHeight>$("#GALLERYIMAGE_"+i+"_1").outerHeight()) { MinHeight = parseInt($("#GALLERYIMAGE_"+i+"_1").outerHeight(),10); } } if (MinHeight<110) { MinHeight = 110; } for (var i=0; i<=GalleryImages; i++) { if ($("#GALLERYIMAGE_"+i+"_0").length==0) { continue; } $("#GALLERYIMAGE_"+i+"_0").css('height',MinHeight+'px'); } } } function ToggleDataBlock(id) { if (id=='MAININFO' || id=='ADDITIONALSERVICES' || id=='DEPARTUREPOINTS') { $("#DATABLOCK_CONTAINER").show(); } else { $("#DATABLOCK_CONTAINER").hide(); } for (var i=0; i'; HTMLDATA += '
'; HTMLDATA += '
'; HTMLDATA += '
' + RELATEDOFFERS[index][1] + ' '; if (RELATEDOFFERS[index][1]==1) { HTMLDATA += 'ден'; } else { HTMLDATA += 'дни'; } HTMLDATA += '
'; HTMLDATA += '
' + RELATEDOFFERS[index][2] + '
'; HTMLDATA += '
'; HTMLDATA += ''; $(datacell).empty().append(HTMLDATA); $("#RELATEDOFFERS_EXTRAINFO_CONTAINER").css('top',(CellPos.top-3)+'px').show(); RelatedOffers_InfoPopboxState = true; } function RelatedOffers_OfferOut(index) { $("#RELATEDOFFER_"+index).css('background',''); $("#RELATEDOFFER_"+index+"_LINK").css('color','#003399').css('border-bottom',''); RelatedOffers_InfoPopboxState = false; setTimeout("RelatedOffers_HideInfoPopbox()",1000); } function RelatedOffers_PopboxOver() { RelatedOffers_InfoPopboxState = true; } function RelatedOffers_PopboxOut() { RelatedOffers_InfoPopboxState = false; setTimeout("RelatedOffers_HideInfoPopbox()",1000); } function RelatedOffers_HideInfoPopbox() { if (RelatedOffers_InfoPopboxState) { return; } $("#RELATEDOFFERS_EXTRAINFO_CONTAINER").hide(); } function RateOver(obj,id) { $(obj).css('cursor','pointer').css('background','#D9EBFF'); $("#RATE_"+id+"_BUTTON").css('margin-top','-21px'); } function RateOut(obj,id) { $(obj).css('cursor','').css('background',''); $("#RATE_"+id+"_BUTTON").css('margin-top',''); } function DotLevelOver(id) { var Text = ''; var BarPos = $("#DOTLEVEL_"+id).position(); var BarLeft = BarPos.left; var BarTop = BarPos.top+27; var IconWidth = $("#DOTLEVEL_"+id).width(); var IconCenterLeft = BarLeft+Math.floor(IconWidth/2); // Initially, position it excessively to the left $("#DOTLEVEL_INFOBOX_TEXT").empty().append('
'+LEVELTEXT[id]+'
'); $("#DOTLEVEL_INFOBOX").css('top',BarTop+'px').css('left',(IconCenterLeft-200)+'px').show(); // Then position it more precisely BoxCenterLeft = Math.floor($("#DOTLEVEL_INFOBOX").width()/2); BoxHeight = $("#DOTLEVEL_INFOBOX").height(); $("#DOTLEVEL_INFOBOX").css('left',(IconCenterLeft-BoxCenterLeft)+'px').css('top',(BarTop)+'px'); $("#DOTLEVEL_"+id).css('cursor','pointer').css('background','#EEEEEE'); } function DotLevelOut(id) { $("#DOTLEVEL_INFOBOX").hide(); $("#DOTLEVEL_"+id).css('cursor','').css('background',''); } function TagOver(id) { $("#TAG_"+id+"_L").show(); $("#TAG_"+id+"_R").show(); $("#TAG_"+id+"_B").css('cursor','pointer').css('background-position','0px -100px'); $("#TAG_"+id+"_T").css('color','#FFFFFF'); } function TagOut(id) { $("#TAG_"+id+"_L").hide(); $("#TAG_"+id+"_R").hide(); $("#TAG_"+id+"_B").css('cursor','').css('background-position','0px 0px'); $("#TAG_"+id+"_T").css('color','#003399'); } function PageButtonOver(obj) { $(obj).css('margin-top','-18px'); } function PageButtonOut(obj) { $(obj).css('margin-top','0px'); } function ShareLinkOver() { $("#PAGELINKS_SHARE_I").hide(); $("#PAGELINKS_SHARE_A").show(); } function ShareLinkOut() { $("#PAGELINKS_SHARE_I").show(); $("#PAGELINKS_SHARE_A").hide(); } function ResizeText(value) { if (value!=1 && value!=-1) { return; } if (value==1 && TextSize1>16) { return; } if (value==-1 && TextSize1<9) { return; } TextSize1 += value; TextSize2 += value; TextSize3 += value; TextSize4 += value; $('div.regtxtB1').css('font-size',TextSize1+'px'); $('div.smalltxtB1').css('font-size',TextSize2+'px'); $('div.bigtxtB2').css('font-size',TextSize3+'px'); $('div.headcell00').css('font-size',TextSize4+'px'); } function RenderAccommodation() { if (typeof document.AccommodationListForm === 'undefined') { return; } if (typeof document.AccommodationListForm.AccommodationDate === 'undefined') { return; } if (ACCDATA.length==0) { return; } var DateStr = document.AccommodationListForm.AccommodationDate.value; var HTMLDATA = ''; var AccCount = 0; for (var i=0; i'; HTMLDATA += ''; HTMLDATA += '
'; } else { HTMLDATA += '
'; } HTMLDATA += ''; for (var v=0; v'; HTMLDATA += ''; HTMLDATA += ''; HTMLDATA += ''; AccCount++; } HTMLDATA += '
'+System.HTMLDecode(ACCDATA[i][1][j][1][v][0])+'
'; HTMLDATA += System.FormatPrice(ACCDATA[i][1][j][1][v][1],Currency); HTMLDATA += ' на турист'; HTMLDATA += '
'; HTMLDATA += '
'; HTMLDATA += ''; HTMLDATA += ''; } } if (HTMLDATA.length==0) { HTMLDATA = 'Няма данни'; } $("#OFFER_ACCOMMODATION_DATA").empty().append(HTMLDATA); } function GenericItemOver(obj,id) { $(obj).css('cursor','pointer'); $("#ITEM_"+id+"_0").css('background','#F3F3F3'); } function GenericItemOut(obj,id) { $(obj).css('cursor',''); $("#ITEM_"+id+"_0").css('background',''); }