// 090527 Per Sally, fixed Boat & Vacation Rentals  (also 's') - Brian
// 090527 Per Sally, added 's' to bed and breakfast. - Brian
// 081124 added per Sally as she wants a clock on WTGL Pages - Brian
// Analog Clock - Parameters Head Script
// You may change the parameters here to set up your clock
// refer to  http://javascript.about.com/library/blclock1.htm
// for a description of the parameters
var clocksize=55;
var colnumbers='000000';
var colseconds='ff0000';
var colminutes='000000';
var colhours='000000';
var numstyle = 0;
var font_family = 'arial,sans-serif,helvetica';
var localZone = 0;
var mytimezone = -5;
var dst = 0;
var city = '';
var country = '';
var fix = 0;
var xpos=755; // from lef4
var ypos=60;  // from top
// code to adjust for daylight saving time if applicable (localzone = 0)
// code to handle clock positioning (fix = 0)
// 081124 added per Sally as she wants a clock on WTGL Pages - Brian
// Analog Clock - Head Script
// copyright Stephen Chapman, 19th November 2005, 28th September 2008
// you may copy this clock provided that you retain the copyright notice
var dayname = new Array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'); var am = 'AM'; var pm = 'PM';
// you should not need to alter the below code
var pi = Math.PI; var d = document; var pi2 = pi/2; var rad = (+clocksize) / 2; var ctrX = (+xpos) + rad; var ctrY = (+ypos) + rad; var hourln = 1; var minln = secln = 2; for(var i = 0; i < (rad / 2) + (rad / 16); i++) {hourln += 1;} for(var i = 0; i < (rad / 2) - (rad / 8); i++) {minln += 2;secln += 2;} var font_size = rad / 3; var offset = 16;  var clocknum = [[,1,2,3,4,5,6,7,8,9,10,11,12],[,'I','II','III','IIII','V','VI','VII','VIII','IX','X','XI','XII'],[,'á','á','-','á','á','<span style="font-size:60%">|</span>','á','á','-','á','á','<span style="font-size:60%">||</span>']]; if (numstyle < 0 || numstyle > 2) numstyle = 0; function timeZone(now,loc,mtz,dst) {if (loc) {var dow = now.getDay(); var second = now.getSeconds(); var minute = now.getMinutes(); var hour = now.getHours();} else {now.setUTCMinutes(now.getUTCMinutes() + (mtz + dst)*60); var dow = now.getUTCDay(); var second = now.getUTCSeconds(); var minute = now.getUTCMinutes(); var hour = now.getUTCHours();} if (hour > 11) {moa = pm; hour -= 12;} else moa = am; return [dow,moa,hour,minute,second];} function commonClock(n) {n.style.position = 'absolute'; n.style.top = '0'; n.style.left = '0'; n.style.visibility = 'hidden';} function displayClock() {if (!d.getElementById) return; var ctx = document.createElement('div'); if ( fix) {ctx.style.position = 'relative'; ctx.style.margin = 'auto'; ctx.style.width = (clocksize + offset * 2) + 'px'; ctx.style.height = (clocksize + offset * 2) + 'px'; ctx.style.overflow = 'visible';} var cn = []; for (var i = 12; i > 0; i--) {cn[i] = document.createElement('div'); cn[i].id = 'cnum' + i; commonClock(cn[i]); cn[i].style.width = (offset * 2) + 'px'; cn[i].style.height = (offset * 2) + 'px'; cn[i].style.fontFamily = font_family; cn[i].style.fontSize = font_size + 'px'; cn[i].style.color = '#' + colnumbers; cn[i].style.textAlign = 'center'; cn[i].style.paddingTop = '10px'; cn[i].style.zIndex = 1000; cn[i].innerHTML = clocknum[numstyle][i]; ctx.appendChild(cn[i]);} var mn = []; for (i = minln; i > 0; i--) {mn[i] = document.createElement('div'); mn[i].id = 'cmin' + i; commonClock(mn[i]); mn[i].style.width = '1px'; mn[i].style.height = '1px'; mn[i].style.fontSize = '1px'; mn[i].style.backgroundColor = '#' + colminutes; mn[i].style.zIndex = 997; ctx.appendChild(mn[i]);} var hr = []; for (i = hourln; i > 0; i--) {hr[i] = document.createElement('div'); hr[i].id = 'chour' + i; commonClock(hr[i]); hr[i].style.width = '2px'; hr[i].style.height = '2px'; hr[i].style.fontSize ='2px'; hr[i].style.backgroundColor = '#' + colhours; hr[i].style.zIndex = 998; ctx.appendChild(hr[i]);} var sc = []; for (i = secln; i > 0; i--) {sc[i] = document.createElement('div'); sc[i].id = 'csec' + i; commonClock(sc[i]); sc[i].style.width = '1px'; sc[i].style.height = '1px'; sc[i].style.fontSize ='1px'; sc[i].style.backgroundColor = '#' + colseconds; sc[i].style.zIndex = 999; ctx.appendChild(sc[i]);} var am = document.createElement('div'); am.id = 'ampm'; commonClock(am); am.style.width = ((xpos + rad) * 2) + 'px'; am.style.fontFamily = font_family; am.style.fontSize = (font_size * 2 / 3) + 'px'; am.style.color = '#' + colnumbers; am.style.textAlign = 'center'; am.style.paddingTop = '10px'; am.style.zIndex = 990; ctx.appendChild(am); var zn = document.createElement('div'); zn.id = 'zone'; commonClock(zn); zn.style.width = ((xpos + rad) * 2) + 'px'; zn.style.fontFamily = font_family; zn.style.fontSize = (font_size * 2 / 3) + 'px'; zn.style.color = '#' + colnumbers; zn.style.textAlign = 'center'; zn.style.paddingTop = '10px'; zn.style.zIndex = 990; ctx.appendChild(zn); d.getElementById('clock_a').appendChild(ctx); for (var i = 12; i > 0; i--) {d.getElementById('cnum' + i).style.top = (ctrY - offset + rad * Math.sin(i * pi / 6 - pi2))+'px'; d.getElementById('cnum' + i).style.left = (ctrX - offset + rad * Math.cos(i * pi / 6 - pi2))+'px'; d.getElementById('cnum' + i).style.visibility = 'visible';} updateClock();} function moveClock(l, e, f) {for (var i = l; i > 0; i--) {d.getElementById(e + i).style.top = (ctrY + i * Math.sin(f))+'px';d.getElementById(e + i).style.left = (ctrX + i * Math.cos(f))+'px';d.getElementById(e + i).style.visibility = 'visible';}} function updateClock() {var now = new Date(); var theTime = timeZone(now,localZone,mytimezone,dst); d.getElementById('ampm').style.top = (ypos + rad/3)+'px'; d.getElementById('ampm').innerHTML = theTime[1] + '<br />' + dayname[theTime[0]]; d.getElementById('ampm').style.visibility = 'visible'; if (!localZone) {d.getElementById('zone').style.top = (ctrY + (rad/10))+'px'; d.getElementById('zone').innerHTML = city + '<br />' + country; d.getElementById('zone').style.visibility = 'visible';} moveClock(secln, 'csec', pi * theTime[4] / 30 - pi2); moveClock(minln, 'cmin', pi * theTime[3] / 30 - pi2); moveClock(hourln, 'chour', pi * theTime[2] / 6 + pi * (+now.getMinutes())/360 - pi2); setTimeout('updateClock()', 100);}
window.onload = displayClock;// 4/1/2005 If you edit the menu here, be sure to edit the 
// special menu on the wtglhome.html page as well. - Brian
// 2/25/2005 - This code highlight the current menu. 
// 2/26/2005 Doesn't work when page is loaded from index link. - Brian
// 2/26/2005 - I really need to make this so it is independent of the base url. - Brian
// It will check the current URL, then make the current menu id
// the same as the pub either ktg or wtgl and because they match
// the html body id, it will highlight this page too. - Brian
// First set the base url which in the if statement.
var baseURL = "http://www.kytravel.com/esc/wtgl";
// Set the id tag to ktg as a variable. (See html body tag 
// as it is either ktg or wtgl based on CSS.)
var idWTGL = " id=\"wtgl\"";
// Then just make each menu variable the current url.
var home = location.href;
var welcome = location.href;
var accommodations = location.href;
var architectural = location.href;
var art = location.href;
var attractions = location.href;
var bed = location.href;
var boat = location.href;
var bour = location.href;
var conventions = location.href;
var dining = location.href;
var golf = location.href;
var help = location.href;
var historic = location.href;
var industry = location.href;
var museums = location.href;
var music = location.href;
var night = location.href;
var points = location.href;
var shopping = location.href;
var sightseeing = location.href;
var spas = location.href;
var special = location.href;
var sports = location.href;
var contact = location.href;
// compare the menu variable against known list of urls.
if (home == baseURL + "home.html") {home = idWTGL };
if (welcome == baseURL + "welcome.html") {welcome = idWTGL };
if (accommodations == baseURL + "accommodations.html") {accommodations = idWTGL };
if (architectural == baseURL + "architectural.html") {architectural = idWTGL };
if (art == baseURL + "art.html") {art = idWTGL };
if (attractions == baseURL + "attractions.html") {attractions = idWTGL };
if (bed == baseURL + "bed.html") {bed = idWTGL };
if (boat == baseURL + "boat.html") {boat = idWTGL };
if (bour == baseURL + "bour.html") {bour = idWTGL };
if (conventions == baseURL + "conventions.html") {conventions = idWTGL };
if (dining == baseURL + "dining.html") {dining = idWTGL };
if (golf == baseURL + "golf.html") {golf = idWTGL };
if (help == baseURL + "help.html") {help = idWTGL };
if (historic == baseURL + "historic.html") {historic = idWTGL };
if (industry == baseURL + "industry.html") {industry = idWTGL };
if (museums == baseURL + "museums.html") {museums = idWTGL };
if (music == baseURL + "music.html") {music = idWTGL };
if (night == baseURL + "night.html") {night = idWTGL };
if (points == baseURL + "points.html") {points = idWTGL };
if (shopping == baseURL + "shopping.html") {shopping = idWTGL };
if (sightseeing == baseURL + "sightseeing.html") {sightseeing = idWTGL };
if (spas == baseURL + "spas.html") {spas = idWTGL };
if (special == baseURL + "special.html") {special = idWTGL };
if (sports == baseURL + "sports.html") {sports = idWTGL };
if (contact == baseURL + "contact.html") {contact = idWTGL };
// If it matches, put the body id in the menu id below. If it doesn't match put nothing. (see menu01.js)
// so that it highlights the right choice below.
document.write('\
<div id=\"clock_a\"></div>\
<div id=\"subheadwtgl\">\
<a href=\"wtglhome.html\"' + home + '>	Home</a>	 <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglwelcome.html\"' + welcome + '>	Welcome Letters</a>	 <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglaccommodations.html\"' + accommodations + '>	Accommodations</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglarchitectural.html\"' + architectural + '>	Architectural Tours</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglart.html\"' + art + '>	Art Exhibits</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglattractions.html\"' + attractions + '>	Attractions</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglbed.html\"' + bed + '>	Bed &amp; Breakfasts</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglboat.html\"' + boat + '>	Boat &amp; Vacation Rentals</a> <br> \
<a href=\"wtglbour.html\"' + bour + '>	Bourbon Country</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglconventions.html\"' + conventions + '>	Conventions </a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtgldining.html\"' + dining + '>	Dining</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglgolf.html\"' + golf + '>	Golf</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglhelp.html\"' + help + '>	Helpful Information</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglhistoric.html\"' + historic + '>	Historic Homes</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglindustry.html\"' + industry + '>	Industry Tours</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglmuseums.html\"' + museums + '>	Museums</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglmusic.html\"' + music + '>	Music &amp; Theatre</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglnight.html\"' + night + '>	Night Life</a> <br> \
<a href=\"wtglpoints.html\"' + points + '>	Points of Interest</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglshopping.html\"' + shopping + '>	Shopping</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglsightseeing.html\"' + sightseeing + '>	Sightseeing Tours</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglspas.html\"' + spas + '>	Spas</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglspecial.html\"' + special + '>	Special Events</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglsports.html\"' + sports + '>	Sports</a> <img src=\"/esc/base/wtgl/images/bullet.jpg\" alt=\"\" border=\"0\" align=\"middle\" class=\"bullet\"> \
<a href=\"wtglcontact.html\"' + contact + '>	Contact Us</a> \
</div>	');