javascript:window.history.forward(1);

function func_SRstatus(){
	document.form1.productType_Option.value='CheckPreviousStatus';
	document.form1.aos.value="TYSR"
	//document.form1.action = "http://10.16.18.194:9081/web/L001/corporate/jsp/ebpp/fcrmrequestUnsec.jsp";
	//document.form1.action = "https://10.16.168.71:9447/web/L001/corporate/jsp/ebpp/fcrmrequestUnsec.jsp";
	//document.form1.action = "https://infinity.icicibank.co.in/web/L001/corporate/jsp/ebpp/fcrmrequestUnsec.jsp";
	document.form1.submit();
}



function func_staticPage()
{
  // alert("** funtion Static Pages");
   
		
	if(Form1_Validator(document.form1))
    {
        if(document.form1.app_product1.value=='select' || document.form1.app_product1.value=='')
	{
		alert("Please select Product");
		document.form1.app_product1.focus();
		return false;
	}
	if(document.form1.app_product2.value=='SelectAccount' || document.form1.app_product2.value=='')
	{
		alert("Please select Relating to");
		document.form1.app_product2.focus();
		return false;
	}
	//////////
	  if(document.form1.app_product3.value=="Others")
		{
		alert("Others");
		return false;
       }
	//////////
	
		if(document.form1.app_product3.value=="Online Application Status"){
		
		document.form1.action="https://infinity.icicibank.co.in/web/cards/creditcard/jsp/ccNonLoginApplicationStatus.jsp";
		document.form1.submit();
	}
	
	else if(document.form1.app_product3.value=="Track your online application"){
			
		document.form1.action="https://infinity.icicibank.co.in/salesEARWeb/web/nriapplyonline/jsp/nriLogin.jsp";
		document.form1.submit();
	}
		if(document.form1.app_product3.value!="Online Application Status" ){
			if(document.form1.app_product3.value!="Track your online application"){
			 if(document.form1.app_product3.value=='Select' || document.form1.app_product3.value=='' || document.form1.app_product3.value==0)
			{
				alert("Please select value for Type of Request");

				document.form1.app_product3.focus();
				return false;
			}else{
			
	//document.form1.action = "https://10.16.168.71:9447/web/L001/corporate/jsp/ebpp/fcrmrequestUnsec.jsp";
	//**alert("form has been submitted Successfully");
	//if (document.form1.customer.value==1){
	
//	alert("Thank you for contacting us. Your views are important as they help us in our constant endeavour to improve our products and services for you. We will forward your message to the appropriate department who will contact you shortly.");		
//	}
			document.form1.submit();
			}
			}
		}
}
}

function func_go()
{	
	if(document.form1.select3.value=='Others')
		{
			
		}
	else
		{
	if(Form1_Validator(document.form1))
		{
		//alert("**Validation Done");
		document.form1.submit();
		return true;
	   }
  }
}

function func_previous_page(){
	go.style.visibility='visible';
	link.style.visibility='hidden';
	func_yes_no(0);
	document.form1.customer[1].checked=  false;
	
	document.form1.customer[0].checked=  true;
    original_HomePage.style.display="";
     home_Page.style.display="none";

 select_product.style.display='none';
relating_to.style.display='none';
what_would.style.display='none';
//application_no.style.display='none';
accountNot_There.style.display = 'none';
select_heading.style.display = 'none';
accnt_restricted.style.visibility='hidden';
hide_yes_no.style.display="";
previous_page.style.display='none';
relating_to_Go.style.display='none';

select_product.style.display="";
relating_to.style.display="";
what_would.style.display='none';
//application_no.style.display='none';
accountNot_There.style.display = 'none';
select_heading.style.display = "";
accnt_restricted.style.visibility='visible';
hide_yes_no.style.display="";
previous_page.style.display='none';
app_status_product.style.display="none";
relating_to_Go.style.display='';

document.form1.select1.options[0].selected = 'true';
document.form1.select2.options[0].selected = 'true';
document.form1.select3.options[0].selected = 'true';
remove_select2();
remove_select3();
	
}

function func_yes_no(val){

if(val==0){
select_product.style.display='none';
relating_to.style.display='none';
what_would.style.display="";
//application_no.style.display='none';
accountNot_There.style.display = "";
select_heading.style.display = "";
//accnt_restricted.style.visibility='visible';
accnt_restricted.style.visibility='hidden';
cms.style.visibility='hidden';
accnt_notThere.style.display='none';
hide_yes_no.style.display="";
previous_page.style.display='none';
app_status_product.style.display="none";
relating_to_Go.style.display='none';
link.style.visibility='hidden';
document.form1.query.value="";
document.form1.email1.value="";
document.form1.email2.value="";
document.form1.city_code.value="";
document.form1.phone.value="";
document.form1.address1.value="";
document.form1.city.value="";
document.form1.pincode.value="";
document.form1.account_not.selectedIndex=0;
document.form1.select4.selectedIndex=76;
}else  if(val==1){
//*
//alert("Yes clicked");
accnt_notThere.style.display='';		
go.style.visibility='visible';
select_product.style.display="";
relating_to.style.display="";
what_would.style.display='none';
//application_no.style.display='none';
accountNot_There.style.display = 'none';
select_heading.style.display = "";
accnt_restricted.style.visibility='visible';
hide_yes_no.style.display="";
previous_page.style.display='none';
app_status_product.style.display="none";
relating_to_Go.style.display='';
cms.style.visibility='hidden';
link.style.visibility = 'hidden';
document.form1.accno.value="";
document.form1.select1.selectedIndex=0;
document.form1.select2.selectedIndex=0;
document.form1.cmsno.value="";

}else if(val==2){
form1.aos.value="AOS";
select_product.style.display="none";
app_status_product.style.display="";
relating_to.style.display='none';
what_would.style.display='none';
//application_no.style.display="";
accountNot_There.style.display = 'none';
select_heading.style.display = "";
accnt_restricted.style.visibility='hidden';
cms.style.visibility='hidden';
hide_yes_no.style.display="";
previous_page.style.display='none';
relating_to_Go.style.display='none';
document.form1.customer[0].checked=false;
document.form1.customer[1].checked=false;
link.style.visibility='hidden';
display.style.visibility='visible';
}

}

// Removing the left spaces 

function LTrim(VALUE)
{
	var w_space = String.fromCharCode(32);
	if(v_length < 1){
		return"";
	}
var v_length = VALUE.length;
var strTemp = "";

var iTemp = 0;

while(iTemp < v_length){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(iTemp,v_length);
break;
}
iTemp = iTemp + 1;
} //End While
return strTemp;
} //End Function


//removing the right spaces

function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){
return"";
}
var iTemp = v_length -1;

while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;

} //End While
return strTemp;

} //End Function


//Validate Function 


function validate(value,checkOk)
{
	var checkStr = 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 (!allValid)
					{
						return (false);
									
					}
					else { return (true); }
	}





//Check Email
function checkemail(value)
{
		var checkStr = value;
		checkemail1=false;
		
		
		for (i = 0;  i < checkStr.length;  i++)
			{
				ch = checkStr.charAt(i);
				if (ch==".") checkemail1=true;
			}
			
			
		
		if (!(checkemail1))
					{
					return (false);
					}
					
			else 
					{
						var n=value.length;
						var text=".";
						var i=value.indexOf(text);
						var l=value.lastIndexOf(text);
						var checklen=value.substring(i,n);
						var checklast=value.substring(l,n);
						if (checklen.length<=1 || checklast.length<=1)
							{
							return (false);
							}
						else { return (true);}
						}
	
	}

	//check pipe name

function fnCheckPipe(fieldName)
	{
		var flag = false;
		
		if(window.event.keyCode==124 ||(fieldName.value.indexOf("|")!=-1) || window.event.keyCode==58 
			||(fieldName.value.indexOf(":")!=-1))
		{
			alert("You cannot enter special character '|' and :");
			fieldName.focus();
			flag = false;
		}
		else if(fieldName.value.length > 1000)
		{
			alert("Maximum 1000 characters accepted");
			fieldName.focus();
			flag = false;
		}
		else
		flag = true;
		return flag;

	}

function Form1_Validator(theForm)
{
	flag=true;
	
	function emptystring(value)
	{
	 if (value=="") return (false);
	 else return(true);
	 }
	
   


	// First Name 
	theForm.first_name.value = LTrim(theForm.first_name.value);
	theForm.first_name.value = RTrim(theForm.first_name.value);

	if (!emptystring(theForm.first_name.value))
		 {
			alert("Please enter First Name");
			theForm.first_name.focus();
			flag=false;
			return (false);
		}
  
	   else {

           var checkOk = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' .";
			if (!(validate(theForm.first_name.value,checkOk)))
				{
				alert("Please enter valid First Name");
				theForm.first_name.focus();
				flag=false;
				return (false);
				}
		}

  //Last Name 
	theForm.last_name.value = LTrim(theForm.last_name.value);
	theForm.last_name.value = RTrim(theForm.last_name.value);

	if (!emptystring(theForm.last_name.value))
		 {
			alert("Please enter Last Name");
			theForm.last_name.focus();
			flag=false;
			return (false);
		}
  
   else {

           var checkOk = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' .";
			if (!(validate(theForm.last_name.value,checkOk)))
				{
				alert("Please enter valid Last Name");
				theForm.last_name.focus();
				flag=false;
				return (false);
				}
		}
		
		//Select Product		

if(accountNot_There.style.display=="")
{
		if(form1.account_not.value=="select" ||( form1.account_not.value==""  ) ) 
		{
			alert("Please select Product");
			form1.account_not.focus();
			flag=false;
			return (false);
		}
}
	
if(select_product.style.display=="")
{
if (form1.select1.value=="select")
		 {
			alert("Please select product");
			form1.select1.focus();
			flag=false;
			return (false);
		}

		if (form1.select2.value=="SelectAccount" || form1.select2.value=="")
		 {
			alert("Please select query relating to");
			form1.select2.focus();
			flag=false;
			return (false);
		}
		
		if (form1.select3.value=="select" || form1.select3.value=="" || form1.select3.value==0)
		 {
			alert("Please select type of request");
			form1.select3.focus();
			flag=false;
			return (false);
		}
	
	}
		
			if(form1.select1.value=="Cash Management Services"){
				tempcms=form1.select1.value;

				var checkOk="";
				if((validate(form1.cmsno.value,checkOk)))
				{
					alert("Please enter cms number");
					//form1.accno.value=="";
					//form1.accno.focus();
					//form1.cmsno.value=="";
					//form1.cmsno.focus();
					//flag=false;
					//return (false);
				}

				var checkOk="0123456789";
		if ((validate(form1.cmsno.value,checkOk)))
				{

				alert("Please enter a alpha numeric Number");
				form1.cmsno.value=="";
				form1.cmsno.focus();
				flag=false;
				return (false);
				}

				var checkOk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
			if ((validate(form1.cmsno.value,checkOk)))
				{

				alert("Please enter a alpha numeric Number");
				form1.cmsno.value=="";
				form1.cmsno.focus();
				flag=false;
				return (false);
				}
				else{   
			var checkOk ="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
			if ((validate(form1.cmsno.value,checkOk)))
				{
				//alert(validate(form1.cmsno.value,checkOk));
				//alert("Please enter a valid CMS Number");
				//form1.cmsno.value=="";
				//form1.cmsno.focus();
				//flag=true;
				//return (true);
				}else{
				alert("Please enter a valid CMS Number");
				flag=false;
				return (false);
				}
			if(form1.cmsno.value.length!=8 ) 
				{
				alert("Please enter 8 digit valid CMS Number");
				form1.cmsno.focus();
				flag=false;
				return (false);
				}
			
			}

			
} 

if(select_product.style.display=="" && (document.form1.select3.value=="Others"||document.form1.select2.value!="Select" )&& document.form1.app_product2.value!="Account Opening" || document.form1.customer.value=="Yes")

	//alert("dfkdjfkdj");
{
	 
	
	
	var  accnt_value = document.form1.accno.value;
	if(accnt_value==""){
	alert("Please enter Account Number");
	//form1.accno.focus();
    flag=false;
	return (false);
	
}

if(isNaN(accnt_value)){
				alert("Please enter valid Account Number");
				form1.accno.focus();
				flag=false;
				return (false);
				}

if(accnt_value.charAt(4)!=0) {
		alert("please enter valid 12 digit Bank Account Number");

		document.form1.accno.focus();
		flag = false;
		return(false);
	}
	if( (accnt_value.charAt(5)!=1)&& (accnt_value.charAt(5)!=5) )  {
		alert("Please enter valid 12 digit Bank Account Number");
		document.form1.accno.focus();
		flag = false;
		return(false);
	}
	if(accnt_value.length!=12 ) {
		alert("Please enter 12 digit Bank Account Number");
		form1.accno.focus();
		flag=false;
		return (false);
	}
 
 
// alert("**I am here");
 
var kk = document.form1.select3.value;
var str_validate = document.form1.srData_required.value;
var  pp = kk.split('^');
//var dd = str_validate.split('@@');
//alert("vasau");
if(str_validate.match(pp[2])==null ||   document.form1.select3.value=="Others")
{
//alert("vasu");
if(accnt_value==""){
	alert("Please enter Account Number");
	form1.accno.focus();
    flag=false;
	return (false);
}
if(isNaN(document.form1.accno.value)){
				alert("Please enter valid Account Number");
				form1.accno.focus();
				flag=false;
				return (false);
			}

//------------Credit Card--------------------//

var accnt_product = document.form1.select1.value;
	
	if(accnt_value.charAt(4)!=0) {
		alert("please enter valid 12 digit Bank Account Number");

		document.form1.accno.focus();
		flag = false;
		return(false);
	}
	if( (accnt_value.charAt(5)!=1)&& (accnt_value.charAt(5)!=5) )  {
		alert("Please enter valid 12 digit Bank Account Number");
		document.form1.accno.focus();
		flag = false;
		return(false);
	}
	if(accnt_value.length!=12 ) {
		alert("Please enter 12 digit Bank Account Number");
		form1.accno.focus();
		flag=false;
		return (false);
	}
	
//}
//}*/

}
else{
			if(isNaN(document.form1.accno.value)){
				alert("Please enter valid Account Number");
				form1.accno.focus();
				flag=false;
				return (false);
			}
		}

}

//Validation to check ICICI Bank Customer
//var temp=theForm.account_not.value;
//var len=theForm.accno.value.length;

// validation for textarea------------------

if( what_would.style.display==""){
if(document.form1.query.value==""){
alert("Please enter your request/query details");

	theForm.query.focus();
	flag=false;
	return (false); 
}
}


//validation for the Email ID

theForm.email1.value=LTrim(theForm.email1.value);
theForm.email1.value=RTrim(theForm.email1.value);
theForm.email1.value=LTrim(theForm.email1.value);
theForm.email1.value=RTrim(theForm.email1.value);

if(what_would.style.display=="")

{

	if (!(emptystring(theForm.email1.value)))
		{
			alert("Please enter a valid E-mail ID");

			theForm.email1.focus();
			flag=false;
			return (false);
		}
	else if (!(emptystring(theForm.email2.value)))
		{
			alert("Please enter a valid E-mail ID");

			theForm.email2.focus();
			flag=false;
			return (false);
		}
	else 
		{
           var checkOk = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.";
		if (!(validate(theForm.email1.value,checkOk)))
		 {
				alert("Please enter a valid E-mail ID");

				//theForm.email.value="";
				theForm.email1.focus();
				flag=false;
				return (false);
				}
			
			 else if (!(validate(theForm.email2.value,checkOk)) || (!checkemail(theForm.email2.value)))
				{
				alert("Please enter a valid E-mail ID");

				//theForm.email.value="";
				theForm.email2.focus();
				flag=false;
				return (false);
				}
	}

	}



//Validation for telephone

//Phone no 
	
	
	theForm.city_code.value=LTrim(theForm.city_code.value);
	theForm.city_code.value=RTrim(theForm.city_code.value);
	
	if(what_would.style.display=="")

	{

	if (!(emptystring(theForm.city_code.value)))
		{
			alert("Please enter your STD code");

			theForm.city_code.focus();
			flag=false;
			return (false);
		}
	 else {

           var checkOk ="0123456789";
			if (!(validate(theForm.city_code.value,checkOk)))
				{
				alert("Please enter a valid STD code");

				theForm.city_code.focus();
				flag=false;
				return (false);
				}
		}




	theForm.phone.value=LTrim(theForm.phone.value);
	theForm.phone.value=RTrim(theForm.phone.value);
	
	if (!(emptystring(theForm.phone.value)))
		{
			alert("Please enter your Phone Number");

			theForm.phone.focus();
			flag=false;
			return (false);
		}
	else {

           var checkOk ="0123456789";
			if (!(validate(theForm.phone.value,checkOk)))
				{
				alert("Please enter the valid Phone Number");

				theForm.phone.focus();
				flag=false;
				return (false);
				}
		}


		}
		


//Validation for the address field
theForm.address1.value=LTrim(theForm.address1.value);
theForm.address1.value=RTrim(theForm.address1.value);

if(what_would.style.display=="")

{

	if (!(emptystring(theForm.address1.value)))
		{
			alert("Please enter your Correspondence Address");
			theForm.address1.focus();
			flag=false;
			return (false);
		}


}
//Validation for City
theForm.city.value=LTrim(theForm.city.value);
	theForm.city.value=RTrim(theForm.city.value);

	if(what_would.style.display=="")

	{
 
	if (!emptystring(theForm.city.value))
		 {
			alert("Please enter the City");

			theForm.city.focus();
			flag=false;
			return (false);
		}
   else 
		{
           var checkOk ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz. ";
			if (!(validate(theForm.city.value,checkOk)))
				{
				alert("Please enter the valid City");

				theForm.city.value="";
				theForm.city.focus();
				flag=false;
				return (false);
				}
		}

}
//Country
if(what_would.style.display=="")
{

if (theForm.Country1.value=="")
		 {
			alert("Please select your Country");
			flag=false;
			return (false);
		}

}
//Validation for Pin Code
theForm.pincode.value=LTrim(theForm.pincode.value);
theForm.pincode.value=RTrim(theForm.pincode.value);
 
 if(what_would.style.display=="")

 {

	if (!emptystring(theForm.pincode.value))
		 {
			alert("Please enter the Pincode");
			theForm.pincode.focus();
			flag=false;
			return (false);
		}
   else 
		{
           var checkOk ="0123456789";
			if (!(validate(theForm.pincode.value,checkOk)))
				{
				alert("Please enter the valid Pincode");
				theForm.pincode.value="";
				theForm.pincode.focus();
				flag=false;
				return (false);
				}
		}
}

//end

/*Newly added function based on CR 2068 ABHILASH */
var nri=theForm.select3.value;

if((nri=="NRI" && theForm.customer.value=="Yes") && theForm.accno.value=='')
{
	alert("Please enter Account Number");
	accno.focus();
	flag=false;
	return false;
}

//	


if(flag)
	{ 
	if(go.style.visibility=="hidden"){
	//
	theForm.button.disabled=true;
	}	
	if(accountNot_There.style.display =="")
	{
	sendMail();
	}
		
	}	
	//Set this return value to true when you want to submit the form
	
		
return (flag) 
}

function clearDropDown(DropDownName,firstItemValue,firstItemTxt){
		document.all(DropDownName).length=0           //clear the events  
		O=new Option(firstItemTxt)  //add a default first option and set the value = -1
		O.value = firstItemValue 
//		document.all(DropDownName).add(O)
		if(navigator.appName == "Netscape")
		{
				 document.all(DropDownName).appendChild( O);
		}else{
				document.all(DropDownName).add(O)
		}	
		document.all(DropDownName).selectedIndex=0
	}


function remove_select3(){
	var  remv = document.form1.select3.length;
	 for(count1 = remv - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
}

function remove_select2(){
	var  remv = document.form1.select2.length;
	 for(count1 = remv - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select2.remove(count1);
       }
}

function func_app_product1(){

	var disable_data = document.form1.app_product1.value;
	document.form1.select_value.value = document.form1.app_product1.value;
	if(disable_data=="General Banking"){
	var Savings= ["Account Opening"];	
	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}
///////////////
	/*if(disable_data=="Corporate Internet Banking"){
	var Savings= ["Password","Others"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/
	
/*if(disable_data=="Cash Management Services"){
	var Savings= ["MIS-Reports","Others"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/

	/*if(disable_data=="NRI"){
	var Savings= ["NRI"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/
	/////////////
	
	/*if(disable_data=="Credit Card"){
	var Savings= ["Credit Card"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/

	/*if(disable_data=="Demat"){
	var Savings= ["Demat"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/
}


//yes button
//added by gopi
//function func_prod_select(){
//alert("gopichand");
//if(form1.select1.account_not == "Cash Management Services"){
//	alert("gopi");
//	accnt_notThere.style.visibility='hidden';
//}
//}

function func_app_productyes(){

	var disable_data = document.form1.select1.value;
	document.form1.select_value.value = document.form1.select1.value;
	if(disable_data=="General Banking"){
	var Savings= ["Account Statement","Cheque Clearing","Cheque Book","Account Closure","Debit Card/Debit Card Pin","Others"];	
    
var k = document.form1.select2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select2.appendChild( p);
		}else{
				document.form1.select2.add(p);
		}	 
	}
	 
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select2.remove(count1);
       }
    	//    remove_select3();

	}
///////////////
	if(disable_data=="Corporate Internet Banking"){
	var Savings= ["Password","Others"];	

var k = document.form1.select2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select2.appendChild( p);
		}else{
				document.form1.select2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select2.remove(count1);
       }
    	//    remove_select3();

	}
/////////////	
if(disable_data=="Cash Management Services"){
	var Savings= ["Others queries"];	

var k = document.form1.select2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select2.appendChild( p);
		}else{
				document.form1.select2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select2.remove(count1);
       }
    		
	}
/////////////
if(disable_data=="Trade Finance"){
	var Savings= ["Others queries"];	

var k = document.form1.select2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select2.appendChild( p);
		}else{
				document.form1.select2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select2.remove(count1);
       }
    		
	}
////////////
if(disable_data=="Other Products"){
	var Savings= ["Others"];	

var k = document.form1.select2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select2.appendChild( p);
		}else{
				document.form1.select2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select2.remove(count1);
       }
    		
	}
////////////


	/*if(disable_data=="NRI"){
	var Savings= ["NRI"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/
	/////////////
	
	/*if(disable_data=="Credit Card"){
	var Savings= ["Credit Card"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/

	/*if(disable_data=="Demat"){
	var Savings= ["Demat"];	

var k = document.form1.app_product2.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.app_product2.appendChild( p);
		}else{
				document.form1.app_product2.add(p);
		}	 
	}
	 
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.app_product2.remove(count1);
       }
    	//    remove_select3();

	}*/
}


//for yes third 

function func_app_productyes2(){

	var disable_data = document.form1.select2.value;
	document.form1.select_value.value = document.form1.select1.value;
	if(disable_data=="Account Statement"){
	var Savings= ["Request for Duplicate Statement(Hardcopy)","E-mail statement not received and Request","Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}
///////////////
	if(disable_data=="Cheque Clearing"){
	var Savings= ["Status of Local Cheque deposited in Bank Acccount","Status of Outstation Cheque deposited in Bank Account","Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}
	
if(disable_data=="Cheque Book"){
	var Savings= ["Status of Cheque Book applied not received","Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}

	if(disable_data=="Account Closure"){
	var Savings= ["Account Closure not done","Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}
	
if(disable_data=="Debit Card/Debit Card Pin"){
	var Savings= ["Status of Debit Card applied not received","Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}

	if(disable_data=="Others"){
	var Savings= ["Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}



if(disable_data=="Password"){
	var Savings= ["Password Locked","Password not received","Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p); 				
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}



	if(disable_data=="MIS-Reports"){
	var Savings= ["Status of daily report not received","Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}

	if(disable_data=="Others queries"){
	var Savings= ["Others"];	

var k = document.form1.select3.length;
	
	for(var j=0;j<Savings.length;j++){
	var p = new Option(Savings[j],Savings[j]);
//	 document.form1.select2.add( p);
if(navigator.appName == "Netscape")
		{
				 document.form1.select3.appendChild( p);
		}else{
				document.form1.select3.add(p);
		}	 
	}
	 for(count1 = k - 1 ; count1 >= 1 ; count1--)
	   {
            document.form1.select3.remove(count1);
       }
    	//    remove_select3();

	}

}

function getUrl()
{
//alert("Page Loded");
var sURL = window.document.URL.toString();
	
	if (sURL.indexOf("?") > 0)
	{
		var arrParams = sURL.split("?");
	    var pValue = arrParams[1]; 
		if(pValue=="wrongAttempt=yes")
		{
			var Fname;
			var Lname;
			var Title;
			 
			//alert(document.form1.hdnfname.value)
			//alert(document.form1.hdnlname.value)
			//alert(document.form1.hdntitle.value)
//document.form1.select1.options[0].selected = 'true';
			 document.form1.first_name.value=document.form1.hdntitle.value;
			 document.form1.last_name.value=document.form1.hdnfname.value;
			 //document.form1.select21.Value=document.form1.hdnlname.value;
	if(document.form1.hdnlname.value=='Mr.')
		{
		document.form1.select21.options[0].selected = 'true';
		}
	 if(document.form1.hdnlname.value=='Mrs.')
		{
		document.form1.select21.options[1].selected = 'true';
		}
	 if(document.form1.hdnlname.value=='Ms.')
		{
		document.form1.select21.options[2].selected = 'true';
		}
	 if(document.form1.hdnlname.value=='Dr.')
		{
		document.form1.select21.options[3].selected = 'true';
		}
			document.form1.select21.selected=true;
			 
			 
			document.form1.customer[1].checked=true;
			func_yes_no(0);
		}
    }
     
  }

