function chkcontact()
{
     daform = document.forms['contact'];
		 if (daform.name.value=="")
		 {
		       alert("You must provide your name");
					 daform.name.focus();
		 }
		 else if (daform.email.value=="")
		 {
		       alert("You must provide your email address");
					 daform.email.focus();
		 }
		 else if (daform.mess.value=="")
		 {
		       alert("Please type your enquiry");
					 daform.mess.focus();
		 }
		 else
		 {
		       daform.submit();
		 }
}
//******************************************************************************
function launchtour(id)
{
		 winpop = window.open("http://www.aaronproperties.com/tp.php?id="+id,"popup","scrollbars=1,location=0,toolbar=0,directories=0,menubar=0,resizable=0,status=0,width=550,height=400");
}
//******************************************************************************
function switchpic(pic)
{
    document.getElementById('viewpic').src='ir4.php?p='+pic;
}
//******************************************************************************
function checkreg()
{
     daform = document.forms['reg'];
		 if (daform.name.value=="")
		 {
		       alert("You must provide your name");
					 daform.name.focus();
		 }
		 else if (daform.email.value=="")
		 {
		       alert("You must provide your email address");
					 daform.email.focus();
		 }
		 else if (daform.pswd.value=="")
		 {
		       alert("Please type a password");
					 daform.pswd.focus();
		 }
		 else if (daform.pswd.value!=daform.pswd_con.value)
		 {
		       alert("Your password confirmation doesn't match the original password");
					 daform.pswd_con.focus();
		 }
		 else
		 {
		       daform.submit();
		 }
}
//******************************************************************************
function pr()
{
		 prpop = window.open("http://www.aaronproperties.com/fp.php","fppopup","scrollbars=0,location=0,toolbar=0,directories=0,menubar=0,resizable=0,status=0,width=300,height=150");
}
//******************************************************************************
function ckmkbook()
{
     daform = document.forms['mkbook'];
		 if ((daform.tel_num.value=="")&&(daform.mob_num.value==""))
		 {
		       alert("You must provide a contact number where you can be reached");
					 daform.mob_num.focus();
		 }
		 else
		 {
		       daform.submit();
		 }
}
//********************************************************************************
function showmap(pc)
{
		 prpop = window.open("http://maps.google.co.uk/maps?f=d&hl=en&daddr="+pc,"damap","scrollbars=1,location=0,toolbar=1,directories=1,menubar=1,resizable=1,status=1,width=" + screen.availWidth + ",height=" + screen.availHeight);
}
//********************************************************************************
function swapimg(id,name)
{
     overfile = "http://www.aaronproperties.com/newimg/"+name+"_on_sma.jpg";
		 outfile = "http://www.aaronproperties.com/newimg/"+name+"_off_sma.jpg";
		 if (document.getElementById(id).src == overfile)
		 {
		         document.getElementById(id).src = outfile;
		 }
		 else
		 {
		         document.getElementById(id).src = overfile;
		 }
}
//********************************************************************************
function showpanel(daname)
{
     document.getElementById('srentingmain').style.display='none';
     document.getElementById('slettingmain').style.display='none';
     document.getElementById('sovermain').style.display='none';
     document.getElementById('stenmain').style.display='none';
     document.getElementById(daname).style.display='inline';
}
//********************************************************************************
function hidesplash()
{
     document.getElementById('flashnavholder').className = 'divhide';
     document.getElementById('navholder').className = 'divshow';
 		 $('navnewcon').appear({ duration: 0.75 });
 		 $('navnewcomm').appear({ duration: 1.5 });
 		 $('navnewoversea').appear({ duration: 2.25 });
 		 $('navnewllinfo').appear({ duration: 3.00 });
 		 $('navnewteninfo').appear({ duration: 3.75 });
 		 $('navnewrent').appear({ duration: 4.50 });
}
//********************************************************************************
var lastpic = "pic3";
function changebigpic()
{
    if (lastpic == "pic1")
		{
		     $('pic1').appear({ duration: 1.5 });
		     $('pic3').fade();
				 var lastpic = "pic1";
		}
		else if (lastpic == "pic2")
		{
		     $('pic2').appear({ duration: 1.5 });
		     $('pic1').fade();
				 var lastpic = "pic2";
		}
		else if (lastpic == "pic3")
		{
		     $('pic1').appear({ duration: 1.5 });
		     $('pic2').fade();
				 var lastpic = "pic3";
		}
}
//********************************************************************************
var lcR = 189;
var lcG = 26;
var lcB = 54;
function swapnavicons(name)
{
     clearTimeouts();
     if (name == "renting_float")
		 {
		     $('renting_float').appear({ duration: 1.0 });
				 fade(lcR,lcG,lcB,156,203,143);
		 }
		 else if (name == "letting_float")
		 {
		     $('letting_float').appear({ duration: 1.0 });
				 fade(lcR,lcG,lcB,221,213,194);
		 }		 
		 else if (name == "overseas_float")
		 {
		     $('overseas_float').appear({ duration: 1.0 });
				 fade(lcR,lcG,lcB,180,153,223);
		 }			 
		 else if (name == "tennant_float")
		 {
		     $('tennant_float').appear({ duration: 1.0 });
				 fade(lcR,lcG,lcB,231,161,25);
		 }		 			 
		 else if (name == "com_float")
		 {
		     $('com_float').appear({ duration: 1.0 });
				 fade(lcR,lcG,lcB,134,206,213);
		 }		 
}
//********************************************************************************
function fixnavicons(name)
{
     clearTimeouts();
     if (name == "renting_float")
		 {
		     document.getElementById('renting_float').style.display='none';
				 fade(156,203,143,lcR,lcG,lcB);
     }
		 else if (name == "letting_float")
		 {
		     document.getElementById('letting_float').style.display='none';
				 fade(221,213,194,lcR,lcG,lcB);
		 }
		 else if (name == "overseas_float")
		 {
		     document.getElementById('overseas_float').style.display='none';
				 fade(180,153,223,lcR,lcG,lcB);
		 }			 
		 else if (name == "tennant_float")
		 {
		     document.getElementById('tennant_float').style.display='none';
				 fade(231,161,25,lcR,lcG,lcB);
		 }		 			 
		 else if (name == "com_float")
		 {
		     document.getElementById('com_float').style.display='none';
				 fade(134,206,213,lcR,lcG,lcB); 
		 } 		 
}
//*******************************************************************************
var currText = 0;
var text = new Array();
var sentence = new String();
text[0] = "INVESTORS<br> Speak to our highly trained staff who will give you the  fact about areas, local prices and rental achievements.";
text[1] = "LANDLORD<br> Do you need to Rent out your property fast. We will advertise your properly with Rightmove, Citylets, S1Homes, GSP and lettingweb for free when you sign up with us.";
text[2] = "TENANTS<br> Looking for a place you can call home? Aaron property will help you find the perfect place.";

function textdisplay()
{
    //oldSetTimeout(textdisplay(), 10000);
		/*while (true)
		{
    		if (currText == text.length)
    		{
    		    currText = 0;
    		}
    		
    		var sentence = String(document.getElementById('com_float').innerText);
				if (sentence.length = 0)
				{
        		var totalwords = text[currText].split(" ");
						document.getElementById('com_float').innerText = totalwords[0];
				}
				else
				{
        		var currwords = sentence.split(" ");
        		var totalwords = text[currText].split(" ");
        		if (currwords.length == totalwords.length)
        		{
        		      currText++;
        					document.getElementById('com_float').innerText = "";
        				  changebigpic();
        		}
        		else
        		{
        		     sentence += totalwords[currwords.length] + " ";
        				 document.getElementById('com_float').innerText = sentence;
        		}
				}
				//pausecomp(1000);
		}*/
}

function pausecomp(millis)
{
    var date = new Date();
    var curDate = null;
    
    do { curDate = new Date(); }
    while(curDate-date < millis);
} 