// -----------------------------------------
// (c)Written by Alex Y. Radzishevsky, 2004
// http://beam.to/aradzish, http://websound.ru
// ----------------------------------------
//
// this function gets a path to some image file
// + its description and opens new browser window with the image + description
// --> the function uses FLASH movie clip 
//

// init. variables
var wdth = Math.floor(screen.width*0.95);        // dimensions of the window with photo 
var hght = Math.floor(screen.height*0.9);
var wdth_navigator = Math.floor(wdth*0.96);           // dimensions of the Flash movieclip
var hght_navigator = Math.floor(hght*0.96);
  

// ----------------------------------------------------------
// Call this function! "what" - path to the image file
//                     "descr" - description (HTML-formatted)
// ----------------------------------------------------------
function ShowImage(what, descr) 
{
	// opening new window
	mywindow = window.open('http://radzishevsky.info/system/scripts/show_photo.php?file=../../'+what+'&descr='+descr+'&width='+wdth_navigator+'&height='+hght_navigator, '' ,'width='+wdth+', height='+hght+', left='+Math.round((screen.width-wdth)/2)+', top='+Math.round((screen.height-hght)/2 * 0.3)+', resizable=yes, menubar=no, status=no, scrollbars=yes, statusbar=no, toolbar=no');

	// placing the window
//	mywindow.moveTo( (screen.width-wdth)/2, (screen.height-hght)/2 * 0.3 );
}

