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

function doInit() {
	// Nifty("div.rounded", "big");
	
	settings = {
		tl: { radius: 10 },
		tr: { radius: 10 },
		bl: { radius: 10 },
		br: { radius: 10 },
		antiAlias: true,
		autoPad: true
	}

	var cornersObj = new curvyCorners(settings, "rounded");
	cornersObj.applyCornersToAll(); 
}

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;
}