//********************************************************
// user.js
//
// Last Modified: 24 July 2006 11:00pm
//
// Description: General Javascript functions that are used while dealing with users.
// Copyright NetOptions Pty Ltd 2006
//
// Author: Tim Cromwell  Created On: 27 July 2006
//
//********************************************************

//Update div with the content retrieved from URL
function UpdateUserFormDiv(URL, DivName)
{
	document.UserTypeForm.submit();
	return;
	//This is just temporary to fix the ie bug =( 08-08-2006::MZ
	var user_type = document.getElementById('user_type').value;
	URL = URL + '&UserType='.concat(user_type);
	new Ajax.Updater(DivName, URL, {});
}

//********************************************************
// profile sign-up form functions
//********************************************************

// Display the postal address details if required
function PostalAddressDisplay()
{
	var PostalUse = document.getElementById('postal_address_use').checked;
	
	// if the postal details are required - display
	if (PostalUse)
		Effect.BlindDown('postal_address_details', {duration: 0.5});
	else // otherwise - hide
		Effect.BlindUp('postal_address_details', {duration: 0.5});
}

// Update the username field in the profile sign-up form
function UpdateUsernameField()
{
	document.getElementById('username').value = document.getElementById('email').value;
}

/* end file */
