function popup(popupfilename, Pheight, Pwidth) {
        
    styles=((navigator.platform.indexOf('Win') > -1) ? WinCSS(popupfilename , Pheight, Pwidth) : MacCSS(popupfilename , Pheight, Pwidth));
           
}
           
var winleft = (screen.width - 800) / 2;
var wintop = (screen.height - 480) / 2; 
                
function WinCSS(popupfilename, Pheight, Pwidth) {  

	winprops = 'status=0,scrollbars=auto,width=' + Pwidth + ',height=' + Pheight + ',top='+wintop+',left='+winleft+',resizable=no';
    window.open(popupfilename,"mainpop",winprops);
        
}
           
function MacCSS(popupfilename, Pheight, Pwidth) {
        
    winprops = 'status=0,scrollbars=no,width=' + Pwidth + ',height=' + Pheight + ',top='+wintop+',left='+winleft+',resizable=no';
    window.open(popupfilename,"mainpop",winprops);
        
}
