var width, height, top, left;
var allOptions=",toolbar=yes,scrollbars=yes,location=yes,menubar=yes,resizable=yes,status=yes,linksbar=yes";
var noOptions=",toolbar=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no";
var tb="no",sb="no",lc="no",mb="no",rs="no",st="no";

//All of the following funtions open a window containing the website at "url" and names the window "name."

//The following window will open with width=width, height=height, top=top, and left=left.
//If width and height are not defined, they are set to full screen.
//If top and left not defined, they are set to 0.
//All attributes are set to "yes."
function openFullWin(url,name,width,height,top,left)
{
  if (width == undefined)  var width=(screen.availWidth - 10);
  if (height == undefined)  var height=(screen.availHeight - 165);
  if (top == "center")  var top = (screen.availHeight - height) / 2;
  if (top == undefined)  var top = 0;
  if (left == "center")  var left = (screen.availWidth - width) / 2;
  if (left == undefined)  var left = 0;
  window.open(url, name,"top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + allOptions);
}

//The following window will open with width=width, height=height, top=top, and left=left.
//If width and height are not defined, they are set to full screen.
//If top and left not defined, they are set to 0.
//All attributes are set to "no."
function openWin(url,name,width,height,top,left)
{
  if (width == undefined)  var width=(screen.availWidth - 10);
  if (height == undefined)  var height=(screen.availHeight - 35);
  if (top == "center")  var top = (screen.availHeight - height) / 2;
  if (top == undefined)  var top = 0;
  if (left == "center")  var left = (screen.availWidth - width) / 2;
  if (left == undefined)  var left = 0;
  window.open(url, name,"top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + noOptions);
}

//The following window will open with width=width, height=height, top=top, and left=left.
//If width and height are not defined, they are set to full screen.
//If top and left not defined, they are set to 0.
//Attributes that are listed are defined as "yes."
function openCustomWin(url,name,width,height,top,left)
{
  if (width == undefined)  var width=(screen.availWidth - 10);
  if (height == undefined)  var height=(screen.availHeight - 35);
  if (top == "center")  var top = (screen.availHeight - height) / 2;
  if (top == undefined)  var top = 0;
  if (left == "center")  var left = (screen.availWidth - width) / 2;
  if (left == undefined)  var left = 0;
  window.open(url, name,"top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",toolbar=" + tb + ",scrollbars=" + sb + ",location=" + lc + ",menubar=" + mb + ",resizable=" + rs + ",status=" + st);
}

//The following defines the attributes for the previous function
function defineOptions(arg1,arg2,arg3,arg4,arg5,arg6)
{
  if (arg1 == "toolbar" || arg2 == "toolbar" || arg3 == "toolbar" || arg4 == "toolbar" || arg5 == "toolbar" || arg6 == "toolbar")  tb="yes";
  if (arg1 == "scrollbars" || arg2 == "scrollbars" || arg3 == "scrollbars" || arg4 == "scrollbars" || arg5 == "scrollbars" || arg6 == "scrollbars")  sb="yes";
  if (arg1 == "location" || arg2 == "location" || arg3 == "location" || arg4 == "location" || arg5 == "location" || arg6 == "location")  lc="yes";
  if (arg1 == "menubar" || arg2 == "menubar" || arg3 == "menubar" || arg4 == "menubar" || arg5 == "menubar" || arg6 == "menubar")  mb="yes";
  if (arg1 == "resizable" || arg2 == "resizable" || arg3 == "resizable" || arg4 == "resizable" || arg5 == "resizable" || arg6 == "resizable")  rs="yes";
  if (arg1 == "status" || arg2 == "status" || arg3 == "status" || arg4 == "status" || arg5 == "status" || arg6 == "status")  st="yes";
}