//selector
function backdiv(hobj,sobj)
{	
	hobject=document.getElementById(hobj);
	sobject=document.getElementById(sobj);
	hobject.style.display='none';
	sobject.style.display='';
}
function below_income()
{
	frm=document.frm1;
	if (frm.income[0].checked)
	{
		frm.feature6.checked=false;
		frm.feature7.checked=false;
		frm.feature9.checked=false;
		frm.feature6.disabled=true;
		frm.feature7.disabled=true;
		frm.feature9.disabled=true;
		
		for (var i = 1; i <= 9; i++)
		{
			if (i != 6 && i != 7 && i !=9)
			{
				eval("frm.feature"+i+".checked=false");
				eval("frm.feature"+i+".disabled=false");
			}
		}
	}
	if (frm.income[1].checked)
	{
		frm.feature9.checked=false;
		frm.feature9.disabled=true;
		for (var i = 1; i <= 9; i++)
		{
			//if (i != 9)
			//{
				eval("frm.feature"+i+".disabled=false");
				eval("frm.feature"+i+".checked=false");
			//}
		}
	}
	/*if (frm.income[2].checked)
	{		
		for (var i = 1; i <= 9; i++)
		{
			eval("frm.feature"+i+".disabled=false");
			eval("frm.feature"+i+".checked=false");
		}
	}*/
}
function check_features()
{
	frm=document.frm1;
	if (frm.income[0].checked || frm.income[1].checked)// || frm.income[2].checked
	{

		if (frm.feature2.checked)
		{
			for (var i = 1; i <= 9; i++)
			{
				if (i != 1 && i != 2 && i != 3 && i != 8)
				{
					eval("frm.feature" + i + ".checked=false");
					eval("frm.feature" + i + ".disabled=true");
				}
			}
		}
		else
		{
			for (var i=1;i<=9;i++)
			{
				if ((frm.income[0].checked && i!=7 && i!=9 && i!=6) || (frm.income[1].checked))// || (frm.income[2].checked)
				{
					eval("frm.feature"+i+".disabled=false");
				}
			}
		}
		if (frm.feature4.checked || frm.feature5.checked || frm.feature7.checked || frm.feature9.checked || frm.feature6.checked )
		{
			for (var i=1;i<=9;i++)
			{
				if (i==2)
				{
					eval("frm.feature"+i+".checked=false");
					eval("frm.feature"+i+".disabled=true");
				}
			}
		}
		else
		{
			frm.feature2.disabled=false;
		}
	}
}

function validate()
{
	frm=document.frm1;
	if (!frm.income[0].checked && !frm.income[1].checked)// && !frm.income[2].checked
	{
		alert("Please indicate your income range.");
		frm.income[0].focus();
		return false;
	}
	if (!frm.feature1.checked && !frm.feature2.checked && !frm.feature3.checked && !frm.feature4.checked && !frm.feature5.checked && !frm.feature6.checked && !frm.feature7.checked && !frm.feature8.checked && !frm.feature9.checked)
	{
		alert("Please select at least one of the needs.");
		frm.feature1.focus();
		return false;
	}
}

var msgstring;
function write_text(displayid)
{
	if (document.layers)
	{
		s1 = document.layers[displayid];
		s1.document.open();
		s1.document.write(msgstring);
		s1.document.close();
	}
	if (document.all)
	{
		s1 = document.all[displayid];
		s1.innerHTML=msgstring;
	}
	if (document.getElementById)
	{
		s1 = document.getElementById(displayid);
		s1.innerHTML =msgstring;
	}
}
function show_needstxt()
{
	frm = document.frm1;
	msgstring = "The features selected were:<br>";
	var needs = Array ('<img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" vspace="2"  class="greytxt">Interest free days','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Lower ongoing interest rate','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Balance Transfer','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Free purchase cover','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Free Q Rewards&reg; Program','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Up to four free Additional Cards','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Free International Travel Insurance','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Use the card overseas','<br><img src="/uploadedImages/Personal/Credit_cards/Wizards/tick2.gif" width="16" height="15" border="0" alt="" hspace="3" class="greytxt">Personalised Concierge');
	for (var i = 0; i <= 8; i++)
	{
		if (eval("frm.feature" + (i + 1) + ".checked"))
		{
			msgstring+= needs[i];
		}
	}
	write_text('featuretxt');
}
function show_cards()
{
	frm=document.frm1;
	var step1_id=document.getElementById('step1');
	var step2_id=document.getElementById('step2');
	var step1_tab_id=document.getElementById('step1_tab');
	var step2_tab_id=document.getElementById('step2_tab');

	var lowrate_id=document.getElementById('lowrate');
	var blue_visa_id=document.getElementById('blue_visa');
	var gold_id=document.getElementById('gold');
	var platinum_id=document.getElementById('platinum');


	if ((frm.feature1.checked || frm.feature2.checked || frm.feature3.checked || frm.feature4.checked || frm.feature5.checked || frm.feature6.checked || frm.feature7.checked || frm.feature8.checked || frm.feature9.checked) && (frm.income[0].checked || frm.income[1].checked))// || frm.income[2].checked
	{
		step1_id.style.display='none';
		step2_id.style.display='';
		step1_tab_id.style.display='none';
		step2_tab_id.style.display='';

		if (!frm.feature4.checked && !frm.feature5.checked && !frm.feature7.checked && !frm.feature9.checked)// && !frm.income[1].checked
		{
			lowrate_id.style.display='';
		}
		else
		{
			lowrate_id.style.display='none';
		}
		if (!frm.feature2.checked && !frm.feature7.checked && !frm.feature9.checked)// && !frm.income[1].checked
		{
			blue_visa_id.style.display='';
		}
		else
		{
			blue_visa_id.style.display='none';
		}
		if (!frm.feature2.checked && !frm.feature9.checked && !frm.income[0].checked)
		{
			gold_id.style.display='';
		}
		else
		{
			gold_id.style.display='none';
		}
		if (!frm.feature2.checked && !frm.income[0].checked)
		{
			platinum_id.style.display='';
		}
		else
		{
			platinum_id.style.display='none';
		}
		if (frm.feature6.checked && frm.income[1].checked)
		{
			platinum_id.style.display='';
			gold_id.style.display='none';
			lowrate_id.style.display='none';
			blue_visa_id.style.display='none';
			

		}

	}
}
var showcardcount;

function show_count2()
{
	frm=document.frm1;
	
	if (frm.income[0].checked)
		showcardcount=2;
	
	if (frm.income[1].checked)
		showcardcount=4;
	
	/*if (frm.income[2].checked)
		showcardcount=4;*/
	
	msgstring = showcardcount;
	write_text('count');
}
function show_count()
{
	frm=document.frm1;
	showcardcount=0;
	if ((frm.feature1.checked || frm.feature2.checked || frm.feature3.checked || frm.feature4.checked || frm.feature5.checked || frm.feature6.checked || frm.feature7.checked || frm.feature8.checked || frm.feature9.checked) && (frm.income[0].checked || frm.income[1].checked)) //|| frm.income[2].checked
	{
		if (!frm.feature4.checked && !frm.feature5.checked && !frm.feature7.checked && !frm.feature9.checked)// && !frm.income[1].checked
		{
			showcardcount+=1;
		}
		/*if (!frm.feature1.checked && !frm.feature2.checked && !frm.feature7.checked && !frm.feature9.checked)
		{
			showcardcount+=1;
		}*/
		if (!frm.feature2.checked && !frm.feature7.checked && !frm.feature9.checked)// && !frm.income[1].checked
		{
			showcardcount+=1;
		}
		if (!frm.feature2.checked && !frm.feature9.checked && !frm.income[0].checked)
		{
			showcardcount+=1;
		}
		if (!frm.feature2.checked && !frm.income[0].checked)
		{
			showcardcount+=1;
		}
		if (frm.feature6.checked && frm.income[1].checked)
		{
			showcardcount=1;
		}

	}
	if (((!frm.feature1.checked) && (!frm.feature2.checked) && (!frm.feature3.checked) && (!frm.feature4.checked) && (!frm.feature5.checked) && (!frm.feature6.checked) && (!frm.feature7.checked) && (!frm.feature8.checked) && (!frm.feature9.checked)) && (frm.income[0].checked))
	{
		showcardcount=2;
	}
	if (((!frm.feature1.checked) && (!frm.feature2.checked) && (!frm.feature3.checked) && (!frm.feature4.checked) && (!frm.feature5.checked) && (!frm.feature6.checked) && (!frm.feature7.checked) && (!frm.feature8.checked) && (!frm.feature9.checked)) && ( frm.income[1].checked))
	{
		showcardcount=4;
	}
	/*if (((!frm.feature1.checked) && (!frm.feature2.checked) && (!frm.feature3.checked) && (!frm.feature4.checked) && (!frm.feature5.checked) && (!frm.feature6.checked) && (!frm.feature7.checked) && (!frm.feature8.checked) && (!frm.feature9.checked)) )//&& ( frm.income[2].checked)
	{
		showcardcount=4;
	}*/
	msgstring=showcardcount;
	write_text('count');
}

function check_select(elem)
{
	frm=document.frm1;
	if (eval("document.frm1." + elem + ".disabled==false") && eval("document.frm1." + elem + ".checked==false"))
		eval("document.frm1." + elem + ".checked=true");
	else
		eval("document.frm1." + elem + ".checked=false");
}

function check_income(elem)
{
	eval("document.frm1." + elem + ".checked=true");
}

function uncheck_all()
{
	frm=document.frm1;
	frm.card1.checked=false;
	frm.card2.checked=false;
	frm.card3.checked=false;
	frm.card4.checked=false;
}

function show_comptable()
{
	var frm=document.frm1;
	var j=0;
	
	for (var i=1; i<=4; i++)	
	{
		if (eval('frm.card'+i+'.checked==true'))
		{
			j++;
		}
	}
	if (j<1)	
	{
		alert("Please select a card");
		return false;	
	}
	var cards = "";
		
	if (frm.card1.checked)	
		cards = "&c1=plat";

	if (frm.card2.checked)
		cards += "&c2=gold";

	if (frm.card3.checked)	
		cards += "&c3=blue";	


	if (frm.card4.checked)	
		cards += "&c4=low";			
		
	window.open("personal_creditcards_compare_creditcards.htm?mode=compare" + cards,'','width=900,height=650,scrollbars=yes,resizable=no,top=5,left=0');
}
function show_selectedcards()
{
	frm=document.frm1;
	var step2_id=document.getElementById('step2');
	var step3_id=document.getElementById('step3');
	var step2_tab_id=document.getElementById('step2_tab');
	var step3_tab_id=document.getElementById('step3_tab');

	var platinum1_id=document.getElementById('platinum1');
	var gold1_id=document.getElementById('gold1');
	var blue_visa1_id=document.getElementById('blue_visa1');
	var low_rate_visa1_id=document.getElementById('low_rate_visa1');

	if (!frm.card1.checked && !frm.card2.checked && !frm.card3.checked && !frm.card4.checked)
	{
		alert("Please select the card(s) you need");
		return false;
	}
	else
	{
		step2_id.style.display='none';
		step3_id.style.display='';
		step2_tab_id.style.display='none';
		step3_tab_id.style.display='';
	}
	if (frm.card1.checked)	
	{
		platinum1_id.style.display='';	
	}
	else	
	{
		platinum1_id.style.display='none';	
	}
	if (frm.card2.checked)	
	{
		gold1_id.style.display='';	
	}
	else	
	{
		gold1_id.style.display='none';	
	}
	if (frm.card3.checked)	
	{
		blue_visa1_id.style.display='';	
	}
	else	
	{
		blue_visa1_id.style.display='none';	
	}
	if (frm.card4.checked)	
	{
		low_rate_visa1_id.style.display='';	
	}
	else	
	{
		low_rate_visa1_id.style.display='none';	
	}
}

function show_faq(obj)
{	
	var card_id = document.getElementById(obj);
	if (card_id != null)
	{
	if (card_id.style.display!='')
		card_id.style.display='';
	else
		card_id.style.display='none';
	}
}

function show_tab(obj)
{
	var step1_tab_id=document.getElementById('step1_tab');
	var step2_tab_id=document.getElementById('step2_tab');
	var step3_tab_id=document.getElementById('step3_tab');
	
	if (obj=="step1")
	{
		step1_tab_id.style.display="";
		step2_tab_id.style.display="none";
		step3_tab_id.style.display="none";
	}
	if (obj=="step2")
	{
		step1_tab_id.style.display="none";
		step2_tab_id.style.display="";
		step3_tab_id.style.display="none";
	}
	if (obj=="step3")
	{
		step1_tab_id.style.display="none";
		step2_tab_id.style.display="none";
		step3_tab_id.style.display="";
	} 
	window.scrollTo(0,0);
}
//selector ends

//comp table
function getParameter( name )
{
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

function show_features()
{
	var mode = getParameter('mode');
	if (mode == "compare")
	{
		var c1 = getParameter('c1');
		var c2 = getParameter('c2');
		var c3 = getParameter('c3');
		var c4 = getParameter('c4');

		var trs = document.getElementById('mainTable').getElementsByTagName('tr');
		
		for (var i = 1; i < trs.length; i++)
		{
			if (c1 != "plat")
			{
				var cell = trs[i].getElementsByTagName('td')[1];
				if (cell != null)
					cell.style.display = 'none';
			}
			if (c2 != "gold")
			{
				var cell = trs[i].getElementsByTagName('td')[2];
				if (cell != null)
					cell.style.display = 'none';
			}
			if (c3 != "blue")
			{
				var cell = trs[i].getElementsByTagName('td')[3];
				if (cell != null)
				{
					cell.style.display = 'none';
				}
			}
			if (c4 != "low")
			{
				var cell = trs[i].getElementsByTagName('td')[4];
				if (cell != null)
				{
					cell.style.display = 'none';
				}
			}																
		}
		update_column_colors();
	}
}


function update_column_colors()
{
	var trs = document.getElementById('mainTable').getElementsByTagName('tr');
	
	for (var i = 3; i < trs.length; i++)
	{
		var colClass = "col1";
		var colCentClass = "col1cent";
		for (var j = 0; j < 5; j++)
		{
			var cell = trs[i].getElementsByTagName('td')[j+1];
			// if the cell is not empty, is visible, and is currently has either col1 or col2 style
			if (cell != null && cell.style.display == "")
			{
				if (cell.className == "col1" || cell.className == "col2")
					cell.className = colClass;

				if (cell.className == "col1cent" || cell.className == "col2cent")
					cell.className = colCentClass;

				// toggle the style colour
				if (colClass == "col1")
					colClass = "col2";
				else
					colClass = "col1";
			
				if (colCentClass == "col1cent")
					colCentClass = "col2cent";
				else
					colCentClass = "col1cent";
			}
		}
	}
}	



function show_print()
{
	var print1_id=document.getElementById('print1');
	if (print1_id.style.display!='')
	{
		print1_id.style.display=''
	}
	else
	{
		print1_id.style.display='none'
	}
}
//comp table ends

//tooltip
var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false
var ie5 = (document.getElementById)? true : false;

//Layer pointer objects declarations
var objToolTips;
//==============================================================================
function finit()
{
	if(ns4)
	{
		objToolTips=document.divToolTips;
	}
	else if(ie4)
	{
		objToolTips=document.all["divToolTips"].style;

	}
	else if(ie5)
	{
		objToolTips=document.getElementById("divToolTips").style;
	}
	hideObject(objToolTips)
}
//==============================================================================
function showObject(obj)
{
	if(obj!=null)
	{
		if (ns4)
		{
			obj.visibility = "show";
		}
		else
		{
			obj.visibility = "visible";
		}
	}
}
//==============================================================================
function hideObject(obj)
{
	if(obj!=null)
	{
		if (ns4)
		{
			obj.visibility = "hide";
		}
		else
		{
			obj.visibility = "hidden";
		}
	}
}
//==============================================================================
function layerWrite(id,nestref,text)
{
	if(ns4)
	{
		var lyr=(nestref)?eval('document.'+nestref+'.document.'+id+'.document'):document.layers[id].document;
		lyr.open();
		lyr.write(text);
		lyr.close();
	}
	else if(ie4)
	{
		document.all[id].innerHTML=text;
	}
	else
	{
		document.getElementById(id).innerHTML=text;
	}
}
//==============================================================================
var tooltip_show=1;
var delay = 0;
function showToolTips(img,msg,apos,w,h)
{		

	finit();
	eval("var objToolTipsPos=getAnchorPosition('"+apos+"');");
	var tooltip_left = parseInt(objToolTipsPos.x);
	var tooltip_top = parseInt(objToolTipsPos.y);
	if(ns4)
	{
		//alert("ns4");
		tooltip_left=tooltip_left+3;
		tooltip_top=tooltip_top+44;
		delay = 4500;
	}
	else if(ie4)
	{
		//alert("ie4");
		tooltip_left=tooltip_left+7;
		tooltip_top=tooltip_top+65;
	}
	else if(ie5)
	{
		//alert("ie5");
		tooltip_left=tooltip_left+7;
		tooltip_top=tooltip_top+60;
	}
	objToolTips.left = tooltip_left+w;
	objToolTips.top  = tooltip_top+h;


	writeContent("divToolTips", msg);
	showObject(objToolTips);
	tooltips_onmouseover();
	window.setTimeout("hideToolTip()",delay);
}

function writeContent(apos, msg)
{
	strmsg=msg;
	layerWrite(apos,false,strmsg);
}

function tooltips_onmouseover()
{
	//window.status="tooltips_onmouseover";
	tooltip_show=1;
}

function tooltips_onmouseout()
{
	//window.status="tooltips_onmouseout";
	tooltip_show=0;
}

function hideToolTip()
{
	if(tooltip_show==0)
	{
		hideObject(objToolTips);
	}
	window.setTimeout("hideToolTip()",delay);
}

//==============================================================================
// getAnchorPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x-30;
	coordinates.y=y-15;
	return coordinates;
	}


// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
	}
//------------------------------------------------------------------------------
//==============================================================================
//Card Selector

//Interest free days
var msg0 = '<table width="290" cellpadding=1 cellspacing=0 border=0 bgcolor="#bbbbbb"><tr><td><table width="100%" cellpadding=5 cellspacing=0 border=0 bgcolor="#ffffff"><tr><td align=right class="greytxt"><img src="/uploadedImages/Personal/Credit_cards/Wizards/spacer.gif" width="10" height="1"><a href="javascript:tooltips_onmouseout();" class="lbluetxt">X Close</a></td></tr><tr><td valign=top class="greytxt">Some credit cards give the cardholder the option to make transactions on their account without being charged any interest. <br>&#149; If your card has an interest free day clause (check your pre contractual statement or your conditions of use) then you will qualify for interest free use so long as you pay the entire closing balance of each monthly statement before the due date shown on the statement.  <br>&#149; If you pay less than the full closing balance as shown on the statement you will incur interest charges in accord with the conditions of use. <br>&#149; If you short pay one time, you usually need to pay the full balance for two consecutive months before your account will be interest free again.</td></tr></table></td></tr></table>';

//Low rates on balance transfers
var msg1 = '<table width="290" cellpadding=1 cellspacing=0 border=0 bgcolor="#bbbbbb"><tr><td><table width="100%" cellpadding=5 cellspacing=0 border=0 bgcolor="#ffffff"><tr><td align=right class="greytxt"><img src="/uploadedImages/Personal/Credit_cards/Wizards/spacer.gif" width="10" height="1"><a href="javascript:tooltips_onmouseout();" class="lbluetxt">X Close</a></td></tr><tr><td valign=top class="greytxt">Transferring balances from one credit card to another, usually to take advantage of a lower interest rate. Transfers are limited to the available credit on the receiving card.</td></tr></table></td></tr></table>';

// Free purchase cover 
var msg2 = '<table width="290" cellpadding=1 cellspacing=0 border=0 bgcolor="#bbbbbb"><tr><td><table width="100%" cellpadding=5 cellspacing=0 border=0 bgcolor="#ffffff"><tr><td align=right class="greytxt"><img src="/uploadedImages/Personal/Credit_cards/Wizards/spacer.gif" width="10" height="1"><a href="javascript:tooltips_onmouseout();" class="lbluetxt">X Close</a></td></tr><tr><td valign=top class="greytxt">If any items are lost, stolen or damaged within three months of purchase on your Citibank Credit Card, we will arrange for them to be repaired, replaced, rebuilt or reinstated, free of charge, anywhere in the world.</td></tr></table></td></tr></table>';

// Frequent Flyer Program 
var msg3 = '<table width="290" cellpadding=1 cellspacing=0 border=0 bgcolor="#bbbbbb"><tr><td><table width="100%" cellpadding=5 cellspacing=0 border=0 bgcolor="#ffffff"><tr><td align=right class="greytxt"><img src="/uploadedImages/Personal/Credit_cards/Wizards/spacer.gif" width="10" height="1"><a href="javascript:tooltips_onmouseout();" class="lbluetxt">X Close</a></td></tr><tr><td valign=top class="greytxt">Selected cards can redeem points for Qantas Frequent Flyer or Emirates Skywards Miles.</td></tr></table></td></tr></table>';

// Free rewards program
var msg4 = '<table width="290" cellpadding=1 cellspacing=0 border=0 bgcolor="#bbbbbb"><tr><td><table width="100%" cellpadding=5 cellspacing=0 border=0 bgcolor="#ffffff"><tr><td align=right class="greytxt"><img src="/uploadedImages/Personal/Credit_cards/Wizards/spacer.gif" width="10" height="1"><a href="javascript:tooltips_onmouseout();" class="lbluetxt">X Close</a></td></tr><tr><td valign=top class="greytxt">Enjoy FREE access to a superior Rewards Program where $1 spent = 1 Reward Point = 1 Frequent Flyer Program Point.<br>Reward points never expire while the card remains open.</td></tr></table></td></tr></table>';


// Personalised concierge
var msg5 = '<table width="290" cellpadding=1 cellspacing=0 border=0 bgcolor="#bbbbbb"><tr><td><table width="100%" cellpadding=5 cellspacing=0 border=0 bgcolor="#ffffff"><tr><td align=right class="greytxt"><img src="/uploadedImages/Personal/Credit_cards/Wizards/spacer.gif" width="10" height="1"><a href="javascript:tooltips_onmouseout();" class="lbluetxt">X Close</a></td></tr><tr><td valign=top class="greytxt">Enjoy the privilege and convenience of a Personal Concierge to provide you with information and assistance for both business and pleasure. This service can recommend a restaurant in New York, book theatre tickets in London and arrange flowers or last-minute gifts for family and friends. They will take care of the little things, so you can look after the big ones. You can use the Personal Concierge from anywhere in the world, and is available to you 24 hours day, 7 days a week.</td></tr></table></td></tr></table>';

// Free rewards program (1)
var msg5 = '<table width="290" cellpadding=1 cellspacing=0 border=0 bgcolor="#bbbbbb"><tr><td><table width="100%" cellpadding=5 cellspacing=0 border=0 bgcolor="#ffffff"><tr><td align=right class="greytxt"><img src="/uploadedImages/Personal/Credit_cards/Wizards/spacer.gif" width="10" height="1"><a href="javascript:tooltips_onmouseout();" class="lbluetxt">X Close</a></td></tr><tr><td valign=top class="greytxt">Enjoy FREE access to a superior Rewards program where $1 spent = 1 Reward point</td></tr></table></td></tr></table>';
//==============================================================================

//tooltip end

//dynamic comp table

function check_select(elem)
{
	var frm=document.frm1;
	
	if (eval("document.frm1."+elem+".disabled==false") && eval("document.frm1."+elem+".checked==false"))
	{
		eval("document.frm1."+elem+".checked=true");
	}
	else
	{
		eval("document.frm1."+elem+".checked=false");
	}
}


function collapse_section(prefix)
{
	var trs = document.getElementById('mainTable').getElementsByTagName('tr');
	for(var i = 0; i < trs.length; i++)
	{
		var row = trs[i];
		if (row.id.match(prefix) != null)
		{
			// toggle the visible style
			if (row.style.display == 'none')
				row.style.display = '';
			else
				row.style.display = 'none';
		}
	}
}


function compare_cards()
{
	var frm1 = document.frm1;

	var trs = document.getElementById('mainTable').getElementsByTagName('tr');
	var checks = new Array(frm1.card1, frm1.card2, frm1.card3,  frm1.card4);

	for(var i = 3; i < trs.length; i++)
	{
		for (var j = 0; j < checks.length; j++)
		{
			var cell = trs[i].getElementsByTagName('td')[j+1];
			if (cell != null)
			{
				if (checks[j].checked)
				{
					cell.style.display = '';
				}
				else
				{
					cell.style.display = 'none';
				}
			}
		}
	}
}
	
	
function select_all()
{
	var frm1=document.frm1;
	frm1.card1.checked = frm1.cardAll.checked;
	frm1.card2.checked = frm1.cardAll.checked;
	frm1.card3.checked = frm1.cardAll.checked;
	frm1.card4.checked = frm1.cardAll.checked;
	compare_cards();
}


function show_printtooltip(displaymode)
{
	var print1_id=document.getElementById('printToolTip');
	print1_id.style.display=displaymode;
}

//dynamic comp table ends

