// config

// fade background
var fade2black = document.createElement("div");
fade2black.id = "fade2black";
fade2black.style.position = "fixed";
fade2black.style.zIndex = "300";
fade2black.style.display = "none";
fade2black.style.top = "0px";
fade2black.style.left = "0px";
fade2black.style.height = "100%";
fade2black.style.width = "100%";
fade2black.style.backgroundColor = "#5A5A5C";
fade2black.style.opacity = "0";
fade2black.style.filter = "alpha(opacity=0)";

// innner div
var blocker = document.createElement("div");
blocker.id = "blocker";
blocker.align = "center"
blocker.style.position = "absolute";
blocker.style.zIndex = "301";
blocker.style.height = "100%";
blocker.style.width = "100%";
blocker.style.top = "0px";
blocker.style.left = "0px";
blocker.style.display = "none";

// inner html
var ihtml = "";
ihtml += '<table cellpadding="0" cellspacing="0" border="0" style="margin-top:{margin_top}px;">';
ihtml += '	<tr>';
ihtml += '		<td valign="top"><br><br>{prev}</td>';
ihtml += '		<td>';

// ihtml += '<table id="popup2show" class="{innerCSSclass}" cellpadding="0" cellspacing="0" border="0" style="margin-top:{margin_top}px; background-color:#FFFFFF;">';
ihtml += '<table id="popup2show" class="{innerCSSclass}" cellpadding="0" cellspacing="0" border="0" style="background-color:#FFFFFF;">';
ihtml += '	<tr>';
ihtml += '		<td style="padding:10px;">';
ihtml += '			<div align="right"><div style="position:relative; margin-top:-25px; margin-right:-15px;"><img src="/VAImageBox/close.png" alt="{text_Close}" title="{text_Close}" style="cursor:pointer;border:0px;" type="image" onClick="close_gallery(); return false;"></div></div><br>';
ihtml += '			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="{innerCSSclass}">';
ihtml += '				<tr>';
ihtml += '					<td align="center" style="background-image:url({loading_image}); background-position:center center; background-repeat:no-repeat; width:100px; height:100px;" id="gallery_image_box"><img src="{path_image}" border="0" id="gallery_image" title="{title}" style="display:none;"></td>';
ihtml += '				</tr>';
ihtml += 			'</table>';
ihtml += 			'<br>';
//ihtml += '			<br><a href="{imgurl}" target="_blank" alt="{imgname}">{imgname} mit Originalgr&ouml;&szlig;e anzeigen</a><br><br>';
/*
ihtml += '			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="{innerCSSclass}">';
ihtml += '				<tr>';
// ihtml += '					<td width="33%" align="left">&nbsp;{prev}</td>';
ihtml += '					<td width="34%" align="center">{galinfo}</td>';
// ihtml += '					<td align="right" width="33%">{next}</td>';
ihtml += '				</tr>';
ihtml += '			</table>';
*/
ihtml += '			<div align="center">{preview_images}</div>';
ihtml += '		</td>';
ihtml += '	</tr>';
ihtml += '</table>';

ihtml += '		</td>';
ihtml += '		<td valign="top"><br><br>{next}</td>';
ihtml += '	</tr>';

// other stuff
var path_thumbnail			= "/showImage.php?src={image}&w=190&h=190" // {image} will be replaced with the path
var path_image				= "/showImage.php?src={image}&w={image_width}&h={image_height}" // {image} will be replaced with the path
var image_width				= 500; // [numeric | (string) auto]
var image_height			= 500; // [numeric | (string) auto]
var innerCSSclass			= "VAGalleryBox";
var loading_image			= "/VAImageBox/loading.gif"
var text_Weiter				= "n&auml;chstes Bild &gt;";
var text_Zurueck			= "&lt; vorheriges Bild";
var text_Bild				= "Bild";
var text_von				= "von";
var text_Close				= "Schlie&szlig;en";
var margin_top				= 50; // px
var bg_opacity				= 60; // background opacity
var fade_duration			= 200; // ms
var fade_steps				= 15;
var preview_images_in_box	= 0;// [numeric | false] | (numeric * 2) + 1
// var path_preview_image		= "/showImage.php?src={image}&w={preview_img_width}&h={preview_img_height}" // {image} will be replaced with the path
var path_preview_image		= "/showImage.php?src={image}&w=85&h=64&cut2size=1" // {image} will be replaced with the path
var preview_img_width		= 0;
var preview_img_height		= 75;
var base_href				= "/"; // !important! absolute path to root dir without hostname. for example: "/website/"

//test function if config is included
function galleryConfigIncluded() { return true; }
