

//check on page load - if quick quote button says "Update quote" then hide it some value onthe form has been adjusted
function checkQuoteForm()
	{
	//var butQuickQuote = document.getElementById('butStage1_QuickQuote');  - old value
	var butQuickQuote = document.getElementById('ctl00$ContentPlaceHolder1$butStage1_QuickQuote');
	
	var strQuickQuoteButton = butQuickQuote.value;
	
	if (strQuickQuoteButton == 'Update quote')
		{
		butQuickQuote.style.display = 'none';
		}
	
	}


	
function enableQuoteUpdate()
	{
	var butQuickQuote = document.getElementById('ctl00_ContentPlaceHolder1_butStage1_QuickQuote');
	var divQuickResult = document.getElementById('ctl00_ContentPlaceHolder1_pnlQuickQuoteResult');
	
	
	var strQuickQuoteButton = butQuickQuote.value;
	
	if (strQuickQuoteButton == 'Update quote')
		{
		butQuickQuote.style.display = 'block';
		divQuickResult.innerHTML = 'Values have changed. Click <strong>Update quote</strong> to get an accurate quotation.';
		}
	
	}


		
	


function	GetContactAddress()
			{
		    var strUcPrefix = 'ctl00_ContentPlaceHolder1_ucAddressProject_';
		    
			document.getElementById(strUcPrefix + 'txtNumber').value = jsa_address[0].replace(/^\s+|\s+$/g, '');
			document.getElementById(strUcPrefix + 'txtStreet').value = jsa_address[1].replace(/^\s+|\s+$/g, '');
			document.getElementById(strUcPrefix + 'txtTown').value = jsa_address[2].replace(/^\s+|\s+$/g, '');
			
			document.getElementById(strUcPrefix + 'ddlCounty').value = jsa_address[3].replace(/^\s+|\s+$/g, '');
			
			document.getElementById(strUcPrefix + 'txtPostcode').value = jsa_address[4].replace(/^\s+|\s+$/g, '');
			
			}
			
						
			
			
			