﻿var Softbooker = {
	Tabs: ['hotelier', 'chainehotels', 'portail', 'touroperateur'],
	SwitchTab: function (o, t, p) {
		for (var i = 0; i < this.Tabs.length; i++) 
			document.getElementById('divform_' + this.Tabs[i]).className = 'hidden';
		for (var i = 0; i < this.Tabs.length; i++)
			document.getElementById('tab_' + this.Tabs[i]).className = 'tab';
		document.getElementById('divform_' + t).className = 'visible';
		document.getElementById("t").value = t;
		o.className = 'selected';
		document.getElementById(p + 'nom').focus();
	},
	PopulateCountries: function (o) {
		if (o.options.length == 0) {
			for (var i = 0; i < this.Countries.length; i++) {
				o.options.length = o.options.length + 1;
				o.options[o.options.length - 1] = new Option();
				o.options[o.options.length - 1].text = this.Countries[i];

			}
		}
	}
}
