/* Jackie Mann's accessibility scripts for Lochgilphead, Argyll, Scotland, January, 2008. */
<!--
function myTarb(){var V=new Date,C=V.getHours(),v=V.getMinutes();v=((v<10)?"0":"")+v;n="am";if(C>=12){n="pm";C=C-12};if(C==0)C=12;c=C+":"+v+""+n+", ";var i=new Date,l=i.getYear();if(l<1000)l+=1900;var O=i.getDay(),o=i.getMonth(),I=i.getDate();if(I<10)I="0"+I;dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December");tarbm=c+dayarray[O]+", "+montharray[o]+" "+I+", "+l;return tarbm}
function mySal(){var l=new Date,I=l.getHours(),i
if(I>=0&&I<12){i=("<font face='Arial' color='#00ff00' size='3'><strong>"+"Good morning "+"</strong></font>")}else if(I>=12&&I<16){i=("<font face='Arial' color='#ffff00' size='3'><strong>"+"Good afternoon "+"</strong></font>")}else if(I>=16&&I<24){i=("<font face='Arial' color='#66ffff' size='3'><strong>"+"Good evening "+"</strong></font>")}
return i}
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage}}else if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload()}
MM_reloadPage(true);
function MM_preloadImages(){var l=document;if(l.images){if(!l.MM_p)l.MM_p=[];var I,i=l.MM_p.length,o=MM_preloadImages.arguments;for(I=0;I<o.length;I++)if(o[I].indexOf("#")!=0){l.MM_p[i]=new Image;l.MM_p[i++].src=o[I]}}}
function copNot(){myMsg="Thanks for reading our Copyright Notice: \n\nAll Images, Content, and Design on this Web site \nare World-wide Copyright materials and are not \navailable for reuse in any form. \n\nCopyright (c) 2001 - 2010 Jackie Mann."
bVer=parseInt(navigator.appVersion);brNS=navigator.appName=="Netscape";brIE=navigator.appName=="Microsoft Internet Explorer"
function i(I){if(brNS&&I.which>1){alert(myMsg);return false}else if(brIE&&(event.button>1)){alert(myMsg);return false}}
document.onmousedown=i;if(document.layers)window.captureEvents(Event.MOUSEDOWN);if(brNS&&bVer<5)window.onmousedown=i}
function MM_findObj(l,O){var o,I,i;if(!O)O=document;if((o=l.indexOf("?"))>0&&parent.frames.length){O=parent.frames[l.substring(o+1)].document;l=l.substring(0,o)}
if(!(i=O[l])&&O.all)i=O.all[l];for(I=0;!i&&I<O.forms.length;I++)i=O.forms[I][l];for(I=0;!i&&O.layers&&I<O.layers.length;I++)i=MM_findObj(l,O.layers[I].document);if(!i&&O.getElementById)i=O.getElementById(l);return i}
function readCookie(I){eq=I+"=";ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(eq)==0)return c.substring(eq.length,c.length)}return ''}
function writeCookie(I,l,o){var i="";if(o){d=new Date;d.setTime(d.getTime()+(o*86400000));i="; expires="+d.toGMTString()}document.cookie=I+"="+l+i+"; path=/"}
function checkardForm(){if((document.getElementById('tarbertforma2').texttarbName.value!='')){var i=false;document.cookie="Enabled=true";var I=document.cookie;if(I.indexOf("Enabled=true")!=-1){writeCookie('lochgilpgreet',MM_findObj('texttarbName').value,90);alert('Thanks, the page will now\n reload to make changes.');location.reload();i=true}else{i=false;alert('You need to enable cookies \nto perform this function.')}}else{alert('Please enter your name.');return false}}
function checkForm(i){if(i.imgverify.value==""){alert("Please fill Characters in Image.");i.imgverify.focus();return false}
if(i.realname.value==""){alert("Please enter your Name.");i.realname.focus();return false}
if(i.email.value==""){alert("Please enter your Email address.");i.email.focus();return false}
if(i.mesg.value==""){alert("Please enter your Message.");i.mesg.focus();return false}
return true}
function killCookie(I){var i=readCookie(I);if(i){document.cookie=I+'=; expires=Thu, 01-Jan-70 00:00:01 GMT'+'; path=/';alert('Thanks. If Greeting Persists \nClose, Restart Browser and \nClick Disable Again.');location.reload()}else{alert('Only Enabled Greetings\ncan be Disabled.')}}
function makeFavourite(){var o=parseInt(navigator.appVersion),l=navigator.userAgent.toLowerCase().indexOf("mac")!=-1,I=navigator.userAgent.toLowerCase().indexOf("msie")!=-1,i=location.href;if(i.lastIndexOf('#')!=-1)i=i.substring(0,i.lastIndexOf('#'));if(I&&o&&!l)window.external.AddFavorite(i,document.title);else if(I||document.images)alert("Hold the Ctrl (or Cmd) key down \nthen tap the D key but only after \nyou close this window")}
function setHome(i){if(navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE")+5)>=5&&navigator.platform.indexOf("Win16")==-1&&navigator.platform.indexOf("Mac")==-1){i.style.behavior='url(#default#homepage)';i.setHomePage(document.location);i.href="#";return true}else{return false}}
function checkJs(){document.getElementById("jsMsg").style.display = "none";}

/* ---
function checkJs(){document.getElementById("jsMsg").style.visibility = 'hidden';} 
Following function is adaptation of Paul Snowden's functions:
  <http://www.idontsmoke.com/>  
function chosenStyle(i){var o,l,I;for(o=0;(l=document.getElementsByTagName("link")[o]);o++){if(l.getAttribute("rel").indexOf("style")!=-1&&l.getAttribute("title")){l.disabled=true;if(l.getAttribute("title")==i)l.disabled=false}}}

function findStyle(){var i,I;for(i=0;(I=document.getElementsByTagName("link")[i]);i++){if(I.getAttribute("rel").indexOf("style")!=-1&&I.getAttribute("title")&&!I.disabled)return I.getAttribute("title")}
return null}

function findprefStyle(){var i,I;for(i=0;(I=document.getElementsByTagName("link")[i]);i++){if(I.getAttribute("rel").indexOf("style")!=-1&&I.getAttribute("rel").indexOf("alt")==-1&&I.getAttribute("title"))return I.getAttribute("title")}
return null}

window.onload=function(l){var i=readCookie("style"),I=i?i:findprefStyle();chosenStyle(I)}

window.onunload=function(I){var i=findStyle();writeCookie("style",i,365)}

var cookie=readCookie("style"),title=cookie?cookie:findprefStyle();chosenStyle(title);

var tarbTarget={init:function(c,v){if(document.getElementById&&document.createElement&&document.appendChild){var C=((typeof c=='undefined')||(c==null))?'class':c;var I=((typeof v=='undefined')||(v==null))?'non-html':v;var i=document.getElementsByTagName('a'),l;var o=new RegExp("(^|\\s)"+I+"(\\s|$)");for(var O=0;O<i.length;O++){l=i[O];if((C=='class')&&(o.test(l.className))||(o.test(l.getAttribute(C)))){l.onclick=tarbTarget.openWin}}}},openWin:function(I){var i=window.open(this.getAttribute('href'),'_blank');if(i){if(i.focus)i.focus();return false}
i=null;return true},addEvent:function(i,I,l){if(i.addEventListener)i.addEventListener(I,l,false);else if(i.attachEvent){i["e"+I+l]=l;i[I+l]=function(){i["e"+I+l](window.event)}
i.attachEvent("on"+I,i[I+l])}}};tarbTarget.addEvent(window,'load',function(){tarbTarget.init("rel","external")});

// Limit/Block text

 function maxLength(I,i){if(I.value.length>=i){event.returnValue=false;alert("Please Enter Less Than "+i+" Characters");return false}}
 
 // Block Paste

 function maxLengthPaste(I,i){event.returnValue=false;if((I.value.length+window.clipboardData.getData("Text").length)>i){alert("Please Enter Less Than "+i+" Characters");return false}
event.returnValue=true}
--- */
//-->