/* */ function ZoomPicture(PictureID, Language, Width, Height) { if ((Width/Height > 4/3 && Width > window.screen.availWidth - 35) || (Width/Height < 4/3 && Height > window.screen.availHeight - 150)) { NewWindowWidth = window.screen.availWidth - 20; NewWindowHeight = window.screen.availHeight - 150; } else { NewWindowWidth = Width + 50; NewWindowHeight = Height + 80; } NewWindowFeatures = "top=20,left=10,width="+NewWindowWidth+",height="+NewWindowHeight+",location=0,directories=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1"; var PictureZoom = window.open("http://www.therme-erding.de/generalpurpose/zoompicture.php?PictureID=" + PictureID + "&Language=" + Language, "PictureZoom", NewWindowFeatures); PictureZoom.focus(); } function ZoomGalleryPicture(GalleryPictureID, Language, Width, Height) { if ((Width/Height > 4/3 && Width > window.screen.availWidth - 35) || (Width/Height < 4/3 && Height > window.screen.availHeight - 150)) { NewWindowWidth = window.screen.availWidth - 20; NewWindowHeight = window.screen.availHeight - 150; } else { NewWindowWidth = Width + 50; NewWindowHeight = Height + 80; } NewWindowFeatures = "top=20,left=10,width="+NewWindowWidth+",height="+NewWindowHeight+",location=0,directories=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1"; var PictureZoom = window.open("http://www.therme-erding.de/generalpurpose/zoomgallerypicture.php?GalleryPictureID=" + GalleryPictureID + "&Language=" + Language, "PictureZoom", NewWindowFeatures); PictureZoom.focus(); } function SwapImage(ImageName, ImageFileName) { document.images[ImageName].src = ImageFileName; } function OpenURLInNewWindow(URL) { if (URL) { NewWindowWidth = (window.screen.availWidth - 20); NewWindowHeight = (window.screen.availHeight - 150); NewWindowFeatures = "top=20,left=10,width="+NewWindowWidth+",height="+NewWindowHeight+",location=1,directories=0,menubar=1,toolbar=1,status=1,scrollbars=1,resizable=1"; var NewWindow = window.open("http://www.therme-erding.de/index/referer.php?URL="+URL+"&S=", "PreviewWindow", NewWindowFeatures); NewWindow.focus(); } } function OpenURLInNewWindowSized(URL, NewWindowWidth, NewWindowHeight) { if (URL) { //NewWindowWidth = (window.screen.availWidth - 20); //NewWindowHeight = (window.screen.availHeight - 150); NewWindowFeatures = "top=20,left=10,width="+NewWindowWidth+",height="+NewWindowHeight+",location=1,directories=0,menubar=1,toolbar=1,status=1,scrollbars=1,resizable=1"; var NewWindow = window.open("http://www.therme-erding.de/index/referer.php?URL="+URL+"&S=", "PreviewWindow", NewWindowFeatures); NewWindow.focus(); } } function changeBox(box) { if(box.checked) { box.checked = false; } else { box.checked = true; } } var hoverLargeThumbs = new Object(); function getThumbnailData(picSource, maxWidth, maxHeight) { var dataReturn; picSource = String(picSource); if (hoverLargeThumbs[picSource] == undefined) { $.ajax({ url: '/ajax/ajax_pic_resizer.php', data: { picture: picSource, max_width: maxWidth, max_height: maxHeight }, success: function(data, textStatus){ if (data.path) { dataReturn = data; hoverLargeThumbs[picSource] = data; } }, type: "GET", dataType: 'json', async: false } ); } return hoverLargeThumbs[picSource]; } $().ready(function() { $('.hover-large').mouseenter(function(event) { if ($('img:first', this).length != 1) { return; } var picToHover = $($('img:first', this)[0]); if (!picToHover.attr('src').match(/thumbnail/i)) { return; } if ($('img#img-hover-large') == undefined) { return; } var picData = getThumbnailData(picToHover.attr('src'), 360, 380); newSource = picData.path; $('img#img-hover-large').attr('src', newSource).css({'top':event.pageY + 'px', 'left':event.pageX + 'px', 'position':'absolute', 'display':'block'}); event.stopPropagation(); }); $('.hover-large').mouseleave(function(event) { if ($('img#img-hover-large') == undefined) { return; } $('img#img-hover-large').attr({ 'src': "/image/transparentpixel.gif" }).css({'left':'-999999px', 'position':'absolute', 'display':'none'}); event.stopPropagation(); }); });