// JavaScript Document

function showImage(str){
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'common/banners/Online_privacy_banner.jpg'
theImages[1] = 'common/banners/getting-out-of-debt.jpg'
theImages[2] = 'common/banners/financial-goal.jpg'
theImages[3] = 'common/banners/more-about-debits-cards.jpg'
theImages[4] = 'common/banners/career-planning.jpg'
theImages[5] = 'common/banners/set-to-own-a-home.jpg'
theImages[6] = 'common/banners/Millionaire.jpg'
theImages[7] = 'common/banners/planning-for-baby.jpg'

//specify corresponding links below
var imagelinks=new Array()

imagelinks[0]="../../cd/si/online.jsp"
imagelinks[1]="../../cd/md/debt.jsp"
imagelinks[2]="../../ss/gp/goals.jsp"
imagelinks[3]="../../ss/bs/debit.jsp"
imagelinks[4]="../../le/ma/career.jsp"
imagelinks[5]="../../le/bh/prepare.jsp"
imagelinks[6]="../../gt/main.jsp"
imagelinks[7]="../../le/hb/day.jsp"

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));


document.write('<a href='+'"'+imagelinks[whichImage]+'"'+'><img border=0 src="'+str+theImages[whichImage]+'"></a>');
}

//  End -->
function showImagemain(str){
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'common/banners/banner_soccer.jpg'


 //specify corresponding links below
  var imagelinks=new Array()

  imagelinks[0]="/english/FF.jsp"
// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));


document.write('<a href="'+imagelinks[whichImage]+'"><img border=0 src="'+str+theImages[whichImage]+'"></a>');
}

// Random Content for the Money skills section on the left side
function myMoneySkillsRandom()
{
	
var theTitle = new Array();
var theContent = new Array();
var theLink = new Array();

//Title of My Money Skills
theTitle[0]="A financial literacy programme brought to you by Visa";
theTitle[1]="A financial literacy programme brought to you by Visa";
theTitle[2]="A financial literacy programme brought to you by Visa";
theTitle[3]="A financial literacy programme brought to you by Visa";
//Content of My Money Skills ....double quote " are replaced by \"
theContent[0]="Whether you are a school student, a young graduate setting out on a career, or a new cardholder using payment cards for the first time, we have plenty to offer.<br /><br /> Get straight answers to some commonly asked questions on maintaining your financial health.";
theContent[1]="Whether you are a school student, a young graduate setting out on a career, or a new cardholder using payment cards for the first time, we have plenty to offer.<br /><br /> Work out how much you can save in a year if you start saving today.";
theContent[2]="Whether you are a school student, a young graduate setting out on a career, or a new cardholder using payment cards for the first time, we have plenty to offer.<br /><br /> Discover how long it will take to double your savings.";
theContent[3]="Whether you are a school student, a young graduate setting out on a career, or a new cardholder using payment cards for the first time, we have plenty to offer.<br /><br /> Do a little math to determine your monthly budget.";
//Link of My Money Skills
theLink[0]="cd/uc/faqs.jsp";
theLink[1]="ss/ps/calculations.jsp";
theLink[2]="ss/ps/rule.jsp";
theLink[3]="ss/bb/income.jsp";


// Do not edit this part
var p = theTitle.length;
var i = Math.round(Math.random()*(p-1));

var sLink ='';
var sTitle='';
if (theLink[i] == undefined || theLink[i]=='')
	{
	sLink =='';
	sTitle=theTitle[i];
	}
else
{	sLink='<a class=link href='+'"'+theLink[i]+'"'+' style="white-space:nowrap"> Tell me more &raquo;</a>';
     sTitle='<a  href='+'"'+theLink[i]+'"'+'>' + theTitle[i] + '</a>';
}
document.write(' <p class="innerMainTitle">' + sTitle + '</p> <p> ' + theContent[i]  + sLink + '</p>');
	
}
//  End Money skills-->

// Random Content for the Quick Tips section on the left side
function myQuickTipsRandom()
{
var theTitle = new Array();
var theContent = new Array();
var theLink = new Array();
//Title of Quick tips
theTitle[0]="The Power of $50 a Month";
theTitle[1]="Credit Rating";
theTitle[2]="Fixed Rates";
theTitle[3]="Purchasing Card";
theTitle[4]="Start saving early";
theTitle[5]="Types of property";
//Content of Quick tips ....double quote " are replaced by \"
theContent[0]="When you pay the minimum due on your monthly credit card bills, you are in fact paying more than the original purchase price. Learn how much you could save by paying an additional $50 per month.";
theContent[1]="A financial institution's evaluation of whether a person is suitable to receive credit. Credit ratings are usually based on an individual's character, capacity to repay and capital.";
theContent[2]="An interest rate that doesn't change. The APR (annual percentage rate) is usually a fixed rate. A grace period is a period before interest begins to accrue on new purchases.";
theContent[3]="A credit card used by companies to make medium to low value purchases. It eliminates the need for purchase orders. Orders are placed directly with a participating supplier and charged to the purchasing card.";
theContent[4]="It's never too early to start saving for your golden years. Find out your value at retirement if you begin saving today.";
theContent[5]="If you like privacy and independence, buying a single-family residence might be the right choice for you. Decide whether you want a new home, a previously owned home or a fixer-upper.";
//Link of Quick tips
theLink[0]="ss/ps/power.jsp";
theLink[1]="cd/uc/a-z.jsp";
theLink[2]="cd/uc/a-z.jsp";
theLink[3]="cd/uc/a-z.jsp";
theLink[4]="ss/ps/saving.jsp";
theLink[5]="le/bh/house.jsp";


var p = theTitle.length;
var i = Math.round(Math.random()*(p-1));
var sLink ='';
var sTitle='';
if (theLink[i] == undefined || theLink[i]=='')
	{
	sLink =='';
	sTitle=theTitle[i];
	}
else
{	sLink='<a class=link href='+'"'+theLink[i]+'"'+' style="white-space:nowrap"> Tell me more &raquo;</a>';
     sTitle='<a  href='+'"'+theLink[i]+'"'+'>' + theTitle[i] + '</a>';
}
document.write(' <p class="innerMainTitle">' + sTitle + '</p> <p> ' + theContent[i]  + sLink + '</p>');
	
}
//  End Quick Tips-->

//Random Content for the homepage in the main section
function myMainContentsRandom()
{
		var theImages = new Array();
		var theContent = new Array();
		var theLink = new Array();
		
		//Title of Homepage
		//Path of the image
		theImages[0]="common/images/Protecting.png";
		theImages[1]="common/images/Debit_Cards.png";
		theImages[2]="common/images/Shopping.png";
		theImages[3]="common/images/credit_card.png";
		theImages[4]="common/images/Qualify.png";
		theImages[5]="common/images/Mortgages.png";
		//Content of Homepage ....double quote " are replaced by \"
		theContent[0]="It's easy to see why so many people opt for online transactions. Be it paying a bill, making a reservation, shopping or socialising, the convenience of being able to see to your needs at a click of a button is irresistible. However, by disclosing your personal details online, you are exposing yourself to certain risks. Discover how to protect your privacy online and keep others out of your business.";
		theContent[1]="Widely referred to as bankcards or cheque cards, debit cards operate like cash or personal cheques, only much better. Unlike a credit card where you pay later, purchases charged to your debit card are deducted directly from your bank account. Discover the workings of a debit card and the many ways it can make your life so much easier.";
		theContent[2]="Advanced technology is redefining the way we shop. For ease and convenience, many have turned to shopping via mail, phone and the internet. In an effort to stretch their dollar, some have even joined buying clubs. Discover the many shopping options available and determine the one that best suits your lifestyle needs.";
		theContent[3]="Unlike a charge card, whereby you are required to pay the full amount you owe at the end of each month, a credit card gives you the flexibility of paying in parts with interest. When used responsibly, there are many benefits that come with using your credit card. Find out how you can capitalise on the advantages and ways of reducing the disadvantages.";
		theContent[4]="Owning a home is a big commitment. One that requires careful planning and other notable considerations, such as monthly instalments, home insurance and more. Get a head start by learning as much as you can about purchasing a home, the paperwork required as well as the ideal home for you based on your financial strengths.";
		theContent[5]="Now, if you're going to be paying a mortgage for the next 30 years, it makes perfect sense to know exactly what you're paying for. Learn about the many different mortgage options available in the market before deciding on the right one for you.";
		//link of Homepage
		theLink[0]="cd/si/online.jsp";
		theLink[1]="ss/bs/debit.jsp";
		theLink[2]="ss/sh/shopping.jsp";
		theLink[3]="cd/uc/credit1.jsp";
		theLink[4]="le/bh/prepare.jsp";
		theLink[5]="le/bh/many.jsp";
		
		
		
		
		//Do Not Edit
		var p = theImages.length;
		var i = Math.round(Math.random()*(p-1));
		var sLink ='';
		if (theLink[i] == undefined || theLink[i]=='')
			sLink =='';
		else
		sLink='<a class=link href='+'"'+theLink[i]+'"'+' style="white-space:nowrap"> Tell me more &raquo;</a>';
		document.write('<img src="' + theImages[i] +'" width="380" height="26"> <div class="innerContent"><p>' + theContent[i]  + sLink + '</p></div>');
	
}
//  End Homepage-->

//Switch between image or flash in the main content
function randomImageOrFLash()
{
		
		var theImages = new Array();
		var theLink = new Array();
	
	//if both image and flash are defined, flash will be dominant, and in case browser doesnt support flash, image will be shown.
	theImages[0]="common/banners/SavingAhead.png";
	theImages[1]="common/banners/best-way-to-privacy.jpg";
	theImages[2]="common/banners/Out_of_Debt.jpg";
	theImages[3]="common/banners/click-financial-security.jpg";
	theImages[4]="common/banners/all-about-debit-cards.jpg";
	theImages[5]="common/banners/define.jpg";
	theImages[6]="common/banners/homeowner.jpg";
	theImages[7]="common/banners/how-long-million.jpg";
	theImages[8]="common/banners/bundle-of-joy.jpg";

	//theFlash[0]="common/flash/logo.swf";
	
	theLink[0]="ss/bb/income.jsp";
	theLink[1]="cd/si/online.jsp";
	theLink[2]="cd/md/debt.jsp";
	theLink[3]="ss/gp/goals.jsp";
	theLink[4]="ss/bs/debit.jsp";
	theLink[5]="le/ma/career.jsp";
	theLink[6]="le/bh/prepare.jsp";
	theLink[7]="gt/main.jsp";
	theLink[8]="le/hb/day.jsp";

	
		var p = theImages.length;
		var i = Math.round(Math.random()*(p-1));
		
		if (theImages[i] == undefined || theImages[i]=='')
		{}	
		else if (theImages[i] =="common/banners/SavingAhead.png" )
		{
		document.write('<a  href='+'"'+theLink[i]+'"'+'><img src="' + theImages[i] +'"  border=0/></a>');
		}
		else 
		{
			document.write('<a  href='+'"'+theLink[i]+'"'+'><img src="' + theImages[i] +'" style="margin-top:41px;" border=0/></a>');
		}
	
		/*var fp = theFlash.length;
		var fi = Math.round(Math.random()*(fp-1));
		
		if (theFlash[fi] == undefined || theFlash[fi]=='')
		{}	
		else
		document.write('<script language="javascript">swfobject.embedSWF("' +  theFlash[fi] + '", "rightContent", "640", "262", "9.0.0", "common/flash/expressInstall.swf", flashvars, params, attributes);</script>');*/
	
	
}
