/* author: Patrick Boyle */
/* creation date: 13/01/01 */

function breakframe()
{if ((window != window.top) && (document.referrer.indexOf("les-alberes.net") = -1) && (document.referrer.indexOf("villa-rental.org.uk") = -1))
  top.location.href = location.href;
}

/* The JavaScript Source!! http://javascript.internet.com
	Date Last Updated*/

function takeYear(theDate)
{
x = theDate.getYear();
var y = x % 100;
y += (y < 38) ? 2000 : 1900;
return y;
}
function lastupdated()
{
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified);
var wday = days[dateObj.getDay() + 1];
var lmonth = months[dateObj.getMonth() + 1];
var date = dateObj.getDate();
fyear = takeYear(dateObj);
/*var fyear = dateObj.getYear();
if (fyear < 2000); 
fyear = fyear + 1900;*/
document.write(lmonth + " " + date + ", " + fyear);
}

var bookmarkurl="http://www.les-alberes.net"
var bookmarktitle="French Villa &amp; Village House Rental"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

//<a href="javascript:addbookmark()">Add to Bookmarks</a>

/*Source: Peter-Paul Koch's Javascript pages http://www.xs4all.nl/~ppk/js/?version5.html*/

function openWindow(jpg,winName,widthJ,heightJ)
{
	heightW=heightJ+7;
	widthW=widthJ+9;
	url='foto.html';
	var newindow = '';
	if (newindow.location && !newindow.closed)
	{
		newindow.location.href = url;
	}
	else
	{ 	
		if (navigator.appVersion.indexOf('4') != -1) 
 		{
 			// Vars for centering the new window on Version 4+ Browsers
 			xTop=(screen.width/2)-(widthW/2);
 			yTop=(screen.height/2)-(heightW/2);
			newindow=window.open('',winName,'resizable=no,toolbar=no,menubar=no,location=no,height='+heightW+',width='+widthW+',left='+xTop+',top='+yTop+'');
		}
 		else 
 		{
 			newindow=window.open('',winName,'resizable=no,toolbar=no,menubar=no,location=no,height='+heightW+',width='+widthW+',left=0,top=0');
		}
	if (!newindow.opener) newindow.opener = self;
	}	
	newindow.document.write('<HTML><HEAD><TITLE>');
	newindow.document.write(winName);
	newindow.document.write('</TITLE>');
	newindow.document.write('<meta HTTP-EQUIV="imagetoolbar" CONTENT="no">');
	newindow.document.write('<meta name="MSSmartTagsPreventParsing" content="TRUE">');
	//newindow.document.write('<LINK REL="stylesheet" HREF="all.css">');
	newindow.document.write('</HEAD><BODY background="images/blacklines.gif" bgproperties="fixed" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newindow.document.write('<table align="center" border="2" cellpadding="0" cellspacing="0">');
	newindow.document.write('<tr><td><a href="javascript:window.close()"><img src='+jpg+' width='+widthJ+' height='+heightJ+' title="Left click to close, Right-click to select Print picture..." border="0"></a>');
	newindow.document.write('</td></tr></table>');
	newindow.document.write('</BODY></HTML>');
	newindow.document.close();
	if (window.focus) newindow.focus();	
}

function openScrollWindow(jpg,winName,widthJ,heightJ)
{
	heightW=487;
	widthW=widthJ+9;
	url='foto.html';
	var newindow = '';
	if (newindow.location && !newindow.closed)
	{
		newindow.location.href = url;
	}
	else
	{ 	
		if (navigator.appVersion.indexOf('4') != -1) 
 		{
 			// Vars for centering the new window on Version 4+ Browsers
 			xTop=(screen.width/2)-(widthW/2);
 			yTop=(screen.height/2)-(heightW/2);
			newindow=window.open('',winName,'resizable=no,scrollbars=yes,toolbar=no,menubar=no,location=no,height='+heightW+',width='+widthW+',left='+xTop+',top='+yTop+'');
		}
 		else 
 		{
 			newindow=window.open('',winName,'resizable=no,scrollbars=yes,toolbar=no,menubar=no,location=no,height='+heightW+',width='+widthW+',left=0,top=0');
		}
	if (!newindow.opener) newindow.opener = self;
	}	
	newindow.document.write('<HTML><HEAD><TITLE>');
	newindow.document.write(winName);
	newindow.document.write('</TITLE>');
	newindow.document.write('<meta HTTP-EQUIV="imagetoolbar" CONTENT="no">');
	newindow.document.write('<meta name="MSSmartTagsPreventParsing" content="TRUE">');
	//newindow.document.write('<LINK REL="stylesheet" HREF="all.css">');
	newindow.document.write('</HEAD><BODY background="images/blacklines.gif" bgproperties="fixed" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newindow.document.write('<table align="center" border="2" cellpadding="0" cellspacing="0">');
	newindow.document.write('<tr><td><a href="javascript:window.close()"><img src='+jpg+' width='+widthJ+' height='+heightJ+' title="Left click to close, Right-click to select Print picture..." border="0"></a>');
	newindow.document.write('</td></tr></table>');
	newindow.document.write('</BODY></HTML>');
	newindow.document.close();
	if (window.focus) newindow.focus();	
}

// This Script was made with ASS Maker 3.0 (c)2000-2001 A.Madeira
// http://www.assmaker.homestead.com
var link = "Email Rental Enquiry";
var tag1 = "mail";
var tag2 = "to:";
var email1 = "villarental.20.pbbuk";
var email2 = "spamgourmet";
var email3 = ".com";
var subject = "Rental Enquiry - Laroque des Alberes (villa-rental)";
var cc = "";
var bcc = "";
var body = "I am interested in renting the apartment with private pool in Laroque from               to               . My email address/telephone number is: ";

window.onerror = errorHandler;

function errorHandler() 
{
	return true;
}

/* determining whether msie or netscape being used and what versions */

var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;

var pr = (window.print) ? 1 : 0;

function closePrintWin()
{
	window.close();
}

function printIt()
{
	
	if (document.all)
	{
		this.model=document.getElementById?1:0;
		if (this.model == 1)
		{
		// ie 5 or above
			if ( pr != 0)
			{
				window.print();
			}
			else
			{
				alert('Sorry, your browser doesn\'t support this feature. Please use the browsers print option.');
			}
		}
		else
		{
			// ie 4
			var OLECMDID_PRINT = 6;
			var OLECMDEXECOPT_DONTPROMPTUSER = 2;
			var OLECMDEXECOPT_PROMPTUSER = 1;
			var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
			document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
			oldHandler = window.onerror;
			window.onerror = errorCheck;
			WebBrowser1.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER);
			WebBrowser1.outerHTML = "";
			window.onerror = oldHandler;

			function errorCheck() 
			{
				WebBrowser1.outerHTML = "";
				window.onerror = oldHandler;
				return true;
	  		}
		}
	}
	else
	{
		if ( pr != 0)
		{
			window.print();
		}
		else
		{
			alert('Sorry, your browser doesn\'t support this feature. Please use the browsers print option.');
		}
	}
}

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}

}

//<!-- etracker CODE START 1.6.1 -->
var et_ref=document.referrer;
if(typeof(top.document)=="object") et_ref=top.document.referrer;
function et_echo() {
document.write("<a target='_blank' href='http://www.etracker.de/soverview.php?c=1&amp;name=50625'>"+
"<img border='0' alt='' src='http://www.etracker.de/fcnt.php?"+
"name=50625"+
"&amp;java=y&amp;swidth="+swidth+"&amp;scolor="+scolor+"&amp;ref="+
escape(et_ref)+"'></a>");
}
var swidth="na";
var scolor="na";
swidth=screen.width;
scolor=navigator.appName!='Netscape'? screen.colorDepth : screen.pixelDepth;
//<!-- etracker CODE END -->
//-->