

var daysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
function setDates() {

var dCurDate= new Date();
var dCurTime=dCurDate.getTime();

var tempStart=dCurTime + (1000 * 60 * 60 * 24);
var dStartDate= new Date(tempStart);
var dStartMonth = dStartDate.getMonth();
var dStartDay= dStartDate.getDate();
var dStartYear = dStartDate.getFullYear();
var today=dStartDate.getDay();

var tempEnd = tempStart + (1000 * 60 * 60 * 24 * 7);
var dReturnDate= new Date(tempEnd);
var dReturnYear=dReturnDate.getYear();
var dReturnMonth=dReturnDate.getMonth();
var dReturnDay=dReturnDate.getDate();

if(dStartDay+1>daysInMonth[dStartMonth]){dStartDay=0;dStartMonth=dStartMonth+1;}
 document.mainForm.day1.selectedIndex = dStartDay;
 document.mainForm.month1.selectedIndex = dStartMonth;
if(dReturnDay+1>daysInMonth[dReturnMonth]){dReturnDay=0;dReturnMonth=dReturnMonth+1;}
 document.mainForm.day2.selectedIndex = dReturnDay;
 document.mainForm.month2.selectedIndex = dReturnMonth;

 }
WinId = window.open('','newwin','height=1,width=1');
WinId.close();
function popUp(inmessage) {
  WinId = window.open('','newwin','width=360,height=350,resizable=0,status=no');
  WinId.document.write('<html><head>');
  WinId.document.write('</head>');
  WinId.document.write('<body leftmargin=0 topmargin=0 bgcolor="#0000CE">');
  WinId.document.write('<center>');
  WinId.document.write('<table cellpadding=0 cellspacing=0 border=0 width=100% height=100% bgcolor=#5B91E3><tr><td>');
  WinId.document.write('<link rel="stylesheet" type="text/css" href="http://www.travelselect.com/stylesheets/index_ie.css">');
  WinId.document.write('<table border=0 cellpadding=0 cellspacing=0 align=center width=98%>');
  WinId.document.write('<tr><td align=center><br><img src="http://www.albiontravelcentre.co.uk/images/albion_logo_com.gif" border=0></td></tr>');
  WinId.document.write('<tr><td> </td></tr>');
  WinId.document.write('<tr><td class=lbluelarge align=center>'+inmessage+'</td></tr>');
  WinId.document.write('<tr><td> </td></tr>');
  WinId.document.write('<tr><td align=center><img src="http://www.albiontravelcentre.co.uk/images/animatedplane.gif" border=0 width=100% height=40></td></tr>');
  WinId.document.write('<tr><td align=center> </td></tr>');
  WinId.document.write('<tr><td align=center>');
  WinId.document.write('<table bgcolor="#abccff" border=0 cellspacing=0 cellpadding=0>');
  WinId.document.write('<tr>');   
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('<td colspan=2 align=center class=boldred>SEARCHING FOR THE BEST FARES. All the fares are provided by the UKs leading Travel companies all Members Of:</td>');
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('</tr>');
  WinId.document.write('<tr>');
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('<td align=left class=boldred>ABTA : </td><td align=left><span class=highbold>Ensuring the highest standards of service and quality.</span></td>');
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('</tr>');
  WinId.document.write('<tr>');
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('<td align=left class=boldred>ATOL : </td><td align=left><span class=highbold>Protecting you against financial loss once your booking has been made.</span></td>');
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('</tr>');
  WinId.document.write('<tr>');
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('<td align=left class=boldred>VERISIGN : </td><td align=left><span class=highbold>Guaranteeing secure credit card transactions.</span></td>');
  WinId.document.write('<td width=10> </td>');
  WinId.document.write('</tr>');
  WinId.document.write('<tr>');
  WinId.document.write('</table>');
  WinId.document.write('</td></tr>');
  WinId.document.write('<tr><td> </td></tr>');
  WinId.document.write('<tr><td class=highbold align=center>Our Partners have access to over 500 Airlines,<br>200 Hotel Chains and over 45 Car Rental companies.</td></tr>');
  WinId.document.write('</table>');
  WinId.document.write('</center>');
  WinId.document.write('</td></tr></table>');
  WinId.document.write('</body>');
  WinId.document.close();
}
Last = new Date();
LastSubmit = Last.getTime();
LastSubmit = LastSubmit - 25000;
function CheckSubmit(popup,message) {
  This = new Date();
  ThisSubmit = This.getTime();
  Diff=ThisSubmit-LastSubmit; // how long ago?
  if (Diff<10000) {
    alert('Please be patient. The server is handling your request!');
    return false; // block submit after less than 10 seconds !
  }
  else {
    count = 0;
  }
  if(popup) {
    popUp(message);
  }
  LastSubmit=ThisSubmit;
  return true;
}


