// js functions required for pv-gallery page function photo_selectThumb(thumbIndex) { if (thumbIndex==photo_currentThumb) return; // unselect current thumb var thumbObj = document.getElementById("photothumb"+photo_currentThumb); thumbObj.style.border="1px solid #ebebeb"; // set as new current photo_currentThumb = thumbIndex; thumbObj = document.getElementById("photothumb"+photo_currentThumb); thumbObj.style.border="1px solid red"; photo_showImage(photo_currentThumb); } function photo_next() { var newThumb = photo_currentThumb; newThumb = newThumb % photo_totalThumbs; newThumb = newThumb + 1; photo_selectThumb(newThumb); } function photo_previous() { var newThumb = photo_currentThumb; newThumb = newThumb - 1; if (newThumb==0) newThumb = photo_totalThumbs; photo_selectThumb(newThumb); } function photo_showImage(thumbIndex) { var thumbObj = document.getElementById("photothumb"+thumbIndex); var textObj = document.getElementById("phototext"); var imageObj = document.getElementById("photoimg"); textObj.innerHTML = thumbObj.getAttribute("text"); imageObj.src = thumbObj.getAttribute("image"); imageObj.alt = thumbObj.getAttribute("imagealt"); } function photo_showLarge() { var thumbObj = document.getElementById("photothumb"+photo_currentThumb); popWindow("gallery-popup.php?image="+thumbObj.getAttribute("limage")+"&alt="+thumbObj.getAttribute("limagealt"),"ImagePopup",630,475,2,0,1); } function popVideo(file) { popWindow(file,"nissanvideo",320,340,0,0,1); } function popFlash(name,file) { popWindow(file,"nissanflash",460,470,0,0,1); } function popDownload(file) { var content=""; content=""; content+="\n"; content+="
\n"; content+="\n"; content+="\n"; content+="\n"; content+="\n"; var _parms = 'directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes,left=25,top=32,screenx=25,screeny=32,width=600,height=350'; myWindowHandle=window.open("","",_parms); myWindowHandle.document.open(); myWindowHandle.document.write(content); myWindowHandle.document.close(); myWindowHandle.focus(); }