//Objects used to hold the data
function Transitions_loc( location, languages ) {
    this.location = location;
    this.languages = languages;
}

function Transitions_lang( lang_name, sites){
    this.lang_name= lang_name;
    this.sites = sites;
}

function Transitions_site( site_name, url ){
    this.site_name = site_name;
    this.url = url;
}

//Redirects will work for staging and live sites.  Set the prefix for staging here.
var rootURL = document.URL;
var prefix = rootURL.match('staging-');


//Store the data
var locationArr = new Array();
var i=0;
tempSite = new Transitions_site('Consumer', ('http://fr-emea.transitions.com'));	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Algeria", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Andorra", [tempLang]);
i++;
tempSite1 = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite2 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang1 = new Transitions_lang('English', [tempSite1, tempSite2]);
tempSite3 = new Transitions_site('Consumer', 'http://tw.transitions.com');	
tempSite4 = new Transitions_site('Professional', 'http://tw.transitions.com/professionals');	
tempLang2 = new Transitions_lang('Chinese', [tempSite3, tempSite4]);
locationArr[i] = new Transitions_loc("Asia", [tempLang1, tempLang2]);
i++;
tempSite = new Transitions_site('Consumer', 'http://au.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://au.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Australia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://at.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://at.transitions.com/professionals');
tempLang = new Transitions_lang('Austrian', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Austria", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Bahrein", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://nl-be.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://nl-be.transitions.com/professionals');
tempLang = new Transitions_lang('Dutch', [tempSite, tempSite1]);
tempSite2 = new Transitions_site('Consumer', 'http://fr-be.transitions.com');	
tempSite3 = new Transitions_site('Professional', 'http://fr-be.transitions.com/professionals');	
tempLang1 = new Transitions_lang('French', [tempSite2, tempSite3]);
locationArr[i] = new Transitions_loc("Belgium", [tempLang, tempLang1]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Benin Republic", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Bulgaria", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Burkina Faso", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Cameroon", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-ca.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-ca.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
tempSite2 = new Transitions_site('Consumer', 'http://fr-ca.transitions.com');
tempSite3 = new Transitions_site('Professional', 'http://fr-ca.transitions.com/professionals');	
tempLang1 = new Transitions_lang('French', [tempSite2, tempSite3]);
locationArr[i] = new Transitions_loc("Canada", [tempLang, tempLang1]);
i++;
tempSite1 = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite2 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang1 = new Transitions_lang('English', [tempSite1, tempSite2]);
tempSite3 = new Transitions_site('Consumer', 'http://www.transitions.com.cn');	
tempSite4 = new Transitions_site('Professional', 'http://www.transitions.com.cn/professionals');	
tempLang2 = new Transitions_lang('Chinese', [tempSite3, tempSite4]);
locationArr[i] = new Transitions_loc("China", [tempLang1, tempLang2]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Congo", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Croatia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Cyprus", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://cz.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://cz.transitions.com/professionals');	
tempLang = new Transitions_lang('Czech', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Czech Republic", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Denmark", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Egypt", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Ethiopia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Estonia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Finland", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://fr.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("France", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("French Polynesia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Gabon", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Georgia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://de.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://de.transitions.com/professionals');
tempLang = new Transitions_lang('German', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Germany", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Ghana", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Greece", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Guadeloupe", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Guinea", [tempLang]);
i++;
tempSite1 = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite2 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang1 = new Transitions_lang('English', [tempSite1, tempSite2]);
tempSite3 = new Transitions_site('Consumer', 'http://tw.transitions.com');	
tempSite4 = new Transitions_site('Professional', 'http://tw.transitions.com/professionals');	
tempLang2 = new Transitions_lang('Chinese', [tempSite3, tempSite4]);
locationArr[i] = new Transitions_loc("Hong Kong", [tempLang1, tempLang2]);
i++;
tempSite = new Transitions_site('Consumer', 'http://hu.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://hu.transitions.com/professionals');	
tempLang = new Transitions_lang('Hungarian', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Hungary", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("India", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Indonesia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://gb.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://gb.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Ireland", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Israel", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://it.transitions.com/');	
tempSite1 = new Transitions_site('Professional', 'http://it.transitions.com/professionals');	//for new 2008 site
//tempSite1 = new Transitions_site('Professional', 'http://it.transitions.com/trade/');   //for old 2007 site
tempLang = new Transitions_lang('Italian', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Italy", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Ivory Coast", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', ' http://www.transitions.co.jp/index.html');	
tempSite1 = new Transitions_site('Consumer', 'http://asia.transitions.com/');	
tempSite2 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');
tempLang = new Transitions_lang('Japanese', [tempSite]);
tempLang1 = new Transitions_lang('English', [tempSite1, tempSite2]);
locationArr[i] = new Transitions_loc("Japan", [tempLang, tempLang1]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Kazakhstan", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Kenya", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Korea", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Kuwait", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://pt-la.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://pt-la.transitions.com/professionals');
tempLang = new Transitions_lang('Portuguese', [tempSite, tempSite1]);
tempSite2 = new Transitions_site('Consumer', 'http://es-la.transitions.com');
tempSite3 = new Transitions_site('Professional', 'http://es-la.transitions.com/professionals');	
tempLang1 = new Transitions_lang('Spanish', [tempSite2, tempSite3]);
locationArr[i] = new Transitions_loc("Latin America", [tempLang, tempLang1]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Latvia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Lebanon", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Lithuania", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Luxembourg", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Madagascar", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Malaysia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Mali", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Malta", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Martinique", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Mauritius", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Middle East", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Moldavia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Morocco", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://nl.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://nl.transitions.com/professionals');
tempLang = new Transitions_lang('Dutch', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Netherlands", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://fr.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("New Caledonia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://au.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://au.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("New Zealand", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Niger", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Nigeria", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Norway", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Philippines", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://pl.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://pl.transitions.com/professionals');	
tempLang = new Transitions_lang('Polish', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Poland", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://pt.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://pt.transitions.com/professionals');
tempLang = new Transitions_lang('Portuguese', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Portugal", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://fr.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Reunion", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://ru.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://ru.transitions.com/professionals');		
tempLang = new Transitions_lang('Russian', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Russia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Saudi Arabia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Senegal", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Singapore", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Slovakia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Slovenia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-africa.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://en-africa.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("South Africa", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://es.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://es.transitions.com/professionals');
tempLang = new Transitions_lang('Spanish', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Spain", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://se.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://se.transitions.com/professionals');	
tempLang = new Transitions_lang('Swedish', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Sweden", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Syria", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://de-ch.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://de-ch.transitions.com/professionals');	
tempLang = new Transitions_lang('German', [tempSite, tempSite1]);
tempSite2 = new Transitions_site('Consumer', 'http://fr-ch.transitions.com');	
tempSite3 = new Transitions_site('Professional', 'http://fr-ch.transitions.com/professionals');	
tempLang1 = new Transitions_lang('French', [tempSite2, tempSite3]);
tempSite4 = new Transitions_site('Consumer', 'http://it-ch.transitions.com');
tempSite5 = new Transitions_site('Professional', 'http://it-ch.transitions.com/professionals');	
tempLang2 = new Transitions_lang('Itialian', [tempSite4, tempSite5]);
locationArr[i] = new Transitions_loc("Switzerland", [tempLang, tempLang1, tempLang2]);
i++;
tempSite1 = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite2 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang1 = new Transitions_lang('English', [tempSite1, tempSite2]);
tempSite3 = new Transitions_site('Consumer', 'http://tw.transitions.com');	
tempSite4 = new Transitions_site('Professional', 'http://tw.transitions.com/professionals');	
tempLang2 = new Transitions_lang('Chinese', [tempSite3, tempSite4]);
locationArr[i] = new Transitions_loc("Taiwan", [tempLang1, tempLang2]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Tanzania", [tempLang]);
i++;
tempSite1 = new Transitions_site('Consumer', 'http://asia.transitions.com');	
tempSite2 = new Transitions_site('Professional', 'http://asia.transitions.com/professionals');	
tempLang1 = new Transitions_lang('English', [tempSite1, tempSite2]);
locationArr[i] = new Transitions_loc("Thailand", [tempLang1]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Togo", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://fr-emea.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://fr-emea.transitions.com/professionals');
tempLang = new Transitions_lang('French', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Tunisia", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://tr.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://tr.transitions.com/professionals');	
tempLang = new Transitions_lang('Turkish', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Turkey", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-emea.transitions.com');
tempSite1 = new Transitions_site('Professional', 'http://en-emea.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("Ukraine", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://en-middleeast.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://en-middleeast.transitions.com/professionals');	
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("United Arab Emirates", [tempLang]);
i++;
tempSite = new Transitions_site('Consumer', 'http://gb.transitions.com');	
tempSite1 = new Transitions_site('Professional', 'http://gb.transitions.com/professionals');
tempLang = new Transitions_lang('English', [tempSite, tempSite1]);
locationArr[i] = new Transitions_loc("United Kingdom", [tempLang]);
i++;
tempSite1 = new Transitions_site('Consumer', 'http://en-us.transitions.com');
tempSite2 = new Transitions_site('Professional', 'http://en-us.transitions.com/professionals');	
tempLang1 = new Transitions_lang('English', [tempSite1, tempSite2]);
tempSite3 = new Transitions_site('Consumer', 'http://es-us.transitions.com');	
tempSite4 = new Transitions_site('Professional', 'http://es-us.transitions.com/professionals');
tempLang2 = new Transitions_lang('Spanish', [tempSite3, tempSite4]);
locationArr[i] = new Transitions_loc("United States", [tempLang1, tempLang2]);
i++;

//Write the data.  WriteLoactions gets called from the body's onLoad event.  The next two functions are called from onchange events.
function writeLocations() {
    var d=0;
    for(d=0; d<locationArr.length; d++){
	    loc = locationArr[d].location;
	    document.forms['siteSelect'].locationSelect.options[d+1] = new Option(loc,d);
	}	
}

function writeLanguages(locationIndex){	
    loc = locationArr[locationIndex];
    var j=0;
    for(j=0; j<loc.languages.length; j++){
        lang = loc.languages[j].lang_name;
        document.forms['siteSelect'].languageSelect.options[j+1] = new Option(lang,j);
    }
    document.forms['siteSelect'].siteTypeSelect.options.length = 1;
}

function writeSites(langIndex){
    locationIndex = document.forms['siteSelect'].locationSelect.value;
    lang = locationArr[locationIndex].languages[langIndex];
    var k=0;
    for(k=0; k<lang.sites.length; k++){
        site = lang.sites[k].site_name;
        url = lang.sites[k].url;
        /*if(prefix){
            http = url.substring(0, 7);
            theRest = url.substring(7);
            document.forms['siteSelect'].siteTypeSelect.options[k+1] = new Option(site, http+prefix+theRest);
         }
         else*/
          document.forms['siteSelect'].siteTypeSelect.options[k+1] = new Option(site, url);
    }
}

