
///////////////////////////////////////////////////////////////
// Pop-In Builder (c)2004.  iCoder.com  All Rights Reserved. //
///////////////////////////////////////////////////////////////

var flyInCord = new Array();
var flyInCount = 0; // The iterator used to build array of Fly In x value to output to Alert at end of function.


function iPop_close(pop_name) {
  if(!pop_name) pop_name = "iCoder_POP1188310468";
  DHTMLAPI_hide(pop_name);
}
function iPop1188310468_close() { DHTMLAPI_hide("iCoder_POP1188310468"); }
function iPop1188310468_init0() {
  if (!iPop1188310468_CookieCheck()) return;
  DHTMLAPI_init();
  iCoder_POP1188310468_Obj = DHTMLAPI_getRawObject("iCoder_POP1188310468");
  iCoder_POP1188310468_move();
  window.onscroll=iCoder_POP1188310468_move;
  window.onresize=iCoder_POP1188310468_move;
}
function iPop1188310468_init1() {
  if (!iPop1188310468_CookieCheck()) return;
  DHTMLAPI_init();
  iCoder_POP1188310468_delta = 16;
  iCoder_POP1188310468_Obj = DHTMLAPI_getRawObject("iCoder_POP1188310468");
  var theObj = iCoder_POP1188310468_Obj; if (theObj && isCSS) theObj = theObj.style;
  if (theObj && theObj.visibility == "hidden") return;
  if (theObj && theObj.display == "none") { theObj.display = "block"; theObj.position = "absolute"; }
  DHTMLAPI_shiftTo(iCoder_POP1188310468_Obj, 0, 5000);
  //var center = DHTMLAPI_positionWindow(iCoder_POP1188310468_Obj, true);
  iCoder_POP1188310468_x = 700;
  iCoder_POP1188310468_y = 0;
  var w_scroll = DHTMLAPI_getScrollWindow();
  var start_x = -150;
  var start_y = 550;
  parseInt((w_scroll[1]-iCoder_POP1188310468_y-DHTMLAPI_getObjectHeight(iCoder_POP1188310468_Obj)-100)/100)*100 + iCoder_POP1188310468_y;
  DHTMLAPI_shiftTo(iCoder_POP1188310468_Obj, start_x, start_y);
  iCoder_POP1188310468_dropstart=setInterval("iCoder_POP1188310468_flyIn()",30);
}
function get_flyInArray() {
    var str = "";
    for(i=0; i < flyInCord.length; i++) {
        str += flyInCord[i]+", ";
    }
    alert(str);
}
function iCoder_POP1188310468_move() {
  if (window.iCoder_POP1188310468_timeout) clearTimeout(window.iCoder_POP1188310468_timeout);
  if (!iCoder_POP1188310468_Obj) return;
  var theObj = iCoder_POP1188310468_Obj; if (theObj && isCSS) theObj = theObj.style;
  if (theObj && theObj.visibility == "hidden") return;
  if (theObj && theObj.display == "none") { theObj.display = "block"; theObj.position = "absolute"; }
  DHTMLAPI_positionWindow(iCoder_POP1188310468_Obj);
  window.iCoder_POP1188310468_timeout = setTimeout("iCoder_POP1188310468_move()", 100);
}

function iCoder_POP1188310468_flyIn() {
  var y = DHTMLAPI_getObjectTop(iCoder_POP1188310468_Obj);
  var x = DHTMLAPI_getObjectLeft(iCoder_POP1188310468_Obj);
  var goto_x = iCoder_POP1188310468_x;
  var goto_y = iCoder_POP1188310468_y;
  var yDiff = y-5;
  var xFactor = x+9;
  flyInCord[flyInCount] = yDiff;
  flyInCount++;
  if ( goto_x > x ) DHTMLAPI_shiftTo(iCoder_POP1188310468_Obj, xFactor, yDiff);
  else {
    clearInterval(iCoder_POP1188310468_dropstart);
    //DHTMLAPI_hide(iCoder_POP1188310468);
    //get_flyInArray();
  }
}

function DHTMLAPI_hide(obj) {
  var theObj = DHTMLAPI_getObject(obj);
  if (theObj) {
    theObj.display = "none";
  }
}
function DHTMLAPI_getRawObject(obj) {
  var theObj;
  if (typeof obj == "string") {
    if (isW3C) theObj = document.getElementById(obj);
    else if (isIE4) theObj = document.all(obj);
    else if (isNN4) theObj = DHTMLAPI_seekLayer(document, obj);
  } else theObj = obj;
  return theObj;
}
function DHTMLAPI_shiftTo(obj, x, y) {
  var theObj = DHTMLAPI_getObject(obj);
  if (theObj) {
    if (isCSS) {
      var units = (typeof theObj.left == "string") ? "px" : 0;
      theObj.left = x + units;
      theObj.top = y + units;
    } else if (isNN4) theObj.moveTo(x,y);
  }
}
function DHTMLAPI_getScrollWindow() {
  var scrollX = 0, scrollY = 0;
  if (document.body && typeof(document.body.scrollTop) != "undefined") {
    scrollX += document.body.scrollLeft;
    scrollY += document.body.scrollTop;
  } else if (typeof(window.pageXOffset) != "undefined") {
    scrollX += window.pageXOffset;
    scrollY += window.pageYOffset;
  }
  return [scrollX, scrollY];
}
function DHTMLAPI_getObjectHeight(obj)  {
  var elem = DHTMLAPI_getRawObject(obj);
  var result = 0;
  if (elem.offsetHeight) result = elem.offsetHeight;
  else if (elem.clip && elem.clip.height) result = elem.clip.height;
  else if (elem.style && elem.style.pixelHeight) result = elem.style.pixelHeight;
  return parseInt(result);
}
function DHTMLAPI_getObjectTop(obj)  {
  var elem = DHTMLAPI_getRawObject(obj);
  var result = 0;
  if (document.defaultView) {
    var style = document.defaultView;
    var cssDecl = style.getComputedStyle(elem, "");
    result = cssDecl.getPropertyValue("top");
  }
  else if (elem.currentStyle) result = elem.currentStyle.top;
  else if (elem.style) result = elem.style.top;
  else if (isNN4) result = elem.top;
  return parseInt(result);
}

function DHTMLAPI_getObjectLeft(obj)  {
  var elem = DHTMLAPI_getRawObject(obj);
  var result = 0;
  if (document.defaultView) {
    var style = document.defaultView;
    var cssDecl = style.getComputedStyle(elem, "");
    result = cssDecl.getPropertyValue("left");
  }
  else if (elem.currentStyle) result = elem.currentStyle.left;
  else if (elem.style) result = elem.style.left;
  else if (isNN4) result = elem.left;
  return parseInt(result);
}

function DHTMLAPI_getObject(obj) {
  var theObj = DHTMLAPI_getRawObject(obj);
  if (theObj && isCSS) theObj = theObj.style;
  return theObj;
}
function DHTMLAPI_seekLayer(doc, name) {
  var theObj;
  for (var i = 0; i < doc.layers.length; i++) {
    if (doc.layers[i].name == name) {
      theObj = doc.layers[i];
      break;
    }
    if (doc.layers[i].document.layers.length > 0) theObj = DHTMLAPI_seekLayer(document.layers[i].document, name);
  }
  return theObj;
}
function DHTMLAPI_getInsideWindowWidth( ) {
  if (window.innerWidth) return window.innerWidth;
  else if (isIE6CSS) return document.body.parentElement.clientWidth;
  else if (document.body && document.body.clientWidth) return document.body.clientWidth;
  return 0;
}
function DHTMLAPI_getInsideWindowHeight( ) {
  if (window.innerHeight) return window.innerHeight;
  else if (isIE6CSS) return document.body.parentElement.clientHeight;
  else if (document.body && document.body.clientHeight) return document.body.clientHeight;
  return 0;
}
function DHTMLAPI_getObjectWidth(obj)  {
  var elem = DHTMLAPI_getRawObject(obj);
  var result = 0;
  if (elem.offsetWidth) result = elem.offsetWidth;
  else if (elem.clip && elem.clip.width) result = elem.clip.width;
  else if (elem.style && elem.style.pixelWidth) result = elem.style.pixelWidth;
  return parseInt(result);
}
function DHTMLAPI_init( ) {
  if (document.images) {
    isCSS = (document.body && document.body.style) ? true : false;
    isW3C = (isCSS && document.getElementById) ? true : false;
    isIE4 = (isCSS && document.all) ? true : false;
    isNN4 = (document.layers) ? true : false;
    isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
  }
}
setTimeout("iPop1188310468_init1()", 500);

function iPop1188310468_CookieCheck() {return true;}