// popup on-the-fly

function showPopup(LANG,IMG,HEADER,TITLE,CHAR) {
popimage = window.open("","picture","left=10,top=10,width=594,height=577,resizable=no,scrollbars=no,status=no,menubar=no,location=no,toolbar=0");
if (LANG=='jp') {
HEADER=HEADER.replace(/cc/g,'&#');
}
	if(popimage) {
		ndoc = popimage.document;
		var contentPopup = "";			
		contentPopup += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n';
		contentPopup += '<html>\n';
		contentPopup += '<head>\n';
		contentPopup += '<title>' + TITLE + '</title>\n';
		contentPopup += '<meta http-equiv="content-type" content="text/html; charset=' + CHAR + '">\n';
		contentPopup += '<meta http-equiv="pragma" content="no-cache">\n';
		contentPopup += '<meta http-equiv="expires" content="0">\n';
		if (LANG=='jp') {
		contentPopup += '<link rel="stylesheet" type="text/css" href="/_common/css/styles_jp_utf8.css">\n';
		}
		else {
		contentPopup += '<link rel="stylesheet" type="text/css" href="/_common/css/styles.css">\n';
		}
		contentPopup += '<style type="text/css">\n';
		contentPopup += '	div.headlinePopup { margin-top:25px; margin-bottom:10px; width:594px;}\n';
		contentPopup += '	div.imagePopup { width:594px; height:477px;}\n';
		contentPopup += '	div.lineblack { line-height:1px; font-size:1px; background-color:#000000; width:594px;}\n';
		contentPopup += '	IMG.middle { vertical-align: middle}\n';
		contentPopup += '</style>\n';
		contentPopup += '</head>\n';
		contentPopup += '<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="self.focus();">\n';
		contentPopup += '<div align="center" class="headlinePopup"><span class="text11px333333b">' + HEADER + '</span></div>\n';
		contentPopup += '<div class="lineblack">&nbsp;</div>\n';
		contentPopup += '<div align="center" class="imagePopup"><table height="477" cellpadding=0 cellspacing=0><tr><td><img src="' + IMG + '" alt="" border="0" class="middle" /></td></tr></table></div>\n';
		contentPopup += '<div class="lineblack">&nbsp;</div>\n';
		contentPopup += '<br><img src="/_common/img/trans.gif" width="1" height="14" alt="" border="0" />\n';
		contentPopup += '</body>\n';
		contentPopup += '</html>\n';
		//ndoc.innerHtml = contentPopup;
		ndoc.open();
		ndoc.write(contentPopup);
		ndoc.close();
	} else
	{
		//Popup blockiert, evtl. einen Hinweis einblenden
	}
}

// ruft Standardpopup oder popup on-the-fly auf
function showImage(URL,IMG,LANG,HEADER,TITLE,CHAR) {
	// keine URL vorhanden dann wird Popup on-the-fly generiert
	if (URL=='') {
	showPopup(LANG,IMG,HEADER,TITLE,CHAR);
	}
	else {
	// ansonsten Standardpopup mit URL-Übergabe
	popup_detail(URL);
	}
}
