function onFormSubmit() {

	if (jQuery('#twitbg').attr('checked')){
	  var twitbg = 1;
	} else {
	  var twitbg = 0;
	}

	if (jQuery('#twitus').attr('checked')){
	  var twitus = 1;
	} else {
	  var twitus = 0;
	}

	var url = '/auth.php?fromview=1&bg='+jQuery('#bg').val()+'&bgtile='+jQuery('#bgtile').val()+'&profile_background_color='+jQuery('#profile_background_color').val()+'&profile_text_color='+jQuery('#profile_text_color').val()+'&profile_link_color='+jQuery('#profile_link_color').val()+'&profile_sidebar_fill_color='+jQuery('#profile_sidebar_fill_color').val()+'&profile_sidebar_border_color='+jQuery('#profile_sidebar_border_color').val()+'&twitus='+twitus+'&twitbg='+twitbg;
	newwindow=window.open(url,'Twitter Install','height=400,width=600');
	if (window.focus) {newwindow.focus()}
	return false;





	jQuery('#twitresult').hide()
	jQuery('#twitprogress').show()


	
	jQuery.getJSON('/api.php', 
		{
			bg: jQuery('#bg').val(),
			bgtile: jQuery('#bgtile').val(),
			profile_background_color: jQuery('#profile_background_color').val(),
			profile_text_color: jQuery('#profile_text_color').val(),
			profile_link_color: jQuery('#profile_link_color').val(),
			profile_sidebar_fill_color: jQuery('#profile_sidebar_fill_color').val(),
			profile_sidebar_border_color: jQuery('#profile_sidebar_border_color').val(),
			login: jQuery('#twitlogin').val(),
			password: jQuery('#twitpass').val(),
			twitus: jQuery('#twitus').val(),
			twitbg: jQuery('#twitbg').val()
		}, 
		function(json) {
			//alert(jQuery.param( json ))
			jQuery('#twitprogress').hide()
			if (json.error) {
				jQuery('#twitresult').attr('class', 'er').html(json.error).fadeIn('slow')
				return
			}
			jQuery('#twitresult').attr('class','ok').html(json.message).fadeIn('slow')
			
		}
	)
	
	return false;
}

