// function for select drop menu //
function selectDirectors(form){
	var newIndex = form.directors.selectedIndex;
	if(newIndex==0){
		alert("Please select a previous year!");
	}else{ 
		cururl=form.directors.options[newIndex].value;
		window.location.assign(cururl);
	}
}

// function for select drop menu //
function selectOriginal(form){
	var newIndex = form.original.selectedIndex;
	if(newIndex==0){
		alert("Please select a previous year!");
	}else{ 
		cururl=form.original.options[newIndex].value;
		window.location.assign(cururl);
	}
}

// function for select drop menu //
function selectEnglish(form){
	var newIndex = form.english.selectedIndex;
	if(newIndex==0){
		alert("Please select a previous year!");
	}else{ 
		cururl=form.english.options[newIndex].value;
		window.location.assign(cururl);
	}
}

// function for select drop menu //
function selectCategory(form){
	var newIndex = form.category.selectedIndex;
	if(newIndex==0){
		alert("Please select a category!");
	}else{ 
		cururl=form.category.options[newIndex].value;
		window.location.assign(cururl);
	}
}

// function for select drop menu //
function selectCountry(form){
	var newIndex = form.country.selectedIndex;
	if(newIndex==0){
		alert("Please select a previous year!");
	}else{ 
		cururl=form.country.options[newIndex].value;
		window.location.assign(cururl);
	}
}

// function for select drop menu //
function selectPrevious(form){
	var newIndex = form.previousYears.selectedIndex;
	if(newIndex==0){
		alert("Please select a previous year!");
	}else{ 
		cururl=form.previousYears.options[newIndex].value;
		window.location.assign(cururl);
	}
}

// function to enable standards compliant 'rel="external"' to be used instead of 'target="_blank"' //
function externalLinks(){
	if(!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for(var i=0; i<anchors.length; i++){
			var anchor = anchors[i];
			if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank";
		}
}
window.onload = externalLinks;