function doStart(ajaxRequest) 
{
	loading.style.display = 'inline';
}
function doEnd(ajaxRequest) 
{
	loading.style.display = 'none';
}
function redirect()
{
	var page = "CruiseLine="+ document.form.CruiseLine.value ;
	page = page + "&Ship="+ document.form.Ship.value ;
	page = page + "&Destinations="+ document.form.Destinations.value ;
	page = page + "&MinDuration=&MaxDuration=";
	page = page + "&StartDate="+ document.form.StartDate.value ;
	page = page + "&EndDate=" ;
	page = page + "&DeparturePorts="+ document.form.DeparturePorts.value ;
	page = page + "&Duration="+ document.form.Duration.value;
	var url="loadCruiser.jsp?" + page;
	var ajaxRequest = new AjaxRequest(url);
    ajaxRequest.setPreRequest(doStart);
    ajaxRequest.sendRequest();
    ajaxRequest.setPostRequest(doEnd);
}
function ShipInformation(cruiser)
{
    var Num= document.form.Ship.length;
	//alert (cruiser);
	for (i=1; i <=Num; i++)
        document.form.Ship.remove(1)
	var nameShip="";
	var Name1;
	var Value1;
	if (cruiser==1)//carnival
	{
		Name1=new Array  ("Carnival - Celebration","Carnival - Conquest","Carnival - Destiny","Carnival - Ecstasy","Carnival - Elation","Carnival - Fantasy","Carnival - Fascination","Carnival - Freedom","Carnival - Glory","Carnival - Holiday","Carnival - Imagination","Carnival - Inspiration","Carnival - Legend","Carnival - Liberty","Carnival - Miracle","Carnival - Paradise","Carnival - Pride","Carnival - Sensation","Carnival - Spirit","Carnival - Splendor","Carnival - Triumph","Carnival - Valor","Carnival - Victory");
		Value1=new Array (9,1,2,10,11,12,13,1096,3,14,15,16,4,96,5,17,18,19,6,1163,7,93,8);
	}
	else if(cruiser==2)
	{
		Name1=new Array  ("Celebrity - Century","Celebrity - Constellation","Celebrity - Galaxy","Celebrity - Infinity","Celebrity - Journey","Celebrity - Mercury","Celebrity - Millennium","Celebrity - Quest","Celebrity - Solstice","Celebrity - Summit","Celebrity - Xpedition");
		Value1=new Array (20,21,22,24,1103,25,26,1113,1117,27,97);
	}
	else if(cruiser==10)
	{
		Name1=new Array  ("Costa - Allegra","Costa - Atlantica","Costa - Classica","Costa - Europa","Costa - Fortuna","Costa - Magica","Costa - Marina","Costa - Mediterranea","Costa - Romantica","Costa - Tropicale","Costa - Victoria");
		Value1=new Array (100,101,102,103,104,107,105,106,108,109,110);
	}
	else if(cruiser==12)
	{
		Name1=new Array  ("Cunard - Queen Elizabeth 2","Cunard - Queen Mary 2");
		Value1=new Array (117,118);
	}
	else if(cruiser==5)
	{
		Name1=new Array  ("Holland America - ms Amsterdam","Holland America - ms Eurodam","Holland America - ms Maasdam","Holland America - ms Noordam","Holland America - ms Oosterdam","Holland America - ms Prinsendam","Holland America - ms Rotterdam","Holland America - ms Ryndam","Holland America - ms Statendam","Holland America - ms Veendam","Holland America - ms Volendam","Holland America - ms Westerdam","Holland America - ms Zaandam","Holland America - ms Zuiderdam");
		Value1=new Array (34,1161,35,36,37,38,39,40,41,42,43,44,45,46);
	}
    else if(cruiser==6)
	{
		Name1=new Array  ("Norwegian - Crown","Norwegian - Dawn","Norwegian - Dream","Norwegian - Gem","Norwegian - Jade","Norwegian - Jewel","Norwegian - Majesty","Norwegian - Pearl","Norwegian - Pride of Aloha","Norwegian - Pride of America","Norwegian - Pride of Hawaii","Norwegian - Spirit","Norwegian - Star","Norwegian - Sun");
		Value1=new Array (47,48,49,1100,1159,95,50,1097,55,56,51,94,52,53);
	}
	else if(cruiser==7)
	{
		Name1=new Array  ("Princess - Caribbean Princess","Princess - Coral Princess","Princess - Crown Princess","Princess - Dawn Princess","Princess - Diamond Princess","Princess - Emerald","Princess - Golden Princess","Princess - Grand Princess","Princess - Island Princess","Princess - Pacific Princess","Princess - Regal Princess","Princess - Royal Princess","Princess - Ruby","Princess - Sapphire Princess","Princess - Sea Princess","Princess - Star Princess","Princess - Sun Princess","Princess - Tahitian Princess");
		Value1=new Array (57,58,114,59,60,1098,61,62,63,64,65,66,1162,67,99,68,69,70);
	}
	else if(cruiser==8)
	{
		Name1=new Array  ("Royal Caribbean - Adventure of the Seas","Royal Caribbean - Brilliance of the Seas","Royal Caribbean - Empress of the Seas","Royal Caribbean - Enchantment of the Seas","Royal Caribbean - Explorer of the Seas","Royal Caribbean - Freedom of the Seas","Royal Caribbean - Grandeur of the Seas","Royal Caribbean - Independence of the Seas","Royal Caribbean - Jewel of the Seas","Royal Caribbean - Legend of the Seas","Royal Caribbean - Liberty of the Seas","Royal Caribbean - Majesty of the Seas","Royal Caribbean - Mariner of the Seas","Royal Caribbean - Monarch of the Seas","Royal Caribbean - Navigator of the Seas","Royal Caribbean - Radiance of the Seas","Royal Caribbean - Rhapsody of the Seas","Royal Caribbean - Serenade of the Seas","Royal Caribbean - Sovereign of the Seas","Royal Caribbean - Splendour of the Seas","Royal Caribbean - Vision of the Seas","Royal Caribbean - Voyager of the Seas");
		Value1=new Array (71,72,82,73,74,116,75,1116,76,77,1093,78,79,80,81,83,84,85,86,87,88,89);
	}
	else if(cruiser==11)
	{
		Name1=new Array  ("Seabourn - Legend","Seabourn - Pride","Seabourn - Spirit");
		Value1=new Array (111,112,113);
	}	
	else if(cruiser==9)
	{
		Name1=new Array  ("Windstar - Wind Spirit","Windstar - Wind Star","Windstar - Wind Surf");
		Value1=new Array (90,91,92);
	}
	if(cruiser!='')
	{
		for (i=0; i <=Name1.length - 1; i++)
		{
			var oOption = document.createElement("OPTION");
			//form.Ship.options.add(oOption);
			//### Modified : For Mozila compatible
		//	document.getElementById("Ship").
			form.Ship.options.add(new Option(Name1[i],Value1[i]))
			//form.Ship.options.add(oOption);
			//oOption.value = Value1[i];
			//oOption.innerText = Name1[i];
		}
	}
}

function setupDate () {
	dateNow = new Date();
	var month=dateNow.getMonth()+1;
	var year=dateNow.getFullYear();
	var nameMonth="";
	for (i=1;i<=13;i++) 
	{
		switch(month)
		{
			case 1: nameMonth="January";
			break;
			case 2: nameMonth="February";
			break;
			case 3: nameMonth="March";
			break;
			case 4: nameMonth="April";
			break;
			case 5: nameMonth="May";
			break;
			case 6: nameMonth="June";
			break;
			case 7: nameMonth="July";
			break;
			case 8: nameMonth="August";
			break;
			case 9: nameMonth="September";
			break;
			case 10: nameMonth="October";
			break;
			case 11: nameMonth="November";
			break;
			case 12: nameMonth="December";
			break;
		};
		if(month<10) var monthvalue="0"+month;
		else  monthvalue=month;
		document.form.StartDate.options[i] = new Option(nameMonth+' '+ year,monthvalue+"/01/"+year);
		if(month==12)
		{
			year=year+1;
			month=0;
		}
		month=month+1;
	}
}