function signup (email, password, screen_name, recaptcha_challenge_field, recaptcha_response_field, subscribe, template, arg)
{
	var nextTemplate = template || defaultTemplate;
	alert ('in fundtion');
	return false;
     //alert (email + "," + password + "," + screen_name + "," + recaptcha_challenge_field + "," + recaptcha_response_field);     
	function successHandler (obj) 
	{
		alert (obj.responseText);
		return false;
		if (obj.responseText.indexOf ("LOGIN") != -1)
		{
			alert ('Welcome to ETFzone!');
			login (email, password, nextTemplate, arg);
		}
		else if (obj.responseText.indexOf ("USER") != -1)
		{
			alert ('The email ID ' + email + ' is already registered with us. Please log in above or sign up for FREE below.');
			self.location.replace ("?template=signup");
		}
		else if (obj.responseText.indexOf ("incorrect-captcha-sol") != -1)
		{
			alert ('The words you typed did not match the words below. Please try again. You can hit the refresh button to get new words or the speaker button to hear the words pronounced.');
		}
	}
						
	YAHOO.util.Connect.asyncRequest ("POST", 'includes/ajax/session.ajax.php',
		{
			success:successHandler,
			failure:successHandler
		},
		'form_action=signup&email=' + email + '&password=' + password + '&screen_name=' + screen_name + '&recaptcha_challenge_field=' + recaptcha_challenge_field + '&recaptcha_response_field=' + recaptcha_response_field + '&subscribe=' + subscribe);
}

