var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}

function UKPopAndBack()
{
  CurrencyWindow = window.open ('', 'CurrencyWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height=150,width=575')
  CurrencyWindow.focus()
  CurrencyWindow.location.href = 'http://www.xe.com/pca/input.cgi?From=NZD&ToSelect=GBP'
}

function USPopAndBack()
{
  CurrencyWindow = window.open ('', 'CurrencyWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height=150,width=575')
  CurrencyWindow.focus()
  CurrencyWindow.location.href = 'http://www.xe.com/pca/input.cgi?From=NZD&ToSelect=USD'
}

function EuroPopAndBack()
{
  CurrencyWindow = window.open ('', 'CurrencyWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height=150,width=575')
  CurrencyWindow.focus()
  CurrencyWindow.location.href = 'http://www.xe.com/pca/input.cgi?From=NZD&ToSelect=EUR'
}

function checkCheckBox(f){
if (f.Terms.checked == false )
{
alert('Please tick that you have read the Terms & Conditions to continue...');
return false;
}else
return true;
}

function assignTour(){
var list = document.book.Tour;
var listText = list.options[list.selectedIndex].text;
var listDep = list.options[list.selectedIndex].value;
document.book.DepositPP.value = listDep
document.book.Tour_Name.value = listText
document.book.OrderID.value = listText
}

function calcDeposit(){
var PaxNo = document.book.Pax.value
var Dep = document.book.Pax.value * document.book.DepositPP.value
document.book.Total_NZD.value = Dep
document.book.Total_String.value = "$" + Dep + " NZD"
}

