////////////////////////////////////////////////////////////////////////////////
//
// Zoom Window (Pop-Up) system written by Piotr Pytlik
//
// Opening an IMAGE url will automatically resize the window to match image size
//  (unless opts parameter overrides it). For non-image urls, opts must specify
//  the size or else a default of 640 x 480 will be used. Position is 50, 50 or
//  as specified by opts parameter which can also override any other attributes.
// Pop-up window will be automatically closed when another attempt to Zoom is
//  made from a page or when the main page is activated (receives focus).
//
// Copyright © 2002-2007, Double P Software, All Rights Reserved.
//
// Written permission/license agreement has to be granted by Double P Software
// before you can use this Zoom System, it is not a freeware or shareware.
//
// If you'd like to license it to use on your own site then, please contact us
// at http://www.DoubleP.com/ContactUs.asp?To=CSm or visit Product's Home Page
// at http://www.doublep.com/Products/PpJs_Zoom
// Licensed copy includes a complete documentation and several examples.
//
//   WHEN   VER WHO/WHAT/WHERE/WHY
// ======== === ================================================================
// 20030510 1.0 Created initially for http://www.ezPressRoom.net to show images.
// 20030826 2.0 Support Zooming of any page (not just images) with specific size
// 20070531	3.0	Fixed a problem on Vista with attempt at closing a closed window
////////////////////////////////////////////////////////////////////////////////
																																												var ppZoomImage=null;var wZoomImage=null;function ppZoom(src,opts){if(src.match(/\.(jpe?g|gif)$/i)){ppZoomImage=new Image();ppZoomImage.src=src;ppWait4ZoomImage(src,opts)}else ppViewZoom(src,opts);return false}function ppWait4ZoomImage(src,opts){if(ppZoomImage.width!=0&&ppZoomImage.height!=0)ppViewZoom(src,"width="+(ppZoomImage.width+20)+","+"height="+(ppZoomImage.height+20)+(opts?","+opts:''));else setTimeout("ppWait4ZoomImage('"+src+"','"+(opts||'')+"')",20)}function ppViewZoom(src,opts){if(!opts)opts="";ppCloseZoom();var ao=opts.split(/,/),ho={left:50,top:50,width:640,height:480};for(var i=0;i<ao.length;i++){var kv=ao[i].split(/=/);ho[kv[0]]=kv[1]}opts='';for(var k in ho){if(opts)opts+=',';opts+=k+'='+ho[k]}wZoomImage=window.open(src,"ppZoomImage",opts)}function ppCloseZoom(){if(wZoomImage)try{wZoomImage.close();wZoomImage=null}catch(e){}}document.onfocusin=ppCloseZoom;