function slideWin(pgname) {
	var prefCursor = GetCookie('picSize');
	if (prefCursor == null) {
		pagename = pgname;
	}
	else {
		pagename = 'sm_'+pgname;
	}
	window.open(pagename,'','fullscreen=yes, scrollbars=auto');	
}

function PicSizeMsg() {
	document.write('<a href="JavaScript:setPicSize()"><span style="color: #ffffff"; font-size: 85%; font-weight: bold>');
	var prefCursor = GetCookie('picSize');
	if (prefCursor == null) {
		document.write('Click here for small pictures');
	}
	else {
		document.write('Click here for large pictures');
	}
	document.write('</a></span>');

}

function setPicSize() {

	var prefSize = GetCookie('picSize');
	if (prefSize == null) {
		var expDays = 30;
		var exp = new Date(); 
		exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
		SetCookie ('picSize', 'small', exp);
	}
	else {
		DeleteCookie ('picSize');
	}
	//refresh page
	setTimeout("history.go()",1);

}

function genlocate(pgname,middlename) { //reset frames for main section of dunromin site
	<!-- // check if the page is in its proper frame, and if not, relocate
	if ((self.name != 'details') || (top.frames.length==0)) {  // checks to see if our frames are in place
		self.name = 'details';
		var theURL = unescape(window.location.href);
		var writeTo = theURL.indexOf("?");
		var passpage =  theURL.substring(writeTo+"?".length,theURL.length);
		if (top.frames.length==0) {  // checks that there are no frames at all before building them
			document.write('<frameset rows="40,*,80" framespacing=0 border=no frameborder=0>');
			document.write('<frame src="../toolbar.htm" name="toolbar" scrolling=no noresize marginwidth=0 marginheight=0>');
			//  check if the referring page was stored for tracking & use that, otherwise get from doc
			if (writeTo != -1) {
				document.write('<frame src="'+middlename+'.htm?'+pgname+'.htm&rf='+passpage+'" name="middlebit" scrolling=no noresize marginwidth=0 marginheight=0>');
			}
			else {
				document.write('<frame src="'+middlename+'.htm?'+pgname+'.htm&rf='+escape(document.referrer)+'" name="middlebit" scrolling=no noresize marginwidth=0 marginheight=0>');
			}
			document.write('<frame src="../foot.htm" name="foot" scrolling=no noresize marginwidth=0 marginheight=0>');
			document.write('</frameset>')
		}
		else {	// if there are frames, reset the top reference to clear the frames, storing referrer
			// check the referring page for a stored referrer, otherwise obtain from doc
			var newURL=self.location.href + '?' 
			if (writeTo != -1) { 
				newURL = newURL + passpage; }
			else {
				newURL = newURL + escape(document.referrer); }
			top.location.href = newURL
		}
	}
	//-->
}
function undergenlocate(pgname,middlename) { //reset frames for other undertow site
	<!-- // check if the page is in its proper frame, and if not, relocate
	if ((self.name != 'details')  || (top.frames.length==0)) {  // checks to see if our frames are in place
		self.name = 'details';
		var theURL = unescape(window.location.href);
		var writeTo = theURL.indexOf("?");
		var passpage =  theURL.substring(writeTo+"?".length,theURL.length);
		if (top.frames.length==0) {  // checks that there are no frames at all before building them
			document.write('<frameset rows="40,*,60" framespacing=0 border=no frameborder=0>');
			document.write('<frame src="toolbar.htm" name="toolbar" scrolling=no noresize marginwidth=0 marginheight=0>');
			//  check if the referring page was stored for tracking & use that, otherwise get from doc
			if (writeTo != -1) {
				document.write('<frame src="'+middlename+'.htm?'+pgname+'.htm&rf='+passpage+'" name="middlebit" scrolling=no noresize marginwidth=0 marginheight=0>');
			}
			else {
				document.write('<frame src="'+middlename+'.htm?'+pgname+'.htm&rf='+escape(document.referrer)+'" name="middlebit" scrolling=no noresize marginwidth=0 marginheight=0>');
			}
			document.write('<frame src="foot.htm" name="foot" scrolling=no noresize marginwidth=0 marginheight=0>');
			document.write('</frameset>')
		}
		else {	// if there are frames, reset the top reference to clear the frames, storing referrer
			// check the referring page for a stored referrer, otherwise obtain from doc
			var newURL=self.location.href + '?' 
			if (writeTo != -1) { 
				newURL = newURL + passpage; }
			else {
				newURL = newURL + escape(document.referrer); }
			top.location.href = newURL
		}
	}
	//-->
}
function underlocate(pgname) {
	<!-- // call generalised locate function
		undergenlocate(pgname+'2','undermiddle')
	//-->
}
function underlocate2(pgname) {
	<!-- // call generalised locate function
		undergenlocate(pgname,'undermiddle')
	//-->
}
function aromalocate(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname+'2','aromamiddle')
	//-->
}
function aromalocate2(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname,'aromamiddle')
	//-->
}
function greenslocate(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname+'2','greensmiddle')
	//-->
}
function greenslocate2(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname,'greensmiddle')
	//-->
}
function recipelocate(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname+'2','recipemiddle')
	//-->
}
function recipelocate2(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname,'recipemiddle')
	//-->
}
function uslocate(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname+'2','usmiddle')
	//-->
}
function uslocate2(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname,'usmiddle')
	//-->
}
function mainlocate(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname+'2','mainmiddle')
	//-->
}
function mainlocate2(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname,'mainmiddle')
	//-->
}
function blanklocate(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname+'2','blankmiddle')
	//-->
}
function blanklocate2(pgname) {
	<!-- // call generalised locate function
		genlocate(pgname,'blankmiddle')
	//-->
}
function underlistlocate(pgname) {
	<!-- // check if the page is in its proper frame, and if not, relocate
		if (self.name != 'details') {  // checks if there is the right depth of frames, and if not starts from scratch
			self.name = 'details'
			top.location = self.location }
		if (top.frames.length==0) {  // checks if there are no frames at all, and if not rebuilds them
			document.write('<frameset rows="40,*,60" framespacing=0 border=no frameborder=0>')
			document.write('<frame src="../toolbar.htm" name="toolbar" scrolling=no noresize marginwidth=0 marginheight=0>')
			document.write('<frame src="../underlistmiddle.htm?'+pgname+'2.htm&rf='+escape(document.referrer)+'" name="middlebit" scrolling=no noresize marginwidth=0 marginheight=0>')
			document.write('<frame src="../foot.htm" name="foot" scrolling=no noresize marginwidth=0 marginheight=0>')
			document.write('</frameset>')
		}
	//-->
}
function underlistlocate2(pgname) {
	<!-- // check if the page is in its proper frame, and if not, relocate
		if (self.name != 'details') {  // checks if there is the right depth of frames, and if not starts from scratch
			self.name = 'details'
			top.location = self.location }
		if (top.frames.length==0) {  // checks if there are no frames at all, and if not rebuilds them
			document.write('<frameset rows="40,*,60" framespacing=0 border=no frameborder=0>')
			document.write('<frame src="../toolbar.htm" name="toolbar" scrolling=no noresize marginwidth=0 marginheight=0>')
			document.write('<frame src="../underlistmiddle.htm?'+pgname+'.htm&rf='+escape(document.referrer)+'" name="middlebit" scrolling=no noresize marginwidth=0 marginheight=0>')
			document.write('<frame src="../foot.htm" name="foot" scrolling=no noresize marginwidth=0 marginheight=0>')
			document.write('</frameset>')
		}
	//-->
}
function oldtraffic(pgname) {
	<!--
		if (location.href.charAt(4) != 's') {
			// Do not run on secure servers, calling a non-secure counter
			document.write('<BR><IMG WIDTH=1 HEIGHT=1 SRC="http://www.trafficcount.com/cgi-local/counter.pl');
			document.write('?id=15642&ck=89890&domain=www.dunromin.demon.co.uk&page=' + pgname + '.htm&url=' + escape(document.URL) + '&ref=' + document.referrer + '" BORDER=0>');
		}
	// -->
}
function sep_window(pgname) {
	<!--
	sepWin = window.open('panel.htm','sepWin','width=350,height=270,menubar=no,toolbar=no,scrollbars=no,resizable=no');	
// -->
}
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var expDays = 1; // number of days the cookie should last

var page = "prize_rules.htm";
var windowprops = "width=300,height=200,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes";

function GetCookie (name) {  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) {    
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
		return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
	}  
	return null;
}

function SetCookie (name, value) {  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) +  
		((domain == null) ? "" : ("; domain=" + domain)) +    
		((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {  
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function amt(){
	var count = GetCookie('count')
	if(count == null) {
		SetCookie('count','1')
		return 1
	}
	else {
		var newcount = parseInt(count) + 1;
		DeleteCookie('count')
		SetCookie('count',newcount,exp)
		return count
	}
}

function getCookieVal(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function prizeWin() {

	var count = GetCookie('count');
	if (count == null) {
		count=1;
		SetCookie('count', count, exp);
		window.open(page, "", windowprops);

// also stick the code for the hUJe survey in here too
var surveyCookie = GetCookie('survey');
var survpage = "no";

//document.write ("<p class='answer'>Cookie: #" + surveyCookie + "#</p>");

if (surveyCookie == null) {
	survpage = "surveyrequest-form";
}

if ( (surveyCookie == "yes") || (surveyCookie == "started") ) {
	survpage = "surveybegan-form";
}

if (surveyCookie == "later") {
	survpage = "surveylater-form";
}

//document.write ("<p class='answer'>Cookie: #" + surveyCookie + "#</p>");
//document.write ("<p class='answer'>Page: " + page + "</p>");

if (survpage != "no") {
	survpage = survpage + ".htm";
	var winprops = "height=520,location=no,toolbar=yes,menubar=no,scrollbars=yes,resizable=yes";
	window.open(survpage, "", winprops);
}


	}
	else {
		count++;
		SetCookie('count', count, exp);
	}
}
//  End -->
<!-- Above script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

function traffic(pgname) {
	<!--
// check for pages where the frames have been rebuilt and restore the referring page
		var theURL = unescape(window.location.href);
		var writeTo = theURL.indexOf("?");
		var passpage =  theURL.substring(writeTo+"?".length,theURL.length);
// document.write('theURL = '+theURL);
// document.write('<br>writeTo = '+writeTo);
// document.write('<br>passpage = '+passpage);
// document.write('<br>passpage.length = '+passpage.length);
// document.write('<br>referer = '+escape(document.referrer));
<!-- www.toolshack.com web tools statistics hit counter code -->
document.write('<a href="http://www.toolshack.com">');
		var data,p;document.cookie='__support_check=1';nhp='http';
		if((location.href.substr(0,6)=='https:') || 
		  (location.href.substr(0,6)=='HTTPS:'))nhp='https'; 
data='&an='+escape(navigator.appName)+ '&ck='+document.cookie.length+'&rf=';
if ((passpage.length == 0) || (writeTo  == -1))
{	
	data = data+escape(document.referrer);
}
else
{
	data = data+passpage;
}
data=data+ '&sl='+escape(navigator.systemLanguage)+
'&av='+escape(navigator.appVersion)+ '&l='+escape(navigator.language)+
'&pf='+escape(navigator.platform)+ '&pg='+pgname+'.htm';
if(navigator.appVersion.substring(0,1)>'3') {data=data+'&cd='+
screen.colorDepth+'&rs='+escape(screen.width+ ' x '+screen.height)+
'&je='+ navigator.javaEnabled()};
document.write('<a href="http://counter.hitslink.com/'+
'redirector.asp?acct=dunromin">');document.write('<img border=0 hspace=0 '+
 'vspace=0 width=1 height=1 src="'+nhp+'://counter.hitslink.com/'+
 'statistics.asp?v=0&s=14&acct=dunromin'+data+'"></a>');
document.write('</a>');
// document.write('data ='+data);
<!-- End www.toolshack.com statistics web tools hit counter code -->
	// -->
}
function cookieStatus () {
	var exp = new Date(); 
	exp.setTime(exp.getTime() + (1*24*60*60*1000));
	SetCookie ('test', exp, exp);
	cookieDate = GetCookie('test');
	hereDate = exp;
	document.write("<span style='color: #ffffff'>Cookies are '");
	if (hereDate == cookieDate ) {	document.write('ALLOWED');}
	else {				document.write('NOT ALLOWED');}
	document.write("'.</span>");
}
function surveypop () {
	var count = GetCookie('sCount');
	if (count == null) {
		count=1;
		SetCookie('sCount', count, exp);

		var surveyCookie = GetCookie('survey');
		var spage = "no";

		if (surveyCookie == null) {
			spage = "surveyrequest-form";
		}

		if ( (surveyCookie == "yes") || (surveyCookie == "started") ) {
			spage = "surveybegan-form";
		}

		if (surveyCookie == "later") {
			spage = "surveylater-form";
		}

		if (spage != "no") {
			spage = spage + ".htm";
			var winprops = "height=520,location=no,toolbar=yes,menubar=no,scrollbars=yes,resizable=yes";
			window.open(spage, "", winprops);
		}

	}
	else {
		var exp = new Date(); 
		exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
		count++;
		SetCookie('sCount', count, exp);
	}
}
