document.writeln("<script language = \"JavaScript\">");
document.writeln("		var onecount;");
document.writeln("		onecount=0;");
document.writeln("		twocount=0;");
document.writeln("		subcat = new Array();");
document.writeln("		<?");
document.writeln("		$sql_country  = \"select * from wp_country \";");
document.writeln("		$query_country = $db->query($sql_country);");
document.writeln("		$count = 0;");
document.writeln("		while($read_country = $db->fetch_array($query_country)){");
document.writeln("		?>");
document.writeln("		subcat[<?=$count?>] = new Array(\"<?=$read_country[\"ID\"]?>\",\"<?=$read_country[\"GBNAME\"]?>\",\"<?=$read_country[\"CONTINENT_NAME\"]?>\");");
document.writeln("		<?");
document.writeln("		$count++;");
document.writeln("		}");
document.writeln("		print \"onecount=$count;\";");
document.writeln("		?>");
document.writeln("");
document.writeln("		subcat2 = new Array();");
document.writeln("		<?");
document.writeln("		$sql_country  = \"select * from wp_city \";");
document.writeln("		$query_country = $db->query($sql_country);");
document.writeln("		$count = 0;");
document.writeln("		while($read_country = $db->fetch_array($query_country)){");
document.writeln("		?>");
document.writeln("		subcat2[<?=$count?>] = new Array(\"<?=$read_country[\"ID\"]?>\",\"<?=$db->GetCityName($read_country[\"GBNAME\"])?>\",\"<?=$read_country[\"COUNTRY_NAME\"]?>\");");
document.writeln("		<?");
document.writeln("		$count++;");
document.writeln("		}");
document.writeln("		print \"twocount=$count;\";");
document.writeln("		?>");
document.writeln("");
document.writeln("		\/\/Áª¶¯º¯Êý");
document.writeln("		function changelocation(location_name)");
document.writeln("	   {");
document.writeln("				document.SearchFlight.txtG.length = 0; ");
document.writeln("				var i;");
document.writeln("				for (i=0;i < onecount; i++)");
document.writeln("				{");
document.writeln("						if (subcat[i][2] == location_name)");
document.writeln("						{ ");
document.writeln("								document.SearchFlight.txtG.options[document.SearchFlight.txtG.length] = new Option(subcat[i][1], subcat[i][1]);");
document.writeln("						}");
document.writeln("				}");
document.writeln("		   ");
document.writeln("	   }   ");
document.writeln("");
document.writeln("		function changelocation2(location_name)");
document.writeln("	   {");
document.writeln("				document.SearchFlight.txtC.length = 0; ");
document.writeln("				var i;");
document.writeln("				for (i=0;i < twocount; i++)");
document.writeln("				{");
document.writeln("						if (subcat2[i][2] == location_name)");
document.writeln("						{ ");
document.writeln("								document.SearchFlight.txtC.options[document.SearchFlight.txtC.length] = new Option(subcat2[i][1], subcat2[i][1]);");
document.writeln("						}");
document.writeln("				}");
document.writeln("		   ");
document.writeln("	   }   ");
document.writeln("<\/script>");