var theImages = new Array() // do not change this

theImages[0] = 'images/top-photo-slide/Canada - Ontario - Niagara Falls 1a.jpg'
theImages[1] = 'images/top-photo-slide/Giordania - Petra 1a.jpg'
theImages[2] = 'images/top-photo-slide/Namibia - Deadvlei 1a.jpg'
theImages[3] = 'images/top-photo-slide/Namibia - Sossusvlei 1a.jpg'
theImages[4] = 'images/top-photo-slide/Namibia - Sossusvlei 2a.jpg'
theImages[5] = 'images/top-photo-slide/Siria - Palmyra 1a.jpg'
theImages[6] = 'images/top-photo-slide/USA - Arizona - Canyon de Chelly 1a.jpg'
theImages[7] = 'images/top-photo-slide/USA - Arizona - Coyote Buttes - Wave 1a.jpg'
theImages[8] = 'images/top-photo-slide/USA - Arizona - Grand Canyon North Rim 1a.jpg'
theImages[9] = 'images/top-photo-slide/USA - Maine - Pemaquid Point 1a.jpg'
theImages[10] = 'images/top-photo-slide/USA - Utah - Delicate Arch 1a.jpg'
theImages[11] = 'images/top-photo-slide/USA - Utah - Monument Valley 1a.jpg'
theImages[12] = 'images/top-photo-slide/Iceland - Skogarfoss 1a.jpg'
theImages[13] = 'images/top-photo-slide/Iceland - Lake Myvatn - Namaskard 1a.jpg'
theImages[14] = 'images/top-photo-slide/Iceland - Seljalandsfoss 1a.jpg'
theImages[15] = 'images/top-photo-slide/Iceland - Lake Myvatn - Leirhnjukur 1a.jpg'
theImages[16] = 'images/top-photo-slide/Greece - Amorgos 1a.jpg'
theImages[17] = 'images/top-photo-slide/Giordania - Wadi Rum 1a.jpg'
theImages[18] = 'images/top-photo-slide/Siria - Krak des Chevaliers 1a.jpg'
theImages[19] = 'images/top-photo-slide/Spain - Barcelona 1a.jpg'
theImages[20] = 'images/top-photo-slide/Thai - Koh Kradan 1a.jpg'
theImages[21] = 'images/top-photo-slide/Thai - Koh Bulon 1a.jpg'
theImages[22] = 'images/top-photo-slide/France - Paris 1a.jpg'
theImages[23] = 'images/top-photo-slide/Greece - Santorini 1a.jpg'
theImages[24] = 'images/top-photo-slide/Thai - Koh Ngai 1a.jpg'
theImages[25] = 'images/top-photo-slide/Thai - Koh Ngai 2a.jpg'
theImages[26] = 'images/top-photo-slide/Thai - Koh Ngai 3a.jpg'
theImages[27] = 'images/top-photo-slide/Thai - Koh Ngai 4a.jpg'
theImages[28] = 'images/top-photo-slide/Thai - Koh Lipe 1.jpg'
theImages[29] = 'images/top-photo-slide/Thai - Koh Lipe 2.jpg'
theImages[30] = 'images/top-photo-slide/Thai - Koh Lanta 1a.jpg'
theImages[31] = 'images/top-photo-slide/Thai - Koh Lanta 2a.jpg'
theImages[32] = 'images/top-photo-slide/Thai - Koh Lanta 3a.jpg'


var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

var date = new Date();
var timegmt = date.toGMTString();

// split the GMT string at spaces
time_string = timegmt.split(' ');

// assign variables
week = time_string[0];
day = time_string[1];
mon = time_string[2];
year = time_string[3];
hms = time_string[4];

// split the time part on colon
hms_string = hms.split(':');

// assign variables
var hour = hms_string[0] - 0;
var min = hms_string[1];

// convert day-of-week variables to numbers
if (week == 'Sun,') {
   week = 1
   }
if (week == 'Mon,') {
   week = 2
   }
if (week == 'Tue,') {
   week = 3
   }
if (week == 'Wed,') {
   week = 4
   }
if (week == 'Thu,') {
   week = 5
   }
if (week == 'Fri,') {
   week = 6
   }
if (week == 'Sat,') {
   week = 7
   }
   
// fix mac version communicator bug
function checkOS() {
          if (navigator.appVersion.indexOf("Mac") > 0) return "Macintosh";
          else return "other";
}
var check = checkOS();
    if (check == "Macintosh") {
    week -= 1
   }

// make array for days of week
weekly = new Array("Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");

  
// assign -9
var nove_hour = hour - 8;
var nove_week = week;
var nove_ampm = " a.m.";
if (nove_hour < 0) {
   nove_hour += 24
   nove_week -= 1
   }
if (nove_hour > 11) {
    nove_ampm = " p.m."
    }
if (nove_hour > 12) {
   nove_hour -= 12
   }
if (nove_hour == 0) {
   nove_hour = 12
}

// assign -8
var otto_hour = hour - 7;
var otto_week = week;
var otto_ampm = " a.m.";
if (otto_hour < 0) {
   otto_hour += 24
   otto_week -= 1
   }
if (otto_hour > 11) {
    otto_ampm = " p.m."
    }
if (otto_hour > 12) {
   otto_hour -= 12
   }
if (otto_hour == 0) {
   otto_hour = 12
}

// assign -7
var sette_hour = hour - 6;
var sette_week = week;
var sette_ampm = " a.m.";
if (sette_hour < 0) {
   sette_hour += 24
   sette_week -= 1
   }
if (sette_hour > 11) {
    sette_ampm = " p.m."
    }
if (sette_hour > 12) {
   sette_hour -= 12
   }
if (sette_hour == 0) {
   sette_hour = 12
}

// assign -7
var sei_hour = hour - 5;
var sei_week = week;
var sei_ampm = " a.m.";
if (sei_hour < 0) {
   sei_hour += 24
   sei_week -= 1
   }
if (sei_hour > 11) {
    sei_ampm = " p.m."
    }
if (sei_hour > 12) {
   sei_hour -= 12
   }
if (sei_hour == 0) {
   sei_hour = 12
}


var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")


function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
