	

	/*

call like this 
a) frames
href="#" onclick="popup('index.html', 400, 400, 1, 'frames'); return false"
b) no frames
href="#" onclick="popup('index.html', 400, 400, 1); return false"

*/


var agt = navigator.userAgent.toLowerCase();
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);
var ns = (agt.indexOf("mozilla")!=-1 && agt.indexOf("compatible")==-1);
var ie = (agt.indexOf("msie")!=-1);
var ver = (agt.indexOf("msie 5")!=-1) ? 5 : parseInt(navigator.appVersion);


var popupwindow;
function popup(site, width, height, which, frames) {
    if (site=="") return;
    if (ie) {
        if (ver>=4 && mac) {
            height-=15;
            width-=14;
        } else {
            if (frames+""!="frames") height-=28;
            else height+=5;
            if (frames+""!="frames") width+=5;
            else width+=6;
        }    
    } 
    popupwindow = window.open(site, "newwindow"+which, "align=center,valign=middle,location=no,scrollbar=auto,width="+width+",height="+height);
    setTimeout("popupwindow.focus()", 100);
    return;
}

