var txt1="1";
var txt2="2";
var txt3="3";
var txt4="4";

function getPrice()
{
    switch(document.getElementById("M_tenure").value)
	{
	case "freehold":
		switch(document.getElementById("paymentType").value)
	    {
	    case "VISA":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;    
	    case "MSCD":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;
	    case "JCB":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;    
	    case "VISP":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;
	    default: 
		    document.getElementById("totalPrice").innerHTML="264";
		    document.getElementById("amount").value="264";
	    }
		break;    
	case "leasehold":
		switch(document.getElementById("paymentType").value)
	    {
	    case "VISA":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;    
	    case "MSCD":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;
	    case "JCB":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;    
	    case "VISP":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;
	    default: 
		    document.getElementById("totalPrice").innerHTML="328";
		    document.getElementById("amount").value="328";
	    }
		break;    
	case "commonhold":
		switch(document.getElementById("paymentType").value)
	    {
	    case "VISA":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;    
	    case "MSCD":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;
	    case "JCB":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;    
	    case "VISP":
		    document.getElementById("totalPrice").innerHTML="333";
		    document.getElementById("amount").value="333";
		    break;
	    default: 
		    document.getElementById("totalPrice").innerHTML="328";
		    document.getElementById("amount").value="328";
	    }
		break;    
	default: 
		switch(document.getElementById("paymentType").value)
	    {
	    case "VISA":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;    
	    case "MSCD":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;
	    case "JCB":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;    
	    case "VISP":
		    document.getElementById("totalPrice").innerHTML="269";
		    document.getElementById("amount").value="269";
		    break;
	    default: 
		    document.getElementById("totalPrice").innerHTML="264";
		    document.getElementById("amount").value="264";
	    }
		break;    
	}
	
}
function validateOnSubmitHIP() {
  var elem;
  var errs=0;
 
	if (!validatePresent  (document.forms.formwp.propertytype, 'inf_propertytype')) errs += 1; 
	if (!validatePresent  (document.forms.formwp.bedrooms, 'inf_bedrooms')) errs += 1; 
	if (!validatePresent  (document.forms.formwp.tenure, 'inf_tenure')) errs += 1; 
	if (!validatePresent  (document.forms.formwp.postcode, 'inf_postcode')) errs += 1;
	if (!validatePresent  (document.forms.formwp.county, 'inf_county')) errs += 1;
	if (!validatePresent  (document.forms.formwp.town, 'inf_town')) errs += 1;
	if (!validatePresent  (document.forms.formwp.address1, 'inf_address1')) errs += 1;
	if (!validatePresent  (document.forms.formwp.sellers, 'inf_sellers')) errs += 1; 
	if (!validateEmail  (document.forms.formwp.email, 'inf_email', true)) errs += 1; 
	if (!validatePresent  (document.forms.formwp.tel1, 'inf_tel1')) errs += 1;
	if (!validatePresent  (document.forms.formwp.name, 'inf_name')) errs += 1;
	

  return (errs==0);
}
function validateOnSubmitCheque() {
  var elem;
  var errs=0;
 
	if (!validatePresent  (document.forms.formwp.M_type, 'inf_M_type')) errs += 1; 
	if (!validatePresent  (document.forms.formwp.M_bedrooms, 'inf_M_bedrooms')) errs += 1; 
	if (!validatePresent  (document.forms.formwp.M_tenure, 'inf_M_tenure')) errs += 1; 
	if (!validatePresent  (document.forms.formwp.M_sellername, 'inf_M_sellername')) errs += 1; 
	if (!validateEmail  (document.forms.formwp.email, 'inf_email', true)) errs += 1; 
	if (!validatePresent  (document.forms.formwp.tel, 'inf_tel')) errs += 1;
	if (!validatePresent  (document.forms.formwp.town, 'inf_town')) errs += 1;
	if (!validatePresent  (document.forms.formwp.county, 'inf_county')) errs += 1;
	if (!validatePresent  (document.forms.formwp.delvPostcode, 'inf_postcode')) 
	{
	errs += 1; 
	}
	else
	{
	document.forms.formwp.postcode.value=document.getElementById("delvPostcode").value
	}
	if (!validatePresent  (document.forms.formwp.delvAddress, 'inf_address')) 
	{
	errs += 1;  
	}
	else
	{
	document.forms.formwp.address.value=document.getElementById("delvAddress").value
	}
	if (!validatePresent  (document.forms.formwp.delvName, 'inf_name'))
	{
	errs += 1; 
	}
	else
	{
	document.forms.formwp.name.value=document.getElementById("delvName").value
	}

  return (errs==0);
}

function customercomments(pstr) {


switch(pstr)
	{
	case "1":
		
		document.getElementById("customerComments").innerHTML='Thanks for sending the HIP pack. '+
											'I\'m very impressed and pleased with your speedy service, and hopefully will use it again.<br />'+
											'<i>Bob Harvey, Peterborough</i><br />'+
											'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'2\');">More</a>';
		break;    
	case "2":
		document.getElementById("customerComments").innerHTML='Thank you so much! '+
															'You have been extremely helpful and I will '+
															'definitely contact you as soon as we are able to put the house '+
															'on the market again. '+
															'Many thanks, again.<br />'+
															'<i>Kate Millican, Dorset</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'3\');">More</a>';
		break;    
	case "3":
		document.getElementById("customerComments").innerHTML='All received! '+
															'Thanks for the speedy work.<br />'+
															'<i>Kevin Sach, Hull</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'4\');">More</a>';
		break;    
	case "4":
		document.getElementById("customerComments").innerHTML='Thanks very much for your excellent service.<br />'+
															'<i>Jane Staab, Essex</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'5\');">More</a>';
		break;    
	case "5":
		document.getElementById("customerComments").innerHTML='That\'s really <i>FAST</i>. Thank you very much.<br />'+
															'<i>Jim and Eileen Read, Birmingham</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'6\');">More</a>';
		break; 
   case "6":
		document.getElementById("customerComments").innerHTML='Thank you very much for your fast and efficient service. Excellent job!<br />'+
															'<i>Verity Batchelder, Hertfordshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'7\');">More</a>';
		break; 
   
	case "7":
		document.getElementById("customerComments").innerHTML='Thank you very much for your prompt and efficient service, it has been a pleasure doing business with your company.<br />'+
															'<i>Caroline Espley, Staffordshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'8\');">More</a>';
		break; 
   
	case "8":
		document.getElementById("customerComments").innerHTML='Just wanted to say what an efficient, value for money and easy service you offer. Ordered on a Friday, Survey done Tuesday. Thank you.<br />'+
															'<i>Michelle Pitman, Essex</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'9\');">More</a>';
		break; 
   
	case "9":
		document.getElementById("customerComments").innerHTML='Can I just say a big thank you – I was a bit skeptical at first ordering the \'cheapest HIP online\', but you have been really quick and efficient.<br />'+
															'<i>Geoff Holt, Hampshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'10\');">More</a>';
		break; 
   
	case "10":
		document.getElementById("customerComments").innerHTML='Thank you very much for a very efficient and professional service. I will use your service again.<br />'+
															'<i>Alex Thompson, Berkshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'11\');">More</a>';
		break; 
   
	
	
	
	default: 
		document.getElementById("customerComments").innerHTML='Thanks for sending the HIP pack. '+
											'I\'m very impressed and pleased with your speedy service, and hopefully will use it again.<br />'+
											'<i>Bob Harvey, Peterborough</i><br />'+
											'<a class="arrowright" href="javascript:void(0);" onclick="customercomments(\'2\');">More</a>';
		break;    
	    
	}
}


function customercommentsEPC(pstr) {


switch(pstr)
	{
	case "1":
		
		document.getElementById("customerComments").innerHTML='Just a note to thank you for your prompt and efficient service. And the chap who came to visit was very nice and helpful too!<br />'+
											'<i>Yvonne Taylor, Leicestershire</i><br />'+
											'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'2\');">More</a>';
		break;    
	case "2":
		document.getElementById("customerComments").innerHTML='Thank you so much! '+
															'You have been extremely helpful and I will '+
															'definitely contact you as soon as we are able to put the house '+
															'on the market again. '+
															'Many thanks, again.<br />'+
															'<i>Kate Millican, Dorset</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'3\');">More</a>';
		break;    
	case "3":
		document.getElementById("customerComments").innerHTML='All received! '+
															'Thanks for the speedy work.<br />'+
															'<i>Kevin Sach, Hull</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'4\');">More</a>';
		break;    
	case "4":
		document.getElementById("customerComments").innerHTML='Thanks very much for your excellent service.<br />'+
															'<i>Jane Staab, Essex</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'5\');">More</a>';
		break; 
	case "5":
		document.getElementById("customerComments").innerHTML='That\'s really <i>FAST</i>. Thank you very much.<br />'+
															'<i>Jim and Eileen Read, Birmingham</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'6\');">More</a>';
		break; 
   case "6":
		document.getElementById("customerComments").innerHTML='Thank you very much for your fast and efficient service. Excellent job!<br />'+
															'<i>Verity Batchelder, Hertfordshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'7\');">More</a>';
		break; 
   
	case "7":
		document.getElementById("customerComments").innerHTML='Thank you very much for your prompt and efficient service, it has been a pleasure doing business with your company.<br />'+
															'<i>Caroline Espley, Staffordshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'8\');">More</a>';
		break; 
   
	case "8":
		document.getElementById("customerComments").innerHTML='Just wanted to say what an efficient, value for money and easy service you offer. Ordered on a Friday, Survey done Tuesday. Thank you.<br />'+
															'<i>Michelle Pitman, Essex</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'9\');">More</a>';
		break; 
   
	case "9":
		document.getElementById("customerComments").innerHTML='Can I just say a big thank you – I was a bit skeptical at first ordering the \'cheapest HIP online\', but you have been really quick and efficient.<br />'+
															'<i>Geoff Holt, Hampshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'10\');">More</a>';
		break; 
   
	case "10":
		document.getElementById("customerComments").innerHTML='Thank you very much for a very efficient and professional service. I will use your service again.<br />'+
															'<i>Alex Thompson, Berkshire</i><br />'+
															'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'11\');">More</a>';
		break; 
   
	default: 
		document.getElementById("customerComments").innerHTML='Just a note to thank you for your prompt and efficient service. And the chap who came to visit was very nice and helpful too!<br />'+
											'<i>Yvonne Taylor, Leicestershire</i><br />'+
											'<a class="arrowright" href="javascript:void(0);" onclick="customercommentsEPC(\'2\');">More</a>';
		break;   
	    
	}
}