function PopupWindowDet(id, title, print, w, h) { 
    var div = document.getElementById(id);
    if(!div) return false;
	if(window.location.href.indexOf('web')>=0) {
		r = '../../';
	}
	else {
		r = '../';
	}
		
    msg = open("","View","width=" + (w>0 ? w : 590) + ",height=" + (h>0 ? h : 350) + ",menubar=0,scrollbars=1,resizable=1");
    msg.document.write('<html><head><title>'+title+'</title><link href="'+r+'custom/css/design.css" rel="stylesheet" type="text/css" /><link href="'+r+'custom/css/custom.css" rel="stylesheet" type="text/css" />');
    msg.document.write('<link href="'+r+'custom/css/global.css" rel="stylesheet" type="text/css" />');
    msg.document.write('<link href="'+r+'web/userstyle.css" rel="stylesheet" type="text/css" />');
    msg.document.write('</head><body style="background-image: none; background-color: white"><div style="background-color: white"><div id="content" style="width: 560px;"><div class="main" style="width: 560px;"><div id="signpost">');
    msg.document.write(div.innerHTML);
    msg.document.write('</div></div><div class="cleaner"></div></div></div></body></html>');
    msg.document.close();
    
    if(print==true) msg.print();
    return false;
}

function PopupWindowUrl(url, w, h) {	
	msg = open(url,"View","width=" + (w>0 ? w : 680) + ",height=" + (h>0 ? h : 600) + ",menubar=0,scrollbars=1,resizable=1");	
	if(msg)	msg.focus();
}