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('<link rel="stylesheet" type="text/css" href="http://www.cheap-flight-deals.com/cheap-flights/cheap-flights.css" >');
  WinId.document.write('</head>');
  WinId.document.write('<body leftmargin=0 topmargin=0 bgcolor="#ffffff" >');
  WinId.document.write('<center>');
  WinId.document.write('<table cellpadding=0 cellspacing=0 border=0 width=85% height=100% class="cheap-flight-deals" bgcolor=#fffff><tr><td align=center><img src="cheap-flights/anim.gif"><br><br><p>Please wait searching...</p></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;
}
<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->