// external js

if (document.images) {

	thisSiteOn = new Image();
	thisSiteOn.src = "/vsite/static/images/site_arrow_new.gif";
	
	thisSiteOff = new Image();
	thisSiteOff.src = "/vsite/static/images/transdot.gif";
	
	// frontSportImg = new Image();
	// frontSportImg.src = "/vsite/static/images/front" + (1 + Math.round(11*Math.random())) + ".jpg";

}     
   
function createTour(CURL) {
tourWin = window.open(CURL,'tour','width=740,height=550,resizeable=no,status=yes,scrollbars=yes');
tourWin.focus();
} 

function changeImg(whichImage,toWhichImage,direction) {
eval("document['" + whichImage + "'].src = " + toWhichImage + direction + ".src");
}
   
function changeStyleOn(linkId,styleClass) {
if (document.all) {
var changestyle = "document.all." + linkId + ".className = '" + styleClass + "On'";
eval(changestyle);
	}
}

function changeStyleOff(linkId,styleClass) {
if (document.all) {
var changestyle = "document.all." + linkId + ".className = '" + styleClass + "Off'";
eval(changestyle);
	}
}

// Updated code to deal with Navigator problems.
function pageInit() {
  if (document.layers)
  {
    window.captureEvents(Event.RESIZE)
    window.onresize = resizeHandler;
  }
  if (document.images) {
    // document['frontMain'].src = "/vsite/static/images/front" + (1 + Math.round(11*Math.random())) + ".jpg";
	
	// rotateImg();
	}
}

function resizeHandler () {
  if (document.images) {
   // document['frontMain'].src = "/vsite/static/images/front" + (1 + Math.round(11*Math.random())) + ".jpg";
  }
  return false	
}
	
// open terms and conditions window from link in footer


function footerwin(whichwin) {

winurl = "";
if (whichwin == "tmandcopy") {winurl = "/vsite/static/pages/tmandcopy/0,10754,,00.html"}
if (whichwin == "termsaccess") {winurl = "/vsite/static/pages/termsaccess/0,10757,,00.html"}
if (whichwin == "privacy") {winurl = "/vsite/static/pages/privacy/0,10756,,00.html"}

tcfootwin = window.open(winurl,'tandcfoot','width=460,height=550,resizable=1,scrollbars=1');
tcfootwin.focus();
}

function tellaFriend(CURL) {
sendMail = window.open(CURL,'sendMail','width=500,height=550,resizeable=no,status=yes,scrollbars=yes');
sendMail.focus();
}