/* HP Banner Script */
var RootElement1;
var hpxml;
var trackLoad;

function StartUp() {

// Load XML - Microsoft/IE.
if (window.ActiveXObject)
  {
  hpxml=new ActiveXObject("Microsoft.XMLDOM");
  hpxml.async=false;
  hpxml.load("/vgn/images/ebusiness/ad_structure.xml");
  loadNodes();
  }
// Load XML - Mozilla/Netscape/Opera.
else if (document.implementation &&
document.implementation.createDocument)
  {
	hpxml = document.implementation.createDocument("", "", null);
	hpxml.async=false;
	hpxml.onload = loadNodes;
	hpxml.load("/vgn/images/ebusiness/ad_structure.xml");
  }
else
  {
  alert('Your browser does not allow this script.');
  }
}


// Load and assign node values
function loadNodes() {
	hp3ad1 = hpxml.getElementsByTagName('ad1')[0].getAttribute('location');
	hp3ad2 = hpxml.getElementsByTagName('ad2')[0].getAttribute('location');
	hp3ad3 = hpxml.getElementsByTagName('ad3')[0].getAttribute('location');
	time = hpxml.getElementsByTagName('delay')[0].getAttribute('time');
	
	link1 = hpxml.getElementsByTagName('ad1')[0].getAttribute('click');
	link2 = hpxml.getElementsByTagName('ad2')[0].getAttribute('click');
	link3 = hpxml.getElementsByTagName('ad3')[0].getAttribute('click');

	ihp3 = [hp3ad1, hp3ad2, hp3ad3];
	trackIDc = [link1, link2, link3];
	
	array_hp3 = new adscript(ihp3, 'slide3', time, "array_hp3", trackIDc, 'click');
}

// begin image switch
function adscript(iList, image, speed, name, track, myAnchor)          
{
  this.iList = iList;
  this.image = image;
  this.speed = speed;
  this.name = name;
  this.current = -1;
  this.timer = 0;
  this.myAnchor = myAnchor;
  this.track = track;
}
adscript.prototype.play = adscript_play;  

function adscript_play() 
{
  with(this)
  {
	
    if(current++ == iList.length-1) current = 0;
    switchImage(image, iList[current], track[current], myAnchor);
    clearTimeout(timer);
    timer = setTimeout(name+'.play()', speed);
  }
}


function switchImage(imgName, imgSrc, tid, myAnchor) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
document.getElementById(myAnchor).href = tid;
    }
  }
}
// end image switch

/* [HP Banner Script] */



/* HP Banner Script 2*/
var RootElement2;
var hpxml2;
var trackLoad2;

function StartUp2() {

// Load XML - Microsoft/IE.
if (window.ActiveXObject)
  {
  hpxml2=new ActiveXObject("Microsoft.XMLDOM");
  hpxml2.async=false;
  hpxml2.load("/vgn/images/ebusiness/ad_structure.xml");
  loadNodes2();
  }
// Load XML - Mozilla/Netscape/Opera.
else if (document.implementation &&
document.implementation.createDocument)
  {
	hpxml2 = document.implementation.createDocument("", "", null);
	hpxml2.async=false;
	hpxml2.onload = loadNodes2;
	hpxml2.load("/vgn/images/ebusiness/ad_structure.xml");
  }
else
  {
  alert('Your browser does not allow this script.');
  }
}


// Load and assign node values
function loadNodes2() {
	hp3ad12 = hpxml2.getElementsByTagName('ad4')[0].getAttribute('location');
	hp3ad22 = hpxml2.getElementsByTagName('ad5')[0].getAttribute('location');
	hp3ad32 = hpxml2.getElementsByTagName('ad6')[0].getAttribute('location');
	time2 = hpxml2.getElementsByTagName('delay')[0].getAttribute('time');
	
	link12 = hpxml2.getElementsByTagName('ad4')[0].getAttribute('click');
	link22 = hpxml2.getElementsByTagName('ad5')[0].getAttribute('click');
	link32 = hpxml2.getElementsByTagName('ad6')[0].getAttribute('click');

	ihp32 = [hp3ad12, hp3ad22, hp3ad32];
	trackIDc2 = [link12, link22, link32];
	
	array_hp32 = new adscript2(ihp32, 'slide32', time2, "array_hp32", trackIDc2, 'click');
}

// begin image switch
function adscript2(iList2, image2, speed2, name2, track2, myAnchor2)          
{
  this.iList2 = iList2;
  this.image2 = image2;
  this.speed2 = speed2;
  this.name2 = name2;
  this.current2 = -1;
  this.timer2 = 0;
  this.myAnchor2 = myAnchor2;
  this.track2 = track2;
}
adscript2.prototype.play = adscript_play2;  

function adscript_play2() 
{
  with(this)
  {
	
    if(current2++ == iList2.length-1) current2 = 0;
    switchImage2(image2, iList2[current2], track2[current2], myAnchor2);
    clearTimeout(timer2);
    timer2 = setTimeout(name2+'.play()', speed2);
  }
}


function switchImage2(imgName2, imgSrc2, tid2, myAnchor2) 
{
  if (document.images)
  {
    if (imgSrc2 != "none")
    {
      document.images[imgName2].src = imgSrc2;
document.getElementById(myAnchor2).href = tid2;
    }
  }
}
// end image switch

/* [HP Banner Script2] */

