<!--
//
function changeFrame(framename, filename)
{
framename.location.replace(filename);
}

//switch among tabs
function changeTabs(name) {

  for(i=1;i<=7;i++)
 {  var themenubaritem, themenu;
     if(i==name) {
    themenubaritem=document.getElementById(i);
        themenubaritem.style.display = 'block';
        themenu=document.getElementById('t' + i);
        themenu.className = "seltab";     
      }
   else {
 themenubaritem=document.getElementById(i);
        themenubaritem.style.display = 'none';
        themenu=document.getElementById('t' + i);
        themenu.className = "tab";   
         }
    }
 tab1=document.getElementById('tabtable1');
 tab2=document.getElementById('tabtable2');
 if(name>4) {
   tab1.style.top = '30px';
   tab2.style.top = '-30px';
   tab1.style.width = '650px';
   tab2.style.width = '646px';
    }
if(name<5) {
   tab1.style.top = '0px';
   tab2.style.top = '0px';
   tab1.style.width = '646px';
   tab2.style.width = '650px';
    }
window.scroll(0,0);
}

//country/state/province arrays for carfree greenpages directory

  var africa = new Array("Country","Algeria", "Benin", "Botswana", "Burkina Faso", "Burundi", "Cameroon", "Cape Verde", "Central African Republic", "Chad", "Congo", "Djibouti", "Egypt", "Equatorial Guinea", "Eritrea", "Ethiopia", "Gabon", "Gambia", "Ghana", "Guinea", "Ivory Coast", "Kenya", "Lesotho", "Liberia", "Libya", "Madagascar", "Malawi", "Mali", "Mauritania", "Mauritius", "Morocco", "Mozambique", "Namibia", "Niger", "Nigeria", "Saint Helena", "Sao Tome and Principe", "Senegal", "Sierra Leone", "South Africa", "Sudan", "Swaziland", "Tanzania", "Togo", "Tunisia", "Uganda", "Zambia", "Zimbabwe");

  var asia = new Array("Country","Afghanistan", "Azerbaijan", "Bangladesh", "Burma/Myanmar", "Bhutan", "Brunei", "Cambodia", "China", "Georgia", "India", "Indonesia", "Japan", "Kazakhstan", "Kyrgyzstan", "Laos", "Macau", "Malaysia", "Maldives", "Mongolia", "Nepal", "North Korea", "Pakistan", "Russian Federation", "Seychelles", "Singapore", "Sri Lanka", "South Korea", "Taiwan", "Tajikistan", "Thailand", "Turkey", "Turkmenistan", "Uzbekistan", "Vietnam");

  var europe = new Array("Country","Albania", "Andorra", "Austria", "Belarus", "Belgium", "Bosnia And Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "Denmark", "Estonia", "Faroe Islands", "Finland", "France", "Germany", "Gibraltar", "Greece", "Hungary", "Iceland", "Ireland", "Italy", "Latvia", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Malta", "Moldova", "Netherlands", "Norway", "Poland", "Portugal", "Romania", "Russian Federation", "San Marino", "Serbia & Montenegro", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland", "Turkey", "Ukraine", "United Kingdom");

  var middle_east = new Array("Country","Bahrain", "Iran", "Iraq", "Israel", "Jordan", "Kuwait", "Lebanon", "Oman", "Qatar", "Saudi Arabia", "Syrian Arab Republic", "United Arab Emirates", "Yemen");

  var n_america = new Array("Country","Belize", "Canada", "Costa Rica", "El Salvador", "Greenland", "Guatemala", "Honduras", "Mexico", "Nicaragua", "Panama", "Saint Pierre and Miquelon", "United States");

  var oceania = new Array("Country","American Samoa", "Australia", "Cook Islands", "Fiji", "French Polynesia", "French Southern Territories", "Guam", "Kiribati", "Marshall", "Micronesia", "New Caledonia", "New Zealand", "Niue", "Norfolk Island", "Northern Mariana Islands", "Palau", "Papua New Guinea", "Philippines", "Samoa", "Solomon Islands", "Tokelau", "Tonga", "Tuvalu", "Vanuatu", "Wallis and Futuna");

  var s_america = new Array("Country","Argentina", "Bolivia", "Brazil", "Chile", "Colombia", "Ecuador", "French Guiana", "Guyana", "Paraguay", "Peru", "Suriname", "Uruguay", "Venezuela");

  var carribean = new Array("Country","Anguilla", "Antigua And Barbuda", "Aruba", "Bahamas", "Barbados", "Bermuda", "Cayman Islands", "Dominica", "Dominican Republic", "Grenada", "Guadeloupe", "Haiti", "Jamaica", "Martinique", "Montserrat", "Netherlands Antilles", "Puerto Rico", "Reunion", "Saint Kitts And Nevis", "Saint Lucia", "Saint Vincent/Grenadines", "Trinidad And Tobago", "Turks and Caicos Islands", "Virgin Islands, British", "Virgin Islands, U.S.");
  
  var united_states = new Array("State","Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "District of Columbia", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming");

  var canada = new Array("Province","Alberta", "British Columbia", "Manitoba", "New Brunswick", "Newfoundland and Labrador", "Northwest Territories", "Nova Scotia", "Nunavut", "Ontario", "Prince Edward Island", "Québec", "Saskatchewan", "Yukon");

//changes target SELECT for showCountries and showRegions
function setTarget(target, the_array)
{ 
target.length = the_array.length;
 for (var i=0; i < the_array.length; i++)
 {
  target.options[i].text = the_array[i];	
  target.options[i].value = the_array[i];
  target.options[i].name = the_array[i];
  if (target.options[i].value == "Country") target.options[i].value = "";
  if (target.options[i].value == "State") target.options[i].value = "";
  if (target.options[i].value == "Province") target.options[i].value = "";
 }
}

//shows countries for selected contients
function showCountries (select) 
{
var countries = new Array(); 
var c = new Array();
var show = 0;
  for (var i = 0; i < select.options.length; i++)
    if (select.options[i].selected) 
	{ c[c.length] = select.options[i].value;
	  show = 1;
	}
  for (var i = 0; i < c.length; i++)
      { if (c[i]=="Africa") countries = countries.concat(africa);
        if (c[i]=="Asia") countries = countries.concat(asia);
        if (c[i]=="Europe") countries = countries.concat(europe);
        if (c[i]=="Middle East") countries = countries.concat(middle_east);
        if (c[i]=="North/Central America") countries = countries.concat(n_america);
        if (c[i]=="Oceania") countries = countries.concat(oceania);
        if (c[i]=="South America") countries = countries.concat(s_america);
        if (c[i]=="The Carribean") countries = countries.concat(carribean);
        if (c[i]=="") show = 0;
      }

 if (show==1) document.getElementById('country_table').style.display = 'block';
 if (show==0) document.getElementById('country_table').style.display = 'none';
 document.getElementById('country_select').selectedIndex = 0;
 document.getElementById('state_select').selectedIndex = 0;
 document.getElementById('state_table').style.display = 'none';
 setTarget(document.getElementById('country_select'), countries);
}

// pops up state/province box in directory if Canada or US chosen
function showRegions (select)
{
var states = new Array(); 
var s = new Array();
var show = 0;
  for (var i = 0; i < select.options.length; i++)
    if (select.options[i].selected)
	 s[s.length] = select.options[i].value;
  for (var i = 0; i < s.length; i++)
      {
	    if (s[i]=="United States")
		{ states = states.concat(united_states);
		  show = 1;
		}
        if (s[i]=="Canada")
		{ states = states.concat(canada);
		  show = 1;
		}
      }

 if (show==1) document.getElementById('state_table').style.display = 'block';
 if (show==0) document.getElementById('state_table').style.display = 'none';
 document.getElementById('state_select').selectedIndex = 0;
 setTarget(document.getElementById('state_select'), states);
}


function resetForm()
{
document.getElementById('country_table').style.display = 'none';
document.getElementById('state_table').style.display = 'none';
document.search.descriptioncontains.value = '';
document.search.namecontains.value = '';
document.search.city.value = '';
document.getElementById('superregion').selectedIndex = 0;
document.getElementById('country_select').selectedIndex = 0;
document.getElementById('state_select').selectedIndex = 0;
document.getElementById('groupis').selectedIndex = 0;
document.getElementById('foci').selectedIndex = 0;
document.getElementById('methods').selectedIndex = 0;
}
-->
