// redirect

if (top.location == self.location) {
	top.location.href = "/";
}


// menu

function mo1() {
for (var i=0; i< document.getElementsByTagName('a').length; i++) {
	x = document.getElementsByTagName('a')[i].style;
	x.color='#00F';
}
}
function mo2(x) {
	x.style.color='#A00';
}

// showhide

function sh1(id) {
if (document.getElementById(id).style.display=='none') {
	document.getElementById(id).style.display='';
}
else {
	document.getElementById(id).style.display='none';
}
}

function sh2(id) {
	document.getElementById(id).style.display='none';
}


// blur inputs & anchors

function blurInputs() {
if (document.getElementsByTagName) {
var a = document.getElementsByTagName("input");
for (var i=0; i< a.length; i++)
a[i].onfocus = function() {if(this.blur)this.blur()}
}
}

function blurAnchors() {
if (document.getElementsByTagName) {
var a = document.getElementsByTagName("a");
for (var i=0; i< a.length; i++)
a[i].onfocus = function() {if(this.blur)this.blur()}
}
}

function start() {
	blurInputs();
	blurAnchors();
}
window.onload = start;


// slideshow (v1 / ricocheting.com)

var x = 0;
function rotate(num) {
x=num%document.slideForm.slide.length;
if(x<0){x=document.slideForm.slide.length-1};
document.images.show.src=document.slideForm.slide.options[x].value;
document.slideForm.slide.selectedIndex=x;
}
function apRotate() {
if(document.slideForm.slidebutton.value == "STOP"){
rotate(++x);window.setTimeout("apRotate()", 3000);}
}


// preload

if (document.images)
{
a = new Image();
b = new Image();
a.src = "a/new.gif";
b.src = "a/tripadvisor.jpg";
}
