// JavaScript Document
function foc()
{
	document.getElementById('mem').style.display="none";
}
function show(as)
{
	//document.getElementById(as).className="pop";
	//document.getElementById(as).style.display="block";
	if(document.getElementById(as).style.display=='block')
	{
		document.getElementById(as).style.display="none";
	}
	else{
		document.getElementById(as).style.display="block";
		}
}
function close()
{
	document.getElementById('mem').style.display="none";
}
function chng(as)
{
	
	if(as=="1")
	{
		document.getElementById('DivBg').className="bgim2";
	}
}
function route(b)
{
	var x=document.getElementById(b).value;
	if(x=="Bank Transfer")
	{
		window.location="bankdeatials.html";
	}
	else if(x=="Cheque / DD")
	{
		window.location="chequedd.html";
	}
	else if(x=="Online Credit card Payment")
	{
		window.location="Creditcard.html";
	}
	else if(x=="Mobile phone payment")
	{
		window.location="Creditcard.html";
	}
	else if(x=="Paypal")
	{
		window.location="Creditcard.html";
	}
}
function chngimg(as)
{
	
	if(as=="Ramarao")
	{
		document.getElementById('im1').src="images/photo.gif";
		document.getElementById('sp1').className="ovr";
	}
	else if(as=="Rajendra")
	{
		document.getElementById('im1').src="images/Mr.Rajendra-Kulkarni.gif";
		document.getElementById('sp2').className="ovr";
	}
	else if(as=="Surekha")
	{
		document.getElementById('im1').src="images/Mrs.-Surekha.gif";
		document.getElementById('sp3').className="ovr";
	}
	else if(as=="Jayasree")
	{
		document.getElementById('im1').src="images/Smt.-Jayasree-Desai.gif";
		document.getElementById('sp4').className="ovr";
	}
	else if(as=="Kulkarni")
	{
		document.getElementById('im1').src="images/G.G.-Kulkarni.gif";
		document.getElementById('sp5').className="ovr";
	}
	else if(as=="Ganga")
	{
		document.getElementById('im1').src="images/ganga_small.gif";
		document.getElementById('sp6').className="ovr";
	}
	else if(as=="Rajamani")
	{
		document.getElementById('im1').src="images/T.S.-Rajamani.gif";
		document.getElementById('sp7').className="ovr";
	}
	else if(as=="Prasd")
	{
		document.getElementById('im1').src="images/PrasdDesai.gif";
		document.getElementById('sp8').className="ovr";
	}
}
function out(ss)
{
	document.getElementById(ss).className="clr";
}
function pop2(ss)
{

	//document.getElementById(as).className="pop";
	//document.getElementById(as).style.display="block";
	if(document.getElementById('Detail').style.display=='block')
	{
		document.getElementById('Detail').style.display="none";
	}
	else
	{
		document.getElementById('Detail').style.display="block";
		//document.getElementById('Detail').innerHTML="";
		if(ss=="Ramarao")
		{
			document.getElementById('Detail').className="pop12";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>RAM RAO KULKARNI</strong> (Retired- District & Session Judge)<br> Practiced law between 1962 to 1972 and served in the Karnataka Judicial Services until his retirement in 1996.Inspired by his family background ,felt the need and commitment towards Development of Society and has involved and been the motivator since 1999. ";
		}
		else if(ss=="Rajendra")
		{
			document.getElementById('Detail').className="pop12";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>RAJENDRA KULKARNI</strong><br> Deeply interested in social service & committed to the welfare of community. He Had been past member and past president of Rotary Club. He has been the member of various other organizations keenly involved at the grass root social service. He is the founder member of Manav Charities. ";
		}
		else if(ss=="Surekha")
		{
			document.getElementById('Detail').className="pop12";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>SUREKHA</strong><br> A Freelance writer & Author of Story Books, keen to highlight the community problems and have been putting her mind in changing the attitude of rural people. She is Executive Member of Manav Charities since 1999. ";
		}
		else if(ss=="Jayasree")
		{
			document.getElementById('Detail').className="pop12";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>JAYASREE DESAI</strong><br> She has been a grass root social worker, having represented the Gram Panchayat and working for the community since 25 years. She is the Executive Member  of Manav Charities since 2005 - 2006.  ";
		}
		else if(ss=="Kulkarni")
		{
			document.getElementById('Detail').className="pop12";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>G.G.KULKARNI</strong><br> A MBA qualified and is presently the State President for Confederation of NGO's in Rural India , Karnataka Branch and involved in social service at various levels. He is the Executive Member of Manav Charities since 2005 - 2006   ";
		}
		
		else if(ss=="Ganga")
		{
			document.getElementById('Detail').className="pop12";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>Mrs.Ganga Sridhar</strong><br> Ganga Sridhar is a graduate, interested in Social Work for over 20 years now. Her vision is to ensure that no child should be left hungry. She hopes to feed about one lakh children in the forth coming year and wants to trot around the world to ensure that no child is left hungry ";
		}
		
		else if(ss=="Rajamani")
		{
			document.getElementById('Detail').className="pop3";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>Prof.T.S.RAJAMANI</strong>(Social Scientist) <br>With nearly 50 years if combined experience in International teaching & Peripherals Training on Human Resource Development & Management, Child Nutrition, Family Welfare, Community Development & Behavioral psychology &Implementation and Evaluation of Community based Rehabilitation & Development Projects - associates authored of Books & Articles.He has involved in several assignment for various National & International Organizations like World Bank, UNICEF, DANIDA, CARE, NABARD, Asian Development Bank and many more. He has also authored and involved in publication of Books & Articles and associates with cultural & social assests. He is the Vice President of Manav Charities since 2005 - 2006 ";
		}
		else if(ss=="Prasd")
		{
			document.getElementById('Detail').className="pop4";
			document.getElementById('Detail').innerHTML="<span style='margin-left:325px'><a href='javascript:close1()'><img src='images/close.gif' bordr='0'/></a></span><br><strong>PRALHAD DESAI</strong>&nbsp;(Totally Blind & State Awardee)<br> Himself a visually challenged and State Awardee had been earlier president of Karnataka State Blind Joint Action Committee and is founder President of Helen Keller Handicapped Association who has dedicated to social service for the upliftment of physically / visually / mentally & other challenged people. He is the Executive Member of Manav Charities since 2005 - 2006  ";
		}
	}

}
function close1()
{
	document.getElementById('Detail').style.display="none";
}
function clr(as)
{
	document.getElementById('text01').value="";
	document.getElementById('text02').value="";
	document.getElementById('text03').value="";
	document.getElementById('text04').value="";
	document.getElementById('text05').value="";
	document.getElementById('text06').value="";
	document.getElementById('text07').value="";
	document.getElementById('text08').value="";
	document.getElementById('pay').value="";
}
function ddlchange(as)
{
    if(document.getElementById(as).selectedIndex==1)
    {
      document.getElementById('DivP').innerHTML="";
       document.getElementById('tr1').style.display="block";  
    }
    else if(document.getElementById(as).selectedIndex==2)
    {
        document.getElementById('DivP').innerHTML="Please ensure the details submitted is the same as the one on your electronic payment device has (Credit / Debit / Account)"; 
        document.getElementById('tr1').style.display="none";
          document.getElementById('tr2').style.display="none"; 
         document.getElementById('tr3').style.display="none";    
    }
    else
    {
         document.getElementById('DivP').innerHTML="";
         document.getElementById('tr1').style.display="none";
         document.getElementById('tr2').style.display="none"; 
         document.getElementById('tr3').style.display="none";   
    }
}
function chksel(as)
{
    if(document.getElementById(as).selectedIndex==1)
    {
     document.getElementById('tr2').style.display="block";
     document.getElementById('tr3').style.display="none";
     document.getElementById('tr4').style.display="none";     
    }
    else if(document.getElementById(as).selectedIndex==3)
    {
    document.getElementById('tr3').style.display="block";
    document.getElementById('tr2').style.display="none";  
    document.getElementById('tr4').style.display="none"; 
    }
    else if(document.getElementById(as).selectedIndex==2)
    {
    document.getElementById('tr3').style.display="none";
    document.getElementById('tr2').style.display="none";  
    document.getElementById('tr4').style.display="block";  
    }
    else
    {
    document.getElementById('tr3').style.display="none";
    document.getElementById('tr2').style.display="none"; 
    document.getElementById('tr4').style.display="none"; 
    }
}
function chk(as)
{
    if(document.getElementById(as).selectedIndex==1)
    {
        if(document.getElementById('ddltype').selectedIndex==0)
          {
            alert("fdsfsdf");
          }
return false;
    }
  
  return false;
}	
function chkdonation()
{
    var error="";
    if(document.getElementById('Txt_name').value=="")
    {
        error=error+"Name , ";
    }
    if(document.getElementById('Txt_Email').value=="")
    {
        error=error+"E-mail , ";
    }
    if(document.getElementById('Txt_Email').value!="")
    {
        var a=document.getElementById('Txt_Email').value;
        if((a.indexOf('@')==-1) ||(a.indexOf('.')==-1))
        {
            error=error+"Invalid E-mail , ";
        }  
    }
    if(document.getElementById('Txt_Phone').value=="")
    {
        error=error+"Phone , ";
    } 
    if(document.getElementById('Txt_Mobile').value=="")
    {
        error=error+"Mobile , ";
    }
    if(document.getElementById('Txt_Address').value=="")
    {
        error=error+"Address , ";
    }
    if(document.getElementById('Txt_Amount').value=="")
    {
        error=error+"Amount , ";
    }
    if(document.getElementById('Txt_To').value=="")
    {
        error=error+"Contribute towards , ";
    }
    if(document.getElementById('Ddl_payment').selectedIndex==0)
    {
        error=error+"Payment , ";
    }
    else if(document.getElementById('Ddl_payment').selectedIndex==1)
    {
       
        if(document.getElementById('ddltype').selectedIndex==0)
        {
            error=error+"Option , ";
        }
        else if(document.getElementById('ddltype').selectedIndex==1)
        {
            if(document.getElementById('TxtBank').value=="")
            {
                 error=error+"Bank name , ";
            }
            if(document.getElementById('TxtCheque').value=="")
            {
                 error=error+"Cheque No , ";
            }
            if(document.getElementById('TxtDate').value=="")
            {
                 error=error+"Date , ";
            }
        }
        else if(document.getElementById('ddltype').selectedIndex==3)
        {
            if(document.getElementById('TxtComm').value=="")
            {
                 error=error+"Comments , ";
            }
        }
        else if(document.getElementById('ddltype').selectedIndex==2)
        {
            if(document.getElementById('TxtTran').value=="")
            {
                 error=error+"Transaction Id , ";
            }
        }
        
    }
    if(error!="")
    {
        error=error.substring(0,error.length-3)+".";
        document.getElementById('LblErr').innerHTML=error;
    }
    else
    {
        error="";
        return true;
    }
   
    return false;
}
function checkno(as)
{
        var x=document.getElementById(as).value;
        var len=x.length;
        var c,result=x;
        for(var i=0;i<len;i++)
        { 
            c=result.charAt(i);
            if ((c < "0") || (c > "9")) 
		   	    result=result.substring(0,result.length-1);
	    }
        document.getElementById(as).value=result;

}
function checkno1(as)
{
        var x=document.getElementById(as).value;
        var len=x.length;
        var c,result=x;
        for(var i=0;i<len;i++)
        { 
            c=result.charAt(i);
            if(c==".")continue;
            if ((c < "0") || (c > "9")) 
		   	    result=result.substring(0,result.length-1);
	    }
        document.getElementById(as).value=result;

}
function validationcon()
{
	if(document.getElementById('Name').value=="")
	{
		alert("Please enter Name");
		document.getElementById('Name').focus();
		return false;
	}
	else if(document.getElementById('Phone').value=="")
	{
		alert("Please enter Phone Number");
		document.getElementById('Phone').focus();
		return false;
	}
	else if(document.getElementById('Mobile').value=="")
	{
		alert("Please enter Mobile Number");
		document.getElementById('Mobile').focus();
		return false;
	}
	else if(document.getElementById('Email').value=="")
	{
		alert("Please enter Email");
		document.getElementById('Email').focus();
		return false;
	}
	else if(document.getElementById('Comment').value=="")
	{
		alert("Please enter Comment");
		document.getElementById('Comment').focus();
		return false;
	}
	else if(document.getElementById('Email').value!="")
	{
		var xx= document.getElementById('Email').value;
		if((xx.indexOf('@')==-1) || (xx.indexOf('.')==-1))
		{
			alert("Please enter a valid E-mail");
			document.getElementById('Email').focus();
			return false;
		}
	}
	else
	{
		return true;
	}
}