// JavaScript Document
var msg = "Travellers Cheques are only available in:\n\n US Dollars,\n Euros,\n Australian Dollars,\n Canadian Dollar,\n Japanese Yen,\n and UK Sterling.";

var msg_ster_tc = "Please note there is a 1% charge for all Sterling Travellers' Cheques."


function check_ctc(sel,r){
	var rad;
	rad = eval('document.frm.'+ r);
	if ((sel.value!=='165'&&sel.value!=='186'&&sel.value!=='7'&&sel.value!=='21'&&sel.value!=='213'&&sel.value!=='185')&&(rad[1].checked==true)){
		alert(msg);
		rad[0].checked = true;
		}
	if ( sel.value == 185 && rad[1].checked == true ) { alert(msg_ster_tc) }
	}

function check_curr(r,j){
	var rad;
	rad = eval('document.frm.'+ r);
	var sel; var currID;
	sel = eval('document.frm.cid' + j);
	currID = sel.options[sel.selectedIndex].value;
	if((currID!=='165')&&(currID!=='186')&&(currID!=='7')&&(currID!=='21')&&(currID!=='213')&&(currID!=='185')){
		alert(msg);
		if(currID!==''){rad[0].checked = true;}
	}
}

function check_TC(){




	var sel; var currID; var rad;
	rad = eval('document.frm.ctc');
	sel = eval('document.frm.cid');
	currID = sel.options[sel.selectedIndex].value;


	if((currID!=='165')&&(currID!=='186')&&(currID!=='7')&&(currID!=='21')&&(currID!=='213')&&(currID!=='185')){
		alert(msg);
		if(currID!==''){rad[0].checked = true;}
		}
	if ( currID == 185 && rad[1].checked == true ) { alert(msg_ster_tc) }
	}



function clearTxt(txt,x){if (x.value == txt) x.value = '';}
function resetTxt(txt,x){if (x.value == '') x.value = txt;}

function noSpam(user,domain) {
locationstring = "mailto:" + user + "@" + domain;
window.location = locationstring;
}



function forgotPass(page){
	var xleft = (window.screen.width/2)-200;
	var xtop = (window.screen.height/2)-150;
	var newPopup = window.open(page,'shortlist','left='+xleft+',top='+xtop+',width=450,height=149,status=1')
	newPopup.focus();
}




var win =0;
function newWin(URLStr,w,h,t,l)
{
//var xleft = (window.screen.width)-323;
//var xtop = 0;
if(win){if(!win.closed) win.close();}
	win = window.open(URLStr,'win','status,menubar,scrollbars,resizable,width='+w+',height='+h+',top='+t+',left='+l+' ')
}


/*
===========================================================
Script:   JavaScript Cross-Browser SlideShow Script
          With Cross-Fade Effect between Images
          Adjustable Timing and Unlimited Images
Function: Displays images continuously in a slideshow
          presentation format, with a fade effect on
          image transitions.
Browsers: All common browsers: NS3-6, IE 4-6
          Fade effect only in IE; others degrade gracefully
Author:   etLux
===========================================================
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// Set slideShowSpeed (milliseconds) */
var slideShowSpeed = 3750
// Duration of crossfade (seconds)
var crossFadeDuration = 1
// Specify the image files
var Pic = new Array() 
Pic[0] = 'images/headers/0.jpg'
Pic[1] = 'images/headers/1.jpg'
Pic[2] = 'images/headers/2.jpg'
Pic[3] = 'images/headers/0.jpg'
Pic[4] = 'images/headers/3.jpg'
Pic[5] = 'images/headers/4.jpg'
Pic[6] = 'images/headers/0.jpg'
Pic[7] = 'images/headers/5.jpg'
Pic[8] = 'images/headers/6.jpg'

// =======================================
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}
function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

///////////////////////////////////////////////////////////////////
// Ticker startup
function startTicker()
{
	// Define run time values
	theCurrentStory     = -1;
	theCurrentLength    = 0;
	// Locate base objects
	if (document.getElementById) {	
			theAnchorObject = document.getElementById("tickerAnchor");
			runTheTicker();   	
		}
	else {
			document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
			return true;
	}
}
// Ticker main run loop
function runTheTicker()
{
	var myTimeout;  
	// Go for the next story data block
	if(theCurrentLength == 0)
	{
		theCurrentStory++;
		theCurrentStory      = theCurrentStory % theItemCount;
		theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');		
		theTargetLink        = theSiteLinks[theCurrentStory];
		theAnchorObject.href = theTargetLink;
		thePrefix 	     = "<span class=\"tickls\">" + theLeadString + "</span>";
	}
	// Stuff the current ticker text into the anchor
	theAnchorObject.innerHTML = thePrefix + 
	theStorySummary.substring(0,theCurrentLength) + whatWidget();
	// Modify the length for the substring and define the timer
	if(theCurrentLength != theStorySummary.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}
	// Call up the next cycle of the ticker
	setTimeout("runTheTicker()", myTimeout);
}
// Widget generator
function whatWidget()
{
	if(theCurrentLength == theStorySummary.length)
	{
		return theWidgetNone;
	}

	if((theCurrentLength % 2) == 1)
	{
		return theWidgetOne;
	}
	else
	{
		return theWidgetTwo;
	}
}
/*======================================================================*/
function showhide(divID) {
	div = document.getElementById(divID); 
	div.style.display = (div.style.display == 'block') ? 'none' : 'block';
	} 
	
function showdiv(divID) { document.getElementById(divID).style.display = 'block'; } 
	
function hidediv(divID) { document.getElementById(divID).style.display = 'none'; } 
	


/*======================================================================*/

/*======================================================================*/
function show_insurance(ins,ttl_ste) {
	document.getElementById('insurance').innerHTML=ins;
	document.getElementById('total_sterling').innerHTML=ttl_ste;
	}
/*======================================================================*/


/*======================================================================*/


