//function newPopupWindow(file, width, height) {
//    msgWindow=open(file,'popup','resizable=yes,scrollbars=yes,width=' + width + ',height=' + height);
//    if (msgWindow.opener == null) msgWindow.opener = self;
//}

function newPopupWindow(file) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(file, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=390,height=385');");
}

function eventPopup(event,newtext,w,h) {
if(screen.height>272) {
	win_attrib='toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=' + w + ',height=' + h + ',';
	}
        else{
	win_attrib='toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=' + w + ',height=' + h + ',';
	}
	win_left=(screen.width-w)/25;
	win_top=(screen.height-h)/2;		
    if (navigator.appName.indexOf("Microsoft")>=0) {
		win_attrib+='left=' + win_left + ',top=' + win_top;
    } 
    else {
    	win_attrib+='screenX=' + win_left + ',screenY=' + win_top;
    }
	win_popup = window.open('blank.htm','',win_attrib);     

	win_popup.document.write("<title>More Details</title>");
	win_popup.document.write("<body bgcolor=#FFDD99>");
	win_popup.document.write("<b>" + event + "</b><br><br>");     
	win_popup.document.write(newtext );     
	win_popup.document.write("<br><br><font size=2><p align = right><a href='' onclick=window.close()>Close Window</a></p></font>");
	win_popup.document.write("</body>");
}
