// JavaScript Document
//function for the expand/collapse list of contacts under loc
function toggle(box,fontId,whichRow) {
 	//box is the id of the DIV tag
	//fontId is the id of the font tag
	//whichRow is the subscript of the repeating row
	var whichSign, plusSign, minusSign;
 	//whichSign is what the font tag is set to, it is a + to start with 
	whichSign = (document.getElementById(fontId + whichRow).innerHTML);
  	plusSign = '+'
	minusSign = '-'
	if (whichSign == '+'){
	//the default style of the DIV is set to none, reset that to block(which shows the DIV contents)
		if ((document.getElementById(box).style.display)=='none'){
			(document.getElementById(box).style.display) = "block";
		}
		//change the sign to minus when plus is cliked and change the display style of the DIV 
		document.getElementById(fontId + whichRow).innerHTML = minusSign;
		document.getElementById(box).style.display = "block";
	}
	else if (whichSign == '-'){
		document.getElementById(fontId + whichRow).innerHTML = plusSign;
		document.getElementById(box).style.display = "none";
	}
}

function openPopUp(url, i_hi, i_wi, i_top) {
	i_screenWidth = screen.width;
	i_screenHeight = screen.height;
	if((i_hi == '') || (i_hi == 0) || (i_hi == 'undefined')) {
		i_winHeight = 570;
	}
	else {
		i_winHeight = i_hi;
	}	
	if((i_wi == '') || (i_wi == 0) || (i_wi == 'undefined')) {
		i_winWidth = 770;
	}
	else {
		i_winWidth = i_wi;
	}	
	if((i_top == '') || (i_top == 0) || (i_top == 'undefined')) {
		i_top = 1;
	}
	else {
		i_top = i_top;
	}	
	//i_left = (i_screenWidth-i_winWidth)/2;	
	i_left = 0;
	w_child = window.open(url, "_blank", "scrollbars,height=" + i_winHeight + ",width=" + i_winWidth + ",top=" + i_top + ",left=" + i_left + ",resizable=1");
	//w_child.focus;
	return;
}
function populateStates(f_form)
{	
	a_States = new Array("AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA",
						 "HI","ID","IL","IN","IA","KS","KY","LA","ME","MD",
						 "MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ",
						 "NM","NY","NC","ND","OH","OK","OR","PA","RI","SC",
						 "SD","TN","TX","UT","VT","VA","WA","WV","WI","WY");

	for(count=0; count < a_States.length; count++){
   		f_form.options[count] = new Option(a_States[count]);
		f_form.options[count].value = a_States[count];
 	}
	
	//f_form.value = t_default;
	
	return;
}
function populateCountries(f_form) {	
	a_Countries = new Array("United States of America","Canada","Germany","France","United Kingdom",
						"Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola",
						"Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba",
						"Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados",
						"Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegowina",
						"Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam",
						"Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Cape Verde","Cayman Islands",
						"Central African Republic","Chad","Chile","China","Christmas Island","Cocoa (Keeling) Islands",
						"Colombia","Comoros","Congo","Cook Islands","Costa Rica","Cote Divoire","Croatia",
						"Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic",
						"East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia",
						"Ethiopia","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland",
						"France, Metropolitan","French Guiana","French Polynesia","French Southern Territories",
						"Gabon","Gambia","Georgia","Ghana","Gibraltar","Greece","Greenland","Grenada",
						"Guadeloupe","Guam","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti",
						"Heard and Mc Donald Islands","Honduras","Hong Kong","Hungary","Iceland","India",
						"Indonesia","Iran (Islamic Republic of)","Iraq","Ireland", "Israel","Italy","Jamaica",
						"Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, Democratic Peoples Republic of",
						"Korea, Republic of","Kuwait","Kyrgyzstan","Lao Peoples Democratic Republic","Latvia",
						"Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania",
						"Luxembourg","Macau","Macedonia, The Former Yugoslav Republic of","Madagascar",
						"Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania",
						"Mauritius","Mayotte","Mexico","Micronesia", "Federated States of","Moldova, Republic of",                                         
						"Monaco","Mongolia","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru",                    
						"Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua",
						"Niger","Nigeria","Niue","Norfolk Island","NorthParaguayern Mariana Islands","Norway","Oman",
						"Pakistan","Palau","Panama","Papua New Guinea","Peru","Philippines","Pitcairn", 
						"Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russian Federation", 
						"Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines",                     
						"Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Seychelles",                        
						"Sierra Leone","Singapore","Slovakia (Slovak Republic)","Slovenia","Solomon Islands",
						"Somalia","South Africa","South Georgia and the South Sandwich Islands","Spain",                     
						"Sri Lanka","St. Helena","St. Pierre and Miquelon","Sudan","Suriname",
						"Svalbard and Jan Mayen Islands","Swaziland","Sweden","Switzerland","Syrian Arab Republic",
						"Taiwan","Tajikistan","Tanzania, United Republic of","Thailand","Togo","Tokelau",
						"Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands",
						"Tuvalu","Uganda","Ukraine","UniteVatican City Stated Arab Emirates","United States Minor Outlying Islands",
						"Uruguay","Uzbekistan","Vanuatu","Venezuela","Viet Nam","Virgin Islands (British)",
						"Virgin Islands (U.S.)","Wallisw and Futuna Islands"," Western Sahara","Yeman",
						"Yugoslavia","Zaire","Zambia","Zimbabwe","Not Listed");

	for(count=0; count < a_Countries.length; count++){
   		f_form.options[count] = new Option(a_Countries[count]);
		f_form.options[count].value = a_Countries[count];
 	}	
	//f_form.value = t_default;	
	return;
}