// detail.js version 0.95 - javascript library of PPSee generator.
// Copyright (C) 2003-2007 Pavel Ponec (ppsee2@gmail.com )
// Home Page: http://pponec.net/ppsee/index.htm

// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation version 2 of the License.
// Please read license-gpl.txt for the full details. A copy of the GPL may 
// be found at http://www.gnu.org/licenses/gpl.txt .
// -------------------------------------------------

// Enable / disable link to original picture:
var DETAIL_ENABLED = true;

// Path to original pictures:
var ORIGINAL_PATH = "../original/"; 

// Show new window with the originl picture:
function detail(name,x,y){
  var top=0, left=0;
  var sw=screen.width - 8;
  var sh=screen.height-30;
  x+=35; 
  y+=40; 
  if (x<sw) { left=(sw-x)/2; sw=x; }
  if (y<sh) { top =(sh-y)/2; sh=y; }
  newWindow = window.open(name,"DETAIL","scrollbars=yes,status=no,width="+sw+",height="
  +sh+",menubar=no,resizable=yes,directories=no,top="+top+",left="+left+",fullscreen_=yes");
}

// Write link to original picture:
function display(name,x,y,label){
  if (DETAIL_ENABLED) {
    if (label==null) label = 'detail';
    var img = ORIGINAL_PATH + name;
    var ref = '&nbsp;&nbsp;&nbsp;<a href=javascript:detail("'+img+'",'+x+','+y+')><i>'+label+'</i></a>';
    document.writeln(ref);
  }
}
// EOF