//UNUSED FUNCTIONS

//Following script opens window with specified filename, which then can be closed with window.close().
//example syntax:
// a href="JavaScript:openWindow('height=475,width=700,menubar=1,resizable=yes,scrollbars=yes,location=no','url','windowname')"
function openWindowWithSpecs(url,windowname,specs)
{window.open(url, windowname, specs)}
function openWindowWithSpecs1(url,windowname)
{window.open(url, windowname, 'location=no,resizable=yes,scrollbars=yes,menubar=1,height=475,width=700')}
function openWindowWithSpecs2(url,windowname)
{window.open(url, windowname, 'location=no,resizable=yes,scrollbars=yes,menubar=1,toolbar=1,height=700,width=900')}
function openWindowWithSpecs3(url,windowname)
{window.open(url, windowname, 'location=no,resizable=yes,scrollbars=yes,menubar=1,toolbar=1,height=600,width=800')}
function openWindowWithSpecs4(url,windowname)
{window.open(url, windowname, 'location=no,resizable=yes,scrollbars=yes,height=375,width=500')}


/** Scripts for creating popup iframes on page by mousing over non-link objects, eg., frame submit button
 * onMouseOver="return show_hide_box_obj('terms_warning.php',authnet_sub_but,180,120,'2px solid orange','no',-195,-75)"
 * onMouseOut="return show_hide_box_obj('terms_warning.php',authnet_sub_but,180,120,'2px solid orange','no',-195,-75)" */
// 1st var is the url to display in box, 2nd var is the name attribute of the calling element 
// eg., onMouseOver="return ('terms_warning.php',authnet_sub_but,180,120,'2px solid orange','no',-195,-75)"
function show_hide_box_obj (an, object, width, height, borderStyle, scroll, shiftleft, shifttop) {
  var href = an;
  var boxdiv = document.getElementById(href);
  var obj = object;
  var scr = scroll;
// if boxdiv (var representing div element) exists already, display it
  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box(obj, boxdiv, shiftleft, shifttop);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }
// create boxdiv (var representing div element) containing iframe, and display it
  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle;
  boxdiv.style.backgroundColor = '#fff';

  var contents = document.createElement('iframe');
  contents.scrolling = scr;
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
  move_box(obj, boxdiv, shiftleft, shifttop);
  return false;
}

