// JavaScript Document  var ieDHTML = document.all !=null  var nsDHTML = document.layers  function checkFrames() {    var iframes = window.frames    var numFrames = iframes.length    for (var i=0; i < numFrames; i++) {      var f = iframes[i]      if ((f.document.readyState=="complete") && (f.document.cached==null)) {        f.document.body.style.border = "none"        var elFrame = document.all[f.name].tags("IFRAME")[0]        elFrame.style.height = f.document.body.scrollHeight        f.document.cached = true      }    }    setTimeout("checkFrames()",100)  }var theInterval;var bType;
var bleft;var bTop;

function doLoadList(newData, Total) {
if( theInterval ) { clearInterval(theInterval); }
var d = document.getElementById('list');
d.style.visibility = 'hidden';
d.innerHTML = newData;
d.style.visibility = 'visible';
var d = document.getElementById('House');
d.style.visibility = 'hidden';
var t
t=0
if (Total > 5)
{ t= "1"}
if (Total > 9)
{ t= "2"} 
if (Total > 20)
{ t= "3"}
if (Total == 24 || Total > 24)
{ t= "4"}
d.innerHTML = "<img src=images/house" + t + ".gif>";
d.style.visibility = 'visible';
}

function windowchange()
{
if (bType == 'IE')
{
	bleft = document.body.clientWidth;
	bTop = document.body.clientHeight;
if (bleft <= 762)
{bleft = 762;}
if (bTop <= 555)
{bTop = 555;}
bleft = bleft / 2 - 125;
bTop = bTop / 2 - 100;
eval('document.all.Info.style.top=' + bTop);
eval('document.all.Info.style.left=' + bleft);
}

if (bType == "NN")
	{
	bleft = window.innerWidth;
	bTop = window.innerHeight;
if (bleft <= 762)
{bleft = 762;}
if (bTop <= 555)
{bTop = 555;}
bleft = bleft / 2 - 125;
bTop = bTop / 2 - 100;
eval('document.all.Info.style.left=' + bleft);
eval('document.all.Info.style.top=' + bTop);
}

if (bType == "MO")
	{
	bleft = window.innerWidth;
	bTop = window.innerHeight;
if (bleft <= 762)
{bleft = 762;}
if (bTop <= 555)
{bTop = 555;}
bleft = bleft / 2 - 125;
bTop = bTop / 2 - 100;
	eval("document.getElementById('Info').style.left=" + bleft);
	eval("document.getElementById('Info').style.top=" + bTop);
	}

if (bType == "OP")
	{
	bleft = window.innerWidth;
	bTop = window.innerHeight;
if (bleft <= 762)
{bleft = 762;}
if (bTop <= 555)
{bTop = 555;}
bleft = bleft / 2 - 125;
bTop = bTop / 2 - 100;
	eval("document.getElementById('Info').style.left=" + bleft);
	eval("document.getElementById('Info').style.top=" + bTop);
	}
}function doLoadInfo(newData) {    if( theInterval ) { clearInterval(theInterval); }    windowchange();    var d = document.getElementById('Info');    d.style.visibility = 'hidden';    d.innerHTML = newData;    d.style.visibility = 'visible';}function browserType ()
{
	if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById)
		return "OP"; // Opera
	if (document.all)
		return "IE"; // Internet Explorer
	if (document.layers)
		return "NN"; //Netscape 4
	if (!document.all && document.getElementById)
		return "MO"; // Mozilla (Netscape 6+, etc)
}

function setLayerVisibility (pstrID, pstrVisibility)
{
if (bType == "IE")
eval("document.all." + pstrID + ".style.visibility='" + pstrVisibility + "'"); 
if (bType == "NN")
eval("document." + pstrID + ".visibility='" + pstrVisibility + "'"); 
if (bType == "MO" || bType == "OP") 
eval("document.getElementById('" + pstrID + "').style.visibility='" + pstrVisibility + "'"); 
}

function closeinfo ()
{
	setLayerVisibility('Info', 'hidden');

}

function SubmitForm(Form)
	{
	var d = document.getElementById(Form);
	if (Form == "frmFirst") {
		if (d.txtClientFirstName.value !="") 
			{
			if (d.txtClientSurname.value !="") 
				{
				if (d.txtAddressLine1.value !="") 
					{
					if (d.txtTown.value !="") 
						{
						if (d.txtCounty.value !="") 
							{
							if (d.txtPostCode.value !="") 
								{
								if (d.txtHomeTel.value !="") 
									{
									if (d.txtEmail.value !="") 
										{
										d.submit();
										}
									else
										{
										alert('Please enter your email address');
										}
									}
								else
									{
									alert('Please enter your home telephone number');
									}
								}
							else
								{
								alert('Please enter the postcode of your current contact address');
								}
							}
						else
							{
							alert('Please enter the county of your current contact address');
							}
						}
					else
						{
						alert('Please enter the town of your current contact address');
						}
			}
			else
			{
			alert('Please enter the first line of your current contact address');
			}
		}
		else
		{
		alert('Please enter the your surname');
		}
	}
	else
		{
		alert('Please enter the your first name');
		}
	}
	if (Form == "frm1") {
		d.submit();
	}
	if (Form == "frmPage3") {

	if (d.selTypeOfTransaction.value == "Selling") {
		if (d.txtSellPropertyPrice.value !=""  && d.txtSellPropertyPrice.value != "0") 
			{
			if (d.txtSellAddress1.value !="") 
				{
				if (d.txtSellTown.value !="") 
					{
					if (d.txtSellCounty.value !="") 
							{
						if (d.txtSellPostCode.value !="") 
							{
							d.submit();
							}
						else
							{
							alert('Please enter the postcode of your property');
							}
						}
					else
						{
						alert('Please enter the county of your property');
						}
					}
				else
					{
					alert('Please enter the town of your property');
					}
				}
			else
			{
			alert('Please enter the first line of your property');
			}
		}
	else
		{
		alert('Please enter the price of the property');
		}

	}
	else {
		if (d.txtBuyPrice.value !=""  && d.txtBuyPrice.value != "0") 
			{
			if (d.txtBuyAddress1.value !="") 
				{
				if (d.txtBuyTown.value !="") 
					{
					if (d.txtBuyCounty.value !="") 
							{
							d.submit();
							}
					else
						{
						alert('Please enter the county of your property');
						}
					}
				else
					{
					alert('Please enter the town of your property');
					}
				}
			else
			{
			alert('Please enter the first line of your property');
			}
		}
	else
		{
		alert('Please enter the price of the property');
		}

	}
	}
	if (Form == "frmPage4") {


		if (d.txtSellPropertyPrice.value !=""  && d.txtSellPropertyPrice.value != "0") 
			{
			if (d.txtSellAddress1.value !="") 
				{
				if (d.txtSellTown.value !="") 
					{
					if (d.txtSellCounty.value !="") 
							{
						if (d.txtSellPostCode.value !="") 
							{
							d.submit();
							}
						else
							{
							alert('Please enter the postcode of your property');
							}
						}
					else
						{
						alert('Please enter the county of your property');
						}
					}
				else
					{
					alert('Please enter the town of your property');
					}
				}
			else
			{
			alert('Please enter the first line of your property');
			}
		}
	else
		{
		alert('Please enter the price of the property');
		}
	
	}
	}


//-->
