// function to display scrolling marquee
function marquee()
{
	mesg = "Welcome to Fionnlagh Villa...book now for 2010 and receive a 10% discount";
	isNS = (navigator.appName == "Netscape")
	isIE = (navigator.appName == "Microsoft Internet Explorer")
	text = ("<p class=marquee>"+mesg+"</p>")
	if (isNS) {
	document.write("<blink>" + text + "</blink>")}
	else if (isIE) {
	document.write("<marquee behaviour=alternate direction=left>" + text + "</marquee>")}
}

// function to report page last modified date in footer.
function last_mod()
{
	if ( Date.parse(document.lastModified ) != 0 );
	document.write ( "Page last updated: " + document.lastModified );
}

//function to report page last modified date
function last_mod1()
{
	if ( Date.parse(document.lastModified ) != 0 );
	document.write( document.lastModified );
}

// function to calculate the number of nights

function numnights(year, month,day,year1,month1,day1)
{
	var date_in = year+month+day;
	var date_out = year1+month1+day1;
	var start = new Date(date_in);
	var finish = new Date(date_out);
	var today = new Date();
	var one_day = 1000*60*60*24;

	document.forms.enquiry.nights.value = Math.floor((today.getTime()-start.getTime()+(finish.getTime()-today.getTime()))/(one_day));
}

//function to open a window for viewing images of the villa from floorplan image

function pictures( str ) 

{
	window.open( str , "","top=40,left=40,width=640,height=480,status,scrollbars" );
}


//function to open new window for viewing pdf brochure

function download( str )

{
	window.open ( str, "","top=40,left=40,width=640,height=480,status,scrollbars,resizable" );
}

//function to open new window for viewing video tour

function video_tour( str )

{
	window.open ( str, "","top=10,left=40,width=640,height=750,status,scrollbars,resizable" );
}

function weather()

{
   		/* Locations can be edited manually by updating 'wx_locID' below.  Please also update */
   		/* the location name and link in the above div (wx_module) to reflect any changes made. */
   		var wx_locID = 'USFL0104';

   		/* If you are editing locations manually and are adding multiple modules to one page, each */
   		/* module must have a unique div id.  Please append a unique # to the div above, as well */
   		/* as the one referenced just below.  If you use the builder to create individual modules  */
   		/* you will not need to edit these parameters. */
   		var wx_targetDiv = 'wx_module_3167';

   		/* Please do not change the configuration value [wx_config] manually - your module */
   		/* will no longer function if you do.  If at any time you wish to modify this */
   		/* configuration please use the graphical configuration tool found at */
   		/* https://registration.weather.com/ursa/wow/step2 */
   		var wx_config='SZ=180x150*WX=FHW*LNK=SSNL*UNT=C*BGI=plane*MAP=CSC|null*DN=www.fionnlaghvilla.pwp.blueyonder.co.uk*TIER=0*PID=1007319327*MD5=e359c0874d4c0f9dfd8ad1fb4724080f';

   		document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?config='+wx_config+'&proto='+document.location.protocol+'&target='+wx_targetDiv+'"></scr'+'ipt>');
}

// function to close the pop-up window
function cls_pictures()

{
	window.close();
}



