// changed function name to something less generic (was: gotourl(); now: gotoResNet())

// Script to build Resnet reservation link from any page in a client website.
// Written by Agilysys, Inc. 
// All rights reserved  Copyright 2005  
// ***********************************
// ADD this script section to the <head> area of the page or include in your called .JS file

function gotoResNet()
{   // builds the URL for ResNet.  Change the domain name 
	// and the partition and the offer below to match your needs 
	// the %3B in the URL is the semiColon.

var hotel = document.ResNetGetRates.hotel.value;

	if (hotel == "GON")
	{

	var partition = "nsh";			// From ResNet. Usually a 3 character code that was given to you during ResNet setup
	var offer = "NET"; 				// From ResNet. If using the default blank offer just leave the two quote marks
	var domain = "reservations.oprylandhotels.com";	// Example: res.greathotel.com  DO NOT include the https//
	// DO NOT EDIT BELOW HERE 
	var month = document.ResNetGetRates.month.value;
	var date = document.ResNetGetRates.date.value;
	var year = document.ResNetGetRates.year.value;
	var nights = document.ResNetGetRates.nights.value;
	var adults = document.ResNetGetRates.adults.value;
	var children = document.ResNetGetRates.children.value;
	var roomType = "001";
	var myyear = year.substring(2,4)
	document.location.href =
	"https://"+domain+"/cgi-bin/lansaweb?procfun+rn+resnet+"+partition+"+funcparms+UP(A2560)%3A%3B"+offer+"%3B"+month+date+myyear+"%3B"+nights+"%3B"+adults+"%3B"+children+"%3B"+roomType+"%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3F";
	}

	else if (hotel == "GPH")
	{

	var partition = "orl";			// From ResNet. Usually a 3 character code that was given to you during ResNet setup
	var offer = "NET"; 				// From ResNet. If using the default blank offer just leave the two quote marks
	var domain = "reservations.gaylordpalms.gaylordhotels.com";	// Example: res.greathotel.com  DO NOT include the https//
	// DO NOT EDIT BELOW HERE 
	var month = document.ResNetGetRates.month.value;
	var date = document.ResNetGetRates.date.value;
	var year = document.ResNetGetRates.year.value;
	var nights = document.ResNetGetRates.nights.value;
	var adults = document.ResNetGetRates.adults.value;
	var children = document.ResNetGetRates.children.value;
	var roomType = "001";//document.ResNetGetRates.roomType.value
	var myyear = year.substring(2,4)
	document.location.href =
	"https://"+domain+"/cgi-bin/lansaweb?procfun+rn+resnet+"+partition+"+funcparms+UP(A2560)%3A%3B"+offer+"%3B"+month+date+myyear+"%3B"+nights+"%3B"+adults+"%3B"+children+"%3B"+roomType+"%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3F";
	}
	
		else if (hotel == "GNA")
	{

	var partition = "nat";			// From ResNet. Usually a 3 character code that was given to you during ResNet setup
	var offer = "NET"; 				// From ResNet. If using the default blank offer just leave the two quote marks
	var domain = "reservations.gaylordnational.gaylordhotels.com";	// Example: res.greathotel.com  DO NOT include the https//
	// DO NOT EDIT BELOW HERE 
	var month = document.ResNetGetRates.month.value;
	var date = document.ResNetGetRates.date.value;
	var year = document.ResNetGetRates.year.value;
	var nights = document.ResNetGetRates.nights.value;
	var adults = document.ResNetGetRates.adults.value;
	var children = document.ResNetGetRates.children.value;
	var roomType = "001";
	var myyear = year.substring(2,4)
	document.location.href =
	"https://"+domain+"/cgi-bin/lansaweb?procfun+rn+resnet+"+partition+"+funcparms+UP(A2560)%3A%3B"+offer+"%3B"+month+date+myyear+"%3B"+nights+"%3B"+adults+"%3B"+children+"%3B"+roomType+"%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3F";
	}

	else
	{
	var partition = "tex";			// From ResNet. Usually a 3 character code that was given to you during ResNet setup
	var offer = "NET"; 				// From ResNet. If using the default blank offer just leave the two quote marks
	var domain = "reservations.texas.gaylordhotels.com";	// Example: res.greathotel.com  DO NOT include the https//
	// DO NOT EDIT BELOW HERE 
	var month = document.ResNetGetRates.month.value;
	var date = document.ResNetGetRates.date.value;
	var year = document.ResNetGetRates.year.value;
	var nights = document.ResNetGetRates.nights.value;
	var adults = document.ResNetGetRates.adults.value;
	var children = document.ResNetGetRates.children.value;
	var roomType = "001";
	var myyear = year.substring(2,4)
	document.location.href =
	"https://"+domain+"/cgi-bin/lansaweb?procfun+rn+resnet+"+partition+"+funcparms+UP(A2560)%3A%3B"+offer+"%3B"+month+date+myyear+"%3B"+nights+"%3B"+adults+"%3B"+children+"%3B"+roomType+"%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3F";
	}

}


