	function lookup_user(){
		// send data to CF
		arg1 = document.form1.username.value;	
		arg2 = document.form1.password.value;	
		arg4 = document.form1.password2.value;	
		arg3 = document.form1.email.value;
		if(arg1 != '' && arg2 != '' && arg3 != '' && arg4 != ''){
			if(arg2 != arg4){
				alert('Passwords did not match.');
			}else{
				DWRUtil.useLoadingMessage();
				DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'getLookup',arg1, getLookup_result);
			}
		}else{
			alert('Some fields were not filled out.');
		}
	}
	
	function getLookup_result(r){
		if(r == 'true'){
			alert('Username not available');
		}else{
			add_user();
		}
	}
	
	function add_user(){
		arg1 = document.form1.username.value;	
		arg2 = document.form1.password.value;	
		arg3 = document.form1.email.value;
		DWRUtil.useLoadingMessage();
		DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'saveUser',0,arg1, arg2, arg3, add_user_result);	
	}
	
	function add_user_result(r){
		arg1 = document.form1.username.value;	
		arg2 = document.form1.password.value;	
		arg3 = document.form1.email.value;
		DWRUtil.useLoadingMessage();
		DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'login',arg1, arg2, arg3, login_result);
	}
	
	function login_result(r){
		location.href=r;
	}
	
	function profilecheck() {
		
	}
	function contactcheck(){
		if(document.getElementById('fname').value == '' && document.getElementById('lname').value == '' && document.getElementById('phone').value == ''){
			alert("all fields need to be filled in");
			return false;
		}else{
			return true;
		}
	}
	function contactuscheck(){
		if(document.getElementById('fullname').value == '' && document.getElementById('subject').value == '' && document.getElementById('message').value == ''){
			alert("all fields need to be filled in");
			return false;
		}else{
			return true;
		}
	}
	function profilecheck(form){
		if (document.form1.password.value == document.form1.password2.value ){
			return true;
		}else{
			alert('Passwords did not match!');
			return false	
		}
	}
	function onOptions(id){
		location.href='edit.cfm?id='+id;
	}
	function onDown(id){
	
	}
function onOver(id){
	//document.getElementById(id).style.backgroundColor='#ffcc00';
	document.getElementById(id).style.color="#cf548a";
}
function onOut(id){
	//document.getElementById(id).style.backgroundColor='#000000';
	document.getElementById(id).style.color="#999999";
}
