
var currentPhotoNum=0;var currentPids="";var currentLayoutPhotoNum=-1;var currentLayoutPids="";var photoPreloader=new ImagePreloader(photoLoaded,null);var elProductPhoto=null;var elProductPhotoOver=null;var opacityEffect=new OpacityFadeEffect(0.27);var nextImage=null;var fPhotoLoadBusy=false;var uriMedium=null;var uriInfoBox=null;var uriBig=null;var nextNameInfoBox=null;function articleEntryMouseOver(el){el.className="hover";}
function articleEntryMouseOut(el){el.className="";}
function showProductPhoto(elLink,num,filename,pids,layout){initProductImagePaths();if(elLink&&elLink.blur)
elLink.blur();if(currentPhotoNum==num||fPhotoLoadBusy)
return;fPhotoLoadBusy=true;var el=document.getElementById("a_tn_id_"+currentPhotoNum);if(el)
el.className="product_tn";el=document.getElementById("desc_tn_id_"+currentPhotoNum);if(el)
el.className="product_tn_desc";el=document.getElementById("a_tn_id_"+num);if(el){el.className="product_tn selected";}
el=document.getElementById("desc_tn_id_"+num);if(el)
el.className="product_tn_desc selected";hilightProductNamePid(currentPids,false);hilightProductNamePid(pids,true);currentPids=pids;currentPhotoNum=num;if(layout){elProductPhoto=document.getElementById("productlayoutphoto");elProductPhotoOver=document.getElementById("productlayoutphoto_over");photoPreloader.preload(uriInfoBox+filename);}else{elProductPhoto=document.getElementById("productphoto");elProductPhotoOver=document.getElementById("productphoto_over");nextNameInfoBox="";photoPreloader.preload(uriMedium+filename);}}
function showProductLayoutPhoto(elLink,num,filename,pids,numSelectedOnInit,name,fNoZoom){initProductImagePaths();if(elLink&&elLink.blur)
elLink.blur();var fZoom=false;if(currentLayoutPhotoNum==-1){currentLayoutPhotoNum=numSelectedOnInit;}
if(!document.getElementById("productlayoutphoto")){zoomPhotoNow(filename);return;}
if(currentLayoutPhotoNum==num&&!fNoZoom){zoomProductLayoutPhoto();return;}
if(currentLayoutPhotoNum==num||fPhotoLoadBusy)
return;fPhotoLoadBusy=true;var el=document.getElementById("a_tn_id_"+currentLayoutPhotoNum);if(el)
el.className="product_tn";el=document.getElementById("desc_tn_id_"+currentLayoutPhotoNum);if(el)
el.className="product_tn_desc";el=document.getElementById("a_tn_id_"+num);if(el){el.className="product_tn selected";}
el=document.getElementById("desc_tn_id_"+num);if(el)
el.className="product_tn_desc selected";hilightProductNamePid(currentLayoutPids,false);hilightProductNamePid(pids,true);currentLayoutPids=pids;currentLayoutPhotoNum=num;if(fZoom){zoomProductLayoutPhoto();}else{elProductPhoto=document.getElementById("productlayoutphoto");elProductPhotoOver=document.getElementById("productlayoutphoto_over");el=document.getElementById("infobox_hidden_layout");if(el&&!el.style.display){if(elProductPhotoOver.filters){elProductPhotoOver.filters.alpha.opacity="100";}else{elProductPhotoOver.style.opacity="1.0";}
elProductPhotoOver.style.visibility="visible";elProductPhotoOver.style.width=elProductPhoto.width+"px";elProductPhotoOver.style.height=elProductPhoto.height+"px";elProductPhotoOver=null;var descOverlay=document.createElement("div");descOverlay.id="productlayoutdescription_over";elDesc=document.getElementById("infobox_description");descOverlay.style.width=(elDesc.clientWidth||elDesc.offsetWidth)+"px";descOverlay.style.height=(elDesc.clientHeight||elDesc.offsetHeight)+"px";el=document.getElementById("infobox_layout_name");el.innerHTML=name;elDesc.appendChild(descOverlay);if(descOverlay.filters){descOverlay.filters.alpha.opacity="0";}else{descOverlay.style.opacity="0.0";}}
nextNameInfoBox=name;photoPreloader.preload(uriInfoBox+filename);}}
function hilightProductNamePid(pids,fSelected){if(!pids)
return;var tokens=pids.split(',');if(tokens.length){for(var i=0;i<tokens.length;i++){var el=document.getElementById("a_name_pid_"+tokens[i]);if(el)
el.className="a_name_pid"+(fSelected?" nameselected":"");}}}
function photoLoaded(fLoaded,image,data){nextImage=image;if(!elProductPhotoOver){var elDescOverlay=document.getElementById("productlayoutdescription_over");opacityEffect.startFadeEffect(elDescOverlay,null,false,photoFadedOut);return;}
if(elProductPhotoOver.filters){elProductPhotoOver.filters.alpha.opacity="0";}else{elProductPhotoOver.style.opacity="0.0";}
elProductPhotoOver.style.width=elProductPhotoOver.parentNode.clientWidth+"px";elProductPhotoOver.style.height=elProductPhotoOver.parentNode.clientHeight+"px";elProductPhotoOver.style.visibility="visible";opacityEffect.startFadeEffect(elProductPhotoOver,null,false,photoFadedOut);}
function photoFadedOut(){if(!elProductPhotoOver){setElementsByIdsDisplayNone("infobox_description");setElementsByIdsDisplayBlock("infobox_hidden_layout");elProductPhotoOver=document.getElementById("productlayoutphoto_over");}
elProductPhoto.src=nextImage.src;elProductPhoto.width=nextImage.width;elProductPhoto.height=nextImage.height;elProductPhotoOver.style.width=elProductPhotoOver.parentNode.clientWidth+"px";elProductPhotoOver.style.height=elProductPhotoOver.parentNode.clientHeight+"px";opacityEffect.startFadeEffect(elProductPhotoOver,null,true,photoFadedIn);}
function photoFadedIn(){if(nextNameInfoBox){var el=document.getElementById("infobox_layout_name");if(el){el.innerHTML=nextNameInfoBox;setElementsByIdsVisible("infobox_layout_name");nextNameInfoBox="";}}
fPhotoLoadBusy=false;elProductPhotoOver.style.visibility="hidden";}
var currentProductTab=null;var currentProductTabDivContent=null;function selectProductInfoTab(el,name){if(el.parentNode.className!="current"){if(currentProductTab==null){currentProductTab=document.getElementById("productinfo_tab_desc");currentProductTabDivContent=document.getElementById("product_desc");}
currentProductTab.className="";var cyParent=currentProductTabDivContent.parentNode.clientHeight||currentProductTabDivContent.parentNode.offsetHeight;var cy=currentProductTabDivContent.clientHeight;currentProductTabDivContent.parentNode.style.height=cyParent+"px";currentProductTabDivContent.style.display="none";el.parentNode.className="current";currentProductTab=el.parentNode;currentProductTabDivContent=document.getElementById("product_"+name);currentProductTabDivContent.style.display="block";var curHeight=currentProductTabDivContent.clientHeight||currentProductTabDivContent.offsetHeight;if(curHeight>cyParent){currentProductTabDivContent.parentNode.style.height=curHeight+"px";}}}
var currentThumbnailPage=1;function setThumbnailPage(el,page){if(el.blur)
el.blur();if(page!=currentThumbnailPage){var elButton=document.getElementById("product_tn_page_button_"+currentThumbnailPage);elButton.className="";setElementsByIdsDisplayNone("product_tn_page_"+currentThumbnailPage);currentThumbnailPage=page;resetElementsByIdsDisplay("product_tn_page_"+currentThumbnailPage);el.parentNode.className="currentpage";}}
function showNextThumbnailPage(){var el=document.getElementById("product_tn_page_"+(currentThumbnailPage+1));if(el){setElementsByIdsDisplayNone("product_tn_page_"+currentThumbnailPage);currentThumbnailPage++;resetElementsByIdsDisplay("product_tn_page_"+currentThumbnailPage);if(!document.getElementById("product_tn_page_"+(currentThumbnailPage+1))){setElementsByIdsHidden("product_tn_next");}
setElementsByIdsVisible("product_tn_prev");}}
function showPreviousThumbnailPage(){var el=document.getElementById("product_tn_page_"+(currentThumbnailPage-1));if(el){setElementsByIdsDisplayNone("product_tn_page_"+currentThumbnailPage);currentThumbnailPage--;resetElementsByIdsDisplay("product_tn_page_"+currentThumbnailPage);if(!document.getElementById("product_tn_page_"+(currentThumbnailPage-1))){setElementsByIdsHidden("product_tn_prev");}
setElementsByIdsVisible("product_tn_next");}}
function showLines(num){setElementsByIdsDisplayBlock("lines_"+num);setElementsByIdsDisplayNone("show_lines_"+num);}
function zoomProductPhoto(){zoomPhoto(document.getElementById("productphoto"));}
function zoomProductLayoutPhoto(){zoomPhoto(document.getElementById("productlayoutphoto"));}
function zoomPhoto(elPhoto){initProductImagePaths();var filename="";for(var i=elPhoto.src.length-1;i>0;i--){if(elPhoto.src.charAt(i)=='/'){filename=elPhoto.src.substring(i+1,elPhoto.src.length);break;}}
zoomProductOnMouseOut();zoomProductLayoutOnMouseOut();zoomPhotoNow(filename);}
function zoomPhotoNow(filename){if(!gpgembd){gpgembd=new EmbdPG();gpgembd.setCloseButtonAtTop(true);gpgembd.setPNGCloseButton(true,-35,-5);gpgembd.setBorderWidth(15);}
gpgembd.loadEmbeddedPhotoGallery(900,700,0,uriBig,filename);}
function zoomProductOnMouseOver(){var el=document.getElementById("zoomicon");var elPhoto=document.getElementById("productphoto");el.style.display="block";el.style.left=(elPhoto.offsetLeft+((elPhoto.width-42)/2))+"px";el.style.marginTop=((elPhoto.height-50)/2)+"px";}
function zoomProductOnMouseOut(){setElementsByIdsDisplayNone("zoomicon");}
function zoomProductLayoutOnMouseOver(){var el=document.getElementById("zoomicon_layout");var elPhoto=document.getElementById("productlayoutphoto");el.style.display="block";el.style.left=(elPhoto.offsetLeft+((elPhoto.width-42)/2))+"px";el.style.marginTop=((elPhoto.height-50)/2)+"px";}
function zoomProductLayoutOnMouseOut(){setElementsByIdsDisplayNone("zoomicon_layout");}
var presentationwnd='';function openPresentationWindow(){presentationwnd=openWindow(720,576,"/om/presentation",presentationwnd,"presentationwnd",true,"0","1");}
