No3 = (parseInt(navigator.appVersion) > 3) ? 1:0;
var layer = (document.all) ? "document.all['layer_' + layer_obj].style" : (document.layers) ? "document.layers['layer_' + layer_obj]" : 0;
var timer;
var count = 0;
var arr_links = new Array();

window.onerror = null;

function onerror()  {
  return false;
}

function ContentLayer()  {
  this.info = (arguments[0]) ? arguments[0]:"";
  this.src_href = (arguments[1]) ? " " + arguments[1]:"";
}

function Show()  {
if( Layer )  {
    if(timer) clearTimeout(timer);
    for(layer_obj=0; layer_obj<Layer.length; layer_obj++)  {
      if(Layer[layer_obj])  {
        eval(layer + '.visibility = "hidden"');
      }
    }
var layer_obj = arguments[0];
//default setting is 'top', layers are positioned on top of anchor graphic (x dimension)
    var position = (arguments[1]) ? arguments[1]:'top';
    var x_offset = (arguments[2]) ? arguments[2]:0;
    var y_offset = (arguments[3]) ? arguments[3]:0;
    if(document.all && layer_obj)  {
      switch (position)  {
        case ('top'):
          eval(layer + ".left = document.all.item_anchor_" + layer_obj + ".offsetLeft + " + x_offset);
          eval(layer + ".top = document.all.item_anchor_" + layer_obj + ".offsetTop - document.all.ylayer_" + layer_obj + ".offsetTop + " + y_offset);
          break;
        case ('bottom'):
          eval(layer + ".left = document.all.item_anchor_" + layer_obj + ".offsetLeft + " + x_offset);
          eval(layer + ".top = document.all.item_anchor_" + layer_obj + ".offsetTop + document.all.item_anchor_" + layer_obj + ".offsetHeight + " + y_offset);
          break;
        case ('right'):
          eval(layer + ".left = document.all.item_anchor_" + layer_obj + ".offsetLeft + document.all.item_anchor_" + layer_obj + ".width + " + x_offset);
          eval(layer + ".top = document.all.item_anchor_" + layer_obj + ".offsetTop + " + y_offset);
          break;
        case ('center'):
          eval(layer + ".left = screen.availwidth/2 - document.all.layer_" + layer_obj + ".offsetWidth/2 + " + x_offset);
          eval(layer + ".top = screen.availheight/2 - document.all.layer_" + layer_obj + ".offsetHeight/2 + " + y_offset);
          break;
      }
    eval(layer + '.visibility = "visible"');
    }
    else if(document.layers && layer_obj)  {
      switch (position)  {
        case ('top'):
          eval(layer + ".left = document.item_anchor_" + layer_obj + ".x + " + x_offset);
          eval(layer + ".top = document.item_anchor_" + layer_obj + ".y - document.layer_" + layer_obj + ".layers[0].y + " + y_offset);
          break;
        case ('bottom'):
          eval(layer + ".left = document.item_anchor_" + layer_obj + ".x + " + x_offset);
          eval(layer + ".top = document.item_anchor_" + layer_obj + ".y + document.item_anchor_" + layer_obj + ".height + " + y_offset);
          break;
        case ('right'):
          eval(layer + ".left = document.item_anchor_" + layer_obj + ".x + document.item_anchor_" + layer_obj + ".width + " + x_offset);
          eval(layer + ".top = document.item_anchor_" + layer_obj + ".y + " + y_offset);
          break;
        case ('center'):
          eval(layer + ".left = window.outerWidth/4 - document.layer_" + layer_obj + ".layers[0].pageX/4 + " + x_offset);
          eval(layer + ".top = window.outerHeight/4 - document.layer_" + layer_obj + ".layers[0].pageY/4 + " + y_offset);
          break;
      }
    eval(layer + '.visibility = "visible"');
    }
    position = 'top';
  }
}

function Hide()  {
  timer = setTimeout("Show()", 200);
}

function MakeAnchor(layer,img_height)  {
  var img_style = "";
  if(document.all)  {
    img_style = " style=\"position:absolute\"";
  }
  document.write("<img src=\"components/images/afp/spacer.gif\" height=\"" + img_height + "\" width=\"1\" border=\"0\" name=\"item_anchor_" + layer + "\" id=\"item_anchor_" + layer + "\"" + img_style + ">");
}

function showSearch() {
  self.name = "AFPmain";
  var windowprops = "toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars,resizable,width=695,height=600";
  OpenWindow = window.open("http://www.afponline.org/pub/search/search.html", "AFPsearch", windowprops);
}

function additem(url,msg) {
 var msg_copy;
 if ( msg == "ves" ) {
  var msg_copy="CANCELLATION POLICY:\n" +
    "AFP only accepts written cancellations. Cancellations must be\n" +
    "received one week prior to the session to receive a refund. If\n" +
    "you miss a session, someone from your company may attend\n" +
    "in your place. AFP must receive all substitutions in writing one\n" +
    "week prior to the session.\n\n" +
    "REGISTRATION CONFIRMATION:\n" +
    "Confirmations will be e-mailed to all registrants after payment\n" +
    "is received. Confirmations will include a Web site address for\n" +
    "the session which contains the dial-in phone number and\n" +
    "presentation.\n\n" +
    "PROCEED TO REGISTER:\n" +
    "By selecting 'OK' you agree with and accept the conditions of\n" +
    "the VES cancellation policy. Proceed to register...";
    if ( confirm(msg_copy) ) {
	 document.location = 'http://www.afponline.org/afpdb/additem.html?' + url;
	}
 }
 if ( msg == "an05" ) {
  var msg_copy="CANCELLATION POLICY:\n" +
    "AFP accepts only written cancellations. Cancellations for registrations postmarked on or\n" +
    "before September 2, 2005, will receive a 100 percent refund, less a $100 processing fee.\n" +
    "There are no refunds for cancellations postmarked after September 2, 2005. Membership is\n" +
    "not refundable. Registrants are responsible for canceling their own hotel accommodations.\n\n" +
    "SUBSTITUTION POLICY:\n" +
    "If you cannot attend the conference, you may substitute another person from your\n" +
    "company. All requests for substitutions must be made in writing with a completed\n" +
    "registration form accompanied by a $100 processing fee. Additional fees may apply\n" +
    "based on the replacement's membership status. If you must substitute after September 2,\n" +
    "2005, do not send materials to AFP----- these will be processed on-site and all fees will\n" +
    "apply.\n\n" +
    "Registration Confirmation:\n" +
    "Confirmations will be emailed to all registrants after full payment has been received.\n" +
    "Confirmations will include badge information and any pre-conference functions.\n\n" +
    "PROCEED TO REGISTER:\n" +
    "By selecting 'OK' you agree with and accept the conditions of these policies.\n" +
    "Proceed to register...";
    if ( confirm(msg_copy) ) {
	 document.location = 'http://www.afponline.org/afpdb/store.html?' + url;
	}
 }
	if ( msg == "cmf" ) {
  var msg_copy="CANCELLATION POLICY:\n" +
    "AFP accepts only written cancellations. Cancellations for registrations received three\n" +
    "weeks prior to the start of the seminar will receive a 100 percent refund, less a $100 processing\n" +
    "fee. There are no refunds for cancellations received less than three weeks prior to the start\n" +
    "of the seminar.  Registrants are responsible for canceling their own hotel accommodations.\n\n" +
    "SUBSTITUTION POLICY:\n" +
    "If you cannot attend the seminar, someone else from your company may attend. All requests\n" +
    "for substitutions must be made in writing with a completed registration form to AFP's\n" +
    "Customer Service Department at least two weeks prior to the event.  On-site substitutions\n" +
    "will also be accepted.\n\n" +
    "REGISTRATION CONFIRMATION:\n" +
    "Confirmations will be e-mailed to all registrants after payment is received.\n\n" +
    "PROCEED TO REGISTER:\n" +
    "By selecting 'OK' you agree with and accept the conditions of these policies.\n" +
    "Proceed to register...";
    if ( confirm(msg_copy) ) {
	 document.location = 'http://www.afponline.org/afpdb/additem.html?' + url;
	}
 }
}
