function showWindow(newwin, type)
{
	switch(type){
	case 1:
		window.open(newwin, "BOCI", "");
		break;
	case 2:
		window.open(newwin, "BOCI", "width=640,height=480,directories=no,toolbar=no,resizable=no,menubar=no,scrollbars=yes");
		break;
	case 3:
		window.location=newwin;
		break;
	default:
	}
}

pictotal=1;
picnum=Math.round(Math.random()*pictotal+.5);

picloc1="../../images/chi/adv/adv02.gif";
urlloc1="../creditcard/boci_cc_ex_internet.htm";
//picloc1="../../images/chi/adv/adv01.gif";
//urlloc1="../creditcard/boci_cc_ex_octopus.htm";
//picloc2="../../images/chi/adv/adv02.gif";
//urlloc2="../creditcard/boci_cc_ex_internet.htm";
//picloc3="../../images/chi/adv/adv03.gif";
//urlloc3="../creditcard/boci_cc_ex_monthly.htm";
var winloc= new Array(2);

function changePic() {
	document.images.show.src=eval("picloc"+picnum);
}
function changeUrl() {
	//parent.location=eval("urlloc"+picnum);
	showWindow( eval("urlloc"+picnum), winloc[picnum-1] );
}

spictotal=2;
spicnuma=Math.round(Math.random()*spictotal+.5);
spicnumb=Math.round(Math.random()*spictotal+.5);
while (spicnumb==spicnuma) spicnumb=Math.round(Math.random()*spictotal+.5);

spicloc1="../../images/chi/adv/macau_adv1.gif";
surlloc1=webPath+"chi/promotion/boci_prom_new.htm";
spicloc2="../../images/chi/adv/macau_adv2.gif";
surlloc2=webPath+"chi/promotion/boci_prom_spec.htm";
//spicloc3="../../images/chi/adv/s_adv03.gif";
//surlloc3=webPath+"pdf/chi/BT&CBC.pdf";
//spicloc4="../../images/chi/adv/s_adv04.gif";
//surlloc4=webPath+"pdf/chi/BT&CBC.pdf";
//spicloc3="../../images/chi/adv/s_adv03a.gif";
//surlloc3=webPath+"pdf/chi/BT&CBC.pdf";
//spicloc4="../../images/chi/adv/s_adv03b.gif";
//surlloc4=webPath+"pdf/chi/EC_BT&CBC.pdf";
//spicloc5="../../images/chi/adv/s_adv04a.gif";
//surlloc5=webPath+"pdf/chi/BT&CBC.pdf";
//spicloc6="../../images/chi/adv/s_adv04b.gif";
//surlloc6=webPath+"pdf/chi/EC_BT&CBC.pdf";
var swinloc= new Array(3,3);


function schangePica() {
	document.images.showa.src=eval("spicloc"+spicnuma);
}
function schangePicb() {
	document.images.showb.src=eval("spicloc"+spicnumb);
}
function schangeUrla() {
	newwina=eval("surlloc"+spicnuma);
	//window.open(newwina,"");
	showWindow(newwina, swinloc[spicnuma-1]);
}
function schangeUrlb() {
	newwinb=eval("surlloc"+spicnumb);
	//window.open(newwinb,"");
	showWindow(newwinb, swinloc[spicnumb-1]);
}

