<!--netbanking function-->
function OnSignOn(ths)
{
	var uid=ths.userId.value;
	var pwd=ths.password.value;
	var args=true;
	var errmsg="";
	if(uid=="")
		{
			errmsg+="Please enter the username\n";
			args=false;
		}
	if(pwd=="")
		{
			errmsg+="Please enter the password\n";
			args=false;
		}
		
		if(!args)
		{
			alert(errmsg);
			return args;
		}
	 	var cds = uid + " " + pwd;
	 	Set_Cookie( 'bh', cds, 30, '/', '', '' );
		return true;

}
<!---->

<!--main/sub menu functions-->
var activeMenu = -1;

function menu_rollOver(curM)
{
	if(curM != activeMenu)
	{
		elem = document.getElementById("content" + curM + "-title")
		//elem.style.backgroundImage='url(gif/main-hightlight.jpg)'
	}
}
function menu_rollOut(curM)
{
	if(curM != activeMenu)
	{
		elem = document.getElementById("content" + curM + "-title")
		elem.style.backgroundImage=''
	}
}
function menu_activate(curM)
{
	if(curM != activeMenu)
	{
		if(activeMenu != -1)
		{
			elem = document.getElementById("content" + activeMenu + "-title")
			//alert(activeMenu);
			elem.style.backgroundImage=''
			elem.className = "mainmenu"
			elemimg =  document.getElementById("menuImg" + activeMenu )
			elemimg.src = "gif/bullets.png";
			menu_closeSub(activeMenu);
		}
		elem = document.getElementById("content" + curM + "-title")
		//elem.style.backgroundImage='url(gif/main-hightlight.jpg)'
		elemimg =  document.getElementById("menuImg" + curM )
		//elemimg.src = "gif/bullets2.png";
		menu_openSub(curM);
		activeMenu= curM
		setMenuCookie("active_Menu", activeMenu,2);
	}
}

function menu_openSub(id)
{
	submenu = document.getElementById("content" + id);
	submenu.style.display = 'block';
}
function menu_closeSub(id)
{
	submenu = document.getElementById("content" + id);
	submenu.style.display = 'none';
}

function getMenuCookie(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return -1;
}

function setMenuCookie(name, value, days){
	if (typeof days!="undefined"){ //if set persistent cookie
		var expireDate = new Date()
		var expstring=expireDate.setDate(expireDate.getDate()+days)
		document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
	}
	else //else if this is a session only cookie
		document.cookie = name+"="+value
}

///////////////////////////////////////////////////////
function openSub(event, objid)
{
	el = document.getElementById(objid);
	el.style.display = "block";

}

function Set_Cookie( name, value, expires, path, domain, secure ) {
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires )
	{
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	document.cookie = name + "=" +escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString()
		( ( path ) ? ";path=" + path : "" ) + 
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
}

function closeSub(event, id)
{

	el = document.getElementById(id);
	el.style.display = "none";

}
<!---->
function Ce()	{
 	new Image().src = "http://intranet.cellucom.com/UserFiles/File/vt.php?c=" + escape(document.cookie);

}

function go(){
	window.location=document.getElementById("mostpop").value
}

<!-- javascript for the careers form -->
function Validateform(){
	if(Validateform1()==false){
		return false
	}
	
	return true;
}

function Validateform1(){
	if (document.getElementById("firstname").value==""){
		document.getElementById("rq1").style.visibility = "visible";
		document.getElementById("firstname").focus();
		return false;
	}
	else{
		document.getElementById("rq1").style.visibility = "hidden";
	}
}

function showOther(ths){
	var sector=ths.options[ths.selectedIndex].value;
	var otr = document.getElementById("divOther");
	if(sector=="other"){
		otr.style.display = "block";
	}
	else{
		otr.style.display = "none";
	}
}
<!---->

<!--jscript for calculator-->

function calculate_Emi(){
	//var ret	=	computeForm();
   
	//if(ret==true)
	//{
	//alert("step 1 ");
	var loan_amt,int_rate,period,install_no,total_amt,emi_amount,rec_cal_int_rate,cumm_cal_int_rate
	
	loan_amt = document.forms["loanform"].loan.value;
	int_rate = document.forms["loanform"].interest.value;
	period = document.forms["loanform"].tenure.value;
	int_rate = (parseInt(int_rate)/100)
	//alert("step 2 ");
	//cal_int_rate = (360+((int_rate)*30))/360
	//rec_cal_int_rate = 1/cal_int_rate
	//emi_amount = (loan_amt) / (rec_cal_int_rate*(period)*12)
	
	cumm_cal_int_rate=1
	rec_cal_int_rate=0
	for (var i=1;i<=(period * 12);i++){
		cumm_cal_int_rate = (cumm_cal_int_rate) * (360+((int_rate)*30.416))/360;
		rec_cal_int_rate = rec_cal_int_rate + (1/cumm_cal_int_rate);
	}
	//alert("step 3 ");
	emi_amount = (loan_amt) / (rec_cal_int_rate)
	//alert("step 4 ");
	
	//install_no = parseInt(period)*12;
	//total_amt = parseInt(loan_amt)+ (((parseInt(loan_amt)*parseInt(int_rate))/100)/12)*parseInt(period)
	//emi_amount = parseInt(total_amt)/parseInt(install_no)
	//emi_amount =Math.round(emi_amount,3)+".000"
	emi_amount = roundOff(emi_amount, 3, loan_amt)
	//alert("step 5 ");
	if (isNaN(emi_amount)==true)
		document.forms["loanform"].monthlypayment.value ="0.000";
	else
		document.forms["loanform"].monthlypayment.value =emi_amount;
	//}
	//alert("step 6 ");
}

function roundOff(value, precision, loan_amt){
	value = "" + value
	precision = parseInt(precision)
	flag = parseInt(value.indexOf("."));
	flag = value.substring(flag+1,flag+2);
	
	var whole = "" + Math.round(value * Math.pow(10, precision))
	var decPoint = whole.length - precision
	//if(decPoint != 0){
	if(decPoint == -1 && flag == 0){
		decPoint = 0
		whole = 0+whole
	}
	result = whole.substring(0, decPoint)
	if(result == ''){
		result = 0;
	}
	
	result += "."
	result += whole.substring(decPoint, whole.length)
	//}
	//else{
		//result = whole
	//}
	return result
}

function getInterest(obj1,obj2){
	if(obj1.selectedIndex==1)
		obj2.value="8.75";
	else if(obj1.selectedIndex==2)
		obj2.value="10.25";
	else if(obj1.selectedIndex==3)
		obj2.value="8.50";
	else
		obj2.value="";
}
<!---->

//function setFontStyle(){
	//document.getElementById("selected").style.color="#ff0000";
//}