<?php

$out2 = wp_cache_get( 'wct_select_js' , 'wct');
if ($out2 == false) {
	$url = $this->generate_pagelink(array("/[&?]+wctdro(p|f)=.*&/","/[&?]+wctstart=[0-9]*/"),array("&",""));
	$out2 = "<script type=\"text/javascript\">
		function selector(field){
			var selection = document.getElementById('wctdrop_' + field).options[document.getElementById('wctdrop_' + field).selectedIndex].value;
			location.href= '".$url."wctdrof=' + field + '&wctdrop=' + selection;
		}
		</script>";
	wp_cache_set( 'wct_select_js', $out, 'wct', $this->settings['wct_cachetime']);
}
echo $out2;

?>