function selectsite() {
	if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "") {		
		var expdate = new Date();
		var expmonth = expdate.getMonth();
			if (expmonth == 11) { 
				var newmonth = 0; 
				var newyear = expdate.getFullYear() + 1;
				}
			else { 
				var newmonth = expmonth + 1; 
				var newyear = expdate.getFullYear();
				}
		expdate.setMonth(newmonth); 
		expdate.setDate(1); 
		expdate.setYear(newyear);
		document.cookie = "site=" + document.selecter.select1.options[document.selecter.select1.selectedIndex].value + 
			"; expires=" + expdate.toGMTString();
		location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value;
		}
	}
	
function sitePref() {
	var allcookies = document.cookie;
	var pos = allcookies.indexOf("site=");
	
	if (pos != -1) {
		var start = pos + 5;
		var end = allcookies.indexOf(";", start);
		if (end == -1) end = allcookies.length;
		var value = allcookies.substring(start, end);
		value = unescape(value);
		
		var image = "";
		var loc = "";
		if (value == "http://www.exabyte-europe.com/") { image = ""; loc = "Europe"; }
		if (value == "http://www.exabyte-asiapacific.com/") { image = ""; loc = "Asia-Pacific"; }
		if (value == "http://www.exabyte.dk/") { image = "dk"; loc = "Denmark"; }
		if (value == "http://www.exabyte.fr/") { image = "fr"; loc = "France"; }
		if (value == "http://www.exabyte.de/") { image = "de"; loc = "Germany"; }
		if (value == "http://www.exabyte.nl/") { image = "nl"; loc = "Netherlands"; }
		if (value == "http://www.exabyte.pl/") { image = "pl"; loc = "Poland"; }
		if (value == "http://barra.exabyte.com/") { image = "sc"; loc = "Scotland"; }
		if (value == "http://www.exabyte.co.uk/") { image = "uk"; loc = "United Kingdom"; }
		
		if (loc != "") document.write("<p class=\"smaller\" style=\"margin-left:5px;\">&nbsp;<br><a href=\"" + value + "\">");
		if (image != "") document.write("<img src=\"images/flags/" + image + ".gif\" width=72 height=48 alt=\"\" border=0 vspace=2><br>");
		if (loc != "") document.write("<b>You have visited Exabyte " + loc + "</b><br><i>click to return</i></a></p>");
		}
	}
