function myPop(type, objName, _id, title, popWidth, popHeight, lang)	{
	var newLeft = (screen.availWidth-popWidth)/2;
	var newTop =  20; //(screen.availHeight-popHeight)/2-20;
	if ( type == "design") {
		dynaPop = window.open('imgview.php?id='+_id , 'dynaPopup' , 'width='+popWidth+',height='+popHeight+',left='+newLeft+',top='+newTop+',resizable=0, scrollbars=no');	
	} else {
		dynaPop = window.open('', 'dynaPopup' , 'width='+popWidth+',height='+popHeight+',left='+newLeft+',top='+newTop+',resizable=0, scrollbars=no, statusbar=no, status=no');	
		dynaPop.document.open();		
		dynaPop.document.write('<html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-2"><meta http-equiv="imagetoolbar" content="no"><title>'+title+'</title><script language="javascript">window.focus();</script></head><body bgcolor="#ffffff" text="#000000" link="#000000" alink="#000000" vlink="#000000" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
		dynaPop.document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" bgcolor="#ffffff"><tr><td align="center" valign="middle"><table border="0" cellpadding="0" cellspacing="0" width="'+popWidth+'" height="'+popHeight+'"><tr><td align="center" valign="middle">');
		if (type == "swf") {
			dynaPop.document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+popWidth+'" height="'+popHeight+'" id="virtual" align="middle">');
			dynaPop.document.write('<param name="movie" value="swf/'+objName+'.swf?lang='+lang+'">');
			dynaPop.document.write('<param name="menu" value="false"><param name="quality" value="high"><param name="scale" value="noscale"><param name="bgcolor" value="#ffffff">');
			dynaPop.document.write('<embed src="swf/'+objName+'.swf?lang='+lang+'" menu="false" quality="high" scale="noscale" bgcolor="#ffffff" width="'+popWidth+'" height="'+popHeight+'" name="virtual" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
			dynaPop.document.write('</object>');
		} else if (type == "img") {
			dynaPop.document.write('<img src="'+objName+' alt='+title+'">');
		} 
			dynaPop.document.write('</td></tr></table></td></tr></table>');
			dynaPop.document.write('</body></html>');
			dynaPop.document.close();
	}
	return false;
	dynaPop.focus();
}

function imgViewPopup(_id)
{
	window.open('imgview.php?id=' + _id, 'moroImgView', 'width=820,height=700,resizable=0,scrollbars=0');
	return false;
}

function simpleDesign(objName)	{
	popWidth = 500;
	popHeight = 600;
	var newLeft = (screen.availWidth-popWidth)/2;
	var newTop = (screen.availHeight-popHeight)/2-20;
		dynaPop = window.open('', 'dynaPopup' , 'width='+popWidth+',height='+popHeight+',left='+newLeft+',top='+newTop+',resizable=0, scrollbars=no');	
		dynaPop.document.open();
		dynaPop.document.write('<html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-2"><meta http-equiv="imagetoolbar" content="no"><link rel="StyleSheet" href="css/style.css" type="text/css"><script language="javascript">window.focus();</script></head><body bgcolor="#ffffff" text="#000000" link="#000000" alink="#000000" vlink="#000000" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
		dynaPop.document.write('<table border="0" cellpadding="0" cellspacing="0" width="500" height="600" style="table-layout:fixed"><tr><td height="600" valign="middle" align="center"><table border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="#C9C6BF" style="padding:2px">');
		dynaPop.document.write('<img src="'+objName+'"');
		dynaPop.document.write('alt="" border="0" style="border: 3px solid #ffffff"></td></tr></table></td></tr></table>');
		dynaPop.document.write('</body></html>');
		dynaPop.document.close();

	return false;
	dynaPop.focus();
}

