function populate_country(defaultstr) {
	document.write(defaultstr);
	for (tmp = 1; tmp < address.length; tmp++) {
		document.write("<option value='" + tmp + "'> " + address[tmp][0]);
	}
}

function refreshpage(country) {
	if (country != 0) {
		url = document.location;
		str = url.toString();
		stringarray = str.split("?");
		window.location.href = stringarray[0] + "?" + country + "#address";
	}
}

function displaystuff() {
	url = document.location;
	str = url.toString();
	//stringarray = str.split("#address");
	//if (stringarray.length > 1) {
  if(str.indexOf('#address') != -1) {
		return true;
	} else {
		return false;
	}
}

function displayaddress() {
	url = document.location;
	str = url.toString();
	stringarray = str.split("#");
	stringarray = stringarray[0].split("?");
	if (stringarray.length > 1) {
		str = stringarray[stringarray.length - 1];
		//document.write("HIER: " + str);
    document.write("<a id='address'></a>");
    document.write("<span style='font-size:12px'>");
		document.write("<b>" + address[str][0] + "</b><br>");
		document.write(address[str][1]);
		document.addressform.country.selected = address[str][0];
    document.write("</span>");
	}
}
