
	  function DoPage(GridId,pageNumber)
	  {
			var param = "list=P|"+pageNumber;
			switch(GridId)
			{
				case "LoginTracking":
					getResponseWithScript('ReportHolder',param,'LoadingPanel','/AdminModulesCompany/report/LoginGrid.aspx')	
					break;
				case "CompanyGrid":
					getResponseWithScript('UserGrid',param,'LoadingPanel','/AdminModulesCompany/comps/grid.aspx')	
					break;
				case "Coach_Coachee_Grid":
					getResponseWithScript('UserGrid',param,'LoadingPanel','/AdminModulesCompany/coachee/CoachCoacheeList.aspx')	
					break;
				case "CompanyGrid":
					getResponseWithScript('UserGrid',param,'LoadingPanel','/AdminModulesCompany/comps/grid.aspx')	
					break;
				case "AccountGrid":
					getResponseWithScript('AccGrid',param,'LoadingPanel','Esign/AccountGrid.aspx')	
					break;
			}
		}



		function DoSignUp()
		{
			getResponseWithScript('myContent','list=C|0','LoadingPanel','esign/FormSignup1.aspx');
		
		}



		function DoCompare(tbid)
		{
			var param = "list=C|"+tbid+"|";
			getResponseWithScript('myCompare',param,'LoadingPanel','CompareResults.aspx');
		
		}
		
		
		
		function DoCalculator()
		{
			getResponseWithScript('myContent','list=C|0','LoadingPanel','DebtCalculator.aspx');
		}
			
		
		function DoLinks(i)
		{
			var param="list=C|";
			//alert(i);
			getResponseWithScript('myContent',param,'LoadingPanel',i);
		}
		
			
	function DoSteps(i)
	{
		switch(i)
		{
			case "0":
				getResponseWithScript('myContent','list=C|0','LoadingPanel','esign/Agreement1.aspx');
				getResponseWithScript('15minForm','list=C|0','LoadingPanel','esign/steps.aspx?sid=0');
				
			break;	
			case "1":
				getResponseWithScript('myContent','list=C|0','LoadingPanel','esign/Step1.aspx');
				getResponseWithScript('15minForm','list=C|0','LoadingPanel','esign/steps.aspx?sid=1');
				
			break;
			case "2":
				getResponseWithScript('myContent','list=J|0','LoadingPanel','esign/Step2.aspx');
				getResponseWithScript('15minForm','list=C|0','LoadingPanel','esign/steps.aspx?sid=2');
				
			break;
			case "3":
				getResponseWithScript('myContent','list=C|0','LoadingPanel','esign/Step3.aspx');
				getResponseWithScript('15minForm','list=C|0','LoadingPanel','esign/steps.aspx?sid=3');
				
			break;
			case "4":
				getResponseWithScript('myContent','list=C|0','LoadingPanel','esign/FormSignup1.aspx');
				getResponseWithScript('15minForm','list=C|0','LoadingPanel','esign/steps.aspx?sid=4');
				
			break;
			case "5":
				getResponseWithScript('myContent','list=C|0','LoadingPanel','esign/FormSignup1.aspx');
				getResponseWithScript('15minForm','list=C|0','LoadingPanel','esign/steps.aspx?sid=5');
				
			break;																	

		}		
	}		
			
		function CheckSelect(v, testv, msg)
		{
		if (v == testv)
			{
			alert("Please Select " + msg)
			return false
			}
		else
			return true
		}
		
		
		function DoSubmit15minForm()
		{
			var phone=document.getElementById("homephone1").value+document.getElementById("homephone2").value+document.getElementById("homephone3").value;
			var fPhone=document.getElementById("phone");
			fPhone.value=phone;
			//alert(fPhone.value);
			if(checkString2(document.getElementById("firstname"),"FIRST NAME", false)
			&& checkString2(document.getElementById("lastname"),"LAST NAME", false)
			&& checkUSPhone2(document.getElementById("phone"), document.getElementById("homephone1"), false)
			//&& checkUSPhone(document.getElementById("phone"), false)
			&& CheckSelect(document.getElementById("timetocall").value, "0", "BEST TIME TO CALL")
			&& checkEmail(document.getElementById("email"),false)
			&& CheckSelect(document.getElementById("state").value, "0", "STATE")
			&& CheckSelect(document.getElementById("debt").value, "0", "TOTAL UNSECURED DEBT")

			)
			{
			DoSend15MinForm();		
			}	
		
		}
		
		function DoSend15MinForm()
		{
			var param = "list=S|"+Get15MinFormFields();
			getResponseWithScript('15minForm',param,'LoadingPanel','15minForm.aspx')
		}
		
		function Get15MinFormFields()
		{
					var s=document.getElementById("firstname").value+"|";
				s+=document.getElementById("lastname").value+"|";
				s+=document.getElementById("phone").value+"|";
				s+=document.getElementById("timetocall").value+"|";	
				s+=document.getElementById("email").value+"|";
				s+=document.getElementById("state").value+"|";
				s+=document.getElementById("debt").value+"|";
										
				return s;		
		
		}
		
		
		
		function DoSubmitFeedbackForm()
		{
			var phone=document.getElementById("homephone1").value+document.getElementById("homephone2").value+document.getElementById("homephone3").value;
			var fPhone=document.getElementById("phone");
			fPhone.value=phone;
			//alert(fPhone.value);
			if(checkString2(document.getElementById("name"),"NAME", false)
			&& checkEmail(document.getElementById("feedemail"),false)
			&& checkString2(document.getElementById("coments"),"COMMENTS", false)

			)
			{
			DoSendFeedbackForm();		
			}	
		
		}
		
		function DoSendFeedbackForm()
		{
			var param = "list=S|"+GetFeedbackFormFields();
			getResponseWithScript('FeedbackForm',param,'LoadingPanel','FeedbackForm.aspx')
		}
		
		function GetFeedbackFormFields()
		{
					var s=document.getElementById("name").value+"|";
				s+=document.getElementById("feedemail").value+"|";
				s+=document.getElementById("coments").value+"|";
										
				return s;		
		
		}		
		
		
		
		
		
		
		
/*		</script>*/
		
		
		
/*<script language="JavaScript" type="text/javascript">*/
//start calculator

function calculateresult() {
//alert("Calculating....")
var a = document.all.debts.value;
//alert("a=" + a);
var i = document.all.months.selectedIndex;



// Validate debt and month fields

if (document.all.debts.value=="0.00" || document.all.debts.value=="")

	{

    alert("Please enter your debt amount!")

    document.all.debts.focus()

	return false;

  	}

if (document.all.debts.value < 10000)

	{

    alert("We only settle debts of $10,000 or more")

    document.all.debts.focus()

	return false;

  	}

if (document.all.months.value=="")

	{

    alert("Please select number of months!")

    document.all.months.focus()

	return false;

  	}





if (i == -1)   return;

var b = document.all.months.options[i].value;

var c = (a/100);

var d = (c*53);

var result = (d/b);

e=parseInt((result*100))/100;

document.all.current.value = e;


document.all.current.innerHTML= a;

document.all.newmo.innerHTML= e;

document.all.dfreemo.innerHTML= b + ' months!';
}



function resetdecimal() {
document.all.debts.value = "0.00";

}

//end calculator

function DoSelectedChanged()
{

	var ddb = document.getElementById("CountryId_value");
	var param="cid="+ddb.value+"|";
	getResponseWithScript('cState',param,'LoadingPanel2','/StateDDB.aspx')
	
}


function DoLogin(){
	if(checkString3(document.getElementById("UserName"),"USER NAME", false)
		&& checkString(document.getElementById("Password"),"PASSWORD", false))
	{
		var param = "list=L|"+GetLoginInfo();
		getResponseWithScript('myContent',param,'LoadingPanel','content.aspx');	
	}
}
function DoRedirect(){
	
	document.location.href='/EsignDefault.aspx';

}

function DoAdminRedirect(){
	
	document.location.href='/EsignAdmin.aspx';

}
function GetLoginInfo(){
	var s=document.getElementById("UserName").value+"|";
		s+=document.getElementById("Password").value+"|";
	return s;
}

function SetLoginMsg(msg){
	
	var s = "SetMsg('"+msg+"');";
	window.setTimeout(s,100);
}
function SetMsg(msg){

	document.getElementById("myContent").innerHTML="<span style='FONT-SIZE: 14px;FONT-WEIGHT:bold;COLOR: red;FONT-FAMILY: verdana;'>"+msg+"</span>";

}

function DoLogout(){

		var param = "list=O|Out";
		getResponseWithScript('myContent',param,'LoadingPanel','content.aspx');	

}
function DoRedirect2(){
	
	document.location.href='/Default.aspx';

}



