var a;
var b = null;

function mypopup(directorypfad,picturename) {
	b = a;
	a = window.open('',"popup" + Math.floor(100000*Math.random()+1),"resizable=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,toolbar=0,width=350,height=350");
	a.document.write('<html>\n');
	a.document.write('<head>\n');
	a.document.write('	<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">\n');
	a.document.write('	<title>www.hans-blues.com</title>\n');
	a.document.write(' <link rel="stylesheet" href="../blues.css" type="text/css">\n');
	a.document.write(' <script language="javascript">\n');
	a.document.write(' var c = 0;\n');
	a.document.write(' function changePic(){\n');
	a.document.write('  if(c == 0) {');
	a.document.write(' 		document.getElementById("mypic").src="../img/'+directorypfad+'/'+picturename+'bs.jpg";\n');
	a.document.write(' 		c = 1;\n');
	a.document.write(' 	}else if(c == 1){\n');
	a.document.write(' 		document.getElementById("mypic").src="../img/'+directorypfad+'/'+picturename+'.jpg";\n');
	a.document.write(' 		c = 0;\n');
	a.document.write(' }}');
	a.document.write(' </script>\n');
	a.document.write('</head>\n');
	a.document.write('<body bgcolor="#DAC17E" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">\n');
	a.document.write(' <center>');
	a.document.write('	<table border="0" cellpadding="0" cellspacing="0">\n');
	a.document.write('		<tr>\n<td style="padding-top:5px;">\n');
	a.document.write('	<img src="../img/' + directorypfad + '/' + picturename + '.jpg"  id="mypic" border="0">');
	a.document.write('	<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><a href="#" onClick="changePic();">switch front/backside</a></td><td align="right" class="text"><a href="javascript:window.close();" class="text">close</a><td></td></tr></table>');
	a.document.write('</td>\n</tr>\n</table></center>\n');
	a.document.write('</body>\n');
	a.document.write('</html>\n');
	if( b != null) {
		b.window.close();
	}
}
