var SectionsDashes = 	"";

var SitesDashes = 	"";

//var SectionsDashes = 	"----------------------";

//var SitesDashes = 	"----------------------";

var DefaultLink = "index.htm"



Sections = new Array();

Links = new Array();     



Sites = new Array(

	"Select Area",

	"Europe",

	"Asia",

	"North America"

	);



Sections["Select Area"] = new Array(

	"Country",
	"America",
	"Bulgaria",
	"Dubai",
	"France",
	"Portugal",
	"Spain",
	"Thailand"

	);	

         

Links["Select Area"] = new Array(

	"#",
	
	"countries.php?id=florida",
	"countries.php?id=bulgaria",

	"countries.php?id=dubai",

	"countries.php?id=france",
	
	"countries.php?id=portugal",

	"countries.php?id=spain",

	"countries.php?id=thailand"

	);	



Sections["Europe"] = new Array(

	"Select Country",
	
	"Bulgaria",

	"France",

	"Spain",

	"Portugal"

	);

         

Links["Europe"] = new Array(

	"#",

	"countries.php?id=bulgaria",
	"countries.php?id=france",

	"countries.php?id=spain",

	"countries.php?id=portugal"

	);



Sections["Asia"] = new Array(

	"Select Country",

	"Dubai",

	"Thailand"

	);

         

Links["Asia"] = new Array(

	"#",

    "countries.php?id=dubai",

    "countries.php?id=thailand"	

	);

         

Sections["North America"] = new Array(

	"Select",

	"Florida"

	);



Links["North America"] = new Array(

	"#",

    "countries.php?id=florida"

	);

/*

Sections["South America"] = new Array(

	"Select Country",

	"Brazil"

	);

         

Links["South America"] = new Array(

	"#",

	"/"

	);



Sections["Africa"] = new Array(

	"Select Country",

	"South Africa"

	);

		 

Links["Africa"] = new Array(

	"#",

	"/"

	);

	*/

	 

// CONFIGURATION ENDS HERE

         

function initializeForm () {

	// Fill up initial option values

	document.go.site.length = 0;

	Sites[Sites.length] = SitesDashes;

	document.go.site.options[0] = new Option(Sites[0],"",1,1);

	for(count = 1; count < (Sites.length); count++) {

		document.go.site.options[count] = new Option(Sites[count],"",0,0);

	}

	fillSection();

}

         

function fillSection() {

	with (document.go) {

		if (site.selectedIndex == -1) {

			site.selectedIndex = 0;

		}

		reg = new String(site.options[site.selectedIndex].text);

		while (reg <= SitesDashes) {

			site.selectedIndex = site.selectedIndex - 1;

			reg = site.options[site.selectedIndex].text;

		}

//		window.alert(reg);

	//section.options[0] = new Option(Sites[0],"",1,1);

		for(count = 0; count < Links[reg].length; count++) {

			if (count < section.options.length) {

				with (section.options[count]) {

					text = Sections[reg][count];

					value = Links[reg][count];

				}

			}

			else {

				section.options[count] = new Option(Sections[reg][count],Links[reg][count]);

			}

		}

		for(count2 = count; count2 < section.options.length; count2++) {

			with (section.options[count2]) {

				text=SectionsDashes;

				value=DefaultLink;

			}

		}

		section.selectedIndex=0;

	}

}

        

function checkSection() {

	with (document.go.section) {

		if (selectedIndex == -1) {

			selectedIndex = 0;

		}

		while (options[selectedIndex].text == SectionsDashes) {

			selectedIndex = selectedIndex - 1;

		}



	}

}


