function disableSubmit(id) {
	var iSubmit = $("#"+id);
	iSubmit.attr("disabled", "true");
	iSubmit.attr("value", "Submit");
	return true;
}

function doInit() {
	$('.rounded').corner("round 10px");
	$('.t-archetype ul').hide();

	$('.unfold-list').click(function() {
		if($(this).html() == ' + ')
			$(this).html(' - ');
		else
			$(this).html(' + ');

		$(this).siblings('ul').slideToggle();
	});
}

function selChange(dropdown, url)
{
	var myindex  = dropdown.selectedIndex
	var SelValue = dropdown.options[myindex].value
	var baseURL  = url + SelValue;
	top.location.href = baseURL;
    
	return true;
}

function textDefault(e, str) {
	$(e).ready(function() {
		if($(e).val() == '')
			$(e).val(str);
	});
	$(e).blur(function() { 
		if($(e).val() == '')
			$(e).val(str);
	});
	$(e).focus(function(){
		if($(e).val() == str)
			$(e).val('');
		else
			$(e).select();
	});
}

function showCaptcha() {
	$("#captcha").show();
	var iSubmit = $("#comment-add input[@type='submit']").get(0);
	iSubmit.removeAttribute("disabled");
}

function confirm_vote(id) {
	if(confirm('Are you sure you want to vote for this candidate?')) {
		$('#'+id).submit();
	} else return false;
}