function createXMLHttpRequest(){
	try {return new ActiveXObject("Msxml2.XMLHTTP");}
	catch (e){}
	try {return new ActiveXObject("Microfsoft.XMLHTTP");}
	catch (e){}
	try {return new XMLHttpRequest();}
	catch (e){}
	alert("XMLHttpRequest not supported");
	return null;
	
}

function $(id)
{
	
	return document.getElementById(id);	
}

function changeImg(IMG,LRG)
{
 	var new_img = IMG;
 
  
   document.getElementById("main_img").src = new_img;
   //document.getElementById("main_img_link").href = LRG;
  
}
function changeImg2(IMG,LRG)
{
   var new_img = IMG;
 
  
   document.getElementById("main_img_gallery").src = new_img;
  
}

function view_map()
{
	    document.getElementById("location").onclick = Locate;
	
	  document.getElementById("map").style.display = 'block';
	  document.getElementById("map_frame").style.display = 'block';
	
}


function hideBox()
{
	$('map_frame').style.display='none'; 
	$('map').style.display='none'; 
	
	
}

function loadQuote(){
	
var rq=Math.floor(7*Math.random());

	 if(rq == '0'){
		
		document.write('<a href="casestudies.htm"><img src="images/cta/cta1.gif" alt="With 40 years experience we\'ve built a reputation for integrity and professionalism" width="229" height="125"  border="0"/></a>');
		
	}else if(rq == '1'){
		
		document.write('<a href="casestudies.htm"><img src="images/cta/cta2.jpg" alt="Buying a Property in France is an adventure, let Bruce International guide you through it" width="229" height="125"  border="0"/></a>');
		
		}
	else if(rq == '2'){
		
	document.write('<a href="casestudies.htm"><img src="images/cta/cta3.jpg" alt="Our portfolio includes coastal and country properties from Monaco to Saint Tropez" width="229" height="125"  border="0"/></a>');
		
		}
	else if(rq == '3'){
		
	document.write('<a href="casestudies.htm"><img src="images/cta/cta4.jpg" alt="The professionals for buying and selling character properties on the Cote d\'Azur" width="229" height="125"  border="0"/></a>');
		
		}
	
	
	else if(rq == '4'){
		
	document.write('<a href="casestudies.htm"><img src="images/cta/cta5.jpg" alt="An uncommon reputation for trustworthiness, knowledge and professionalism" width="229" height="125"  border="0"/></a>');
		
		}
	else if(rq == '5'){
		
	document.write('<a href="casestudies.htm"><img src="images/cta/cta6.jpg" alt="Proud of our reputation for knowledge, trustworthiness and professionalism" width="229" height="125"  border="0"/></a>');
		
		}
	else if(rq == '6'){
		
	document.write('<a href="casestudies.htm"><img src="images/cta/cta7.jpg" alt="We enjoy our work because we do it well – we enjoy life on the Cote d\'Azur and would like others to share the experience" width="229" height="125"  border="0"/></a>');
		
		}
	


}

function loadBanner(){
	
var rq=Math.floor(4*Math.random());

	 if(rq == '0'){
		
		document.write('<a href="local-area.htm"><img src="images/banner/img3.jpg" alt="C&ocirc;te d\'Azur" width="483" height="125"  border="0" align="left"/></a>');
		
	}else if(rq == '1'){
		
		document.write('<a href="local-area.htm"><img src="images/banner/img4.jpg" alt="C&ocirc;te d\'Azur" width="483" height="125"  border="0" align="left"/></a>');
		
		}
	else if(rq == '2'){
		
	document.write('<a href="local-area.htm"><img src="images/banner/img6.jpg" alt="C&ocirc;te d\'Azur" width="483" height="125"  border="0" align="left"/></a>');
		
		}
	else if(rq == '3'){
		
	document.write('<a href="local-area.htm"><img src="images/banner/img7.jpg" alt="C&ocirc;te d\'Azur" width="483" height="125"  border="0" align="left"/></a>');
		
		}
	
	
	
	


}
function Locate(e){
			
			var posx=0,posy=0;
			if (e == null) e=window.event;
				if(e.pageX || e.pageY){
					posx=e.pageX; posy=e.pageY;
					}
			 if(e.clientX || e.clientY){
				if(document.documentElement.scrollTop){
					posx=e.clientX+document.documentElement.scrollLeft;
					posy=e.clientY+document.documentElement.scrollTop;
					}
				else{
					posx=e.clientX+document.body.scrollLeft;
					posy=e.clientY+document.body.scrollTop;
					}
				}
			document.getElementById("map_frame").style.top=(posy-30)+"px";
			document.getElementById("map_frame").style.left=(posx+45)+"px";
			document.getElementById("map").style.top=(posy-30)+"px";
			document.getElementById("map").style.left=(posx+45)+"px";
			
			}