/*function changeMenu(menuId){
	if(document.getElementById(menuId).style.display=="none"){
		menuHide();
		document.getElementById(menuId).style.display="block";
	}else{
 		menuHide();
		document.getElementById(menuId).style.display="none";
	}
}
function menuHide(){
		if(document.getElementById("scnd1"))
			document.getElementById("scnd1").style.display="none";
			
		if(document.getElementById("scnd3"))
			document.getElementById("scnd2").style.display="none";
			
		if(document.getElementById("scnd3"))			
			document.getElementById("scnd3").style.display="none";

		if(document.getElementById("scnd4"))			
			document.getElementById("scnd4").style.display="none";
			
		if(document.getElementById("scnd5"))			
			document.getElementById("scnd5").style.display="none";
			
		if(document.getElementById("scnd6"))
			document.getElementById("scnd6").style.display="none";
			
		if(document.getElementById("scnd7"))			
			document.getElementById("scnd7").style.display="none";
}
function displayingcontent(headtitle,headcontent,imgname,imgno){
	document.getElementById("headingcontent").innerText=headtitle;
	document.getElementById("information").innerText=headcontent;
	var slidelength=document.getElementById("totfr").innerHTML;
	//alert("slidelength "+slidelength);
	for(i=1;i<slidelength;i++){
		var iname="img"+i;
		//alert(iname);
		var imval=document.getElementById(iname).src;
		var url = imval;	
		url = url.substring(url.lastIndexOf("/") + 1, url.length);
		
		var imgtxt=url.split("_");
		var filenametxt=imgtxt[0];
		//alert("filename "+filenametxt);
		
		document.getElementById(iname).src=filenametxt;
	}	
	if(document.getElementById(imgno))		
		document.getElementById(imgno).src=imgname;
}*/


function displayingcontent(headtitle,headcontent,imgname,imgno,knowMoreLink,applynowURL){
	document.getElementById("headingcontent").innerHTML=headtitle;
	document.getElementById("information").innerHTML=headcontent;
	var slidelength=document.getElementById("totfr").innerHTML;
	
	for(i=0;i<slidelength;i++){
		var iname="img"+i;
		if(iname==imgno) {
			document.getElementById(imgno).src=imgname;
		} else {
			var imval=document.getElementById(iname).src;
			var url = imval;	
			url = url.substring(url.lastIndexOf("/") + 1, url.length);
			var imgtxt=url.split("_");
			var filenametxt=imgtxt[0];
			var fNameExt = filenametxt.substring(filenametxt.indexOf(".")+1, filenametxt.length);
			var fName = filenametxt.substring(0, filenametxt.indexOf(".")+1);
			if(fNameExt=="Image2") {
				fNameExt = "Image";
			}
			filenametxt=fName+""+fNameExt;
			document.getElementById(iname).src=filenametxt;
		}
	}

	//document.getElementById("linkURL").href="index.jsp?navigationUrl=GlobalBanking_Oprhan&pageTitle="+headtitle;
	//if(headtitle=="GIBApplyNow")document.getElementById("linkURL").href="index.jsp?navigationUrl=GIB_CallMeBack_Oprhan&screenTitle=applynow";
	//if(headtitle=="SMESurvey")document.getElementById("linkURL").href="https://www.surveymonkey.com/s/SMEAWARDS";

	document.getElementById("linkURL").href=applynowURL;
	document.getElementById("knMoreURL").href=knowMoreLink;
		
	/*if(document.getElementById(imgno))		
		document.getElementById(imgno).src=imgname;*/
}
 
/* 
function fLogon(){
		var idAPP;
		for(var j=0;j<document.form1.loginType.length;j++){
			if(document.form1.loginType[j].checked){
				idAPP = document.form1.loginType[j].value;
			}
		}
		document.form1.target = "newwindow";

		if (idAPP=="PC") {
			document.form1.action = "https://prepaid.yesbank.co.in/YESBANKCUSTOMER/html/";
			window.open("", "newwindow", "resizable=yes,scrollbars=yes,toolbar=no,menubar=no,width=1000,height=690,left=0,top=0");
		}else if(idAPP == "CO") {
			document.form1.action = "https://netbanking.yesbank.co.in/corpbanking/entry"; 
			window.open("", "newwindow", "resizable=yes,scrollbars=yes,toolbar=no,menubar=no,width=1000,height=690,left=0,top=0");		
		}else if(idAPP == "RR"){
			document.form1.action = "/com/yesbank/hurdlepage/hurdlepage.jsp";
			window.open("", "newwindow", "resizable=0,scrollbars=yes,toolbar=no,menubar=no,location=no,width=1000,height=690,left=5,top=5");
		}

		document.form1.fldAppId.value=idAPP;
		document.form1.submit ();
		document.form1.target = null;
		return false;
} 
*/

function fLogon(){
		var idAPP;
		for(var j=0;j<document.form1.loginType.length;j++){
			if(document.form1.loginType[j].checked){
				idAPP = document.form1.loginType[j].value;
			}
		}

		if(idAPP == "RR") {
			document.form1.action = "https://netbanking.yesbank.co.in/netbanking/entry";
			setTimeout('bill_payment()',3000);			
		} else if (idAPP == "CO") {
			document.form1.action = "https://netbanking.yesbank.co.in/corpbanking/entry"; 
		}else if (idAPP=="PC") {
			//document.form1.action = "https://test.yalamanchili.co.in/YESBANKCUSTOMER/html/";
			document.form1.action = "https://prepaid.yesbank.co.in/YESBANKCUSTOMER/html/";
		}

		document.form1.fldAppId.value=idAPP;
		document.form1.target = "newwindow";
		//window.open("", "newwindow", "resizable=yes,scrollbars=yes,toolbar=no,menubar=no,width=1000,height=690,left=130,top=175");
		window.open("", "newwindow", "resizable=yes,scrollbars=yes,toolbar=no,menubar=no,width=1000,height=690,left=0,top=0");
		document.form1.submit ();
		document.form1.target = null;
		return false;
} 

function bill_payment(){
		var path = "/moneyMonitor.jsp";
		var dept=window.open (path, null,
			"dependant=no,directories=no,location=no,menubar=no"
		+	",resizable=yes,scrollbars=yes,titlebar=no,toolbar=no"
		+	",height=438,width=838,top=150,left=150,status=no");
}

function logon_continue(customerType){
		if(customerType == "RR") {
			document.hurdlepage.action = "https://netbanking.yesbank.co.in/netbanking/entry";
		} else if (customerType == "CO") {
			document.hurdlepage.action = "https://netbanking.yesbank.co.in/corpbanking/entry";
		}
		document.hurdlepage.fldAppId.value=customerType;
		document.hurdlepage.submit();
		document.hurdlepage.target = null;
		
}

function togglefn(togname,imgname,popname){

	//alert("togname "+togname+" imgname "+imgname+" popname "+popname);

	if(document.getElementById(togname).style.display=="none"){
		document.getElementById(togname).style.display="block";
		
		document.getElementById(imgname).src="/images/box_collapse.gif";
		
		/*if(document.getElementById(popname))
			document.getElementById(popname).style.display="block";*/
	}
	else if(document.getElementById(togname).style.display=="block"){
		document.getElementById(togname).style.display="none";
		document.getElementById(imgname).src="/images/box1_expand.gif";
		
		/*if(document.getElementById(popname))
			document.getElementById(popname).style.display="none";*/
	}
} 

function tabanimation(tabname){
	if(document.getElementById(tabname).style.display=="none"){
	
		if(document.getElementById('contacts1'))
			document.getElementById('contacts1').style.display="none";
		
		if(document.getElementById("contacts2"))
			document.getElementById("contacts2").style.display="none";
			
		if(document.getElementById("contacts3"))
			document.getElementById("contacts3").style.display="none";
			
		if(document.getElementById("contacts4"))
			document.getElementById("contacts4").style.display="none";
			
		if(document.getElementById("contacts5"))
			document.getElementById("contacts5").style.display="none";
			
		if(document.getElementById("contacts6"))
			document.getElementById("contacts6").style.display="none";
	
		if(document.getElementById("contacts7"))
			document.getElementById("contacts7").style.display="none";			
		
		if(document.getElementById(tabname))
			document.getElementById(tabname).style.display="block"
		
	}else{
	
		if(document.getElementById('contacts1'))
			document.getElementById('contacts1').style.display="none";
		
		if(document.getElementById("contacts2"))
			document.getElementById("contacts2").style.display="none";
			
		if(document.getElementById("contacts3"))
			document.getElementById("contacts3").style.display="none";
			
		if(document.getElementById("contacts4"))
			document.getElementById("contacts4").style.display="none";
			
		if(document.getElementById("contacts5"))
			document.getElementById("contacts5").style.display="none";
			
		if(document.getElementById("contacts6"))
			document.getElementById("contacts6").style.display="none";
	
		if(document.getElementById("contacts7"))
			document.getElementById("contacts7").style.display="none";			
		
		if(document.getElementById(tabname))
			document.getElementById(tabname).style.display="none"
	}
}

