function recalcdates(str)
{
    var str_out = '';

    str_out = str.substring(0, str.indexOf("datefrom=") + 9);
    str_out = str_out + getnextday();
    str_out = str_out + str.substring(str.indexOf("datefrom=") + 19, str.indexOf("dateto=") + 7);
    str_out = str_out + getnextmonth();
    str_out = str_out + str.substring(str.indexOf("dateto=") + 17, str.length);

    return(str_out);
}
function getnextday()
{
  var d = new Date();
  d.setDate(d.getDate() + 1);
  return(DateToString(d));
}
function getnextmonth()
{
  var d = new Date();
  d.setMonth(d.getMonth() + 2);	
  return(DateToString(d));
}
function DateToString(d)
{
  var s='';
    
  if(d.getDate() > 9)
  {
   s += d.getDate();
  }
  else
  {  
  	s += '0' + d.getDate();
  }
  
  s += '.';
  
  if((d.getMonth() + 1) > 9)
  { 
   s += (d.getMonth() + 1);
  }
  else
  {  
  	s += '0' + (d.getMonth() + 1);
  }
  
  if(navigator.appName == "Netscape")
	{
	  s += '.' + d.getFullYear();
	}
	else {
	  s += '.' + d.getYear();
	}
  
  return(s);  
}

/*
var imagesarr = new Array( 
	'http://www.vkotravel.com/images/banner_head_blank.png',
	'http://www.vkotravel.com/images/banner_sol_antillas_barbados.jpg',
    
    'http://www.vkotravel.com/images/banner_Aldemar_Roya_ Mare.jpg',
    'http://www.vkotravel.com/images/banner_Aldemar_Cretan.jpg',
    'http://www.vkotravel.com/images/banner_Aldemar_Paradise_Royal.jpg',
    'http://www.vkotravel.com/images/banner_Iberostar_Bellevue.jpg',
    'http://www.vkotravel.com/images/banner_Aldemar_Roya_ Mare2.jpg'
	); 

var linksarr = new Array(
    'http://www.vkotravel.com/catalog/7817.aspx',
	recalcdates('http://www.vkotravel.com/toursearch.aspx?search=1&availmode=2&depcity=1&transtype=1&country=197&datefrom=31.05.2009&dateto=31.05.2009&tourtype=&resort=750&spo=&hid_nights=1&nights=7&hid_hotelcategories=0&hid_foodtypes=0&hid_hotels=1&hotels=1568&hid_parms=1&adults=&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list'),
	
	recalcdates('http://www.vkotravel.com/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=220&datefrom=10.05.2009&dateto=10.05.2009&tourtype=&resort=2283&spo=&hid_nights=1&nights=7&hid_hotelcategories=0&hid_foodtypes=0&hid_hotels=1&hotels=8577&hid_parms=1&adults=&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list'),
	recalcdates('http://www.vkotravel.com/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=220&datefrom=10.05.2009&dateto=10.05.2009&tourtype=&resort=2283&spo=&hid_nights=1&nights=7&hid_hotelcategories=0&hid_foodtypes=0&hid_hotels=1&hotels=2407&hid_parms=1&adults=&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list'),
	recalcdates('http://www.vkotravel.com/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=220&datefrom=10.05.2009&dateto=10.05.2009&tourtype=&resort=2269&spo=&hid_nights=1&nights=7&hid_hotelcategories=0&hid_foodtypes=0&hid_hotels=1&hotels=5642&hid_parms=1&adults=&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list'),
	recalcdates('http://www.vkotravel.com/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=161&datefrom=09.05.2009&dateto=09.05.2009&tourtype=&resort=&spo=&hid_nights=1&nights=7&hid_hotelcategories=0&hid_foodtypes=0&hid_hotels=1&hotels=19715&hid_parms=1&adults=&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list'),
	recalcdates('http://www.vkotravel.com/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=220&datefrom=10.05.2009&dateto=10.05.2009&tourtype=&resort=2283&spo=&hid_nights=1&nights=7&hid_hotelcategories=0&hid_foodtypes=0&hid_hotels=1&hotels=8577&hid_parms=1&adults=&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list')
	); 


var los = Math.floor(Math.random() * imagesarr.length);

if(linksarr[los].length > 0) 
{
	document.write("<a href='" + linksarr[los] + "' style=\"cursor: hand;\"><div style=\"width: 645px; height: 127px; background-image: url('" + imagesarr[los] + "'); background-repeat: no-repeat; padding-left:20px;\"></div></a>");
}
else {
	document.write("<div style=\"width: 645px; height: 127px; background-image: url('" + imagesarr[los] + "'); background-repeat: no-repeat; padding-left:20px;\"></div>");
}

<a href="http://www.vkotravel.com/catalog/7828.aspx" style="cursor: hand;"><div style="width: 645px; height: 127px; background-image: url('http://www.vkotravel.com/images/new_agreement.png'); background-repeat: no-repeat; padding-left:20px;"></div></a>
<a href="http://www.vkotravel.com/descr/40/18045.aspx" style="cursor: hand;"><div style="width: 645px; height: 127px; background-image: url('http://www.vkotravel.com/images/veli_eji.jpg'); background-repeat: no-repeat; padding-left:20px;"></div></a>
*/

/*var Banner = new Array();

Banner[0]="/images/mexico.jpg,/catalog/59303.aspx";
Banner[1]="/images/america.jpg,/catalog/59303.aspx";
Banner[2]='/images/Andorra15.jpg,/catalog/58753.aspx';
Banner[3]='/images/newyearPraga.jpg,/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=82&resort=&datefrom=26.12.2009&dateto=31.12.2009&tourtype=7&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=2&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list';
Banner[4]='/images/andorra_skipass.jpg,/descr/157/9675.aspx';
Banner[5]='/images/Lechebnye-tury-Karlovy-Vary.jpg,/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=82&resort=57&datefrom=29.11.2009&dateto=29.11.2009&tourtype=5&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list';
Banner[6]='<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"656\" height=\"127\" id=\"banner_America\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"allowFullScreen\" value=\"false\" /><param name=\"movie\" value=\"/images/banner_America.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#ffffff\" /><embed src=\"/images/banner_America.swf\" quality=\"high\" bgcolor=\"#ffffff\" width=\"656\" height=\"127\" name=\"banner_America\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>,';
Banner[7]='<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"656\" height=\"127\" id=\"etours\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"allowFullScreen\" value=\"false\" /><param name=\"movie\" value=\"/images/etours.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#ffffff\" /><embed src=\"/images/etours.swf" quality=\"high\" bgcolor=\"#ffffff\" width=\"656\" height=\"127\" name=\"etours\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.adobe.com/go/getflashplayer\" /></object>,';
Banner[8]='/images/Tenerife.jpg,/catalog/60738.aspx';

//Banner[]="/images/Benilyuks.jpg,/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=15834&resort=&datefrom=22.10.2009&dateto=22.10.2009&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list";
//Banner[]='/images/Praga199Evro.jpg,/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=82&resort=59&datefrom=22.11.2009&dateto=13.12.2009&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list';
//Banner[]="/images/ab_ñzechia.jpg,/descr/63337.aspx";

var imagesarr = new Array();
var linksarr = new Array();

for (var i=0;i<Banner.length;i++)
{
  var banner_split = Banner[i].split(",");
  imagesarr[i]=banner_split[0];
  linksarr[i]=banner_split[1];
}*/

var imagesarr = new Array(
    '/images/tucan/1.jpg',
    '/images/Katolicheskaya-pasha-v-Cheh.jpg',
    '/images/Katolicheskaya-pasha-v-Ispa.jpg',
    '/images/Ranee-bronirovanie-po-Bolga.jpg',
    '/images/Ranee-bronirovanie-po-Ispan.jpg',
    '/images/Ranee-bronirovanie-po-Horva.jpg',
    '/images/Gruppovvye-tury-v-Keniyu.jpg',
    //'/images/Praga199Evro.jpg',
    //'/images/Aviatury-v-Chehiyu.jpg', !!!óáðàë 24,02!!!
    //'/images/Madrid.jpg',
    //'/images/vsem_desyat.jpg',
    //'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="656" height="127" id="Pierre_Vacances" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="/images/Pierre_Vacances.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/images/Pierre_Vacances.swf" quality="high" bgcolor="#ffffff" width="656" height="127" name="Pierre_Vacances" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_ru" /></object>',
	//'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="656" height="127" id="Amerika_Meksika" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="/images/Amerika_Meksika.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/images/Amerika_Meksika.swf" quality="high" bgcolor="#ffffff" width="656" height="127" name="Amerika_Meksika" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_ru" /></object>',
    //'/images/Izrail.jpg',
	//'/images/andorra_skipass.jpg',
	//'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="656" height="127" id="banner_America" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="/images/banner_America.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/images/banner_America.swf" quality="high" bgcolor="#ffffff" width="656" height="127" name="banner_America" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>',
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="656" height="127" id="etours" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="/images/etours.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/images/etours.swf" quality="high" bgcolor="#ffffff" width="656" height="127" name="etours" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>'
);

var linksarr = new Array(
    '/catalog/77475.aspx',
    '/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=82&resort=&datefrom=04.04.2010&dateto=04.04.2010&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=2&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list',
    '/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=197&resort=&datefrom=03.04.2010&dateto=03.04.2010&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=2&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list',
    '/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=44&resort=&datefrom=23.05.2010&dateto=30.05.2010&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=2&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list',
    '/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=197&resort=753&datefrom=27.03.2010&dateto=03.04.2010&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=2&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list',
    '/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=40&resort=&datefrom=01.05.2010&dateto=08.05.2010&tourtype=1&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=2&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0',
    '/geography/27019.aspx',
    //'/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=82&resort=&datefrom=31.01.2010&dateto=31.01.2010&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list',
    //'/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=82&resort=&datefrom=31.01.2010&dateto=31.01.2010&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=&childs=&maxprice=&currency=1&sort=0&hid_hotelservices=0#list',
    //'',
    //'/catalog/58753.aspx',
    //'',
    //'',
    //'/toursearch.aspx?search=1&availmode=0&depcity=1&transtype=1&country=54&resort=&datefrom=10.01.2010&dateto=21.02.2010&tourtype=&spo=&hid_nights=1&hid_hotelcategories=1&hid_foodtypes=1&hid_hotels=1&hid_parms=1&adults=&childs=&maxprice=&currency=3&sort=0&hid_hotelservices=0#list',
	//'/descr/157/9675.aspx',
	//'',
	''
);

