//set the duration for each banner (1000 = 1sec)

var cycleDuration2=6000;

//insert html code stating image source, alt tag and link
var bnrAry2=new Array(


'<a href="http://www2.compassvisa.com.hk/html/compassvisa_platium_promotion.aspx?lang=en-US" target="_blank"><img src="/img/hk/creditcards/compass_620x140_e.gif" width="620" height="140" border="0" /></a>',

'<a href="http://hk.dbs.com/en/consumer/creditcards/platinum" target="_blank"><img src="/img/hk/creditcards/DBS_Core_Banner_20111228_en.jpg" width="620" height="140" border="0" /></a>'
);

//'<a href="/en/consumer/creditcards/diningclub/cardoffer/20110915_autumn.html?promo=20110915_autumn_content.html&type=monthly&highlight=monthlyPromo3"><img src="/img/hk/creditcards/20110915_dining_en.gif" width="620" height="140" border="0" /></a>',
//vbv '<A href="javascript:MM_openBrWindow(%27/zh/consumer/creditcards/diningclub/cardoffer/20110314_promo1.html?promo=20110314_1/index.html&type=monthly&highlight=monthlyPromo5%27,%27%27,%27scrollbars=yes,resizable=yes,status=yes,width=1000,height=600,top=0,left=0%27)"><img src="/img/hk/creditcards/20110315_luckydraw_banner.jpg" width="620" height="140" border="0" /></a>',         '<a href="/en/consumer/creditcards/vbvservice/"><img src="/img/hk/creditcards/card_otp.jpg" width="620" height="140" border="0" /></a>'
//black'<a href="javascript:MM_openBrWindow(%27/en/consumer/creditcards/blackcard/blackcard_e.htm%27,%27DBS%27,%27resizable,scrollbars,status,width=800,height=550%27)"><img src="/img/hk/promotion/card_black.gif" width="620" height="140" border="0" /></a>',
//'<a href="http://www.compassvisa.com.hk/html/compassvisa_platium_promotion.aspx?lang=en-US" target="_blank"><img src="/img/hk/creditcards/compass_620x140_e.gif" width="620" height="140" border="0" /></a>'
//3X'<a href="/en/consumer/creditcards/diningClub/3x/" target="_blank"><img src="/img/hk/promotion/card_3x.gif" width="620" height="140" border="0" /></a>'
//the one '<a href="/zh/consumer/creditcards/diningclub/si/?201012_theone" target="_blank"><img src="/img/hk/creditcards/card_theone.jpg" width="620" height="140" border="0" /></a>'
//'<a href="javascript:MM_openBrWindow(%27/en/consumer/creditcards/blackcard/blackcard_e.htm%27,%27DBS%27,%27resizable,scrollbars,status,width=800,height=550%27)"><img src="/img/hk/promotion/black_q1.gif" width="620" height="140" border="0" /></a>',
//'<a href="javascript:MM_openBrWindow(%27/en/consumer/creditcards/diningclub/si/%27,%27DBS%27,%27resizable,scrollbars,status,width=800,height=550%27)"><img src="/img/hk/promotion/card_diningclub.jpg" width="620" height="140" border="0" /></a>',
//'<a href="http://www.compassvisa.com.hk/html/compassvisa_platium_promotion.aspx?lang=en-US" target="_blank"><img src="/img/hk/promotion/card_3everyday.jpg" width="620" height="140" border="0" /></a>',
//'<a href="http://www.compassvisa.com.hk/Channel/Finance/FBISpeLanding.aspx?lang=en-US" target="_blank"><img src="/img/hk/consumer/main_instalment.gif" width="620" height="140" border="0" /></a>'

/********** Don't change beyond this point **********/

var i2, bnrHolder2, timer2;
function bnrCycle2(imgNum) {
	clearTimeout(timer2);
	if (imgNum) i2=imgNum-1; 
	else i2=0; //reset banner queue
	bnrHolder2=document.getElementById("landingPageBnr");
	doCycle2();
}
function doCycle2() {
	bnrHolder2.innerHTML = bnrAry2[i2]; //update banner
	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";
	}
}
