// JavaScript Document
function ChangeMenuClass(id)
	{
	var listName='li_'+id;
	document.getElementById('li_DwellingBuildingCoverage').className = "";
	document.getElementById('li_RatingSection').className = "";
	document.getElementById('li_PriorInsurance').className = "";
	document.getElementById('li_GeneralSection').className = "";
	document.getElementById('li_ContactSection').className = "";

	document.getElementById(listName).className = "current";
	}

function ShowBlock(id)
	{
	document.getElementById('DwellingBuildingCoverage').style.display  = "none";
	document.getElementById('RatingSection').style.display  = "none";
	document.getElementById('PriorInsurance').style.display  = "none";
	document.getElementById('GeneralSection').style.display  = "none";
	document.getElementById('ContactSection').style.display  = "none";

	document.getElementById(id).style.display  = "block";
	DisplayBackButton(id);
	ChangeMenuClass(id);
	}

//Added By Krishna Start
function MoveNext()
	{
	var currentForm;
	currentForm=GetCurrentForm();
	switch (currentForm)
		{
		case 'DwellingBuildingCoverage':
			ShowBlock('RatingSection');
		break;

		case 'RatingSection':
			ShowBlock('PriorInsurance') ;
		break;

		case 'PriorInsurance':
			ShowBlock('GeneralSection') ;
		break;
		
		case 'GeneralSection':
			ShowBlock('ContactSection') ;
		break;

		case 'ContactSection':
			document.form1.action="../free-quote-dwelling/free-quote-dwelling-action.cfm";
			document.form1.submit();
		break;

		default:
			ShowBlock('DwellingBuildingCoverage') ;
		break;
		}
	}

function MoveBack()
	{
	var backCurrentForm;
	backCurrentForm=GetCurrentForm();
	switch (backCurrentForm)
		{
		
		case 'ContactSection':
			ShowBlock('GeneralSection');
		break;		
		
		case 'GeneralSection':
			ShowBlock('PriorInsurance');
		break;

		case 'PriorInsurance':
			ShowBlock('RatingSection') ;
		break;

		default:
			ShowBlock('DwellingBuildingCoverage') ;
		break;
		}
	}

function GetCurrentForm()
	{
	var formName;
	if(document.getElementById('ContactSection').style.display  == "block")
		formName='ContactSection';		
	else if(document.getElementById('GeneralSection').style.display=="block")
		formName='GeneralSection';
	else if(document.getElementById('PriorInsurance').style.display=="block")
		formName='PriorInsurance';
	else if(document.getElementById('RatingSection').style.display=="block")
		formName='RatingSection';
	else
		formName='DwellingBuildingCoverage';
	return formName;
	}

function DisplayBackButton(id)
	{
	if(id=='DwellingBuildingCoverage')
		document.getElementById('backBtn').style.display = "none";
	else
		document.getElementById('backBtn').style.display = "block";
	}

// Additional Quote Limit

function AddQuoteLimit()
	{
	document.getElementById('AddQuoteLimit').style.display  = "block";
	}

//-->