var base="http://oregonstate.edu/~reeset/marcedit/"
var Nwind=0;
var mwidth=500;
var mheight=540;

function GetPage(URL)
{
	
	if (URL !="none")
	window.parent.location=URL;
}


function openpage(sURL){

N   = (document.layers) ? true:false;                 // netscape 4
I   = (document.all) ? true:false;                    // ie4+
DOM = ((document.getElementById)&&(!I))?true:false;   // ns6 etc.



if (I) {
   if (mwidth > screen.width) {
	mwidth=screen.width-50;
      }
   if (mheight > screen.height) {
	mheight=screen.height - 50;
      }
}
else if (N) {
   if (mwidth > screen.availHeight) {
	mwidth=screen.availWidth - 75;
      }
   if (mheight > screen.availHeight) {
	mheight=screen.availHeight - 75;
      }
}

else if (DOM) {
   if (mwidth > screen.availHeight) {
	mwidth=screen.availWidth - 75;
      }
   if (mheight > screen.availHeight) {
	mheight=screen.availHeight - 75;
      }
}


    var xMax = 640, yMax=480; // default

    if (I) var xMax = screen.width, yMax = screen.height;
    
    else if (N || DOM) var xMax = window.outerWidth, yMax = window.outerHeight;

    var xOffset = xMax - mheight, yOffset = yMax - mwidth - 100;


if (Nwind==1 &&  I) {

   var wind= window.open(sURL, 'NewWindow', 'width=' + mwidth + ',height=' + mheight + ',screenX=' +  xOffset + ',screenY=0,Top=0,Left=' + xOffset + ',scrollbars=yes,resizable=yes');
   wind.focus();

	if (wind.opener == null){
		 wind.opener = self;
	}
}
else if (Nwind==1 && N || DOM) {
	var wind= window.open(sURL, 'NewWindow', 'width=' + mwidth + ',height=' + mheight + ',screenX=' +  xOffset + ',screenY=0,scrollbars=yes,resizable=yes');
        wind.focus();

	if (wind.opener == null){
		 wind.opener = self;
	}
}
else {
	self.document.location.href=sURL;
	self.focus();
}
 	
}

function openpageEx(sURL){

N   = (document.layers) ? true:false;                 // netscape 4
I   = (document.all) ? true:false;                    // ie4+
DOM = ((document.getElementById)&&(!I))?true:false;   // ns6 etc.



if (I) {
   if (mwidth > screen.width) {
	mwidth=screen.width-50;
      }
   if (mheight > screen.height) {
	mheight=screen.height - 50;
      }
}
else if (N) {
   if (mwidth > screen.availHeight) {
	mwidth=screen.availWidth - 75;
      }
   if (mheight > screen.availHeight) {
	mheight=screen.availHeight - 75;
      }
}

else if (DOM) {
   if (mwidth > screen.availHeight) {
	mwidth=screen.availWidth - 75;
      }
   if (mheight > screen.availHeight) {
	mheight=screen.availHeight - 75;
      }
}


    var xMax = 640, yMax=480; // default

    if (I) var xMax = screen.width, yMax = screen.height;
    
    else if (N || DOM) var xMax = window.outerWidth, yMax = window.outerHeight;

    var xOffset = xMax - mheight, yOffset = yMax - mwidth - 100;


if (I) {

   var wind= window.open(sURL, 'NewWindow', 'width=' + mwidth + ',height=' + mheight + ',screenX=' +  xOffset + ',screenY=0,Top=0,Left=' + xOffset + ',scrollbars=yes,resizable=yes');
   wind.focus();

	if (wind.opener == null){
		 wind.opener = self;
	}
}
else if (N || DOM) {
	var wind= window.open(sURL, 'NewWindow', 'width=' + mwidth + ',height=' + mheight + ',screenX=' +  xOffset + ',screenY=0,scrollbars=yes,resizable=yes');
        wind.focus();

	if (wind.opener == null){
		 wind.opener = self;
	}
}
else {
	self.document.location.href=sURL;
	self.focus();
}
 	
}
