var video_mapping = [
new Array("99999", "Index", new Array(["http://images.forbestraveler.com/media/photos/destinations/208000300_01_d.jpg", "/video/destination-videos/video-index.html", "Paris"], ["http://images.forbestraveler.com/media/photos/destinations/11000_01_d.jpg", "/video/hawaii/hawaii-maui.html", "Maui"], ["http://images.forbestraveler.com/media/photos/destinations/219000300_01_d.jpg", "/video/barcelona/barcelona.html", "Barcelona"], ["http://images.forbestraveler.com/media/photos/destinations/213000500_01_d.jpg", "/video/italy/rome.html", "Rome"],["http://images.forbestraveler.com/media/photos/destinations/31300_01_d.jpg", "/video/jamaica/jamaica.html", "Jamaica"],["http://images.forbestraveler.com/media/photos/destinations/407000400_01_d.jpg", "/video/mexico/mexico-puerto-vallarta.html", "Puerto Vallarta"], ["http://images.forbestraveler.com/media/photos/destinations/40500_01_d.jpg", "/video/costa-rica/costa-rica-puntarenas.html", "Puntarenas"], ["http://images.forbestraveler.com/media/photos/destinations/210000200_01_d.jpg", "/video/greek-islands/santorini.html", "Santorini"], ["http://images.forbestraveler.com/media/photos/video-thumbs/eiffel-tower.jpg", "/video/paris/paris-eiffel-tower.html", "Eiffel Tower"], ["http://images.forbestraveler.com/media/photos/video-thumbs/oahu.jpg", "/video/hawaii/hawaii-oahu.html", "Oahu"])),
new Array("40700", "Mexico", new Array()),
new Array("101000100", "Conn. - Mystic & the Coast", new Array()),
     new Array("101000200", "Mass. - The Berkshires", new Array()),
     new Array("101000300", "Mass. - Boston", new Array(["http://images.forbestraveler.com/media/photos/destinations/101000300_01_d.jpg", "/video/united-states/boston.html", "Boston"])),
     new Array("101000400", "Mass. - Cape Cod & Islands", new Array()),
     new Array("101000500", "R.I. - Newport & Block Island", new Array()),
     new Array("101000600", "Vt. - Ski Country", new Array()),
new Array("102000100", "Md. - Baltimore", new Array()),
     new Array("102000200", "Md. - Chesapeake Bay", new Array()),
     new Array("102000300", "N.Y. - The Adirondacks", new Array()),
     new Array("102000400", "N.Y. - The Hamptons", new Array()),
     new Array("102000500", "N.Y. - New York City", new Array(["http://images.forbestraveler.com/media/photos/destinations/102000500_01_d.jpg", "/video/united-states/new-york-city.html", "New York City"])),
     new Array("102000600", "Pa. - Philadelphia", new Array()),
     new Array("102000700", "Va. - Richmond", new Array()),
     new Array("102000800", "Va. - Williamsburg", new Array()),
     new Array("102000900", "Washington, D.C.", new Array()),
new Array("103000100", "Fla. - East Coast", new Array()),
     new Array("103000200", "Fla. - The Keys", new Array(["http://images.forbestraveler.com/media/photos/destinations/103000200_01_d.jpg", "/video/united-states/florida-keys.html", "The Keys"])),
     new Array("103000300", "Fla. - Miami & Ft. Lauderdale", new Array(["http://images.forbestraveler.com/media/photos/destinations/103000300_01_d.jpg", "/video/united-states/fort-lauderdale.html", "Ft. Lauderdale"])),
     new Array("103000400", "Fla. - Orlando", new Array()),
     new Array("103000500", "Fla. - Panhandle", new Array()),
     new Array("103000600", "Fla. - West Coast", new Array()),
     new Array("103000700", "Ga. - Atlanta", new Array()),
     new Array("103000800", "Ga. - Savannah", new Array()),
     new Array("103000900", "La. - New Orleans", new Array()),
     new Array("103001000", "N.C. - Asheville", new Array()),
     new Array("103001100", "S.C. - Charleston", new Array()),
     new Array("103001200", "Tenn. - Memphis", new Array()),
     new Array("103001300", "Tenn. - Nashville", new Array()),
     new Array("103001400", "Texas - Austin", new Array()),
     new Array("103001500", "Texas - Dallas/Ft. Worth", new Array()),
     new Array("103001600", "Texas - Houston", new Array()),
     new Array("103001700", "Texas - San Antonio", new Array()),
new Array("104000100", "Ill. - Chicago", new Array()),
     new Array("104000200", "Mich. - Detroit", new Array()),
     new Array("104000300", "Minn. - Minneapolis & St. Paul", new Array()),
     new Array("104000400", "Miss. - St. Louis", new Array()),
     new Array("104000500", "Ohio - Cleveland", new Array()),
new Array("105000100", "Ariz. - Grand Canyon", new Array()),
     new Array("105000200", "Ariz. - Phoenix & Scottsdale", new Array()),
     new Array("105000300", "Ariz. - Sedona", new Array()),
     new Array("105000400", "Ariz. - Tucson", new Array()),
     new Array("105000500", "N. Mex. - Albuquerque", new Array()),
     new Array("105000600", "N. Mex. - Santa Fe", new Array()),
     new Array("105000700", "N. Mex. - Taos", new Array()),
new Array("106000100", "Colo. - Aspen & Snowmass", new Array()),
     new Array("106000200", "Colo. - Colorado Springs", new Array()),
     new Array("106000300", "Colo. - Denver & Boulder", new Array()),
     new Array("106000400", "Colo. - Ski Country", new Array()),
     new Array("106000500", "Colo. - Vail & Beaver Creek", new Array()),
     new Array("106000600", "Utah - Salt Lake City & Ski Country", new Array()),
     new Array("106000700", "Wyo. - Jackson", new Array()),
new Array("107000100", "Calif. - Central Coast", new Array()),
     new Array("107000200", "Calif. - Los Angeles Area", new Array()),
     new Array("107000300", "Calif. - Napa Valley", new Array()),
     new Array("107000400", "Calif. - Palm Springs", new Array()),
     new Array("107000500", "Calif. - San Diego", new Array()),
     new Array("107000600", "Calif. - San Francisco Bay Area", new Array(["http://images.forbestraveler.com/media/photos/destinations/107000600_01_d.jpg", "/video/united-states/san-francisco.html", "San Francisco"])),
     new Array("107000700", "Calif. - Yosemite & Mammoth", new Array()),
     new Array("107000800", "Nev. - Las Vegas", new Array()),
     new Array("107000900", "Nev. - Reno & Lake Tahoe", new Array()),
new Array("108000100", "Ore. - Portland", new Array()),
     new Array("108000200", "Wash. - Seattle & San Juan Islands", new Array()),
new Array("10900", "Alaska", new Array(["http://images.forbestraveler.com/media/photos/destinations/10900_01_d.jpg", "/video/united-states/alaska.html", "Alaska"], ["http://images.forbestraveler.com/media/photos/video-thumbs/denali.jpg", "/video/united-states/denali.html", "Denali"])),
new Array("11000", "Hawaii", new Array(["http://images.forbestraveler.com/media/photos/video-thumbs/big-island.jpg", "/video/hawaii/hawaii-big-island.html", "Big Island"], ["http://images.forbestraveler.com/media/photos/destinations/11000_01_d.jpg", "/video/hawaii/hawaii-maui.html", "Maui"], ["http://images.forbestraveler.com/media/photos/video-thumbs/kauai.jpg", "/video/hawaii/hawaii-kauai.html", "Kauai"], ["http://images.forbestraveler.com/media/photos/video-thumbs/oahu.jpg", "/video/hawaii/hawaii-oahu.html", "Oahu"], ["http://images.forbestraveler.com/media/photos/video-thumbs/molokai.jpg", "/video/hawaii/hawaii-molokai.html", "Molokai"])),
new Array("111000100", "Alb. - Banff", new Array()),
     new Array("111000200", "Alb. - Calgary", new Array()),
     new Array("111000300", "Alb. - Edmonton", new Array()),
     new Array("111000400", "B.C. - Vancouver", new Array()),
     new Array("111000500", "B.C. - Victoria", new Array()),
     new Array("111000600", "B.C. - Whistler", new Array()),
     new Array("111000700", "Ont. - Niagara Area", new Array()),
     new Array("111000800", "Ont. - Toronto", new Array()),
     new Array("111000900", "Que. - Montreal", new Array()),
     new Array("111001000", "Que. - Quebec City", new Array()),
new Array("201000100", "Austrian Alps", new Array()),
     new Array("201000200", "Vienna", new Array()),
new Array("202000100", "Brussels", new Array()),
new Array("203000100", "Dubrovnik", new Array(["http://images.forbestraveler.com/media/photos/destinations/203000100_01_d.jpg", "/video/dubronik/dubronik.html", "Dubrovnik"])),
new Array("204000100", "Prague", new Array()),
new Array("205000100", "Copenhagen", new Array()),
new Array("206000100", "Bath & the Cotswolds", new Array()),
     new Array("206000200", "Lake District", new Array()),
     new Array("206000300", "London", new Array(["http://images.forbestraveler.com/media/photos/destinations/206000300_01_d.jpg", "/video/london/london.html", "London"])),
     new Array("206000400", "Shakespeare Country", new Array()),
new Array("207000100", "Helsinki", new Array()),
new Array("208000100", "Cote d'Azur", new Array()),
     new Array("208000200", "Lyon", new Array()),
     new Array("208000300", "Paris", new Array(["http://images.forbestraveler.com/media/photos/destinations/208000300_01_d.jpg", "/video/paris/paris.html", "Paris"], ["http://images.forbestraveler.com/media/photos/video-thumbs/eiffel-tower.jpg", "/video/paris/paris-eiffel-tower.html", "Eiffel Tower"], ["http://images.forbestraveler.com/media/photos/video-thumbs/louvre.jpg", "/video/paris/paris-louvre.html", "Louvre"], ["http://images.forbestraveler.com/media/photos/video-thumbs/seine-river-cruise.jpg", "/video/paris/paris-river-cruise.html", "Seine River Cruise"])),
     new Array("208000400", "Provence", new Array()),
new Array("209000100", "Berlin", new Array()),
     new Array("209000200", "Frankfurt", new Array()),
     new Array("209000300", "Hamburg", new Array()),
     new Array("209000400", "Munich", new Array()),
new Array("210000100", "Athens", new Array()),
     new Array("210000200", "Greek Islands", new Array(["http://images.forbestraveler.com/media/photos/destinations/210000200_01_d.jpg", "/video/greek-islands/santorini.html", "Santorini"], ["http://images.forbestraveler.com/media/photos/video-thumbs/mykonos.jpg", "/video/greek-islands/mykonos.html", "Mykonos"])),
new Array("211000300", "Budapest", new Array()),
new Array("212000100", "Dublin", new Array()),
new Array("213000100", "Amalfi Coast, Naples, & Capri", new Array()),
     new Array("213000200", "Florence", new Array()),
     new Array("213000300", "Italian Riviera", new Array()),
     new Array("213000400", "Milan & Lake Como", new Array()),
     new Array("213000500", "Rome", new Array(["http://images.forbestraveler.com/media/photos/destinations/213000500_01_d.jpg", "/video/italy/rome.html", "Rome"])),
     new Array("213000600", "Sicily", new Array()),
     new Array("213000700", "Tuscany", new Array()),
     new Array("213000800", "Venice", new Array()),
new Array("21400", "Monaco", new Array()),
new Array("215000100", "Amsterdam", new Array()),
new Array("216000100", "Oslo", new Array()),
new Array("217000100", "Lisbon", new Array()),
     new Array("219000400", "Madeira", new Array()),
new Array("218000100", "Edinburgh", new Array()),
     new Array("218000200", "Glasgow", new Array()),
new Array("219000100", "Andalucia", new Array()),
     new Array("219000300", "Barcelona", new Array(["http://images.forbestraveler.com/media/photos/destinations/219000300_01_d.jpg", "/video/barcelona/barcelona.html", "Barcelona"])),
     new Array("219000350", "Balearic Islands", new Array()),
     new Array("219000500", "Madrid", new Array()),
     new Array("219000600", "Seville", new Array()),
new Array("220000100", "Stockholm", new Array()),
new Array("221000100", "Geneva", new Array()),
     new Array("221000200", "Swiss Alps", new Array()),
     new Array("221000300", "Zurich", new Array()),
new Array("222000100", "Istanbul", new Array()),
new Array("30100", "Anguilla", new Array()),
new Array("30200", "Antigua & Barbuda", new Array()),
new Array("30300", "Aruba", new Array(["http://images.forbestraveler.com/media/photos/destinations/30300_01_d.jpg", "/video/aruba/aruba.html", "Aruba"])),
new Array("30400", "Bahamas", new Array(["http://images.forbestraveler.com/media/photos/destinations/30400_01_d.jpg", "/video/bahamas/nassau.html", "Bahamas"])),
new Array("30500", "Barbados", new Array(["http://images.forbestraveler.com/media/photos/destinations/30500_01_d.jpg", "/video/barbados/barbados.html", "Barbados"])),
new Array("30600", "Bermuda", new Array()),
new Array("30700", "Bonaire", new Array()),
new Array("30800", "British Virgin Islands", new Array()),
new Array("30900", "Cayman Islands", new Array(["http://images.forbestraveler.com/media/photos/destinations/30900_01_d.jpg", "/video/cayman-islands/cayman-islands.html", "Cayman Islands"])),
new Array("31000", "Curacao", new Array()),
new Array("31100", "Dominican Republic", new Array(["http://images.forbestraveler.com/media/photos/destinations/31100_01_d.jpg", "/video/dominican-republic/dominican-republic.html", "Dominican Republic"])),
new Array("31200", "Grenada", new Array()),
new Array("31300", "Jamaica", new Array(["http://images.forbestraveler.com/media/photos/destinations/31300_01_d.jpg", "/video/jamaica/jamaica.html", "Jamaica"])),
new Array("31400", "Puerto Rico", new Array(["http://images.forbestraveler.com/media/photos/destinations/31400_01_d.jpg", "/video/puerto-rico/puerto-rico.html", "Puerto Rico"])),
new Array("31500", "St. Barthelemy", new Array()),
new Array("31600", "St. Kitts & Nevis", new Array()),
new Array("31700", "St. Lucia", new Array(["http://images.forbestraveler.com/media/photos/destinations/31700_01_d.jpg", "/video/st-lucia/st-lucia.html", "St. Lucia"])),
new Array("31800", "St. Martin", new Array(["http://images.forbestraveler.com/media/photos/destinations/31800_01_d.jpg", "/video/st-martin/st-martin.html", "St. Martin"])),
new Array("31900", "St. Vincent & the Grenadines", new Array()),
new Array("32000", "Trinidad and Tobago", new Array()),
new Array("32100", "Turks & Caicos", new Array()),
new Array("32200", "U.S. Virgin Islands", new Array(["http://images.forbestraveler.com/media/photos/destinations/32200_01_d.jpg", "/video/us-virgin-islands/st-thomas.html", "U.S. Virgin Islands"])),
new Array("401000100", "Buenos Aires", new Array(["http://images.forbestraveler.com/media/photos/destinations/401000100_01_d.jpg", "/video/argentina/buenos-aires.html", "Buenos Aires"])),
     new Array("404000100", "Patagonia", new Array()),
new Array("40200", "Belize", new Array(["http://images.forbestraveler.com/media/photos/destinations/40200_01_d.jpg", "/video/belize/belize.html", "Belize"])),
new Array("403000100", "Rio de Janeiro", new Array(["http://www.forbestraveler.com/media/photos/inspirations/adventure/carnival-01-d.jpg", "/video/brazil/rio-de-janeiro.html", "Rio de Janeiro"])),
     new Array("403000200", "Sao Paulo", new Array()),
new Array("404000200", "Santiago", new Array()),
new Array("40500", "Costa Rica", new Array(["http://images.forbestraveler.com/media/photos/destinations/40500_01_d.jpg", "/video/costa-rica/costa-rica-puntarenas.html", "Puntarenas"], ["http://images.forbestraveler.com/media/photos/video-thumbs/limon.jpg", "/video/costa-rica/costa-rica-limon.html", "Limon"])),
new Array("406000100", "Galapagos Islands", new Array()),
     new Array("406000200", "Quito", new Array()),
new Array("407000100", "Baja", new Array(["http://images.forbestraveler.com/media/photos/destinations/407000100_01_d.jpg", "/video/mexico/mexico-cabo-san-lucas.html", "Cabo San Lucas"])),
     new Array("407000200", "Central Mexico", new Array(["http://images.forbestraveler.com/media/photos/destinations/407000200_01_d.jpg", "/video/mexico/mexico-topolobrampo.html", "Topolobrampo"])),
     new Array("407000300", "Mexico City", new Array()),
     new Array("407000400", "Pacific Coast", new Array(["http://images.forbestraveler.com/media/photos/destinations/407000400_01_d.jpg", "/video/mexico/mexico-puerto-vallarta.html", "Puerto Vallarta"], ["http://images.forbestraveler.com/media/photos/video-thumbs/Zihuatanejo.jpg", "/video/mexico/mexico-zihuatanejo.html", "Zihuatanejo"])),
     new Array("407000500", "Yucatan", new Array(["http://images.forbestraveler.com/media/photos/destinations/407000500_01_d.jpg", "/video/mexico/mexico-cancun.html", "Cancun"])),
new Array("40800", "Peru", new Array(["http://images.forbestraveler.com/media/photos/destinations/40800_01_d.jpg", "/video/peru/peru.html", "Peru"])),
new Array("501000100", "Phnom Penh", new Array()),
     new Array("501000200", "Siem Reap", new Array()),
new Array("502000100", "Beijing", new Array()),
     new Array("502000200", "Shanghai", new Array()),
     new Array("502000300", "Southern China", new Array()),
new Array("50300", "Hong Kong", new Array(["http://images.forbestraveler.com/media/photos/destinations/50300_01_d.jpg", "/video/hong-kong/hong-kong.html", "Hong Kong"])),
new Array("504000100", "Delhi", new Array()),
     new Array("504000200", "Mumbai", new Array()),
     new Array("504000300", "Jaipur & Goa", new Array()),
new Array("505000100", "Bali", new Array()),
new Array("506000100", "Kyoto", new Array()),
     new Array("506000200", "Tokyo", new Array(["http://images.forbestraveler.com/media/photos/destinations/506000200_01_d.jpg", "/video/japan/tokyo.html", "Tokyo"])),
new Array("507000100", "Kuala Lumpur", new Array()),
new Array("508000100", "Manila", new Array()),
new Array("509000100", "Moscow", new Array()),
     new Array("509000200", "St. Petersburg", new Array()),
new Array("51000", "Singapore", new Array()),
new Array("511000100", "Bangkok", new Array(["http://images.forbestraveler.com/media/photos/destinations/511000100_01_d.jpg", "/video/thailand/bangkok.html", "Bangkok"])),
     new Array("511000200", "Chiang Mai", new Array()),
     new Array("511000300", "Phuket & the Islands", new Array()),
new Array("512000100", "Central Vietnam", new Array()),
     new Array("512000200", "Hanoi", new Array()),
     new Array("512000300", "Ho Chi Minh City", new Array()),
new Array("601000100", "Brisbane", new Array()),
     new Array("601000200", "Cairns & the Barrier Reef", new Array()),
     new Array("601000300", "Melbourne", new Array()),
     new Array("601000400", "Perth", new Array()),
     new Array("601000500", "Sydney", new Array()),
new Array("602000100", "Auckland", new Array()),
     new Array("602000200", "Christchurch", new Array()),
     new Array("602000300", "Queenstown", new Array()),
new Array("603000100", "Cook Islands", new Array()),
     new Array("603000200", "Fiji", new Array()),
     new Array("603000300", "French Polynesia", new Array(["http://images.forbestraveler.com/media/photos/destinations/603000300_01_d.jpg", "/video/french-polynesia/bora-bora.html", "Bora Bora"], ["http://images.forbestraveler.com/media/photos/video-thumbs/tahiti.jpg", "/video/french-polynesia/tahiti.html", "Tahiti"])),
new Array("70100", "Botswana", new Array()),
new Array("702000100", "Cape Town & the Winelands", new Array(["http://images.forbestraveler.com/media/photos/destinations/702000100_01_d.jpg", "/video/cape-town/cape-town.html", "Cape Town"])),
     new Array("702000200", "Johannesburg", new Array()),
     new Array("702000300", "Kruger National Park", new Array()),
new Array("703000087", "Victoria Falls", new Array()),
new Array("704000100", "Jerusalem", new Array()),
     new Array("704000200", "Tel Aviv", new Array())
];

var chosenAggregate;

function getThumb() {
	var dArray = video_mapping[0];
	var thumbArray = dArray[2];
	
	alert(thumbArray.length);
};

var video_container = null;
var current_aggregate;

function video_init_populate(current_agg) {
	var children = video_getChildren(current_agg);
			
	children.push(new Option('Parent', current_agg));
	populateAllVideos(children);
};

function getHTMLContent(aggregate_id) {
	var htmlContent = '';
	var paramHTML = '?aggregate=';
	
	if(!chosenAggregate)
		paramHTML += current_aggregate;
	else
		paramHTML += chosenAggregate;
	
	for(i=0; i<video_mapping.length; i++) {
		if(video_mapping[i][0] == aggregate_id) {
			if(video_mapping[i][2] != null && video_mapping[i][2].length > 0) {
				for(j=0; j<video_mapping[i][2].length; j++) {
					htmlContent += '' +
						'<div id="video-thumb">' +
							'<div class="box">' +
								'<div style="padding:4px;">' +
									'<a href="' + video_mapping[i][2][j][1] + paramHTML + '">' +
										'<img src="' + video_mapping[i][2][j][0] + '" width=113 height=75 border=0 alt="">' +
									'</a>' +
								'</div>' +
								'<div class="btn-bkgrnd">' +
									'<div class="btn">' +
										'<a href="' + video_mapping[i][2][j][1] + paramHTML + '">' +
											'<img src="/media/img/play_video_btn.gif" width=17 height=13 border=0 alt=""></a>' +
									'</div>' +
									'<div class="play">' +
										'<a href="' + video_mapping[i][2][j][1] + paramHTML + '">PLAY</a>' +
									'</div>' +
									'<div style="clear:both;"></div>' +
								'</div>' +
							'</div>' +
							'<div class="title"><a href="' + video_mapping[i][2][j][1] + paramHTML + '" class="subnav"><h2>' + video_mapping[i][2][j][2] + '</h2></a></div>' +
						'</div>';
				}
			}
			
			break;
		}
	}
	
	return htmlContent;
};

function populateVideos(aggregate_id) {
	var v_container = document.getElementById('all-video-container');
	var htmlContent = '';
	
	htmlContent += getHTMLContent(aggregate_id);
	
	v_container.innerHTML = htmlContent;
};

function populateAllVideos(children) {
	if(children && children.length>0) {
		var v_container = document.getElementById('all-video-container');
		var htmlContent = '';
		
		v_container.innerHTML = '';
		
		for(vc=0; vc<children.length; vc++) {
			htmlContent += getHTMLContent(children[vc].value);
		}
		
		v_container.innerHTML = htmlContent;
	}
};

function video_getChildren(parent_id){

	var tmp = new Array();

	for(var i=0; i < Video.length; i++ ){
		var title = Video[i][2];

		if(Video[i][1] == parent_id){
			tmp[tmp.length] = new Option(title,Video[i][0]);
		}
	}

	return tmp;
}

function video_init(selectid1,selectid2,selectid3){

	selectref1 = document.getElementById(selectid1);
	selectref2 = document.getElementById(selectid2);
	selectref3 = document.getElementById(selectid3);

	var children = video_getChildren(0);

	ftdc_accommodationsearch_populate(selectref1,children,"Select a region...");

	selectref2.style.display="none";
	selectref3.style.display="none";
}

function video_clickmap(thisref,nextid,nextnextid){
	var parent_id = thisref.options[thisref.selectedIndex].value;
	
	chosenAggregate = parent_id;

	if (parent_id == -1){ return; }

	var children = video_getChildren(parent_id);

	if(children.length == 0){
		//populate video here
		populateVideos(parent_id);
		
		if(typeof nextid != "undefined"){
			var selectref = document.getElementById(nextid);
			selectref.style.display = "none";
		}

		if(typeof nextnextid != "undefined"){
			var selectref2 = document.getElementById(nextnextid);
			selectref2.style.display = "none";
		}
	}
	else{
		if(typeof nextid != "undefined"){
			var selectref = document.getElementById(nextid);
			var children = video_getChildren(parent_id);
			ftdc_accommodationsearch_populate(selectref,children,"Select a subregion...");
			selectref.style.display = "inline";
			
			children.push(new Option('Parent', parent_id));
			if(typeof nextid != "undefined" && typeof nextnextid == "undefined")
				populateAllVideos(children);
		}

		if(typeof nextnextid != "undefined"){
			var selectref2 = document.getElementById(nextnextid);
			selectref2.options.length=0;
			selectref2.style.display = "none";
		}
	}
};