// JavaScript Document

/* Domain */

var defhost = document.URL;

var defhost = defhost.substr(defhost.lastIndexOf('//')+2,defhost.length);

var defhost = defhost.substr(0,defhost.indexOf('/'));

//document.write(defhost);



/* Language */

var lang = 'th';



/* Words */

var words = new Array();



/* Personal Banking */

words.push(Array('personal-banking','บุคคลธนกิจ'));



words.push(Array('deposits','บริการเงินฝาก'));

words.push(Array('savings-account','บัญชีเงินฝากออมทรัพย์'));



words.push(Array('visa-electron','บัตรเดบิต วีซ่า อิเลคตรอน'));



words.push(Array('interest-calculator','ตารางคำนวณดอกเบี้ยเงินฝาก'));



words.push(Array('power-saver-savings-account','บัญชีเงินฝากออมทรัพย์ Power Saver'));

words.push(Array('power-saver-plus-savings-account','บัญชีเงินฝากออมทรัพย์ Power Saver Plus'));



words.push(Array('time-deposit','บัญชีเงินฝากประจำ'));

words.push(Array('time-deposit-account','บัญชีเงินฝากประจำ'));

words.push(Array('my-dream-account','บัญชีเงินฝาก My Dream Account – MaxSaver Junior'));

words.push(Array('max-saver-account','บัญชีเงินฝาก MaxSaver'));



words.push(Array('fixed-deposit','Fixed Deposit'));



words.push(Array('current-account','บัญชีเงินฝากกระแสรายวัน'));

words.push(Array('moneyhome-card','MoneyHome Card'));

words.push(Array('foreign-currency-deposit','บัญชีเงินฝากสกุลเงินตราต่างประเทศ'));

words.push(Array('australian-dollar-saving-account','บัญชีเงินฝากออมทรัพย์ออสเตรเลี่ยนดอลล่าร์'));

words.push(Array('australian-dollar-time-deposit','บัญชีเงินฝากประจำออสเตรเลี่ยนดอลล่าร์'));





words.push(Array('cards','บัตรเครดิต'));

words.push(Array('credit-cards','บริการบัตรเครดิต'));



words.push(Array('standard-chartered-platinum-card','บัตรเครดิตสแตนดาร์ดชาร์เตอร์ด แพลตตินั่ม'));

words.push(Array('standard-chartered-business-card','บัตรเครดิตสแตนดาร์ดชาร์เตอร์ด วีซ่าเพื่อธุรกิจ'));

words.push(Array('standard-chartered-gold-card','บัตรเครดิตสแตนดาร์ดชาร์ดเตอร์ด วีซ่า/มาสเตอร์การ์ด ทอง'));

words.push(Array('standard-chartered-classic-card','บัตรเครดิตสแตนดาร์ดชาร์ดเตอร์ด วีซ่า/มาสเตอร์การ์ด คลาสสิค'));


words.push(Array('travel-insurance','แผนประกันระหว่างการเดินทาง'));

/*

words.push(Array('amway-mastercard','Amway MasterCard'));

words.push(Array('character-mastercard','Character MasterCard'));

words.push(Array('goal-mastercard','Goal! MasterCard'));

words.push(Array('business-visa','Business Visa'));

words.push(Array('m-card-visa','M-Card Visa'));

words.push(Array('motorist-club-card','Motorist Club Visa Card'));

words.push(Array('nissan-visa','Nissan Visa'));

words.push(Array('smartone-smart-credit','TM Visa'));

words.push(Array('classic-visa-mastercard','Classic Visa & MasterCard'));

words.push(Array('gold-visa-mastercard','Gold Visa & MasterCard'));

words.push(Array('visa-infinite','Visa Infinite'));

words.push(Array('platinum-visa-mastercard','Platinum Visa & MasterCard'));

words.push(Array('latest-promotions','Latest Promotions'));

words.push(Array('e-statement','e-statements'));

words.push(Array('purchase-protect','Purchase Protect'));

words.push(Array('choice-rewards','Choice Rewards'));

words.push(Array('travel-insurance','Travel Insurance'));

words.push(Array('24-hour-emergency-assistance','24-Hour Emergency Assistance'));

words.push(Array('supplementary-visa-master-card','Supplementary Visa & MasterCard'));

words.push(Array('credit-card-advantages','Credit Card Advantages'));

words.push(Array('balance-transfer','Balance Transfer'));

words.push(Array('terms-and-conditions-apply','Terms and Conditions Apply'));

words.push(Array('bnm-tiered-rates','BNM Tiered Rates'));

words.push(Array('contact-us','Contact Us'));

words.push(Array('apply-now','Apply Now'));

words.push(Array('benefits','Benefits'));

*/

words.push(Array('loans','บริการสินเชื่อ'));

words.push(Array('personal-loans','บริการสินเชื่อ'));

words.push(Array('home-loans','Home Loans (Islamic financing)'));

words.push(Array('overdraft-facility','วงเงินเบิกเกินบัญชีกระแสรายวัน'));

words.push(Array('personal-installment-loan','สินเชื่อบุคคล'));

words.push(Array('standby-cash','วงเงินสแตนด์บายแคช'));

words.push(Array('personal-line-of-credit','วงเงินพิเศษส่วนบุคคล'));

words.push(Array('smart-cash','สินเชื่อสมาร์ทแคช'));



words.push(Array('mortgages','สินเชื่อบ้าน'));

words.push(Array('mortgageone','สินเชื่อบ้านมอร์เกจวัน'));

words.push(Array('mortgage-link','สินเชื่อบ้านมอร์เกจลิงก์'));

words.push(Array('my-mortgage-and-money-mortgage','สินเชื่อบ้านมายมอร์เกจและมันนี่มอร์เกจ'));

words.push(Array('progressive-home-loan','Progressive Home Loan'));



words.push(Array('mortgage-tools','Mortgage Tools'));

words.push(Array('mortgage-calculator','ตารางคำนวณสินเชื่อบ้าน'));

words.push(Array('mortgage-suitability','Mortgage Suitability'));

words.push(Array('document-check-list','เอกสารที่ใช้ในการยื่นกู้'));

words.push(Array('interest-fee','อัตราดอกเบี้ยสินเชื่อบ้าน'));

words.push(Array('fees','ค่าธรรมเนียมสินเชื่อบ้าน'));

words.push(Array('faq','FAQ'));

/*

words.push(Array('mortgageone-optimizer','MortgageOne Optimizer???'));

words.push(Array('mortgageone-low-start','MortgageOne??? Low Start'));

words.push(Array('mortgageone-bonus','MortgageOne??? Bonus'));

words.push(Array('justhome-i','JustHome-i'));

words.push(Array('conventional-housing-loan','Conventional Housing Loan'));

words.push(Array('faq','FAQs'));

words.push(Array('quick-cash-eDGE???','Quick Cash EDGE???'));

words.push(Array('quick-cash-eDGE??? Classic','Quick Cash EDGE??? Classic'));

words.push(Array('personal-financing-i','Personal Financing-i'));

words.push(Array('flexiOverdraft','FlexiOverdraft'));

words.push(Array('quick-cash-edge','Quick Cash EDGE???'));

words.push(Array('loans-repayment-schedule','Loans Repayment Schedule'));

words.push(Array('loans-repayment-schedule-ii','Loans Repayment Schedule'));

words.push(Array('balance-refinancing','Balance Refinancing'));

words.push(Array('quick-cash-edge-classic','Quick Cash EDGE??? Classic'));

words.push(Array('over-draft','Overdraft'));

words.push(Array('optioverdraft','OptiOverdraft'));

words.push(Array('flexioverdraft','FlexiOverdraft'));

words.push(Array('loans','Loans'));

words.push(Array('loans','Loans'));

*/

words.push(Array('services','บริการอื่นๆ'));

words.push(Array('branch-banking-hours','ช่วงเวลาทำการของธนาคาร'));

words.push(Array('cheque-services','Cheque Services'));

words.push(Array('automated-banking-lobby','บริการอัตโนมัติในที่ทำการของธนาคาร'));

words.push(Array('phone-banking','บริการธนาคารทางโทรศัพท์'));

words.push(Array('online-banking','Online Banking'));

words.push(Array('sms-banking','SMS Banking'));

words.push(Array('house','HOUSe'));

words.push(Array('meps-ibg','MEPS IBG'));

words.push(Array('ekiosk','eKiosk'));

words.push(Array('e-statement','e-Statement'));

words.push(Array('contact-the-bank','Contact the Bank'));

words.push(Array('domestic-money-transfer','บริการโอนเงินในประเทศ'));

words.push(Array('bank-guarantee','การออกหนังสือค้ำประกัน'));

words.push(Array('certified-bank-statement','การออกหนังสือรับรองฐานะการเงิน'));

words.push(Array('cashier-cheque','เช็คสั่งจ่ายของธนาคาร'));

words.push(Array('safe-deposit-box','บริการให้เช่าตู้นิรภัย'));

words.push(Array('payment-services','บริการชำระค่าใช้จ่าย'));

words.push(Array('insurance-premium-payment','บริการชำระค่าเบี้ยประกัน'));

words.push(Array('utility-payment','บริการชำระค่าสาธารณูปโภค'));

words.push(Array('tax-payment','บริการรับชำระภาษี'));

words.push(Array('credit-card-direct-debit','บริการตัดบัญชีชำระค่าใช้จ่ายจากบัตรเครดิต'));



words.push(Array('insurance','บริการประกัน'));

words.push(Array('general-insurance','General Insurance'));

words.push(Array('types-of-general-insurance','Types of General Insurance'));

words.push(Array('the-main-types-of-insurance-plans','The Main Types of Insurance Plans'));



words.push(Array('life-insurance','บริการประกันชีวิต'));

words.push(Array('non-life-insurance','บริการประกันภัย'));

words.push(Array('travel-insurance','ประกันการเดินทาง'));

words.push(Array('investments','การลงทุน'));

words.push(Array('investment','การลงทุน'));

words.push(Array('tools','เครื่องมือต่างๆ'));

words.push(Array('financial-health-check','Financial Health Check'));

words.push(Array('risk-profiler','Risk profiler'));

words.push(Array('tax-saving-calculator','Tax Saving Calculator'));

/*

words.push(Array('unit-trust','Unit Trust'));

words.push(Array('foreign-currency-account','Foreign Currency Account'));

words.push(Array('Premium Currency Investment','premium-currency-investment'));

words.push(Array('money-manager','Money Manager'));

words.push(Array('features-and-benefits','Features and Benefits'));

words.push(Array('faqs','FAQs'));

words.push(Array('Features and Benefits','Features and Benefits'));

words.push(Array('how-does-it-work','How does it work'));

words.push(Array('liberalisation-on-the-foreign-exchange-administration-policies','Liberalisation on the Foreign Exchange Administration Policies'));

words.push(Array('plan-build-and-protect','Plan Build & Protect'));

*/



words.push(Array('priority-banking','บริการธนาคารพิเศษ'));

words.push(Array('our-expertise','ความเชี่ยวชาญของธนาคาร'));

words.push(Array('personal-investment-services','บริการด้านการลงทุนส่วนบุคคล'));

words.push(Array('other-services','บริการอื่นๆ'));

words.push(Array('a-world-without-borders','โลกไร้ขอบเขต'));

words.push(Array('global-offerings','บริการของประเทศต่างๆ'));

words.push(Array('branch-listings','รายชื่อสาขาที่ให้บริการ'));

words.push(Array('terms-conditions','ข้อกำหนดและเงื่อนไข'));

words.push(Array('our-global-network','เครือข่ายทั่วโลก'));

words.push(Array('market-news','ข่าวสารด้านการลงทุน'));

words.push(Array('priority-events','กิจกรรมต่างๆ ของบริการธนาคารพิเศษ '));

words.push(Array('be-our-priority-today','สมัครเป็นสมาชิกบริการธนาคารพิเศษวันนี้ '));



/* SME Banking */

words.push(Array('sme-banking','บริการธุรกิจ SME'));

words.push(Array('promotions','รายการส่งเสริมการขาย'));

words.push(Array('deposit-cash-management','บริการด้านเงินฝากและการบริหารเงินสด'));

words.push(Array('current-account','เงินฝากกระแสรายวัน'));

words.push(Array('savings-account','เงินฝากออกทรัพย์'));

words.push(Array('time-deposit-account','เงินฝากประจำ'));

words.push(Array('cash-management','บริการด้านการบริหารเงินสด'));



words.push(Array('business-lending','บริการด้านสินเชื่อ'));

words.push(Array('business-installment-loan','บริการสินเชื่อเพื่อธุรกิจ'));

words.push(Array('property-mortgage','บริการสินเชื่อแบบมีหลักทรัพย์ค้ำประกัน'));

words.push(Array('trade-services','บริการธุรกิจการค้าในประเทศและระหว่างประเทศ'));

words.push(Array('trade-service-for-importers','บริการสำหรับผู้นำเข้าสินค้า'));

words.push(Array('trade-service-for-exporters','บริการสำหรับผู้ส่งออกสินค้า'));

words.push(Array('bond-guarantee','บริการออกหนังสือค้ำประกัน(B/G)'));

words.push(Array('fx-remittance-forward-fx-options','บริการปริวรรตเงินตราต่างประเทศ'));

words.push(Array('receivables-service','บริการซื้อขายบัญชีลูกหนี้การค้า'));



words.push(Array('other-value-services','บริการเพิ่มเติมอื่น ๆ'));

words.push(Array('local-international-network','เครือข่ายในประเทศและระหว่างประเทศ'));

words.push(Array('professional-sme-relationship-manager','ผู้จัดการ - บริหารทางการเงินธุรกิจ'));

words.push(Array('trade-service-advisory','บริการให้คำปรึกษาด้านธุรกิจการค้า'));



words.push(Array('sme-banking-corner','มุมบริการเสริมสำหรับลูกค้า SME'));

words.push(Array('business-management-tools','เครื่องมือช่วยการจัดการทางการเงิน'));

words.push(Array('interest-calculation-cash-management','คำนวณอัตราผลตอบแทนจากเงินฝากและการบริหารเงินสด'));

words.push(Array('business-calculation','คำนวณอัตราดอกเบี้ยเงินกู้'));

words.push(Array('business-matching','บริการจับคู่ทางธุรกิจ'));

words.push(Array('news-economic-review','ข่าวสารและบทวิเคราะห์ทางเศรษฐกิจ'));

words.push(Array('news-update','ข่าวสารล่าสุด'));

words.push(Array('123456','สมัครเป็นสมาชิกเพื่อรับข่าวสารล่าสุด'));

words.push(Array('online-application','ใบสมัครใช้บริการ'));

words.push(Array('123456','ใบสมัครสินเชื่อ BIL / BOD / PP / CM'));

words.push(Array('123456','แนะนำลูกค้า SME'));

/*

//words.push(Array('cash-management','Cash Management Services'));

words.push(Array('deposits-investments','Deposits & Investments'));

words.push(Array('business-saver','Business$aver'));

words.push(Array('premium-service-savings-account','Premium Service Savings Account'));

words.push(Array('premium-currency-investment','Premium Currency Investment'));

words.push(Array('international-trade-account','International Trade Account'));

words.push(Array('foreign-exchange','Foreign Exchange'));

words.push(Array('straight2bank-online-banking-service','Straight2Bank Online Banking Service'));

words.push(Array('online-treasury','Online Treasury'));

words.push(Array('payroll-services','Payroll Services'));

words.push(Array('commercial-mortgages','Commercial Mortgages'));

words.push(Array('business-mortgageone','Business MortgageOne'));

words.push(Array('smione-account','SMIOne Account'));

words.push(Array('business-instalment-loans','Business Instalment Loans'));

words.push(Array('trade-facilities','Trade Facilities'));

words.push(Array('express-trade','Express Trade'));

words.push(Array('services','Services'));

words.push(Array('phone-banking-services','Phone Banking Services'));

words.push(Array('sme-banking-centers','SME Banking Centers'));

words.push(Array('special-promotions','Special Promotions'));





words.push(Array('islamic-banking','Islamic Banking'));

words.push(Array('savings-account-i','Savings Account-i'));

words.push(Array('current-account-i','Current Account-i'));

words.push(Array('saadiq-account-i','Saadiq Account-i'));

words.push(Array('general-investment-account-i','General Investment Account-i'));

words.push(Array('investment-services-i','Investment Services-i'));

words.push(Array('Personal Financing-i','Personal Financing-i'));

words.push(Array('previous-6-months-deposit-rates','Previous 6 Months Deposit Rates'));

words.push(Array('biz-current-account-i','Biz Current Account-i'));

words.push(Array('biz-property-i','Biz Property Account-i'));

words.push(Array('biz-financing-i','Biz Financing-i'));

words.push(Array('wholesale-banking','Wholesale Banking'));

words.push(Array('deposit-cash-products','Deposit & Cash Products'));

words.push(Array('financing-products','Financing Products'));

words.push(Array('treasury-products','Treasury Products'));

words.push(Array('islamic-trade-finance','Islamic Trade Finance'));

words.push(Array('about-islamic-banking','About Islamic Banking'));

words.push(Array('syariah-consultants','Syariah consultants'));

words.push(Array('islamic-concepts','Islamic Concepts'));

words.push(Array('islamic-guidelines','Islamic Guidelines'));

words.push(Array('banking-services','Banking Services'));



words.push(Array('important-customer-info','Important Customer Info'));

words.push(Array('call-account-time-deposit-rates','Call Account Time Deposit Rates'));



words.push(Array('other-related-services','Other Related Services'));

words.push(Array('mrta','MRTA'));

words.push(Array('mrtt','MRTT'));

words.push(Array('msig-home-contents-insurance','MSIG Home'));

*/



/* Tools & Utilities */

words.push(Array('tools-utilities','Tools &amp; Utilities'));

words.push(Array('form-centre','แบบฟอร์ม'));

words.push(Array('complaints','ส่งความคิดเห็นและร้องทุกข์'));



/* Other */

words.push(Array('terms-conditions','ข้อกำหนดและเงื่อนไข'));

words.push(Array('investor-relations','เพื่อนักลงทุน'));

words.push(Array('data-protection-privacy-policy','Data Protection & Privacy Policy'));

words.push(Array('client-charter','Client Charter'));

words.push(Array('usefullink','Useful Links'));

words.push(Array('deposit-interest-rates','Deposit Interest Rates '));

words.push(Array('whats-new','What?€?s new '));

words.push(Array('loans','Loans'));



/* Latest News */

words.push(Array('latest-news','ข่าวธนาคาร'));

words.push(Array('press-releases','ข่าวธนาคาร'));

words.push(Array('media-centre','ข่าวธนาคาร'));

words.push(Array('2005','2548'));

words.push(Array('2006','2549'));

words.push(Array('2007','2550'));

words.push(Array('2008','2551'));

words.push(Array('2009','2552'));

words.push(Array('2010','2553'));



/* About US */

words.push(Array('about-us','เกี่ยวกับธนาคาร'));

words.push(Array('in-thailand','ประวัติธนาคาร'));

words.push(Array('summary-statement-of-assets-and-liabilities','ธ.พ.1.1'));

words.push(Array('scbt','ธนาคารสแตนดาร์ดชาร์เตอร์ด (ไทย)'));

words.push(Array('scnb','ธนาคารสแตนดาร์ดชาร์เตอร์ด นครธน'));

words.push(Array('scb','ธนาคารสแตนดาร์ดชาร์เตอร์ด สาขากรุงเทพมหานคร'));



/* Quick Link */

words.push(Array('our-phone-banking-numbers','เบอร์โทรศัพท์ศูนย์บริการธนาคารทางโทรศัพท์'));

words.push(Array('branch_atm_locator','เอทีเอ็มและสาขา'));

words.push(Array('branch-atm-locator','เอทีเอ็มและสาขา'));

words.push(Array('bank-announcements','ประกาศธนาคาร'));

words.push(Array('interest-fees','อัตราดอกเบี้ยและค่าธรรมเนียม'));

words.push(Array('sitemap','โครงสร้างเว็บไซต์'));

words.push(Array('promotions','โปรโมชั่น'));

/* Legal Notices */

words.push(Array('_legal-notices','ประกาศทางกฎหมาย'));

words.push(Array('disclaimer','คำบอกกล่าวทางกฎหมาย'));

words.push(Array('datapp','นโยบายการคุ้มครองข้อมูลและความเป็นส่วนตัวของธนาคารฯ'));



/* Priority banking*/

words.push(Array('for-you','สำหรับท่าน'));

words.push(Array('for-your-family','สำหรับครอบครัวของท่าน'));

words.push(Array('for-your-business','สำหรับธุรกิจของท่าน'));

words.push(Array('search','ผลการค้นหา'));

/* URL domain */

var ud = new String();

ud = document.URL;

var ud = ud.substr(ud.lastIndexOf('http://')+7,ud.length);

//document.write('<p><strong>The URL is: </strong>'+ud+'</p>');

var ua = new Array();

ua = ud.split('/');

//document.write('<p><strong>The URL array is: </strong>'+ua+'</p>');

ua.splice(1,ua.length);

//document.write('<p><strong>The URL array modified as: </strong>'+ua+' and total <strong>'+ua.length+'</strong> array item inside.</p>');

//ua[0] = 'www.standardchartered.com.hk';



/* URL path */

var up = new String();

up = document.location.pathname;

//document.write('<p><strong>URL path = </strong>'+up+'</p>');



/* Array link */

var al = new Array();

al = up.split('/');

//al.splice(0,1);

al.splice(al.length-2,2);

al[0] = ua[0];

//document.write('<p><strong>Array of link = </strong>'+al+'<br /><strong>Total array(s): </strong>'+al.length+'</p>');



/* Array */

var ap = new Array();

ap = up.split('/');

//ap.splice(0,1);

ap.splice(ap.length-2,2);

ap[0] = 'Home';

//document.write('<p><strong>Array of path = </strong>'+ap+'<br /><strong>Total array(s): </strong>'+ap.length+'</p>');



var ta = new Number(ap.length);



/* Value converstion */

//document.write('<p><strong>Converted array(s) as below: </strong><br />');

for (i=0; i<ta; i++) {

	var tmpvalue = ap[i];

	for (j=0; j<words.length;j++) {

		if (tmpvalue == words[j][0]) {

			ap[i] = words[j][1];

			//document.write(tmpvalue+' &gt; '+ap[i]+'<br />');

		}

	}

}

//document.write('</p><p>');



/* Store array */

var defuse = 0;

var sa = new Array();

for (k=0; k<=ta-1; k++) {

	var tmppath = ap[k];

	var tmplink = 'http://';

	for (m=0; m<=k; m++) {

		if (al[m] == 'personal-banking') {

			if (defuse) {

				tmplink += al[m];

				tmplink += '/';

			} else {

				defuse = true;

			}

		} else {

			tmplink += al[m];

			tmplink += '/';

		}

	}

	//document.write('<strong>ID '+k+': </strong> '+tmppath+' : '+tmplink+'<br />');

	sa.push(Array(tmppath,tmplink));

}

//document.write('</p>');



var counted = false;



/* Special case(s) */

// Repeat the statement block for each case(s)

for (n=0; n<ta-1; n++) {

	var chkstr = sa[n][0];

	var chklink = sa[n][1];

	// Insert specific condition(s) here

	if (chkstr == 'Personal Loans' && chklink.indexOf('/personal-loans/personal-loans/')) {

		if (counted) {

			sa.splice(n,1);

		} else {

			counted = true;

		}

	}

}



/* Trace updated array */

/*document.write('<p>');

for (s=0; s<sa.length; s++) {

	document.write('<strong>'+sa[s][0]+'</strong> : '+sa[s][1]+'<br />');

}

document.write('</p>');

*/



document.write('<ul>');



/* Output */

/*

for (r=0; r<sa.length; r++) {

	if (r == sa.length-1) {

		document.write(sa[r][0]);

	} else {

		document.write('<a href="'+sa[r][1]+lang+'/">'+sa[r][0]+'</a>');

	}

	if (r < sa.length-1) {

		document.write(' &gt; ');

	}

}

*/

for (r=0; r<sa.length; r++) {

	if (r == sa.length-1) {

		document.write('<li><span>'+sa[r][0]+'</span></li>');

	} else {

		if (r==0) {

		document.write('<li id="firstlink"><a href="'+sa[r][1]+lang+'/"><img src="/personal-banking/priority-banking/_images/stan_logo_breadcrumb.gif" alt="'+sa[r][0]+'" /></a></li>');	

		} else {

		document.write('<li><a href="'+sa[r][1]+lang+'/">'+sa[r][0]+'</a></li>');

		}

	}

}

document.write('</ul>');



//document.write('<p>The <strong>Home</strong> will be replaced by the domain name.</p>');