var PopupWindow=null;
function Popup(mypage,myname,w,h,pos,infocus,sbar){
if(pos=='random'){
LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=='center'){
LeftPosition=(screen.width)?(screen.width-w)/2:100;
TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!='random') || pos==null){LeftPosition=100;TopPosition=100;}settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars='+sbar+',resizable=no,dependent=no';
PopupWindow=window.open(mypage,myname,settings);
if(infocus=='front'){PopupWindow.focus();PopupWindow.location=mypage;}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
var fOverColor = "ffffff";
var fOutColor = "ffffff";
var fFocusColor = "f0ffff";
var fBlurColor = "ffffff";

function fOver(which) {
    if (which.style) {
        which.style.background = '#' + fOverColor;
    }
}

function fOut(which) {
    if (which.style) {
        which.style.background = '#' + fOutColor;
    }
}

function fFocus(which) {
    if (which.style) {
        which.style.background = '#' + fFocusColor;
    }
}

function fBlur(which) {
    if (which.style) {
        which.style.background = '#' + fBlurColor;}
    }

function openWindow(url, w, h) {
  var options = "width=" + w + ",height=" + h + ",resizable=yes,scrollbars=yes,status=no,menubar=no,toolbar=yes,location=no,directories=no,left=50,top=50,screenX=50,screenY=50";
  var newWin = window.open(url,"_blank", options);
  newWin.focus();
}