// - - - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function winOpen(file)
{
  nTop    = 20;
  nLeft   = 20;
  w1 = window.open( file,'','width=500,height=420,left=nLeft,top=nTop,scrollbars=yes,resizable=no,toolbar=no,menubar=no');
}
// ===========================================================
function showNotes(notes,nWidth,nHeight,xoffset,yoffset,e) {
    divNoteM              = document.createElement("div");
    divNoteM.className    = "menuItemsBox";
    divNoteM.style.width  = nWidth + "px";
    divNoteM.style.height = nHeight + "px";
    document.body.appendChild(divNoteM);
    divNoteM.innerHTML       = notes;
    //divNoteM.style.top     = (document.body.scrollTop + yoffset) + "px";
    //divNoteM.style.left    = (document.body.scrollLeft + xoffset ) + "px";
    divNoteM.style.top       = (getMouse(e,"y") + yoffset) + "px";
    divNoteM.style.left      = (getMouse(e,"x") + xoffset) + "px";
	divNoteM.style.display   = "block";

}

//-------------------------
function closeNotes() {
 divNoteM.style.display = "none";
}

//-------------------------
//thanks to http://www.codingforums.com/archive/index.php?t-81103.html
//
function getMouse(e,pos){
posx=0;posy=0;
var ev=(!e)?window.event:e;//Moz:IE
if (ev.pageX){posx=ev.pageX;posy=ev.pageY}//Mozilla or compatible
else if(ev.clientX){posx=ev.clientX;posy=ev.clientY}//IE or compatible
if ( pos == "x"){
return posx;
} else {
return posy;
}
}
//=======================================================
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
 var winl = (screen.width-w)/2;
 var wint = (screen.height-h)/2;
 var settings ='height='+h+',';
 settings +='width='+w+',';
 settings +='top='+wint+',';
 settings +='left='+winl+',';
 settings +='scrollbars='+scroll+',';
 settings +='resizable=yes';
 win=window.open(mypage,myname,settings);
 if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
} 

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}



