function saveRegistrationDetails(){

	var validData 	= true;	
	var frm 	= document.membershipApplicationfrm;
	var msg		= "";	
	var tempVal	= "";
	var focusObj	= null;	
	var ValueEmpty	= null;	
	
	//company name
	tempVal = trim( frm.Company_Name.value );
	if( tempVal == '' ){
		
		validData 	= false;
		msg += '\n\t*  Company Name.';	
		focusObj 	=  frm.Company_Name;
	}
	
	//Number of Employees 
	tempVal = trim( frm.Number_of_ees.value );
	if( validateNumericOnly( frm.Number_of_ees.value ) == false ){
		
		frm.Number_of_ees.value = "";
		validData = false;
		msg += '\n\t*  valid Employees Number.';
		if( focusObj == null ){		
			
			focusObj =  frm.Number_of_ees;
		}
		
	}	
	
	// first name
	tempVal = trim( frm.P1_First_Name.value );
	if( tempVal == '' ){
		
		validData 	= false;
		msg += '\n\t*  Contact person first name.';
		if( focusObj == null ){
			focusObj 	=  frm.P1_First_Name;
		}
	}

	// Last name
	tempVal = trim( frm.P1_Last_Name.value );
	if( tempVal == '' ){
		
		validData 	= false;
		msg += '\n\t*  Contact person last name.';	
		if( focusObj == null ){
			focusObj 	=  frm.P1_Last_Name;
		}
	}
	// Email Address
	tempVal = trim( frm.P1_EmailAddress.value );
	if( tempVal == '' ){
		
		validData 	= false;
		msg += '\n\t*  Email Address.';	
		if( focusObj == null ){
			focusObj 	=  frm.P1_EmailAddress;
		}
	}
	// P1_PriPhone
	tempVal = trim( frm.P1_PriPhone.value );
	if( tempVal == '' ){
		
		validData 	= false;
		msg += '\n\t*  Primary Phone.';	
		if( focusObj == null ){
			focusObj 	=  frm.P1_PriPhone;
		}
	}	
	

	if( validData == false ){
		
		alert( "Please enter values  for the following fields: \n" + msg );
		if( focusObj != null ){
			
			focusObj.focus();
		}
	}
	
	if( validData == true ){
		
		frm.submit();
	}

	
}
function closeThisWindow(){
	
	document.membershipApplicationfrm.action = "Index.jsp";
	document.membershipApplicationfrm.submit();
}
function resetForm(){
	
	document.membershipApplicationfrm.reset();
	document.membershipApplicationfrm.Company_Name.focus();
}

function levelOfMembership(){
	
	var popW = 600;
	var popH = 500;
	var url	 = 'MembershipLevels.htm';

	if(document.all) {
	/* the following is only available after onLoad */
		w = document.body.clientWidth;
		h = document.body.clientHeight;
		LeftPosition =(w)?(w-popW)/2:100;
		TopPosition  =(h)?(h-popH)/2:100;

	}

	var settings='width='+popW+',height='+popH+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	window.open(url,'MembershipLevels', settings) ;	

}

