	/*
	 *@description This includes all yahoo YUI libraries
   	 *@setup the ajax management connection
	 *@access public
	 */
	document.write('<script type="text/javascript" src="/javascript/yui/yahoo-min.js"></script>');
	document.write('<script type="text/javascript" src="/javascript/yui/event-min.js"></script>');
	document.write('<script type="text/javascript" src="/javascript/yui/connection-min.js"></script>');
	
	/*
	 *@functions handleSuccess, handleFailure, and callback
	 *@description These three functions receive the Ajax respond, and status
   	 *@access public
	 */
	 
	var handleSuccess = function(o){
		if(o.argument){
			if(o.argument.useDiv)
				var div =  document.getElementById(o.argument.useDiv);
		}else
			var div = document.getElementById(divName);
		if(o.responseText !== undefined){
			div.innerHTML = o.responseText;
		}
	};
	var handleFailure = function(o){
		var div = document.getElementById(divName);
		if(o.responseText !== undefined){
			div.innerHTML = '<li>Ajax fails with transaction id: ' + o.tId + '</li>';
			div.innerHTML += '<li>HTTP status: ' + o.status + '</li>';
			div.innerHTML += '<li>Status code message: ' + o.statusText + '</li>';
		}
	};
	var callback = {
		success:handleSuccess,
	  	failure:handleFailure
	};
		
		
	var askforpassword = {
		cache:false,
		success:handleSuccess,
	  	failure:handleFailure,
	  	argument:{useDiv:'askForPasswordContent'}
	};



	/*
	 *@functions buildPostDataString
	 *@returns string
	 *@description This function is used to build the postData string
	 *@description give the same prefix to all the elements from which you want to post data (e.g. signup_)
	 *@the function will return a postData string of all the elements that start with the prefix (e.g. signup_firstname, signup_lastname, etc...)
   	 *@access public
	 */
	
	function buildPostDataString(prfx){
		var prfx_len = prfx.length;
		var postData = null;
		for (var i=0;i<document.getElementsByTagName('*').length;i++){ 
			if (document.getElementsByTagName('*')[i].id){
				var this_el = document.getElementsByTagName('*')[i].id;
				var prefix = this_el.substring(0,prfx_len);
				if(prefix == prfx){
					postData +=	'&' + this_el + '=' + document.getElementById(this_el).value;	
				}
			} 
		}
		return postData;
	}
	
