
/*
Cross browser marquee script 
*/


var marqueewidth=460
var marqueeheight=20
var speed=3
var marqueecontents='<span class="ticker">Just a small number of 3 and 4 bedroom homes now available and two fully fitted out apartments with prices starting from €185,000</span>'

if (document.all)
document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>')

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",780)
intializemarquee()
}
}

function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.width
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.left-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.left=marqueewidth
scrollit()
}
}
function changeType()
{
	var x = 9;
	var proptype = document.getElementById("proptype");
	var rentalperiod = document.getElementById("rentalPeriod");
	var minPrice = document.getElementById("minPrice");
	var maxPrice = document.getElementById("maxPrice");
	var priceArray = new Array(x);
	var rentArray = new Array(x);
	
		priceArray[0]=100000;
		priceArray[1]=150000; 
		priceArray[2]=200000;
		priceArray[3]=250000;
		priceArray[4]=300000;
		priceArray[5]=350000;
		priceArray[6]=400000;
		priceArray[7]=450000;
		priceArray[8]=500000;
		
		rentArray[0]=500;
		rentArray[1]=1000; 
		rentArray[2]=1500;
		rentArray[3]=2000;
		rentArray[4]=2500;
		rentArray[5]=3000;
		rentArray[6]=3500;
		rentArray[7]=4000;
		rentArray[8]=4500;
	
	if(proptype.options[2].selected)
	{
		rentalperiod.value = 4;
	
	
		minPrice.options.length=x;
		maxPrice.options.length=x;
		minPrice.options[0].value="0";
		minPrice.options[0].text="Not Specified";
		maxPrice.options[0].text="Not Specified";
		for(i=1; i<x; i++)
		{
			minPrice.options[i].value=rentArray[i];
			minPrice.options[i].text=rentArray[i] + " per month"; 
			maxPrice.options[i].value=rentArray[i];
			maxPrice.options[i].text=rentArray[i] + " per month";;
		}
		
		minPrice.options[0].selected = 1;
		maxPrice.options[0].selected = 1;

		 
	}
	else
	{
		rentalperiod.value = 0;
		minPrice.options.length=x;
		maxPrice.options.length=x;
		minPrice.options[0].value=0;
		minPrice.options[0].text="Not Specified";
		for(i=1; i<x; i++)
		{
			minPrice.options[i].value=priceArray[i];
			minPrice.options[i].text=priceArray[i]; 
			maxPrice.options[i].value=priceArray[i];
			maxPrice.options[i].text=priceArray[i];
		}
		maxPrice.options[0].text="Not Specified";
		maxPrice.options[0].value="99999999";
		minPrice.options[0].selected = 1;
		maxPrice.options[0].selected = 1;
		
	}
}

window.onload=regenerate2