function header_home(){/*Header for Home page files*/document.write("<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td align='left'><img src='common/images/barclays_logo.gif' alt='Barclays'></td><td class='wbd' align='right'><a href='about/about_us.htm' title='About Barclays India'>About us</a> | <a href='sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='download_forms.htm' title='Download Forms'>Download forms</a> | <a href='contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table>");}function header_contact() 
{
document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><a href='index.htm'><img src='common/images/barclays_logo.gif' alt='Barclays' class='logo'></a></td><td class='top-tab'><span class='new'><a href='index.htm' title='Consumer Banking Services'><img src='common/images/retail.gif' alt='Retail Banking'></a></span><span class='new'><a href='commercial/commercial_banking.htm' title='Commercial Banking Services' class='new'><img src='common/images/comm_banking.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='about/about_us.htm' title='About Barclays India'>About us</a> | <a href='sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='download_forms.htm' title='Download Forms'>Download forms</a> | <a href='contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>");
}
function header_consumer_visa() 
{
	document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><a href='../index.htm'><img src='../common/images/barclays_logo.gif' alt='Barclays' class='logo'></a></td><td class='top-tab'><span class='new'><a href='../index.htm' title='Consumer Banking Services'><img src='../common/images/retail.gif' alt='Retail Banking'></a></span><span class='new'><a href='../commercial/commercial_banking.htm' title='Commercial Banking Services' class='new'><img src='../common/images/comm_banking.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='../about/about_us.htm' title='About Barclays India'>About us</a> | <a href='../sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='../download_forms.htm' title='Download Forms'>Download forms</a> | <a href='../contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>");
}
function header_commercial()
{
	document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><a href='../index.htm'><img src='../common/images/barclays_logo.gif' alt='Barclays' class='logo'></a></td><td class='top-tab'><span class='new'><a href='../index.htm' title='Consumer Banking Services'><img src='../common/images/retail.gif' alt='Retail Banking'></a></span><span class='new'><img src='../common/images/comm_banking_mo.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='../about/about_us.htm' title='About Barclays India'>About us</a> | <a href='../sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='../download_forms.htm' title='Download Forms'>Download forms</a> | <a href='../contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>")
}
function header_aboutus()
{
	document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><a href='../index.htm'><img src='../common/images/barclays_logo.gif' alt='Barclays' class='logo'></a></td><td class='top-tab'><span class='new'><a href='../index.htm' title='Consumer Banking Services'><img src='../common/images/retail.gif' alt='Retail Banking'></a></span><span class='new'><a href='../commercial/commercial_banking.htm'><img src='../common/images/comm_banking.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='../about/about_us.htm' title='About Barclays India'>About us</a> | <a href='../sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='../download_forms.htm' title='Download Forms'>Download forms</a> | <a href='../contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>")
}
function header_micro()
{
document.write("<div class='header'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td align='left'><a href='../index.htm'><img src='../common/images/barclays_logo.gif' alt='Barclays' border='0'></a></td><td class='wbd' align='right'><a href='../about/about_us.htm' title='About Barclays India'>About us</a> | <a href='../sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='../download_forms.htm' title='Download Forms'>Download forms</a> | <a href='../contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>");
}
function header_popup()
{
document.write("<img src='common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_popup_channels()
{
document.write("<img src='../../common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_popup_inner_channels()
{
document.write("<img src='../../../common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_popup_commercial()
{
document.write("<img src='../common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_popups()
{
document.write("<img src='../common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_retail()
{
	document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><img src='common/images/barclays_logo.gif' alt='Barclays' class='logo'></td><td class='top-tab'><span class='new'><img src='common/images/retail_mo.gif' alt='Retail Banking'></span><a href='commercial/commercial_banking.htm' title='Commercial Banking Services' class='new'><img src='common/images/comm_banking.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='about/about_us.htm' title='About Barclays India'>About us</a> | <a href='sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='download_forms.htm' title='Download Forms'>Download forms</a> | <a href='contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>")
}
function header_retail_inner()
{
	document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><a href='../index.htm'><img src='../common/images/barclays_logo.gif' alt='Barclays' class='logo'></a></td><td class='top-tab'><span class='new'><img src='../common/images/retail_mo.gif' alt='Retail Banking'></span><a href='../commercial/commercial_banking.htm' title='Commercial Banking Services' class='new'><img src='../common/images/comm_banking.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='../about/about_us.htm' title='About Barclays India'>About us</a> | <a href='../sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='../download_forms.htm' title='Download Forms'>Download forms</a> | <a href='../contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>")
}
function header_retail_nri()
{
	document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><a href='../../index.htm'><img src='../../common/images/barclays_logo.gif' alt='Barclays' class='logo'></a></td><td class='top-tab'><span class='new'><img src='../../common/images/retail_mo.gif' alt='Retail Banking'></span><a href='../../commercial/commercial_banking.htm' title='Commercial Banking Services' class='new'><img src='../../common/images/comm_banking.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='../../about/about_us.htm' title='About Barclays India'>About us</a> | <a href='../../sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='../../download_forms.htm' title='Download Forms'>Download forms</a> | <a href='../../contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>")
}

function header_inner_nri()
{
	document.write("<div class='header1'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td width='21%' align='left'><a href='../../../index.htm'><img src='../../../common/images/barclays_logo.gif' alt='Barclays' class='logo'></a></td><td class='top-tab'><span class='new'><img src='../../../common/images/retail_mo.gif' alt='Retail Banking'></span><a href='../../../commercial/commercial_banking.htm' title='Commercial Banking Services' class='new'><img src='../../../common/images/comm_banking.gif' alt='Commercial Banking'></a></td><td width='36%' align='right' class='wbd'><a href='../../../about/about_us.htm' title='About Barclays India'>About us</a> | <a href='../../../sitemap.htm' title='Search Barclays India'>Sitemap</a> | <a href='../../../download_forms.htm' title='Download Forms'>Download forms</a> | <a href='../../../contact.htm' title='Contact Barclays India'>Contact us</a></td></tr></table></div>")
}

function header_savingcharg()
{
document.write("<img src='../common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_swift_transfer()
{
document.write("<img src='../../common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_swift_inner_transfer()
{
document.write("<img src='../../../common/images/barclays_logo.gif' alt='Barclays'>");
}

function header_contact_popup()
{
document.write("<img src='common/images/barclays_logo.gif' alt='Barclays'>");
}
function header_hellomoney()
{
document.write("<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td align='left'><img src='../../common/images/barclays_logo.gif' alt='Barclays'></td></tr></table>");
}
function showdetailsFaq(d,e,f)
			{		
			
				for(j=1;j<=e;j++)
					{
					
						if(d==j)
							{
								if(eval(document.getElementById('divfaq'+j)).style.display=='none')
									{
										eval(document.getElementById('divfaq'+j)).style.display=''
										eval(document.getElementById('imgfaq'+j)).src='/common/images/minus.gif'
									}
								else
									{
										eval(document.getElementById('divfaq'+j)).style.display='none'
										eval(document.getElementById('imgfaq'+j)).src='/common/images/plus.gif'
									}
							}
						else
							{
								eval(document.getElementById('divfaq'+j)).style.display="none"
								eval(document.getElementById('imgfaq'+j)).src='/common/images/plus.gif'
							}
					}
			}
							window.onload=showdetailsFaq
function showdetailsFaq1(d,e)
			{								
				for(j=1;j<=e;j++)
					{
					
						if(d==j)
							{
								if(eval(document.getElementById('divfaq'+j)).style.display=='none')
									{
										eval(document.getElementById('divfaq'+j)).style.display=''
										eval(document.getElementById('imgfaq'+j)).src='../common/images/minus.gif'
									}
								else
									{
										eval(document.getElementById('divfaq'+j)).style.display='none'
										eval(document.getElementById('imgfaq'+j)).src='../common/images/plus.gif'
									}
							}
						else
							{
								eval(document.getElementById('divfaq'+j)).style.display="none"
								eval(document.getElementById('imgfaq'+j)).src='../common/images/plus.gif'
							}
					}
			}
							window.onload=showdetailsFaq


function expandall(e)
		{								
			for(j=1; j<=e;j++)
				{						
					eval(document.getElementById('divfaq'+j)).style.display=''
					eval(document.getElementById('imgfaq'+j)).src='/common/images/minus.gif'
				}
		}

function colapseall(e)
		{								
			for(j=1; j<=e;j++)
				{
					eval(document.getElementById('divfaq'+j)).style.display='none'
					eval(document.getElementById('imgfaq'+j)).src='/common/images/plus.gif'
							
				}
		}
				

function showdetailsFaq_mb(d,e)
			{								
				for(j=1; j<=e;j++)
					{
					
						if(d==j)
							{
								if(eval(document.getElementById('divfaq'+j)).style.display=='none')
									{
										eval(document.getElementById('divfaq'+j)).style.display=''
										eval(document.getElementById('imgfaq'+j)).src='images/minus.gif'
									}
								else
									{
										eval(document.getElementById('divfaq'+j)).style.display='none'
										eval(document.getElementById('imgfaq'+j)).src='images/plus.gif'
									}
							}
						else
							{
								eval(document.getElementById('divfaq'+j)).style.display="none"
								eval(document.getElementById('imgfaq'+j)).src='images/plus.gif'
							}
					}
			}
							window.onload=showdetailsFaq


function showdetailsFaq_mb2(d,e)
			{								
				for(j=1; j<=e;j++)
					{
					
						if(d==j)
							{
								if(eval(document.getElementById('divfaq'+j)).style.display=='none')
									{
										eval(document.getElementById('divfaq'+j)).style.display=''
										eval(document.getElementById('imgfaq'+j)).src='../../common/images/minus.gif'
									}
								else
									{
										eval(document.getElementById('divfaq'+j)).style.display='none'
										eval(document.getElementById('imgfaq'+j)).src='../../common/images/plus.gif'
									}
							}
						else
							{
								eval(document.getElementById('divfaq'+j)).style.display="none"
								eval(document.getElementById('imgfaq'+j)).src='../../common/images/plus.gif'
							}
					}
			}
							window.onload=showdetailsFaq


function expandall_mb(e)
		{								
			for(j=1; j<=e;j++)
				{						
					eval(document.getElementById('divfaq'+j)).style.display=''
					eval(document.getElementById('imgfaq'+j)).src='images/minus.gif'
				}
		}

function colapseall_mb(e)
		{								
			for(j=1; j<=e;j++)
				{
					eval(document.getElementById('divfaq'+j)).style.display='none'
					eval(document.getElementById('imgfaq'+j)).src='images/plus.gif'
							
				}
		}
		
function chkfrm()
{
var frm=document.dnc;
var flg=true;
	
	if(frm.tbtitle.value=='')
		{
			alert("Please select your title.")
			frm.tbtitle.focus();
			flg=false;
			return false;
		}
		if(trimSpace(frm.tbname.value)=='')
		{
			alert("Please enter your full name.")
			frm.tbname.focus();
			flg=false;
			return false;
		}
		if((frm.tbname.value!=''))
		{
			var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' ";
			var checkStr = frm.tbname.value;
			var allValid = true;
			for (i = 0;  i < checkStr.length;  i++)
				{
					ch = checkStr.charAt(i);
					for (j = 0;  j < checkOK.length;  j++)
					  if (ch == checkOK.charAt(j))
					  break;
					  if (j == checkOK.length)
						{
						  allValid = false;
						  break;
						}
				  }
				if(frm.tbname.value.charAt(0)==' ')
				{
					 alert("Your name cannot start with spaces.");
					frm.tbname.focus();
					flg=false;						
					 return false;
				}
			if (!allValid)
			  {
				 alert("Please enter a valid name.");
				frm.tbname.focus();
				flg=false;
				 return false;
			  }
		}		
		//////////////////////////
		if(trim(frm.tbisd1.value)=='' && trim(frm.tbstd1.value)=='' && trim(frm.tbph1.value)=='' && trim(frm.tbisd2.value)=='' && trim(frm.tbstd2.value)=='' && trim(frm.tbph2.value)=='' && trim(frm.tbmob1.value)=='' && trim(frm.tbmob2.value)=='')
		{
			alert("Please enter at least one contact no.")
			frm.tbisd1.focus();
			flg=false;
			return false;
		}
		if(((frm.tbisd1.value=='') || (frm.tbstd1.value=='') || (frm.tbph1.value=='')) && ((frm.tbisd1.value!='') || (frm.tbstd1.value!='') || (frm.tbph1.value!='')))
		{
			alert("Please completely enter land line no. 1.")
			frm.tbisd1.focus();
			flg=false;
			return false;		
		}
		
		if(frm.tbisd1.value!='' && (isNaN(frm.tbisd1.value) || (frm.tbisd1.value).indexOf('.')!=-1  || parseInt(frm.tbisd1.value)==0))
		{		
			alert("Please enter a valid ISD code in land line no. 1.")
			frm.tbisd1.focus();
			flg=false;
			return false;
		}
		if(frm.tbstd1.value!='' && (isNaN(frm.tbstd1.value) ||  (frm.tbstd1.value).indexOf('.')!=-1  || parseInt(frm.tbstd1.value)==0))
		{		
			alert("Please enter a valid STD code in land line no. 1.")
			frm.tbstd1.focus();
			flg=false;
			return false;
		}
		if(frm.tbph1.value!='' && (isNaN(frm.tbph1.value) || (frm.tbph1.value).indexOf('.')!=-1  || parseInt(frm.tbph1.value)==0))
		{		
			alert("Please enter a valid phone number in land line no. 1.")
			frm.tbph1.focus();
			flg=false;
			return false;
		}
		//landline 2
		if(((frm.tbisd2.value=='') || (frm.tbstd2.value=='') || (frm.tbph2.value=='')) && ((frm.tbisd2.value!='') || (frm.tbstd2.value!='') || (frm.tbph2.value!='')))
		{
			alert("Please completely enter land line no. 2.")
			frm.tbisd2.focus();
			flg=false;
			return false;		
		}
		if(frm.tbisd2.value!='' && (isNaN(frm.tbisd2.value) || (frm.tbisd2.value).indexOf('.')!=-1  || parseInt(frm.tbisd2.value)==0))
		{		
			alert("Please enter a valid ISD code in land line no. 2.")
			frm.tbisd2.focus();
			flg=false;
			return false;
		}
		if(frm.tbstd2.value!='' && (isNaN(frm.tbstd2.value) ||  (frm.tbstd2.value).indexOf('.')!=-1  || parseInt(frm.tbstd2.value)==0))
		{		
			alert("Please enter a valid STD code in land line no. 2.")
			frm.tbstd2.focus();
			flg=false;
			return false;
		}
		if(frm.tbph2.value!='' && (isNaN(frm.tbph2.value) ||  (frm.tbph2.value).indexOf('.')!=-1  || parseInt(frm.tbph2.value)==0))
		{		
			alert("Please enter a valid phone number in land line no. 2.")
			frm.tbph2.focus();
			flg=false;
			return false;
		}
		/////
		/*
		if((isNaN(frm.tbisd2.value) || isNaN(frm.tbph2.value)) && (!isNaN(frm.tbisd2.value) || !isNaN(frm.tbstd2.value) || !isNaN(frm.tbph2.value)))
		{
			alert("Please completely enter land line no. 2.")
			frm.tbisd2.focus();
			flg=false;
			return false;		
		}*/
		if(frm.tbisd3.value!='' && (isNaN(frm.tbisd3.value) || (frm.tbisd3.value).indexOf('.')!=-1  || parseInt(frm.tbisd3.value)==0))
		{		
			alert("Please enter a valid ISD code in mobile no. 1.")
			frm.tbisd3.focus();
			flg=false;
			return false;
		}
		if(frm.tbmob1.value!='')
			{
		if(frm.tbmob1.value.length!=7 && frm.tbmob1.value.length!=8 && frm.tbmob1.value.length!=10 && trimSpace(frm.tbmob1.value)!="")
				{
					alert("Please enter a valid 10 digit mobile number.");
					frm.tbmob1.focus();
					flg=false;	
					return false;
				}
		
		if(frm.tbmob1.value.charAt(0)!=9 || frm.tbmob1.value.length!=10)
				{
					alert("Please enter a valid mobile number. (Start from 9 Number Only)");
					frm.tbmob1.focus();
					flg=false;						
					return false;
				}
			}
			////////////
			if(frm.tbisd4.value!='' && (isNaN(frm.tbisd4.value) || (frm.tbisd4.value).indexOf('.')!=-1  || parseInt(frm.tbisd4.value)==0))
		{		
			alert("Please enter a valid ISD code in mobile no. 2.")
			frm.tbisd4.focus();
			flg=false;
			return false;
		}
		if(frm.tbmob2.value!='')
			{
		if(frm.tbmob2.value.length!=7 && frm.tbmob2.value.length!=8 && frm.tbmob2.value.length!=10 && trimSpace(frm.tbmob2.value)!="")
				{
					alert("Please enter a valid 10 digit mobile number.");
					frm.tbmob2.focus();
					flg=false;	
					return false;
				}
		
		if(frm.tbmob2.value.charAt(0)!=9 || frm.tbmob2.value.length!=10)
				{
					alert("Please enter a valid mobile number. (Start from 9 Number Only)");
					frm.tbmob2.focus();
					flg=false;
					return false;
				}
			}
		/////////
		/*if(frm.tbemail.value=='')
		{
			alert("Please enter the email id.")
			frm.tbemail.focus();
			flg=false;
			return false;
		}*/
		if (trim(frm.tbemail.value)!='')	
		{
			if(!emailValidate(frm.tbemail.value, '') || frm.tbemail.value=='')
			{
				alert('Please enter a valid email id');
				frm.tbemail.focus();
				flg=false;
				return false;
			}
		}
		if(frm.tbcity.value=='')
		{
			alert('Please select your city');
			frm.tbcity.focus();
			flg=false;
			return false;		
		}
		if(frm.tbcity.value=='Others' && (trim(frm.tbodrcity.value)=='' || trim(frm.tbodrcity.value)=='In case of \'other\' city mention here'))
		{
			alert('Please provide your city name');
			frm.tbodrcity.focus();
			flg=false;
			return false;		
		}
		if((frm.tbodrcity.value!=''))
		{
			var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
			var checkStr = frm.tbodrcity.value;
			var allValid = true;
			for (i = 0;  i < checkStr.length;  i++)
				{
					ch = checkStr.charAt(i);
					for (j = 0;  j < checkOK.length;  j++)
					  if (ch == checkOK.charAt(j))
					  break;
					  if (j == checkOK.length)
						{
						  allValid = false;
						  break;
						}
				  }
				if(frm.tbodrcity.value.charAt(0)==' ')
				{
					 alert("City name cannot start with spaces.");
					frm.tbodrcity.focus();
					flg=false;						
					 return false;
				}
			if (!allValid)
			  {
				 alert("Please enter a valid city name.");
				frm.tbodrcity.focus();
				flg=false;
				 return false;
			  }
		}	



//////////
		if(flg==true)
		{
			document.dnc.submit();			
		}
}


function ismaxlength(obj,limit){
	var mlength=parseInt(limit);
	if (obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
}
function trimSpace(x)
{
	var emptySpace = / /g;
	var trimAfter = x.replace(emptySpace,"");
	return(trimAfter);
}
//
function trim(strText) { 
    // get rid of leading spaces 
    while (strText.substring(0,1) == ' ') 
        strText = strText.substring(1, strText.length);

    // get rid of trailing spaces 
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);

   return strText;
} 
////
function emailValidate(incomingString, defaultValue)
{
	if(trimSpace(incomingString).length == 0 || incomingString.search(/[\_\-\d]*[A-Za-z]+[\w\_\-]*[\@][\d]*[A-Za-z]+[\w]*[\.][A-Za-z]+/g) == -1 || incomingString==defaultValue)
	{
		return false;
	}
	else
		return true;	
}

function new_window(link)
{
	window.open(link)
}



function chkfrm_suggestion()
{
var frm=document.suggestn;
var flg=true;

if(frm.tbtitle.value=='')
		{
			alert("Please select your title.")
			frm.tbtitle.focus();
			flg=false;
			return false;
		}
		if(trimSpace(frm.tbname.value)=='')
		{
			alert("Please enter your full name.")
			frm.tbname.focus();
			flg=false;
			return false;
		}
		if((frm.tbname.value!=''))
		{
			var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' ";
			var checkStr = frm.tbname.value;
			var allValid = true;
			for (i = 0;  i < checkStr.length;  i++)
				{
					ch = checkStr.charAt(i);
					for (j = 0;  j < checkOK.length;  j++)
					  if (ch == checkOK.charAt(j))
					  break;
					  if (j == checkOK.length)
						{
						  allValid = false;
						  break;
						}
				  }
				if(frm.tbname.value.charAt(0)==' ')
				{
					 alert("Your name cannot start with spaces.");
					frm.tbname.focus();
					flg=false;						
					 return false;
				}
			if (!allValid)
			  {
				 alert("Please enter a valid name.");
				frm.tbname.focus();
				flg=false;
				 return false;
			  }
		}		
		//////////////////////////
		if (trim(frm.tbaddr.value)=='')
		{
			alert("Please enter your address.");
			frm.tbaddr.focus();
			flg=false;
			return false;
		}
		if (frm.tbaddr.value!='')
		{
		 var checkAdd = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789(),.'/- ";
		 var checkStrAdd =frm.tbaddr.value;
		
		 var allValidAdd = true;
		  for (m = 0;  m< checkStrAdd.length;  m++)
			  {
				ch = checkStrAdd.charAt(m);
				for (n = 0; n < checkAdd.length; n++)
					if (ch == checkAdd.charAt(n))
					break;
					if (n == checkAdd.length)
						{
							allValidAdd = false;
							break;
						}
			  }
			  if(frm.tbaddr.value.charAt(0)==' ')	  
			  {
				  alert("Address cannot start with spaces.")
				  frm.tbaddr.focus();
				  flg=false;
				  return false;
			  }
			if (!allValidAdd)
			 {
				alert("Please enter a valid address.");
				frm.tbaddr.focus();
				flg=false;
				return false;
			}
		}
		/////		
		
		if(trimSpace(frm.tbpin.value)=='')
		{
			alert("Please enter pin code.")
			frm.tbpin.focus();
			flg=false;
			return false;
		}
		if(trimSpace(frm.tbpin.value)!='' && (isNaN(frm.tbpin.value) || (frm.tbpin.value).indexOf('.')!=-1 || trimSpace(frm.tbpin.value).length<6 || parseInt(trimSpace(frm.tbpin.value))==0))
		{
			alert("Please enter a valid pin code.")
			frm.tbpin.focus();
			flg=false;
			return false;
		}
		
		if(frm.tbstate.value=='')
		{
			alert("Please select the state.")
			frm.tbstate.focus();
			flg=false;
			return false;
		}
		if(trim(frm.tbphone.value)=='' )
		{
			alert("Please enter the telephone.")
			frm.tbphone.focus();
			flg=false;
			return false;		
		}
		if(frm.tbphone.value!='' && (isNaN(frm.tbphone.value) || (frm.tbphone.value).indexOf('.')!=-1 || frm.tbphone.value.length<7 || parseInt(frm.tbphone.value)==0))
		{		
			alert("Please enter a valid telephone number.")
			frm.tbphone.focus();
			flg=false;
			return false;
		}
		if(frm.tbemail.value=='')
		{
			alert("Please enter the email id.")
			frm.tbemail.focus();
			flg=false;
			return false;
		}
		if (trim(frm.tbemail.value)!='')	
		{
			if(!emailValidate(frm.tbemail.value, '') || frm.tbemail.value=='')
			{
			alert('Please enter a valid email id');
			frm.tbemail.focus();
			flg=false;
			return false;
			}
		}
		////
		if(!frm.excust[0].checked && !frm.excust[1].checked)
		{
			alert('Please answer whether you\'re a Barclays customer.');
			frm.tbemail.focus();
			flg=false;
			return false;		
		}
		if(frm.comment_nature.value=='')
		{
			alert('Please select the nature of your comment.');
			frm.comment_nature.focus();
			flg=false;
			return false;
		}
		if(frm.rel_comment.value=='')
		{
			alert('Please tell us what your comment relates to.');
			frm.rel_comment.focus();
			flg=false;
			return false;
		}
		if(frm.comment.value=='')
		{
			alert('Please enter your comments.');
			frm.comment.focus();
			flg=false;
			return false;
		}
		if(frm.comment.value!='')
		{
		 var checkAdd = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()-,.'/ ";
		 var checkStrAdd =frm.comment.value;
		
		 var allValidAdd = true;
		  for (m = 0;  m< checkStrAdd.length;  m++)
			  {
				ch = checkStrAdd.charAt(m);
				for (n = 0; n < checkAdd.length; n++)
					if (ch == checkAdd.charAt(n))
					break;
					if (n == checkAdd.length)
						{
							allValidAdd = false;
							break;
						}
			  }
			  if(frm.comment.value.charAt(0)==' ')	  
			  {
				  alert("Comments cannot start with spaces.")
				  frm.comment.focus();
				  flg=false;
				  return false;
			  }
			if (!allValidAdd)
			 {
				alert("Please enter a valid comment details.");
				frm.comment.focus();
				flg=false;
				return false;
			}
		}
		
		if(flg==true)
		{
			document.suggestn.submit();			
		}


}


//New to NRI Banking//

function showdetailsFaq_apply(d,e,f)
			{		
			
				for(j=1;j<=e;j++)
					{
					
						if(d==j)
							{
								if(eval(document.getElementById('divfaq'+j)).style.display=='none')
									{
										eval(document.getElementById('divfaq'+j)).style.display=''
										eval(document.getElementById('imgfaq'+j)).src='/common/images/minus.gif'
									}
								else
									{
										eval(document.getElementById('divfaq'+j)).style.display='none'
										eval(document.getElementById('imgfaq'+j)).src='/common/images/plus.gif'
									}
							}
						else
							{
								eval(document.getElementById('divfaq'+j)).style.display="none"
								eval(document.getElementById('imgfaq'+j)).src='/common/images/plus.gif'
							}
					}
			}
							window.onload=showdetailsFaq