// ADDED THE PDF STUFF TO CMS POPUP function cmsPopup (type, id, caption) { var w, h, t, l; l = 0; w = 800; h = 550; if (type == "mp3") { w = 150; h = 55; l = 50; } caption = unescape(caption); caption = escape(caption); var toolbar = 'toolbar=yes,'; if (type == 'image') toolbar = 'toolbar=no,'; var browser=navigator.appName if (type == 'pdf') { // IS THIS IE if (browser.indexOf('Explorer') != -1) { // OPEN WINDOW DIRECTLY TO THE PDF pdfWindow=window.open('http://www.photowings.org/pages/pdf/' + id, 'iepdf', 'scrollbars=yes,' + 'resizable=yes,' + toolbar + 'width=' + w + ',' + 'height=' + h + ',' + 'top=85,' + 'left=' + l); secondWindow.focus(); } else { w = 150; h = 55; l = 50; secondWindow=window.open('http://www.photowings.org/pages/popup.php?type='+ type + '&id=' + id + '&caption=' + caption, type, 'scrollbars=yes,' + 'resizable=yes,' + toolbar + 'width=' + w + ',' + 'height=' + h + ',' + 'top=85,' + 'left=' + l); secondWindow.focus(); self.setTimeout('secondWindow.close()', 7000); } } else if (type == 'link') { id = escape(id); secondWindow=window.open('http://www.photowings.org/pages/popup.php?type='+ type + '&id=' + id + '&caption=' + caption, type, 'scrollbars=yes,' + 'resizable=yes,' + toolbar + 'width=' + w + ',' + 'height=' + h + ',' + 'top=85,' + 'left=' + l); secondWindow.focus(); } else { secondWindow=window.open('http://www.photowings.org/pages/popup.php?type='+ type + '&id=' + id + '&caption=' + caption, type, 'scrollbars=yes,' + 'resizable=yes,' + toolbar + 'width=' + w + ',' + 'height=' + h + ',' + 'top=85,' + 'left=' + l); secondWindow.focus(); } }