
///////////////////// possible usefull code for conv. date into number
//first = 0
//date = var1.split("/");
//numdate = date.join("");
//first = numdate;
//////////////// message box and date select code


function changeValue(){


if (parent.side.document.booking.datebegin.value ==''&& parent.side.document.booking.dateend.value ==''){
value = 0;
}
if (parent.side.document.booking.datebegin.value !=''&& parent.side.document.booking.dateend.value ==''){
value = 1;
}
if (parent.side.document.booking.datebegin.value !=''&& parent.side.document.booking.dateend.value !=''){
value = 2;
}
if (value == 0){
answer=confirm('You have selected\n ' + var1 + '\n as your start date.');
if (answer) {
parent.side.document.booking.datebegin.value=var1;
}
}
if (value == 1){
answer=confirm('You have selected\n ' + var1 + '\n as your end date.');
if (answer) {
parent.side.document.booking.dateend.value=var1;
}
}
if (value == 2){
answer=confirm('To enter new dates click ok.\n');
if (answer) {
parent.side.document.booking.datebegin.value='';
parent.side.document.booking.dateend.value='';
value = 0;
}
}
}//end changeValue


////////////////////////////////////// open popup windows


MyWin= null; 
function calA(){ 
  if(!MyWin){MyWin= window.open("offer.htm","Blah","scrollbars=no,top=200,left=350,height=200,width=200")}
  else{ 
    MyWin.close();MyWin=null; 
    MyWin= window.open("offer.htm","Blah","top=200,left=350,height=200,width=200")
  } 
}
function Non(){ 
  if(MyWin){MyWin.close();MyWin=null} 
  else{MyWin=null}  
}

///////// code for creating drop down links

<!-- Begin links form handlers
function formHandler1(form){
var URL = document.form.year1.options[document.form.year1.selectedIndex].value;
window.location.href = URL;
}
function formHandler2(form){
var URL = document.form.year2.options[document.form.year2.selectedIndex].value;
window.location.href = URL;
}
function formHandler3(form){
var URL = document.form.year3.options[document.form.year3.selectedIndex].value;
window.location.href = URL;
}
// End links form handlers

///////////////// reloads side frame when new calendars are made

<!-- Begin
//-- The function below changes the contents of topFrame and
//-- mainFrame. Absolute or relative references to pages to be
//-- displayed must be passed as arguments newTop and newMain.

function changeside(newSide) {
     
     parent.side.location.href=newSide
}
//  End --> 

//////////////////// changes status line

function changeStatus(){
if (parent.side.document.booking.datebegin.value ==''&& parent.side.document.booking.dateend.value ==''){
status = 0;
}
if (parent.side.document.booking.datebegin.value !=''&& parent.side.document.booking.dateend.value ==''){
status = 1;
}
if (parent.side.document.booking.datebegin.value !=''&& parent.side.document.booking.dateend.value !=''){
status = 2;
}
if (status == 0){
window.status= 'Click to add your date start to the enquiry form';
return true;
}
if (status == 1){
window.status= 'Click to add your date end to the enquiry form';
return true;
}
if (status == 2){
window.status= 'Click to add new dates to the enquiry form';
return true;
}
}
function clearStatus(){
window.status= "";

}

