//set the duration for each banner (1000 = 1sec)
var cycleDuration2=3000;

//insert html code stating image source, alt tag and link
var bnrAry2=new Array(
'<a href="/sg/personal/cards/promotions/littleblackbook/"><img src="/sg/personal/cards/promotions/littleblackbook/PublishingImages/lbb_bnr_430x100.jpg" width="430" height="100" border="0" alt="Secrets of the Little Black Book" /></a>',
'<a href="/sg/dining/"><img src="/sg/dining/PublishingImages/bnr_indulgemooncake_430x100.jpg" width="430" height="100" border="0" alt="DBS Indulge" /></a>',
'<a href="/sg/personal/rewards/"><img src="/sg/personal/rewards/PublishingImages/20090264_banner.jpg" width="430" height="100" border="0" alt="DBS Rewards" /></a>',
'<a href="/sg/personal/cards/shoppingunlimited/disclaimer/" target="_blank"><img src="/img/sg/personal/cards/shoppingunlimited/shoppingunlimited_430x100.jpg" width="430" height="100" border="0" alt="DBS Shopping Unlimited" /></a>',
'<a href="/sg/personal/cards/livefresh/"><img src="/img/sg/bnr2009/livefresh_430x100.jpg" width="430" height="100" border="0" alt="Live Fresh Visa payWave Card" /></a>');
//var bnrAry2=new Array(
//'<a href="/sg/dining/"><img src="/sg/dining/PublishingImages/nd_dining_430x100.jpg" width="430" height="100" border="0" alt="DBS Indulge" /></a>',
//'<a href="/sg/personal/cards/livefresh/"><img src="/img/sg/bnr2009/livefresh_430x100.jpg" width="430" height="100" border="0" alt="Live Fresh by DBS is now refreshed!" /></a>',
//'<a href="/sg/dining/"><img src="/sg/dining/PublishingImages/nd_dining_430x100.jpg" width="430" height="100" border="0" alt="DBS Indulge" /></a>',
//'<a href="/sg/personal/cards/promotions/smartspender/"><img src="/sg/personal/cards/promotions/smartspender/PublishingImages/ss_430x100.gif" width="430" height="100" border="0" alt="Smart Spender" /></a>',
//'<a href="/sg/personal/cards/promotions/smartspender/"><img src="/sg/personal/cards/promotions/smartspender/PublishingImages/ss_430x100.gif" width="430" height="100" border="0" alt="Smart Spender" /></a>',
//'<a href="/sg/personal/rewards/"><img src="/sg/personal/rewards/PublishingImages/20090264_banner.jpg" width="430" height="100" border="0" alt="DBS Rewards" /></a>',
//'<a href="/sg/personal/cards/travel/"><img src="/img/sg/personal/cards/travel/travel_430x100.gif" width="430" height="100" border="0" alt="DBS Travel" /></a>',
//'<a href="/sg/personal/cards/livefresh/promotions/tigertranslate/"><img src="/img/sg/bnr2009/livefresh_tt_430x100.jpg" width="430" height="100" border="0" alt="Live Fresh DBS Visa Platinum Card" /></a>',
//'<a href="/sg/personal/cards/shoppingunlimited/disclaimer/" target="_blank"><img src="/img/sg/personal/cards/shoppingunlimited/shoppingunlimited_430x100.jpg" width="430" height="100" border="0" alt="DBS Shopping Unlimited" /></a>');
//'<a href="/sg/personal/cards/livefresh/"><img src="/img/sg/bnr2008/430x100_livefresh.jpg" width="430" height="100" border="0" alt="Live Fresh DBS Visa Platinum Card " /></a>',
//'<a href="/sg/personal/cards/promotions/xmas2007/"><img src="/img/sg/personal/cards/promotions/xmas2007/xmas2007_430x100.jpg" width="430" height="100" border="0" alt="What Joy Will You Bring This Christmas" /></a>',
//'<a href="/sg/personal/cards/promotions/cards_draw/"><img src="/img/sg/bnr2007/cardsdraw_430x100_011007.gif" width="430" height="100" border="0" alt="The DBS/POSB Winning Cards Draw" /></a>',

/********** Don't change beyond this point **********/

var i2, bnrHolder2, timer2;
_spBodyOnLoadFunctionNames.push("bnrCycle2");
function bnrCycle2(imgNum) {
	clearTimeout(timer2);
	if (imgNum) i2=imgNum-1; 
	else i2=0; //reset banner queue
	bnrHolder2=document.getElementById("landingPageBnr");
	
	if (bnrHolder2) {
		doCycle2();
	}

}
function doCycle2() {
	//bnrHolder2.innerHTML = bnrAry2[i2]; //update banner
	var pnlBanner2 = document.createElement("span");
	pnlBanner2.innerHTML = bnrAry2[i2];
	bnrHolder2.removeChild(bnrHolder2.firstChild);
	bnrHolder2.appendChild(pnlBanner2);
	highlightNum2(i2); //highlight selected number
	(i2==bnrAry2.length-1)? i2=0 : i2++; //if this is the last banner in the array, reset to first banner, else go to next banner
	//if (i2==bnrAry2.length-1) i2=0; else i2++;
	timer2 = setTimeout("doCycle2()", cycleDuration2);
}
function highlightNum2(i2) {
	for (var j=1; j<bnrAry2.length+1; j++) { //run thru number of elements, eg. 1-4
		var landingPageBnrNum = 'landingPageBnrNum' + j.toString();
		if (j==i2+1) document.getElementById(landingPageBnrNum).style.fontWeight = "bold";
		else document.getElementById(landingPageBnrNum).style.fontWeight = "normal";
	}
}
