// Purpose:			NetAssociates ad functions
// Author:			Kieran O'Toole - NetAssociates Limited. 03/2002
// Note:				Custom made for Netassoc.com

// pic1
var ary1 = new Array();
ary1[0] = "<a href='default.asp?pg=php'><img src='/imgs/ad/aniphp01.gif' alt='PHP scripting version 4.04 available with our web hosting services.' width='126' height='56' hspace='0' vspace='0' border='0' align='absmiddle'></a>";
ary1[1] = "<a href='http://www.netassoc.co.nz/services/default.asp?pg=WebForwardingPlus' title='Register a domain name and get free Email and Web forwarding !!'><img src='http://www.netassoc.co.nz/imgs/ad/anidomainregistrations02.gif' width='126' height='56' hspace='0' vspace='0' border='0'></a>";
ary1[2] = "<img src='/imgs/ad/anidot02.gif' alt='register domains here' width='126' height='56' hspace='0' vspace='0' border='0' align='absmiddle'>";
ary1[3] = "<a href='default.asp?pg=mySQL'><img src='/imgs/ad/aniMySQL01.gif' alt='My SQL version 4.0 available here with online administration via phpMyAdmin' width='126' height='56' hspace='0' vspace='0' border='0' align='absmiddle'></a>";
ary1[4] = "<a href='http://rss.netassoc.co.nz/'><img src='/imgs/ad/adRSSAddYours01.gif' alt='click here to find out how to add a live news feed to your website!' width='126' height='56' hspace='0' vspace='0' border='0' align='absmiddle'></a>";
ary1[4] = "<a href='http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/Windows/ActiveServerPages.html' target='_blank'><img src='/imgs/ad/aniActivePerl01.gif' alt='Program in Perl 5.5, intregrated tightly with Microsoft`s Active Server Pages technology' width='126' height='56' hspace='0' vspace='0' border='0' align='absmiddle'></a>";

var intThumb01 = 1;
var intThumb02 = 1;
var intThumb03 = 1;
var intThumb04 = 1;
var objThumb01 = setInterval("", 0);
var objThumb02 = setInterval("", 0);
//var objThumb03 = setInterval("", 0);
//var objThumb04 = setInterval("", 0);
var IE4 = (document.all) ? 1 : 0;									// IE4+	
var NS4 = (document.layers) ? 1 : 0;								// Netscape ver 4-6
var NS5 = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= 5) ? 1 : 0; 

function ThumbDisplay(id, str) {
  if (NS4) {
    with (document[id].document) {
      open();
      write(str);
      close();
    }
  }
  if (NS5) {
  	if (document.getElementById("weead1")) {
		document.getElementById(id).innerHTML = str;
	}
  }
  if (IE4) {
  //	alert("got here OK; id= " + id + " str= " + str);
  	if (document.all("weead1")) {
  		weead1.filters[0].apply();
    	document.all[id].innerHTML = str;
		weead1.filters[0].play();
	}
  }
}

function ThumbNext(intDB) {
var intThm = 0;
var strHTML = "";
	if (intDB == 1) { 
		intThumb01++; 
		if (intThumb01 == ary1.length) { intThumb01 = 0; }
		intThm = intThumb01;
		strHTML = ary1[intThm];
	}
	//alert("strHTML= " + strHTML);
	//alert("intDB= " + intDB);
	ThumbDisplay("pic" + intDB, strHTML);
}

function ThumbPrev(intDB) {
var intThm = 0;
var strHTML = "";
	if (intDB == 1) { 
		intThumb01--;
		if (intThumb01 == 0) { intThumb01 = ary1.length -1; }
		intThm = intThumb01;
		strHTML = ary1[intThm];
	}
	ThumbDisplay("pic" + intDB, strHTML);
}

function ThumbSlide(intDB) {
	if (intDB == 1) {
		clearInterval(objThumb01);
		objThumb01 = setInterval("ThumbNext(" + intDB + ")", 15000);
	}
}


function doTrans() {
	imgObj.filters[0].apply();
	imgObjText.innerHTML =     "";
	imgObj.filters[0].play();
}

if (!ThumbSlide(1)) {}
