
var Infopage={init:function(firmsCnt,annsCnt){JsCore.$('countAllFirm').innerHTML=firmsCnt;JsCore.$('countAllAnnouncement').innerHTML=annsCnt;},showGallery:function(positionImage){JsCore.$('currentPhotoNumber').value=positionImage;var thumbnailSrc=JsCore.$('photo_'+positionImage).src;thumbnailSrc=thumbnailSrc.replace('maxX=108','maxX=350');thumbnailSrc=thumbnailSrc.replace('maxY=144','maxY=350');JsCore.$('currentPhotoViewer').src=thumbnailSrc;JsCore.$('commentPhoto').innerHTML=JsCore.$('p_comment_'+positionImage).value;this.controllGalleryPager(positionImage);JsCore.$('gallery_popup').style.display='block';},controllGalleryPager:function(positionImage){var countPhoto=JsCore.$('countPhoto').value;if(countPhoto!=0){if(positionImage==1){JsCore.removeClassName('prevPhoto','prev');JsCore.addClassName('prevPhoto','prev_inactive');}
if(positionImage==countPhoto){JsCore.removeClassName('nextPhoto','next');JsCore.addClassName('nextPhoto','next_inactive');}
if(positionImage!=1&&positionImage!=countPhoto){if(JsCore.hasClassName('nextPhoto','next_inactive')){JsCore.removeClassName('nextPhoto','next_inactive');JsCore.addClassName('nextPhoto','next');}
if(JsCore.hasClassName('prevPhoto','prev_inactive')){JsCore.removeClassName('prevPhoto','prev_inactive');JsCore.addClassName('prevPhoto','prev');}}
for(var i=1;i<=countPhoto;i++){if(JsCore.hasClassName('pagerPhoto_'+i,'active')){JsCore.removeClassName('pagerPhoto_'+i,'active');}}
JsCore.addClassName('pagerPhoto_'+positionImage,'active');}},navigationGallery:function(typeNav){var position=0;var currentNumber=parseInt(JsCore.$('currentPhotoNumber').value);var countPhoto=JsCore.$('countPhoto').value;if(currentNumber!=0&&countPhoto!=0){if(typeNav=='next'){if(currentNumber<countPhoto){position=currentNumber+1;this.showGallery(position);}}else if(typeNav=='prev'){if(currentNumber>1){position=currentNumber-1;this.showGallery(position);}}}},showDivGallery:function(){$('top').scrollTo();},showRubrics:function(){var currentClass=JsCore.$("ip_rubr_btn").className;if(currentClass=="ip_rubr_more"){JsCore.$("infoRubrics").style.display="block";JsCore.removeClassName('ip_rubr_btn','ip_rubr_more');JsCore.addClassName('ip_rubr_btn','ip_rubr_less');}else{JsCore.$("infoRubrics").style.display="none";JsCore.addClassName('ip_rubr_btn','ip_rubr_more');JsCore.removeClassName('ip_rubr_btn','ip_rubr_less');}},initFlowplayer:function(videoId,path,width,height){flashembed("video_"+videoId,{src:'/video/flowplayer/FlowPlayerLight.swf',width:width,height:height,bgcolor:'#ffffff'},{config:{autoPlay:false,videoFile:path,initialScale:'scale',useNativeFullScreen:true,autoBuffering:false}});}};

