
// ----- Popup Control ---------------------------------------------------------

function at_display(x)
{
  var win = window.open();
  for (var i in x) win.document.write(i+' = '+x[i]+'<br>');
}

// ----- Show Aux -----

function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child );

  var top  = (c["at_position"] == "y") ? p.offsetHeight+0 : 0;
  var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

  for (; p; p = p.offsetParent)
  {
    top  += p.offsetTop;
    left += p.offsetLeft;
  }

  c.style.position   = "absolute";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
  c.style.visibility = "visible";
}

// ----- Show -----

function at_show()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  at_show_aux(p.id, c.id);

  clearTimeout(c["at_timeout"]);
}

// ----- Hide -----

function at_hide()
{
  var c = document.getElementById(this["at_child"]);

  c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 333);
}

// ----- Click -----

function at_click()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  if (c.style.visibility != "visible")
       at_show_aux(p.id, c.id);
  else c.style.visibility = "hidden";

  return false;
}

// ----- Attach -----

// PARAMETERS:
// parent   - id of visible html element
// child    - id of invisible html element that will be dropdowned
// showtype - "click" = you should click the parent to show/hide the child
//            "hover" = you should place the mouse over the parent to show
//                      the child
// position - "x" = the child is displayed to the right of the parent
//            "y" = the child is displayed below the parent
// cursor   - Omit to use default cursor or check any CSS manual for possible
//            values of this field

function at_attach(parent, child, showtype, position, cursor)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  p["at_parent"]     = p.id;
  c["at_parent"]     = p.id;
  p["at_child"]      = c.id;
  c["at_child"]      = c.id;
  p["at_position"]   = position;
  c["at_position"]   = position;

  c.style.position   = "absolute";
  c.style.visibility = "hidden";

  if (cursor != undefined) p.style.cursor = cursor;

  switch (showtype)
  {
    case "click":
      p.onclick     = at_click;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
    case "hover":
      p.onmouseover = at_show;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
  }
}

/**popup**/

function popup() {
	
	if(window.screenTop > 10000) {
    var features = 'directories=no,menubar=no,status=no,titlebar=no,toolbar=no,width=349,height=330';
    var mypopup = window.open('/cuttingedge.htm', 'mypopup', features);
	}
else{
     }
    }


/***** Cutting Edge popup*****/

<!-- Begin
// ====================================
// Copyright 2001 by www.CodeLifter.com
// Do *not* remove this notice.
// ====================================

// Set the url of the banner popup window page
var theURL = "/cuttingedge.htm";

// Set the title of the popup window
var title = "Cutting Edge"

// Set the size of the popup window
var windowWidth  = 349; // cannot be less than 100
var windowHeight = 430; // cannot be less than 100

// Set the position of the popup window
var windowX = 100;
var windowY = 100;

// Set true to auto-center (positions will be ignored)
var autocenter = false;

// Set true for popup to close when launch page does
var autoclose = true;

// Do not edit below this line.
// ============================

var s="width="+windowWidth+",height="+windowHeight;
var beIE=document.all?true:false;
var done=new Object("no");

if(autocenter){
windowX = (window.screen.width-windowWidth)/2;
windowY = (window.screen.height-windowHeight)/2;
}

function doAgilePopup(){
  if (beIE){
  agilePopper = window.open("","popAgile","fullscreen,"+s);  
  agilePopper.blur();
  window.focus();
  agilePopper.resizeTo(windowWidth,windowHeight);
  agilePopper.moveTo(windowX,windowY);
  var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+theURL+"' scrolling=no>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
  agilePopper.document.open();
  agilePopper.document.write(frameString);
  agilePopper.document.close();
  }else{
  agilePopper=window.open(theURL,"popAgile","scrollbars=no,"+s);
  agilePopper.blur();
  window.focus(); 
  agilePopper.resizeTo(windowWidth,windowHeight);
  agilePopper.moveTo(windowX,windowY);
  }   
  agilePopper.blur(); 
  if (autoclose){
  window.onunload = function(){agilePopper.close();}
  }  
  done="okay";
}

//  End -->
