<!doctype html>
<html>




<head>
<meta charset="utf-8">
<title>: Register</title>

<meta name="viewport" content="width=device-width, initial-scale=1">


	<link rel="stylesheet" href="https://use.typekit.net/bwx2oiy.css">
	<link href="/css_styles/cpnet-responsive.css" rel="stylesheet" type="text/css">


<script>// trim11() -- efficient Javascript trim function tested on http://blog.stevenlevithan.com/archives/faster-trim-javascript

function trim11 (str) {
	str = str.replace(/^\s+/, '');
	for (var i = str.length - 1; i >= 0; i--) {
		if (/\S/.test(str.charAt(i))) {
			str = str.substring(0, i + 1);
			break;
		}
	}
	return str;
}

function Check_first_child(container_object){
	
	container_object.firstChild.checked = true;
	
}

function Toggle_check_first_child(container_object){
	
	if(container_object.firstChild.checked == false)
	{
		container_object.firstChild.checked = true;
	}
	else
	{
		container_object.firstChild.checked = false;
	}
	
}

function Health_name_remove_periods(form_field)
{
	var comma_position = form_field.value.indexOf(',');
	
	if(comma_position > 0)
	{
		var up_to_comma = form_field.value.substr(0,comma_position);
		var after_comma = form_field.value.substr(comma_position);
		var after_comma_no_periods = after_comma.replace(/\./g,"");
		var return_string = up_to_comma + after_comma_no_periods;
	
		return_string = return_string.replace(", Jr",", Jr.");
		return_string = return_string.replace(", Sr",", Sr.");
		
		form_field.value = return_string;
	}
	else
	{
		// do nothing
	}
	
}

function Health_URL_format(form_field)
{
	var clean_URL = form_field.value;
	
	clean_URL = clean_URL.replace('http://www.',"");
	
	clean_URL = clean_URL.replace('https://www.',"");
	
	clean_URL = clean_URL.replace('http://',"");
	
	clean_URL = clean_URL.replace('https://',"");
	
	clean_URL = clean_URL.replace('www.',"");
	
	form_field.value = clean_URL;
		
}

function Strip_URL_http(form_field)
{
	var clean_URL = form_field.value;
	
	clean_URL = clean_URL.replace('http://',"");
	
	clean_URL = clean_URL.replace('https://',"");
	
	form_field.value = clean_URL;
		
}


// in 4D phone type field onchange, enter this.value = UCLA_lowercase_phone_type(this)

function UCLA_lowercase_phone_type(Phone_type_object)
{
var Phone_type = trim11(Phone_type_object.value);

	if( Phone_type.substr(0,4) == "UCLA"  | 
	Phone_type.substr(0,5) == "(UCLA"  | 
	Phone_type.substr(0,2) == "US" | 
	Phone_type.substr(0,3) == "DRC" | 
	Phone_type.substr(0,10) == "Chancellor" | 
	Phone_type.substr(0,8) == "WhatsApp" | 
	Phone_type.substr(0,9) == "(WhatsApp" |  
	Phone_type.substr(0,7) == "Twitter" | 
	Phone_type.substr(0,8) == "(Twitter" | 
	Phone_type.substr(0,8) == "Facebook"  | 
	Phone_type.substr(0,9) == "(Facebook"  | 
	Phone_type.substr(0,6) == "Linked"  | 
	Phone_type.substr(0,7) == "(Linked"  )
	{
		// do nothing
	}
	else
	{
		Phone_type = Phone_type.toLowerCase();

	}
		
	return Phone_type;

}


function Health_period_phone_format(Phone_object)
{
var Phone_number=trim11(Phone_object.value)
var Phone_number_stripped=""
var Phone_number_formatted=""
var Numeral_counter=0

// strip all non numbers
for(var Char_counter=0; Char_counter<Phone_number.length; Char_counter++)
{
  if( (Phone_number.charAt(Char_counter)=="0") | (Phone_number.charAt(Char_counter)=="1") | (Phone_number.charAt(Char_counter)=="2") | (Phone_number.charAt(Char_counter)=="3") | (Phone_number.charAt(Char_counter)=="4") | (Phone_number.charAt(Char_counter)=="5") | (Phone_number.charAt(Char_counter)=="6") | (Phone_number.charAt(Char_counter)=="7") | (Phone_number.charAt(Char_counter)=="8") | (Phone_number.charAt(Char_counter)=="9")  )
  {
	 Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
			
	 if(Numeral_counter<10)
	 {
		Numeral_counter = Numeral_counter+1
	 }
  }
  else
  {
	 // after 10 numbers stripped out, just include everything else entered to deal with phone extensions
	 if(Numeral_counter>9)
	 {
		Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
	 }
  }
}

if( ( Phone_number_stripped.length < 8) || ( Phone_number.substr(0,1) == "1") || ( Phone_number.substr(0,1) == "+") || ( Phone_number.indexOf("@") > 0) || ( Phone_number.indexOf("SKIN") > 0) || ( ( Phone_number_stripped.length + 9 ) < Phone_number.length ) )
{
 // do nothing
 	Phone_object.value = Phone_number;
}
else
{
  // format new number

      Phone_number_formatted=""

      for(Char_counter=0; Char_counter<Phone_number_stripped.length;Char_counter++)
      {
         if(Char_counter==2)
         {
            Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + "."
         }
         else
         {
            if(Char_counter==5)
            {
               Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + "."
            }
            else
            {
               Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter)
            }
         }
      }
   Phone_object.value=Phone_number_formatted
}

Health_URL_format(Phone_object);


}


// Format_phone_hyphen - syntax: onchange="Format_phone_hyphen(this)"

function Format_phone_hyphen(Phone_object)
{
var Phone_number=Phone_object.value
var Phone_number_stripped=""
var Phone_number_formatted=""
var Numeral_counter=0


if( ( Phone_number.substr(0,3).toUpperCase() == "TEL" ) || ( Phone_number.substr(0,4) == "(01)" ) || ( Phone_number.substr(0,1).toUpperCase() == "P" ) || ( Phone_number.substr(0,2) == "c ") || ( Phone_number.substr(0,2) == "C ") || ( Phone_number.substr(0,2) == "01") || ( Phone_number.substr(0,1) == "+")  || ( Phone_number.length < 7) )
{
	// do nothing
}
else
{
	// strip all non numbers
	for(var Char_counter=0; Char_counter<Phone_number.length; Char_counter++)
	{
	  if( (Phone_number.charAt(Char_counter)=="0") | (Phone_number.charAt(Char_counter)=="1") | (Phone_number.charAt(Char_counter)=="2") | (Phone_number.charAt(Char_counter)=="3") | (Phone_number.charAt(Char_counter)=="4") | (Phone_number.charAt(Char_counter)=="5") | (Phone_number.charAt(Char_counter)=="6") | (Phone_number.charAt(Char_counter)=="7") | (Phone_number.charAt(Char_counter)=="8") | (Phone_number.charAt(Char_counter)=="9")  )
	  {
		 Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
				
		 if(Numeral_counter<10)
		 {
			Numeral_counter = Numeral_counter+1
		 }
	  }
	  else
	  {
		 // after 10 numbers stripped out, just include everything else entered to deal with phone extensions
		 if(Numeral_counter>9)
		 {
			Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
		 }
	  }
	}
	
	if( ( Phone_number_stripped.length < 8) || ( Phone_number.substr(0,1) == "1") || ( Phone_number.substr(0,1) == "+") || ( Phone_number.indexOf("@") > 0) || ( ( Phone_number_stripped.length + 9 ) < Phone_number.length ) )
	{
	 // do nothing
	}
	else
	{
	  // format new number
	
		  Phone_number_formatted=""
	
		  for(Char_counter=0; Char_counter<Phone_number_stripped.length;Char_counter++)
		  {
			 if(Char_counter==2)
			 {
				Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + "-"
			 }
			 else
			 {
				if(Char_counter==5)
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + "-"
				}
				else
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter)
				}
			 }
		  }
	   Phone_object.value=Phone_number_formatted
	}
}


}



// Format_phone_space - syntax: onchange="Format_phone_space(this)"

function Format_phone_space(Phone_object)
{
var Phone_number=Phone_object.value
var Phone_number_stripped=""
var Phone_number_formatted=""
var Numeral_counter=0

if(( Phone_number.substr(0,4) == "(01)" ) || ( Phone_number.substr(0,2) == "c ") || ( Phone_number.substr(0,2) == "C ") || ( Phone_number.substr(0,2) == "01") || ( Phone_number.substr(0,1) == "+"))
{
	// do nothing
}
else
{
	// strip all non numbers
	for(var Char_counter=0; Char_counter<Phone_number.length; Char_counter++)
	{
	  if( (Phone_number.charAt(Char_counter)=="0") | (Phone_number.charAt(Char_counter)=="1") | (Phone_number.charAt(Char_counter)=="2") | (Phone_number.charAt(Char_counter)=="3") | (Phone_number.charAt(Char_counter)=="4") | (Phone_number.charAt(Char_counter)=="5") | (Phone_number.charAt(Char_counter)=="6") | (Phone_number.charAt(Char_counter)=="7") | (Phone_number.charAt(Char_counter)=="8") | (Phone_number.charAt(Char_counter)=="9")  )
	  {
		 Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
				
		 if(Numeral_counter<10)
		 {
			Numeral_counter = Numeral_counter+1
		 }
	  }
	  else
	  {
		 // after 10 numbers stripped out, just include everything else entered to deal with phone extensions
		 if(Numeral_counter>9)
		 {
			Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
		 }
	  }
	}
	
	if( ( Phone_number_stripped.length < 8) || ( Phone_number.substr(0,1) == "1") || ( Phone_number.substr(0,1) == "+") || ( Phone_number.indexOf("@") > 0) || ( ( Phone_number_stripped.length + 9 ) < Phone_number.length ) )
	{
	 // do nothing
	}
	else
	{
	  // format new number
	
		  Phone_number_formatted=""
	
		  for(Char_counter=0; Char_counter<Phone_number_stripped.length;Char_counter++)
		  {
			 if(Char_counter==2)
			 {
				Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + " "
			 }
			 else
			 {
				if(Char_counter==5)
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + " "
				}
				else
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter)
				}
			 }
		  }
	   Phone_object.value=Phone_number_formatted
	}
}


}




// Format_phone_parenspace - syntax: onchange="Format_phone_parenspace(this)"

function Format_phone_parenspace(Phone_object)
{
var Phone_number=Phone_object.value
var Phone_number_stripped=""
var Phone_number_formatted=""
var Numeral_counter=0

if( ( Phone_number.substr(0,5) == "Phone" ) || ( Phone_number.substr(0,6) == "Office" ) || ( Phone_number.substr(0,3) == "Fax" ) || ( Phone_number.substr(0,4) == "(01)" ) || ( Phone_number.substr(0,2) == "c ") || ( Phone_number.substr(0,2) == "C ") || ( Phone_number.substr(0,2) == "01") || ( Phone_number.substr(0,1) == "+") || ( Phone_number.substr(2,1) == " " ) )
{
	// do nothing
}
else
{
	// strip all non numbers
	for(var Char_counter=0; Char_counter<Phone_number.length; Char_counter++)
	{
	  if( (Phone_number.charAt(Char_counter)=="0") | (Phone_number.charAt(Char_counter)=="1") | (Phone_number.charAt(Char_counter)=="2") | (Phone_number.charAt(Char_counter)=="3") | (Phone_number.charAt(Char_counter)=="4") | (Phone_number.charAt(Char_counter)=="5") | (Phone_number.charAt(Char_counter)=="6") | (Phone_number.charAt(Char_counter)=="7") | (Phone_number.charAt(Char_counter)=="8") | (Phone_number.charAt(Char_counter)=="9")  )
	  {
		 Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
			
		 if(Numeral_counter<10)
		 {
			Numeral_counter = Numeral_counter+1
		 }
	  }
	  else
	  {
		 // after 10 numbers stripped out, just include everything else entered to deal with phone extensions
		 if(Numeral_counter>9)
		 {
			Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
		 }
	  }
	}

	if( ( Phone_number_stripped.length < 8) || ( Phone_number.substr(0,1) == "1") || ( Phone_number.substr(0,1) == "+") || ( Phone_number.indexOf("@") > 0) || ( ( Phone_number_stripped.length + 9 ) < Phone_number.length ) )
	{
	 // do nothing
	}
	else
	{
	  // format new number

		  Phone_number_formatted="("

		  for(Char_counter=0; Char_counter<Phone_number_stripped.length;Char_counter++)
		  {
			 if(Char_counter==2)
			 {
				Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + ") "
			 }
			 else
			 {
				if(Char_counter==5)
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + "-"
				}
				else
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter)
				}
			 }
		  }
	   Phone_object.value=Phone_number_formatted
	}


}



}



// Format_anderson_parenspace - syntax: onchange="Format_anderson_parenspace(this)"

function Format_anderson_parenspace(Phone_object)
{
var Phone_number=Phone_object.value
var Phone_number_stripped=""
var Phone_number_formatted=""
var Numeral_counter=0

if( ( Phone_number.substr(0,4) == "(01)" ) || ( Phone_number.substr(0,2) == "01") || ( Phone_number.substr(0,1) == "+") || ( Phone_number.substr(2,1) == " "))
{
	// do nothing
}
else
{
	// strip all non numbers
	for(var Char_counter=0; Char_counter<Phone_number.length; Char_counter++)
	{
	  if( (Phone_number.charAt(Char_counter)=="0") | (Phone_number.charAt(Char_counter)=="1") | (Phone_number.charAt(Char_counter)=="2") | (Phone_number.charAt(Char_counter)=="3") | (Phone_number.charAt(Char_counter)=="4") | (Phone_number.charAt(Char_counter)=="5") | (Phone_number.charAt(Char_counter)=="6") | (Phone_number.charAt(Char_counter)=="7") | (Phone_number.charAt(Char_counter)=="8") | (Phone_number.charAt(Char_counter)=="9")  )
	  {
		 Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
			
		 if(Numeral_counter<10)
		 {
			Numeral_counter = Numeral_counter+1
		 }
	  }
	  else
	  {
		 // after 10 numbers stripped out, just include everything else entered to deal with phone extensions
		 if(Numeral_counter>9)
		 {
			Phone_number_stripped = Phone_number_stripped + Phone_number.charAt(Char_counter)
		 }
	  }
	}

	if( ( Phone_number_stripped.length < 8) || ( Phone_number.substr(0,1) == "1") || ( Phone_number.substr(0,1) == "+") || ( Phone_number.indexOf("@") > 0) || ( ( Phone_number_stripped.length + 9 ) < Phone_number.length ) )
	{
	 // do nothing
	}
	else
	{
	  // format new number

		  Phone_number_formatted="("

		  for(Char_counter=0; Char_counter<Phone_number_stripped.length;Char_counter++)
		  {
			 if(Char_counter==2)
			 {
				Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + ") "
			 }
			 else
			 {
				if(Char_counter==5)
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter) + "-"
				}
				else
				{
				   Phone_number_formatted=Phone_number_formatted + Phone_number_stripped.charAt(Char_counter)
				}
			 }
		  }
	   Phone_object.value=Phone_number_formatted
	}


}



}






// Disable_enterkey_submit() - disables enter key when cursor is in input field where function is called
//   by  onkeydown="Disable_enterkey_submit(event.keyCode,event)"

function Disable_enterkey_submit(key_pressed_for_Gecko,event_for_Gecko) 
{    
	var k_code = key_pressed_for_Gecko

	if(isGecko())
	{
		if(k_code == 13)
		{
			event_for_Gecko.preventDefault()
		}
	}
	else
	{
		if(isIE())
		{
			k_code == event.keyCode
			
			if (k_code == 13) 
			{        
				event.cancelBubble = true;
				event.returnValue = false;
      			}
		}
		else 
		{
      			// do nothing, (Enter key does not submit old netscape)
		}
		
	}
	
} 

// stop bubbling, such as when a check box is clicked
function Stop_propagation(event){

	if (event.stopPropagation)
	{    // standard
			event.stopPropagation();
	} else {
	    // IE6-8
			event.cancelBubble = true;
	}
}


// Open_image_subwindow() - opens another window according to size of image

function Open_image_subwindow(Subwindow_url,Image_width,Image_height)
{

var max_width =790
var max_height = 540
var set_width = Image_width + 40
var set_height = Image_height + 40

	if(set_width > max_width)
	{
		set_width = max_width
	}

	if(set_height > max_height)
	{
		set_height = max_height
	}


var sub_window = eval("window.open('','subwindow','width=" + set_width + ",height=" + set_height + ",resizable,scrollbars,status')");


sub_window.location = Subwindow_url

sub_window.focus()

}


// Open_image_subwindow_unnamed() - opens another window according to size of image
// unnamed allows multiple windows to be opened at same time

function Open_image_subwindow_unnamed(Subwindow_url,Image_width,Image_height)
{
var max_width =700
var max_height = 480
var set_width = Image_width + 40
var set_height = Image_height + 40

	if(set_width > max_width)
	{
		set_width = max_width
	}

	if(set_height > max_height)
	{
		set_height = max_height
	}


var sub_window = eval("window.open('','','width=" + set_width + ",height=" + set_height + ",resizable,scrollbars,status')");


sub_window.location = Subwindow_url

}





// Open_wait_subwindow() - opens sub window and displays wait message passed
var sub_window_open="false"
var sub_window_wait
function Open_wait_subwindow(Wait_for_reason)
{

	sub_window_wait = window.open('','subwindow','width=600, height=150,resizable,scrollbars,status');
	sub_window_wait.outerHeight=200
	sub_window_wait.location="/4dcgi/wait/"+Wait_for_reason
	sub_window_open="true"
sub_window_wait.focus()
}
// Close_wait_window() - closes wait message subwindow
function Close_wait_window()
{
	if(sub_window_open=="true")
	{
		if(!sub_window_wait.closed)
		
		{
			sub_window_wait.close()
		}
	}
}

// Open_link_subwindow() - opens a subwindow 600x420 pixels
function Open_link_subwindow(Link_href)


{
var Link_subwindow = window.open('','linksubwindow','width=600, height=420, resizable, scrollbars, status, toolbar, menubar')
Link_subwindow.location = Link_href
Link_subwindow.focus()
}

// Show_hidden_element() - pass element ID
function Show_hidden_element(Element_ID)
{
var Element_to_show = document.getElementById(Element_ID)
Element_to_show.style.visibility="visible"
}

// Hide_element() - pass element ID
function Hide_element(Element_ID)
{
var Element_to_show = document.getElementById(Element_ID)
Element_to_show.style.visibility="hidden"
}

// Browser testers
function isMac()
{
	if(navigator.userAgent.indexOf("Mac") != -1){
		return true;
	}
}
function isGecko()
{
// Safari browser also returns True as a Gecko Browser, usually it is compatible
// use isGeckoNotSafari() if you do not want to include Safari
	if(navigator.userAgent.indexOf("Gecko") != -1){
		return true;
	}
}
function isSafari()
{
// Safari browser also returns True as a Gecko Browser, usually it is compatible
// use isGeckoNotSafari() if you do not want to include Safari
	if(navigator.userAgent.indexOf("Safari") != -1){
		return true;
	}
}
function isIE()
{
	if(navigator.appName == "Microsoft Internet Explorer"){
		return true;
	}
}
function isOldNetscape()
{
	if( (navigator.appName == "Netscape") && ( parseInt(navigator.appVersion) < 5) ){
		return true;
	}
}

function isGeckoNotSafari()
{
	if(isGecko())
	{
		if(isSafari())
		{
			return false; 
		}
		else
		{
			return true;
		}
	}
}

function isGeckoNotMac()
{
	if(isGecko())
	{
		if(isMac())
		{
			return false; 
		}
		else
		{
			return true;
		}
	}
}

function isDigit(passedChar)
{
	if( passedChar >= "0" && passedChar <= "9")
	{
		return true;
	}
	else
	{
		return false;
	}
}

function isAlpha(passedChar)
{
	if(((passedChar >= "a") && (passedChar <= "z")) || ((passedChar >= "A") && (passedChar <= "Z")))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function isAlphaOrDigit(passedChar)
{
	if(isAlpha() || isDigit())
	{
		return true;
	}
	else
	{
		return false;
	}
	
}

// Show_upload_preview_window - pass file upload object, shows file source in new window
function Show_upload_preview_window(browse_object)
{
var image_path = browse_object.value
	if(image_path=="")
	{
	var window_open = window.open("","image_window","height=400,width=400,resizable,scrollbars,status")
	var Document_html = "No file to view, click browse to select file."
	window_open.document.write(Document_html)
	window_open.document.close()
	}
	else
	{
	var file_path
		if(isMac())
			{
			if(isGecko())
				{
				file_path = "file:///" + image_path.replace(/\:/g,"\/")
				file_path = file_path.replace(/\ /g,"\%20")
				}
			else
				{
				file_path  = "file://" + image_path
				}
			}
		else
			{
			if(isGecko())
				{
				file_path = "file:///"+image_path.replace(/\\/g,"\/")
				file_path = file_path.replace(/\ /g,"\%20")
				}
			else
				{
				file_path = image_path
				}
			}
		//alert(file_path)
		var window_open = window.open(file_path,"image_window","height=400,width=400,resizable,scrollbars,status")
		}

}


//this function swaps images on rollovers

function swapImage(imageName)
{
var storeImage= imageName.src
	imageName.src = imageName.lowsrc
	imageName.lowsrc = storeImage
}





// Name_to_uppercase - all caps name, except for Mc and PhD, pass object:  Name_to_uppercase(this)

function Name_to_uppercase(Name_object)
{
	if( Name_object.value.substr(0,1) == "!" )
	{
		var SubstrCount = Name_object.value.length ;
		var Name_to_return = Name_object.value.substring(1,SubstrCount);
	}
	else
	{
		var Name_to_return = Name_object.value.toUpperCase();
	
		Name_to_return = Name_to_return.replace(/ MC/, " Mc");
		Name_to_return = Name_to_return.replace(/, Mc/, ", MC");
	
		Name_to_return = Name_to_return.replace(/AEENG\./, "AeEng.");
		Name_to_return = Name_to_return.replace(/AE\.ENG\./, "AeEng.");
		Name_to_return = Name_to_return.replace(/B\.AG\./, "B.Ag.");
		Name_to_return = Name_to_return.replace(/B\.ARCH\./, "B.Arch.");
		Name_to_return = Name_to_return.replace(/B\.CH\.E\./, "B.Ch.E.");
		Name_to_return = Name_to_return.replace(/B\.LIT\./, "B.Lit.");
		Name_to_return = Name_to_return.replace(/B\.PHARM\./, "B.Pharm.");
		Name_to_return = Name_to_return.replace(/B\.S\.ED\./, "B.S.Ed.");
		Name_to_return = Name_to_return.replace(/CENG\./, "CEng.");
		Name_to_return = Name_to_return.replace(/CH\.E\./, "Ch.E.");

		Name_to_return = Name_to_return.replace(/CHARTERED\ FINANCIAL\ ANALYST/, "Chartered Financial Analyst");

		Name_to_return = Name_to_return.replace(/D\.ED\./, "D.Ed.");
		Name_to_return = Name_to_return.replace(/D\.ENV/, "D.Env");
		Name_to_return = Name_to_return.replace(/D\.SC\./, "D.Sc.");
		Name_to_return = Name_to_return.replace(/ED\.D\./, "Ed.D.");
		Name_to_return = Name_to_return.replace(/ED\.S\./, "Ed.S.");
		Name_to_return = Name_to_return.replace(/E\.MET\./, "E.Met.");
		Name_to_return = Name_to_return.replace(/LITT\.B\./, "Litt.B.");
		Name_to_return = Name_to_return.replace(/LITT\.M\./, "Litt.M.");
		Name_to_return = Name_to_return.replace(/M\.AERO\.E\./, "M.Aero.E.");
		Name_to_return = Name_to_return.replace(/M\.DIV\./, "M.Div.");
		Name_to_return = Name_to_return.replace(/M\.ARCH\./, "M.Arch.");
		Name_to_return = Name_to_return.replace(/M\.ARCH/, "M.Arch");
		Name_to_return = Name_to_return.replace(/M\.ENG\./, "M.Eng.");
		Name_to_return = Name_to_return.replace(/M\.ED\./, "M.Ed.");
		Name_to_return = Name_to_return.replace(/ED\.M\./, "Ed.M.");
		Name_to_return = Name_to_return.replace(/M\.MUS\./, "M.Mus.");
		Name_to_return = Name_to_return.replace(/M\.TH\./, "M.Th.");
		Name_to_return = Name_to_return.replace(/MSED/, "MSEd");
		Name_to_return = Name_to_return.replace(/MS\.ED\./, "MS.Ed.");
		

		Name_to_return = Name_to_return.replace(/M\.SC\./, "M.Sc.");
		
		if( Name_to_return.indexOf("MSCE") > -1)
		{
			// do not fix "MSC" if "MSCE"
		}
		else
		{
			Name_to_return = Name_to_return.replace(/MSC/, "M.Sc.");
		}
		
		Name_to_return = Name_to_return.replace(/NUC\.E\./, "Nuc.E.");
		Name_to_return = Name_to_return.replace(/PHARM\.D\./, "Pharm.D.");
		Name_to_return = Name_to_return.replace(/PHD/, "PhD");
		Name_to_return = Name_to_return.replace(/PH\.D/, "Ph.D");
		Name_to_return = Name_to_return.replace(/PHB/, "PhB");
		Name_to_return = Name_to_return.replace(/PH\.B\./, "Ph.B.");
		Name_to_return = Name_to_return.replace(/SC\.D\./, "Sc.D.");
		Name_to_return = Name_to_return.replace(/S\.SC\.D\./, "S.Sc.D.");
		Name_to_return = Name_to_return.replace(/TH\.B\./, "Th.B.");
		Name_to_return = Name_to_return.replace(/TH\.D\./, "Th.D.");
		Name_to_return = Name_to_return.replace(/TH\.M\./, "Th.M.");
		Name_to_return = Name_to_return.replace(/D\.PHIL/, "D.Phil");
		Name_to_return = Name_to_return.replace(/DPHIL/, "DPhil");
		Name_to_return = Name_to_return.replace(/ESQ\./, "Esq.");
		Name_to_return = Name_to_return.replace(/ RPH/, " RPh");
		Name_to_return = Name_to_return.replace(/ED\.D/, "Ed.D");
		Name_to_return = Name_to_return.replace(/, EDD/, ", EdD");
		Name_to_return = Name_to_return.replace(/DNSC/, "DNSc");
		Name_to_return = Name_to_return.replace(/\(H\.C\.\)/g, "(h.c.)");
		Name_to_return = Name_to_return.replace(/D\.ENG/, "D.Eng");
		Name_to_return = Name_to_return.replace(/MPHIL/, "MPhil");
		Name_to_return = Name_to_return.replace(/\(CANTAB\)/, "(cantab)");
		Name_to_return = Name_to_return.replace(/CANDIDATE/, "Candidate");

	}
	
	return Name_object.value = Name_to_return;

}




function Disallow_caps(form_field)
{
	var compare_text = form_field.value
	
	if( trim11(compare_text).length != 0 )
	{
		if( compare_text === compare_text.toUpperCase() )
		{
			alert("All caps are not allowed for this field" )
		
			setTimeout( function(){form_field.focus();form_field.select()}, 10 )
		}
	}

}

function Disallow_URL_UCLA_Address(form_field)
{
	var compare_text = form_field.value;
	
	if( compare_text.includes(".com") )
	{
			alert("Internet URLS are not allowed in address area." );
			setTimeout( function(){form_field.focus();form_field.select()}, 10 );
	}
	if( compare_text.includes(".org") )
	{
			alert("Internet URLS are not allowed in address area." );
			setTimeout( function(){form_field.focus();form_field.select()}, 10 );
	}
	if( compare_text.includes(".edu") )
	{
			alert("Internet URLS are not allowed in address area." );
			setTimeout( function(){form_field.focus();form_field.select()}, 10 );
	}

}


function Disallow_caps_UCLA_name (form_field)
{
	var comma_position = form_field.value.indexOf(',')
	
	var compare_text = ""
	
	if(comma_position == -1)
	{
		compare_text = form_field.value
	}
	else
	{
		compare_text = form_field.value.substr(0,comma_position)
	}
	

	if( trim11(compare_text).length != 0 )
	{
		if( compare_text === compare_text.toUpperCase() )
		{
			alert("All caps are not allowed for name." )
		
			setTimeout( function(){form_field.focus();form_field.select()}, 10 )
		}
	}

}




// Interpolated_Y_Value -- 
// pass X value of related Y value to be determined and 2 parallel Arrays of pre-determined X,Y value relationships to interpolate
// Terminology Note: _is_above_... and _is_below_... refer to position in array, not value

function Interpolated_Y_Value(X_passed,X_values_array,Y_values_array)
{
var Position_in_Xarray = -1
var Number_of_value_pairs = 0
var Values_array_counter = 0
var X_is_above = 0
var X_is_below = 0
var Y_is_above = 0
var Y_is_below = 0
var X_range = 0
var Y_range = 0
var X_difference = 0
var Y_difference = 0
var No_X_is_below_found_b = true
var No_X_is_above_found_b = true
var X_out_of_range_below_b = false
var X_out_of_range_above_b = false
var Y_interpolated = null

	Number_of_value_pairs = X_values_array.length

	// convert passed text values to numbers
	X_passed = parseFloat(X_passed)
	for(var i = 0;i < Number_of_value_pairs; i = i + 1)
	{
		X_values_array[i]=parseFloat(X_values_array[i])
		Y_values_array[i]=parseFloat(Y_values_array[i])
	}
	
	
	for(var i = 0;i < Number_of_value_pairs;i=i+1)
	{
		if(X_values_array[i] == X_passed)
		{
		Position_in_Xarray = i
		}
	}

	if(Position_in_Xarray > -1)
	{
		//if X_passed is in X Array, return corresponding Y, no need to interpolate
		Y_interpolated = Y_values_array[Position_in_Xarray]
	}
	else
	{
	
		if(X_values_array[0] < X_values_array[Number_of_value_pairs - 1])
		{
			// X Ascending values
			
			if(X_passed < X_values_array[0])
			{
				//X out of range BELOW
				X_out_of_range_below_b = true
			}
			else
			{
				if(X_passed > X_values_array[Number_of_value_pairs - 1])
				{
					//X out of range ABOVE
					X_out_of_range_above_b = true
				}
				
				else
				{
					// determine nearest value above and below to interpolate
					
					for(var i = 0; i < Number_of_value_pairs; i = i + 1)
					{
					
						if(i < Number_of_value_pairs - 1)
						{
							// not last time through
							if((X_passed > X_values_array[i]) && (X_passed < X_values_array[i + 1]))
							{
							
								X_is_above = X_values_array[i]
								Y_is_above = Y_values_array[i]
								No_X_is_above_found_b = false
								X_is_below = X_values_array[i + 1]
								Y_is_below = Y_values_array[i + 1]
								No_X_is_below_found_b = false
							}
						}
					}
				}
			}
		}
		else
		{
			// X Descending values
			if(X_passed > X_values_array[0])
			{
				//X out of range BELOW
				X_out_of_range_below_b = true
			}
			else
			{
				if(X_passed < X_values_array[Number_of_value_pairs - 1])
				{
					//X out of range ABOVE
					X_out_of_range_above_b = true
				}
				else
				{
					// determine nearest value above and below to interpolate
					for(var i = 0; i < Number_of_value_pairs; i = i + 1)
					{
						if(i < Number_of_value_pairs - 1)
						{
							// not last time through
							if((X_passed < X_values_array[i]) && (X_passed > X_values_array[i + 1]))
							{
								X_is_above = X_values_array[i]
								Y_is_above = Y_values_array[i]
								No_X_is_above_found_b = false
								X_is_below = X_values_array[i + 1]
								Y_is_below = Y_values_array[i + 1]
								No_X_is_below_found_b = false
							}
						}
					}
				}
			}
		}
	}
	
	if(X_out_of_range_below_b)
	{
		// return lowest position in array
		Y_interpolated = Y_values_array[0]
	}
	else
	{
		if(X_out_of_range_above_b)
		{
			// return highest position in array
			Y_interpolated = Y_values_array[Number_of_value_pairs - 1]
		}
		else
		{
			if(Y_interpolated != null)
			{
			 	// already found above, do nothing
			}
			else
			{
				// interpolate Y Value
				X_range = Math.abs(X_is_below - X_is_above)
				Y_range = Math.abs(Y_is_below - Y_is_above)
						
				if(X_passed > X_is_above)
				{
					X_difference = X_passed - X_is_above
				}
				else
				{
					X_difference = X_is_above - X_passed
				}
			
				Y_difference =( X_difference / X_range) * Y_range
			
				if(Y_is_below > Y_is_above)
				{
					// Y is ascending
					Y_interpolated = Y_is_above + Y_difference
				}
				else
				{
					// Y is descending
					Y_interpolated = Y_is_above - Y_difference

				}	
			}
		}
	}
	
	return Y_interpolated;
	
}

// Round_two_decimals_text - Pass value, returns text formatted to 2 decimal places

function Round_two_decimals_text(Passed_value)
{
var Passed_value_as_text = String(Passed_value)
var Position_decimal = Passed_value_as_text.indexOf(".")


	if(Position_decimal == -1)
	{
		// no decimal, return value + ".00"
		return Passed_value_as_text + ".00";
	}
	else
	{
		var Before_decimal_text = Passed_value_as_text.substring(0,Position_decimal)
		var After_decimal_text = Passed_value_as_text.substring(Position_decimal + 1, Passed_value_as_text.length)
		var Temp_num


		if(After_decimal_text.length>2)
		{
			if(parseInt(After_decimal_text.substring(0,1)) > 4)
			{
			console.log(After_decimal_text.substring(0,1));
			
				Temp_num = parseInt(After_decimal_text.substring(1,2))+1
				
				if(Temp_num == 10)
				{
					Temp_num = parseInt(After_decimal_text.substring(0,1))+1
					After_decimal_text = Temp_num + "0"
					
					
				}
				else
				{
					After_decimal_text = After_decimal_text.substring(0,1) + Temp_num
				}
				
			}
			else
			{
				After_decimal_text = After_decimal_text.substring(0,2)
			}
		
		}
		else
		{
			if(After_decimal_text.length==0)
			{
				After_decimal_text = After_decimal_text + "00"
			}
			else
			{
				if(After_decimal_text.length==1)
				{
					After_decimal_text = After_decimal_text + "0"
				}
				else
				{
					// it is length 2, no change
				}
			}
		}
	}
	
	
	
	return Before_decimal_text + "." + After_decimal_text;
	
	
	
}

function Open_mailinglists_subwindow(Link_href)
{
var Link_subwindow = window.open('','mailinglistssubwindow','width=820, height=600, resizable, scrollbars')
Link_subwindow.location = Link_href
}


function User_verify_link(Confirm_text,URL_requested)
{	
	if(confirm(Confirm_text))
	{
		window.location = URL_requested
	}
	else
	{
		// do nothing
	}
}


function Switch_foot_to_apostrophe(Input_object)
{
Input_object.value = Input_object.value.replace(/'/g,String.fromCharCode(8217))
}

// Cross-browser implementation of element.addEventListener()
function Add_event_listener (element, type, expression, bubbling)
{
	bubbling = bubbling || false;
 
	if(window.addEventListener)	{ // Standard
		element.addEventListener(type, expression, bubbling);
		return true;
	} else if(window.attachEvent) { // IE
		element.attachEvent('on' + type, expression);
		return true;
	} else return false;
}


//Used in for Degrees/Credential field -- Adds comma in beginning and removes periods

function OIC_add_Comma(field)
{
var field_value = trim11(field.value).replace(/\./g,"");

	if(field_value != "")
	{
		if(field_value == ",")
		{
		field_value = "";		
		}
		else
		{
			if(field_value.charAt(0) == ",")
			{
			//do nothing			
			}
			else
			{
			field_value = ", " + field_value;
			}
		}
		
	}

return field_value;
}




</script>

<script>

///// _____________start  this function Parses name field
function parseName(){
var nameObj = document.forms.Register_form.User_fullname_web
var nameString = nameObj.value
var prefixObj = document.forms.Register_form.User_name_prefix_web
var prefixString = prefixObj.value
var firstnameObj = document.forms.Register_form.User_name_first_web
var firstnameString = firstnameObj.value
var midnameObj = document.forms.Register_form.User_name_middle_web
var midnameString = midnameObj.value
var lastnameObj = document.forms.Register_form.User_name_last_web
var lastnameString = lastnameObj.value
var suffixObj = document.forms.Register_form.User_name_suffix_web
var suffixString = suffixObj.value
var aBlankPositions = new Array()
var aBlankPositionsStripped = new Array()
var aWords = new Array()
aWords[0] =""  //this fixes null not object error
var aPrefixes = new Array(34)
aPrefixes[0] = "Mr."
aPrefixes[1] = "Mr"
aPrefixes[2] = "Mrs."
aPrefixes[3] = "Mrs"
aPrefixes[4] = "Ms."
aPrefixes[5] = "Ms"
aPrefixes[6] = "Miss"
aPrefixes[7] = "Dr."
aPrefixes[8] = "Dr"
aPrefixes[9] = "Fr."
aPrefixes[10] = "Fr"
aPrefixes[11] = "Father"
aPrefixes[12] = "Sr."
aPrefixes[13] = "Sr"
aPrefixes[14] = "Sister"
aPrefixes[15] = "Br."
aPrefixes[16] = "Br"
aPrefixes[17] = "Brother"
aPrefixes[18] = "Msgr."
aPrefixes[19] = "Rev"
aPrefixes[20] = "Rev."
aPrefixes[21] = "The Rev"
aPrefixes[22] = "The Rev."
aPrefixes[23] = "The Reverend"
aPrefixes[24] = "Rt. Rev."
aPrefixes[25] = "Rt Rev"
aPrefixes[26] = "The Rt. Rev."
aPrefixes[27] = "Bishop"
aPrefixes[28] = "The Very Reverend"
aPrefixes[29] = "The Right Reverend"
aPrefixes[30] = "The Rt Rev"
aPrefixes[31] = "The Very Rev"
aPrefixes[32] = "The Very Rev."
aPrefixes[33] = "The Right Rev."
var aSuffixes = new Array(27)
aSuffixes[0] = "Jr."
aSuffixes[1] = "Jr"
aSuffixes[2] = "Sr."
aSuffixes[3] = "Sr"
aSuffixes[4] = "II"
aSuffixes[5] = "III"
aSuffixes[6] = "IV"
aSuffixes[7] = "V"
aSuffixes[8] = "VI"
aSuffixes[9] = "VII"
aSuffixes[10] = "VIII"
aSuffixes[11] = "IX"
aSuffixes[12] = "X"
aSuffixes[13] = "esq."
aSuffixes[14] = "esq"
aSuffixes[15] = "PhD"
aSuffixes[16] = "Ph.D."
aSuffixes[17] = "DDS"
aSuffixes[18] = "D.D.S."
aSuffixes[19] = "MD"
aSuffixes[20] = "M.D."
aSuffixes[21] = "sj"
aSuffixes[22] = "s.j."
aSuffixes[23] = "s.m."
aSuffixes[24] = "sm"
aSuffixes[25] = "ohc"
aSuffixes[26] = "o.h.c."
var aLastnamePrefixes = new Array(21)
aLastnamePrefixes[0] = "de los"
aLastnamePrefixes[1] = "delos"
aLastnamePrefixes[2] = "de las"
aLastnamePrefixes[3] = "delas"
aLastnamePrefixes[4] = "delle"
aLastnamePrefixes[5] = "della"
aLastnamePrefixes[6] = "dela"
aLastnamePrefixes[7] = "de la"
aLastnamePrefixes[8] = "van der"
aLastnamePrefixes[9] = "vander"
aLastnamePrefixes[10] = "van den"
aLastnamePrefixes[11] = "vanden"
aLastnamePrefixes[12] = "van de"
aLastnamePrefixes[13] = "vande"
aLastnamePrefixes[14] = "del"
aLastnamePrefixes[15] = "de"
aLastnamePrefixes[16] = "la"
aLastnamePrefixes[17] = "des"
aLastnamePrefixes[18] = "von"
aLastnamePrefixes[19] = "van"
aLastnamePrefixes[20] = "el"

// find blank spaces
var blankPositionNo = 0
for (i = 0; i < nameString.length; i++){
	if(nameString.charAt(i) == " " ){
	aBlankPositions[blankPositionNo] = i;
	blankPositionNo++
	}
}
// strip blanks at beginning of name
var leadBlanksStripped = 0
for (var i = 0; i < aBlankPositions.length; i++){
	if(nameString.charAt(0) == " "){
	nameObj.value = nameString.substr(1, nameString.length);
	nameString = nameObj.value
	aBlankPositions[i] = null
	leadBlanksStripped++
	}
}
//strip blanks at end of  name
for (i = aBlankPositions.length -1; i > -1; i--){
	if(nameString.charAt(nameString.length - 1) == " "){
	nameObj.value = nameString.substr(0, nameString.length - 1);
	nameString = nameObj.value
	aBlankPositions[i] = null
	}
}
// create new array of blank positions
var blankCounter = 0
for (var i = 0; i < aBlankPositions.length; i++){
	if(aBlankPositions[i] != null){
	aBlankPositionsStripped[blankCounter] = aBlankPositions[i] - leadBlanksStripped
	blankCounter++
	}
}
// assign words
var lastBlank = 0
for(i = 0; i < aBlankPositionsStripped.length; i++){
	aWords[i] = nameString.substring(lastBlank,aBlankPositionsStripped[i])
	lastBlank = aBlankPositionsStripped[i] + 1
	if (i == aBlankPositionsStripped.length - 1){ aWords[ i +1] = (nameString.substring(lastBlank,nameString.length))}
}

// check words
// count as you go flag done
var totalWords = aWords.length
var assignedCounter = 0
var flagDone = false
var aNameSlots = new Array(5)
aNameSlots[0] = ""
aNameSlots[1] = ""
aNameSlots[2] = ""
aNameSlots[3] = ""
aNameSlots[4] = ""
// create parallel words array to store which words have been assigned
var aWordsAssigned = new Array()
for(var i = 0; i < aWords.length; i++){
aWordsAssigned[i] = false
}
//subroutine check if all assigned
function checkDone(){
if (assignedCounter == totalWords){flagDone = true}
}
// if only 2 use fname lname
if(totalWords == 2){
aNameSlots[1] = aWords[0];
aNameSlots[3] = aWords[1];
flagDone = true
}

//if word1 is prefix word1 into prefix, word2 into firstname
if(flagDone == false){
	for(var i = 0; i < aPrefixes.length; i++){
		if (aWords[0].toUpperCase() == aPrefixes[i].toUpperCase())
		{
			aNameSlots[0] = aWords[0]; aWordsAssigned[0] = true;
			aNameSlots[1] = aWords[1]; aWordsAssigned[1] = true;
			assignedCounter = 2
			checkDone();
		}
		if((flagDone == false) & (aWords.length>1))
		{
		//if word1+ word2 is prefix word1+ word2 into prefix, word3 into firstname
			if (aWords[0].toUpperCase() + " " + aWords[1].toUpperCase() == aPrefixes[i].toUpperCase())
			{
				aNameSlots[0] = aWords[0] + " " + aWords[1]; aWordsAssigned[0] = true; aWordsAssigned[1] = true;
				aNameSlots[1] = aWords[2]; aWordsAssigned[2] = true;
				assignedCounter = 3
				checkDone();
			}
		}
		if((flagDone == false) & (aWords.length>2))
		{
		//if word1+ word2 + word3 is prefix word1+ word2 + word3 into prefix, word4 into firstname
			if (aWords[0].toUpperCase() + " " + aWords[1].toUpperCase() + " " + aWords[2].toUpperCase() == aPrefixes[i].toUpperCase())
			{
				aNameSlots[0] = aWords[0] + " " + aWords[1] + " " + aWords[2]; aWordsAssigned[0] = true; aWordsAssigned[1] = true; aWordsAssigned[2] = true;
				aNameSlots[1] = aWords[3]; aWordsAssigned[3] = true;
				assignedCounter = 4
				checkDone();
			}
		}
	}
}
//if word1 not prefix it is firstname
if(flagDone == false){
	if(aWordsAssigned[0] == false){
	aNameSlots[1] = aWords[0]; aWordsAssigned[0] = true;
	assignedCounter = 1
	checkDone();
	}
}
// if only 1 left put in lastname
if(flagDone == false){
	if(assignedCounter + 1 == totalWords){
	aNameSlots[3] = aWords[aWords.length - 1]; aWordsAssigned[aWords.length - 1] = true;
	assignedCounter++
	checkDone();
	}
}
// if any word ends in comma, put first instance it into lastname or suffix as appropriate
// move comma to beginning of next word and put remaining words into suffix
if(flagDone == false){
var usedComma = false
	for(var i = 0; i < aWords.length; i++){
		if(aWords[i].charAt(aWords[i].length - 1) == "," && usedComma == false){
			// if word before comma is a suffix, move it and everything after into suffix
			var commaDealtWith = false
			for(var ii = 0; ii < aSuffixes.length; ii++){
				if(aWords[i].substr(0, aWords[i].length - 1) == aSuffixes[ii]){
				aNameSlots[4] = aWords[i];
				assignedCounter++;  aWordsAssigned[i] = true;
				aNameSlots[3] = aWords[i - 1];
				assignedCounter++;  aWordsAssigned[i - 1] = true;
					for(var iii = i + 1; iii < aWords.length; iii++){
					aNameSlots[4] = aNameSlots[4] + " " + aWords[iii];
					assignedCounter++; aWordsAssigned[iii] = true;
					}
				usedComma = true; commaDealtWith = true;
				}
			}
			// if word before comma is not suffix (commaDealtWith = false), put into lastname and move comma
			// move comma to beginning of next word and put remaining words into suffix
			if(commaDealtWith == false){
			aWords[i] = aWords[i].substr(0, aWords[i].length - 1)
			aWords[i + 1] = ", " + aWords[i + 1]
			aNameSlots[3] = aWords[i];
			assignedCounter++;  aWordsAssigned[i] = true;
			aNameSlots[4] = aWords[i + 1];
			assignedCounter++;  aWordsAssigned[i + 1] = true;
				for(var iiii = i + 2; iiii < aWords.length; iiii++){
				aNameSlots[4] = aNameSlots[4] + " " + aWords[iiii];
				assignedCounter++; aWordsAssigned[iiii] = true;
				}
			usedComma = true;
			}

		checkDone();
		}
	}
}
// if more than 1 left, and lastword not assigned, if suffix put lastword into suffix and second to last into lastname
if(flagDone == false){
	if(assignedCounter + 1 < totalWords && aWordsAssigned[aWords.length - 1] == false){
		for(var i = 0; i < aSuffixes.length; i++){
			if(aWords[aWords.length - 1].toUpperCase() == aSuffixes[i].toUpperCase()){
			aNameSlots[4] = aWords[aWords.length - 1];  aWordsAssigned[aWords.length - 1] = true;
			aNameSlots[3] = aWords[aWords.length - 2];  aWordsAssigned[aWords.length - 2] = true;
			assignedCounter = assignedCounter + 2
			checkDone();
			}
		}
	}
}
// if lastword is not yet assigned,  it is not a suffix, it is lastname
if(flagDone == false){
		if(aWordsAssigned[aWords.length - 1] == false){
			aNameSlots[3] = aWords[aWords.length - 1];  aWordsAssigned[aWords.length - 1] = true;
			assignedCounter++
			checkDone();
		}
}
// put rest into midname
if(flagDone == false){
	firstMidnameWord = 0
	for(var i = 0; i < aWords.length; i++){
		if (aWordsAssigned[i] == false){
			if(firstMidnameWord == 0){
			aNameSlots[2] = aWords[i];
			firstMidnameWord++; assignedCounter++;
			}else{
				// add expected midname word to existing midname
				aNameSlots[2] = aNameSlots[2] + " " + aWords[i];
				assignedCounter++
			}
		}
		checkDone();
	}
}
// if middlename includes a lastname prefix move it to lastname
for(var i = 0; i < aLastnamePrefixes.length; i++){
	if(aNameSlots[2].length > aLastnamePrefixes[i].length){
		if((" " + aLastnamePrefixes[i]).toUpperCase() == aNameSlots[2].substr(aNameSlots[2].length - (aLastnamePrefixes[i].length + 1) , aNameSlots[2].length).toUpperCase()){
		aNameSlots[3] = aNameSlots[2].substr(aNameSlots[2].length - (aLastnamePrefixes[i]).length, aNameSlots[2].length) + " " + aNameSlots[3];
		aNameSlots[2] = aNameSlots[2].substr(0, aNameSlots[2].length - (aLastnamePrefixes[i].length + 1));
		}
	}
	if(aNameSlots[2].length == aLastnamePrefixes[i].length){
		if(aLastnamePrefixes[i].toUpperCase() == aNameSlots[2].substr(aNameSlots[2].length - (aLastnamePrefixes[i]), aNameSlots[2].length).toUpperCase()){
		aNameSlots[3] = aNameSlots[2].substr(aNameSlots[2].length - aLastnamePrefixes[i].length) + " " + aNameSlots[3];
		aNameSlots[2] = aNameSlots[2].substr(0, aNameSlots[2].substr(aNameSlots[2].length - (aLastnamePrefixes[i] + 1)));
		}
	}
}
// put into fields
prefixObj.value = aNameSlots[0];
firstnameObj.value = aNameSlots[1];
midnameObj.value = aNameSlots[2];
lastnameObj.value = aNameSlots[3];
suffixObj.value = aNameSlots[4];


}
///// _________________ END Parses name field
</script>

</head>

<body onload="document.getElementById('User_fullname_web').focus()">

<div id="mainWrapper">
  <header>
  
		<div id="logo">
	
			
				<img class="logoimg" src="" border="0">
			
	
		</div>
    
  </header>
  
<!-- The offer section displays a banner text for promotions 
  <section id="offer"> 
  </section>
-->
  <div id="content">
  
    <section class="sidebarNarrow"> 
		<img  src="/images/cp800smalllogo.gif" alt="For support call " border="0">

		<p><a href="">Catalog login</a></p>
	</section>
    
    
    <section class="mainContent">
    
	
	
	
		<div class="accountEditContainer">
		
			<h1>Register</h1>
			
			<p><span class="accountRequiredInfoNote accountLabelBold">* Required</span></p>
			<p><span class="accountRequiredInfoNote">Enter your full name.  Name will be split to fill name parts. (If an error is made splitting the parts, please edit them.)</span></p>
	
			<form name="Register_form" method="post" action="/4dcgi/register//single/31075">
				<!--  MUST INCLUDE THIS HIDDEN VALUE in place of option to select it -->
				<input type="hidden" value="Requisition" name="User_rights_web">
			
				<div class="accountRequiredInfo">
					<label class="accountLabelBold">Full Name *</label><input type="text" id="User_fullname_web" name="User_fullname_web" size="46" value="" onChange="parseName();document.forms.Register_form.User_email_web.focus()" >
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountNameLabel">Prefix</label><input type="text" class="accountNamePart" name="User_name_prefix_web" size="30" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountNameLabel">First name *</label><input type="text" class="accountNamePart" name="User_name_first_web" size="30" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountNameLabel">Middle name</label><input type="text" class="accountNamePart" name="User_name_middle_web" size="30" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountNameLabel">Last name *</label><input type="text" class="accountNamePart" name="User_name_last_web" size="30" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountNameLabel">Suffix</label><input type="text" class="accountNamePart" name="User_name_suffix_web" size="30" value=""/>
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountLabelBold">Email address *</label><input type="text" name="User_email_web" size="46" value=""/>
				</div>
	
				<div class="accountRequiredInfo">
					<label>Web user name</label><input type="text" name="User_name_entered_web" size="30" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountLabelBold">Password *</label><input type="password" name="Password_entered_web" size="10" autocomplete="off" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountLabelBold">Re-enter password *</label><input type="password" name="Password_entered2_web" autocomplete="off" size="10" value=""/>
				</div>
	
				<div class="accountRequiredInfo">
					<label>Password reminder phrase</label><input type="text" name="Password_reminder_web" size="46" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label class="accountLabelBold">Phone *</label><input type="text" name="User_phone_web" size="30" onchange="Format_phone_hyphen(this)" value="" />
				</div>
	
				<div class="accountRequiredInfo">
					<label>Title</label><input type="text" name="User_title_web" size="30" value=""/>
				</div>
	
				<div class="accountRequiredInfo">
					<label>Company</label><input type="text" name="User_company_web" size="30" value=""/>
				</div>
	
				<div class="accountRequiredInfo">
					<label>Department</label><input type="text" name="User_department_web" size="30" value=""/>
				</div>
	
	
								
	<script>
	function Set_registration_action(Form_to_submit,Form_action,Use_catalog_ID)
	{
		Form_to_submit.ID_use_catalog_web.value=Use_catalog_ID
		Form_to_submit.action=Form_action
		Form_to_submit.submit()
	}
	</script>




	

				
				
				
				
				
				<div class="accountRequiredInfo">
					<label>Select a catalog to enter upon registration...</label><div style="display:inline-block">
					
					
					
					
					
					
					
					</div>
				</div>

				

		
				<!--<button type="submit" class="itemVariableSubmitButton" name="cvSubmit" >Submit Registration</button>-->
				<input type="submit" class="itemVariableSubmitButton" name="cvSubmit" value="Submit Registration"/>
											
	

	
			</form>
		</div>

			

    </section>
  </div>
  
  <footer> 
  		

<div>
<p>The Castle Press<br>1128 N Gilbert Street<br>Anaheim, CA 92801</p>
</div>

<div>
<p>Customer support<br></p>
</div>

<div>
<p><a href="http://castlepress.com">castlepress.com</a></p>
</div>
  </footer>
  
</div>
</body>
</html>
