	var hrefArray = new Array();
	var myLocation = new String(document.location);
	
	function changeLocation(lo){
		var index=lo;
		var hrefBase = location.protocol + "//" + location.hostname;
		var str1 = location.pathname;
		var loc = 1;
	
		if(lo != "0"){

			if(location.port != ""){
				hrefBase = hrefBase + ":" + location.port;
			}

			if(str1.length > 1){
				hrefArray = location.pathname.split("/");

				if (hrefArray[loc] == "testsite"){
					hrefBase += "/" + hrefArray[loc];
					loc++;
				}

				if (hrefArray[loc] == "stories"){
				hrefBase += "/" + hrefArray[loc];
				loc++;
				}

				if (hrefArray[loc].length == 3) {
				loc ++;
				}
				else if (hrefArray[loc].length == 2) {
				hrefBase += "/" + hrefArray[loc];
				loc++;
					if (loc <= hrefArray.length && hrefArray[loc].length == 2) {
						loc ++;
					}
				}

				hrefBase += "/" + lo;

				for (var i = loc; i < hrefArray.length; i++){
					hrefBase = hrefBase + "/" + hrefArray[i];
				}
			}
			else {
				hrefBase += "/" + lo;
			}

		location=hrefBase;
		return false;
		}
	}
	
	var valueOfTarget;
	var valueOfUrl;
	function selectTarget (dest) { 
		var selected = dest; 
		var index = selected.options[selected.selectedIndex]; 
		var target = index.getAttribute('target');
		var url = index.getAttribute('value'); 
		valueOfTarget = target; 
		valueOfUrl = url; 
	}
	
	function openLink() { 
		if(valueOfUrl != null) { 
			if(valueOfTarget == '_blank'){ 
				window.open(valueOfUrl ); 
			} 
			else { 
				window.location = valueOfUrl ; 
			} 
		}
	}
