var blShown = false;
function showArrow (strName) {
	if (strName) {
		var obj = document.images[strName];
		if (typeof(obj) == 'object') {
			if (blShown) {
				obj.src = 'images/trans.gif'
				obj.width  = 7;
				obj.height = 1;
			} else {
				obj.src    = 'images/nav_arrow.gif';
				obj.width  = 7;
				obj.height = 11;
			}
			blShown = !blShown;
		}
	}
}

var new_win;
function openMyWindow(file_path, pgtitle, pglink){
	if (typeof(new_win) == 'object') { new_win.close(); }
	new_win = window.open('', '', "toolbar=no,status=no,scrollbars=no,resizable=yes,width=300,height=300");
	new_win.document.write('<html><head><meta http-equiv="Content-type"   Content="text/html;  charset=windows-1250"><title>' +(pgtitle ? pgtitle : 'Detail obrázku / Image detail') +'</title>\n');
	new_win.document.write('<script>\n');
	new_win.document.write('function resizeWindow(){\n');
	new_win.document.write('	this.window.resizeTo(document.images[\'img\'].width+10, document.images[\'img\'].height+30);\n');
	new_win.document.write('}\n');
	new_win.document.write('function openImageLink(pglink){\n');
	new_win.document.write('	window.opener.location = pglink;\n');
	//new_win.document.write('	window.close();');
	new_win.document.write('}\n');
	new_win.document.write('</script>\n');
	new_win.document.write('</head><body marginwidth="0" marginheight="0" onload="resizeWindow();" onresize="resizeWindow();" topmargin="0" leftmargin="0">\n');
	new_win.document.write('<a href="' +(pglink ? 'javascript:openImageLink(\'' +pglink +'\');' : 'javascript:window.close();') +'"><img name="img" src="' +file_path +'" border="0" alt="' +(pglink ? '' : 'klepnutím okno zavřete') +'"></a></div></body></html>\n');
	new_win.document.close();
	new_win.focus();
}

var w_win;
function openWindow(pgparam){
	if (typeof(w_win) == 'object') { w_win.close(); }
	w_win = window.open('customers_details.asp?custid=' +pgparam, 'w_cust', "toolbar=no,status=no,scrollbars=no,resizable=yes,width=491,height=345");
	w_win.focus();
}