function feedback() {
	var destination = 'http://www.breacais.demon.co.uk/feedback/skye-views.htm'
	var sHeight = screen.height-100
	var params = 'width=570 height=' + sHeight + ' left=10 top=10 screenX=10 screenY=10 scrollbars=auto'
	noticeWindow = window.open(destination,'noticeWindow',params)
	noticeWindow.focus()
	}

function newWindow(info) {
	var w1=660, h1=660
	var params = 'width='+w1+',height='+h1+',resizable=no,scrollbars=no,left=10,top=5,screenX=10,screenY=5'
	noticeWindow = window.open(info,w1,params)
	noticeWindow.focus()
	}

function scrollWindow(info, w1, h1) {
	var params = 'width='+w1+',height='+h1+',resizable=yes,scrollbars=yes,left=10,top=5,screenX=10,screenY=5'
	imageWindow = window.open(info,w1,params)
	imageWindow.focus()
	}

//From Orange CD

// Open new window to contain the image.
function openImage(photoNo,windowName,caption) {
	//Set Cookie
	var expireDate = new Date(); expireDate.setMonth(expireDate.getMonth() + 6);
	var cookieName = "VIEWS" ; var VIEWScookievalue = photoNo;
	document.cookie = "VIEWS=" + VIEWScookievalue ;
	//Cookie now set
	var sHeight = screen.height-110;
	var params = 'width=660,height=' + sHeight + ',resizable=no,scrollbars=yes,left=10,top=10,status=no'
	//continue with opening new window.
	mapWindow = window.open('image.htm',windowName,params)
	mapWindow.focus()
}

// Dynamically write the image filename content
function createPage() {
//	var caption = 'Caption TBD'
	photoNo = readCookie()
	document.write('<div align="right">• ');
	document.write('<a href="javascript:window.print()">PRINT</a> • ');
	document.write('<a href="javascript:window.close()">CLOSE</a> •</div>');
	document.write('<div align="center"><img border="0" src="' + photoNo + '.jpg"></div>')
	document.write('<div align="left">' + caption + '</div>')
}

function openOSR(photoNo,windowname,offset) {
var sHeight = screen.height-125;
var popup = photoNo + 'OSR.pdf';
var params = 'width=600,height=' + sHeight + ',resizable=yes,scrollbars=no,left=' + offset + ',top=0,status=no';
	osrWindow = window.open(popup,windowname,params);
	osrWindow.focus()
}

function openPhoto(filename,windowname,offset) {
var sHeight = screen.height-125;
var popup = filename;
var params = 'width=1000,height=' + sHeight + ',resizable=yes,scrollbars=yes,left=' + offset + ',top=0,status=no';
	photoWindow = window.open(popup,windowname,params);
	photoWindow.focus()
}

function readCookie() {
	var cookieName = "VIEWS=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(cookieName) == 0) return c.substring(cookieName.length,c.length);
	}
	return null;
}

function closeCookie () {
	document.cookie = "VIEWS" + ";expires=;";
}

function nul() {null}

