var galleryBox;var _CurrentGallery=null;var _browser=navigator.userAgent;var isSafari=_browser.indexOf("Safari")>-1?true:false;var isMac=_browser.indexOf("Macintosh")>-1?true:false;var isIE=document.defaultView?false:true;var pcFF=isMac==false?isIE?false:true:false;var safariINITG=false;var ffPos=null;var IEvers=isIE?Number(_browser.substring(_browser.indexOf("MSIE ")+4,_browser.indexOf("MSIE ")+8)):null;var IE7=isIE?IEvers>6?true:false:false;isSafari?pcFF=true:null;var smH=0;function $$(a){return(document.getElementById(a))}function SetSummary(b){smElem=$$("GALLERY-SUMMARY");if(pcFF==false){smElem.style.visibility="hidden"}if(b!=null){var a=b}else{var a=null}b=="null"?a=null:null;if(a!=null){smElem.innerHTML="";smElem.style.display="block";smElem.innerHTML=a;smElem.style.visibility="visible";smH=smElem.offsetHeight}else{smElem.style.display="none";if(pcFF==false){smElem.style.visibility="hidden"}smH=0}}function ViewGallery(f){_CurrentGallery=f;boxElem=$$("GALLERY-VIEWER");frElem=$$("GALLERY-FRAME");smElem=$$("GALLERY-SUMMARY");boxElem.style.visibility="hidden";boxElem.style.display="block";if(pcFF==false){boxElem.style.width="602px";boxElem.style.height="464px";galleryBox=new BlakBox(boxElem);boxElem.style.visibility="hidden";smElem.style.visibility="hidden";galleryBox.Blak(GBoxCallBack)}else{var c=$$("GALLERY-TOP");var b=$$("GALLERY-BTM");$$("GALLERY-TOP").style.display="block";$$("GALLERY-BTM").style.display="block";frElem.style.position="absolute";frElem.style.width=$clientWidth()+"px";frElem.style.height=window.innerHeight+"px";frElem.style.top=$scrollTop()+"px";frElem.style.left=$scrollLeft()+"px";if(smElem.innerHTML!=""){smH=smElem.offsetHeight}else{smH=0}var a=window.frames["GALLERY-FRAME"].document.getElementById("VIDEO-HOLDER");a.style.position="absolute";var d=Number($clientWidth())-602;var e=Number($clientHeight())-464;a.style.top=Math.floor(e/2)+"px";a.style.left=Math.floor(d/2)+"px";c.style.position="fixed";c.style.top=(Math.floor(e/2)-6)+"px";c.style.left=Math.floor(d/2)+"px";smElem.style.position="fixed";smElem.style.top=(Math.floor(e/2)+464)+"px";smElem.style.left=Math.floor(d/2)+"px";b.style.position="fixed";b.style.top=(Math.floor(e/2)+(464+smH))+"px";b.style.left=Math.floor(d/2)+"px";window.frames["GALLERY-FRAME"].DrawFlash(_CurrentGallery);boxElem.style.visibility="visible";frElem.style.visibility="visible";frElem.style.display="block";frElem.style.zIndex=2030;ffPos=setInterval(function(){frElem.style.width=$clientWidth()+"px";frElem.style.height=window.innerHeight+"px";frElem.style.top=$scrollTop()+"px";frElem.style.left=$scrollLeft()+"px";var g=Number($clientWidth())-602;var h=Number($clientHeight())-464;a.style.top=Math.floor(h/2)+"px";a.style.left=Math.floor(g/2)+"px";c.style.top=(Math.floor(h/2)-6)+"px";c.style.left=Math.floor(g/2)+"px";smElem.style.top=(Math.floor(h/2)+464)+"px";smElem.style.left=Math.floor(g/2)+"px";b.style.top=(Math.floor(h/2)+(464+smH))+"px";b.style.left=Math.floor(g/2)+"px"},20)}}function GBoxCallBack(){boxElem=$$("GALLERY-VIEWER");frElem=$$("GALLERY-FRAME");smElem=$$("GALLERY-SUMMARY");if(isIE==false){if(isSafari==true){if(safariINITG==false){safariINITG=true;window.frames["GALLERY-FRAME"].DrawFlash(_CurrentGallery)}else{frElem.src="ImageGallery.html"}}else{if(isMac==true){window.frames["GALLERY-FRAME"].DrawFlash(_CurrentGallery)}}boxElem.style.visibility="visible";smElem.style.visibility="visible";var a=window.frames["GALLERY-FRAME"].document.getElementById("BOD");a.className="NoBody"}else{frames["GALLERY-FRAME"].location.href="ImageGallery.html";boxElem.style.visibility="visible";smElem.style.visibility="visible"}}function CloseGallery(){_CurrentGallery=null;if(pcFF==false){if(isIE==true){frames["GALLERY-FRAME"].location.href="Blank.html"}galleryBox.Close()}else{clearInterval(ffPos);$$("GALLERY-FRAME").style.visibility="hidden";$$("GALLERY-VIEWER").style.visibility="hidden";$$("GALLERY-TOP").style.display="none";$$("GALLERY-BTM").style.display="none";window.frames["GALLERY-FRAME"].location.href="ImageGallery.html"}};
