function OpenWindow(pageToLoad, winName, xposition, yposition, width, height, scroolbars, resizable)
{                                          
    if (parseInt(navigator.appVersion) >= 4 ) {
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=" + resizable + ","
    + "scrollbars=" + scroolbars + ","
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  /*Netscape*/
    + "screeny=" + yposition + ","  /*Netscape*/
    + "left=" + xposition + ","     /*Internet Explorer*/
    + "top=" + yposition;          /*Internet Explorer*/
    /* + "alwaysRaised=1"; */
    window.open(pageToLoad, winName, args );
}




function noRightClickDocumentSet() {
	if (window.Event)
	  document.captureEvents(Event.MOUSEUP);

	if (document.layers)
	  document.captureEvents(Event.MOUSEDOWN);

	document.oncontextmenu = noContextMenu;
	document.onmousedown = noRightClick;
	document.onmouseup = noRightClick;

	window.onmousedown = noRightClick;
}

function noContextMenu() {
  event.cancelBubble = true, event.returnValue = false;

  return false;
} 

function noRightClick(e) {
	if (window.Event) {
		if (e.which == 2 || e.which == 3) 
			return false;
	}
	else if (event.button == 2 || event.button == 3) {
		event.cancelBubble = true, event.returnValue = false;
		return false;
	}
}

