function openSimpleWindow(url)
{
  var win = window.open(url,'NewWindow')
}

function openLargeWindow(url)
{
  var pct_width = .95;
  var pct_heigth = .8;
  var scr_params = "scrollbars=yes,status=yes,toolbar=yes,resizable=yes,location=yes,menubar=yes,directories=yes,screenX=0,screenY=0,left=0,top=0,height="+screen.availHeight*pct_heigth+",width="+screen.availWidth*pct_width;

  var win = window.open(url,'NewWindow', scr_params)
  //return false;
}

function setValue(field, value)
{
  document.forms[0].elements[field].value = value;
}

function subForm(to)
{
  if(to)
  {
    document.forms[0].action = to;
  }
  document.forms[0].submit();
}

function NewWindow(mypage,myname,w,h,scroll,pos)
{
  var win=null;

  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 = 0;
    TopPosition = 20;
  }

  settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=yes';
  win = window.open(mypage,myname,settings);
}

function editJump(url)
{
  if(url != "")
  {
    window.location = url;
  }
}

function isEnter() 
{
  if (event.keyCode==13)
  {
    return true;
  }
  return false;
}