
// javascript functions for the GTM profile form

// this toggles the required field designations depending on submission type selection
function updateType(val,elm,pwd,sbj) {
	var a = getRequired();
	if (val == 'new') {
		elm.style.display = ''; // show the password field
		sbj.value = 'Traveler Profile - New';
		document.getElementById('pwdrmk').style.display = '';
		for (var i=0; i<a.length; i++) {
			if (document.getElementById(a[i]).innerHTML.indexOf('*') == -1) {
				document.getElementById(a[i]).innerHTML = document.getElementById(a[i]).innerHTML + ' *';
			}
			document.getElementById(a[i]).className = 'required';
		}
	} else {
		elm.style.display = 'none'; // hide the password field
		pwd.value = ''; // clear any value currently in the password field
		sbj.value = 'Traveler Profile - Update';
		document.getElementById('pwdrmk').style.display = 'none';
		for (var i=0; i<a.length; i++) {
			if (document.getElementById(a[i]).innerHTML.indexOf('*') > -1) {
				document.getElementById(a[i]).innerHTML = document.getElementById(a[i]).innerHTML.substring(0,document.getElementById(a[i]).innerHTML.length-2);
			}
			document.getElementById(a[i]).className = '';
		}
	}
	return;
}


function toggleCountry(elm) {
	if(elm.value == 'Non-US/Canada') {
		document.getElementById('bus_country_row').style.display = '';
	} else {
		document.getElementById('bus_country').value = '';
		document.getElementById('bus_country_row').style.display = 'none';
	}
}

// functions for input filtering --------------------------------------------------------------------->

// this is run on most field's onBlur event to strip out any characters I don't like
function runFilter(elm,filter) {
	if(elm.value == '') { return; } // if the field is empty, get out
	if(elm.id == 'middle_init' || elm.id == 'home_airport' || elm.id == 'company' || elm.id == 'group_code' || elm.id.indexOf('zip') > -1) {
		var val = elm.value.toUpperCase();
			if (elm.value.substring(elm.value.length-1, elm.value.length) == ' '){//take this out if erroring
			val = val.substring(0,elm.value.length-1); //removes space at end of company 
			}
	} else {
		var val = elm.value;
	}
	
	if(elm.id == 'group_code'){	 //makes sure the Gcode is in the correct format
		if(!elm.value.match(/^^G{1}[0-9]{4}$/i)){
			alert('Your group code is invalid.'); // display an alert
		setTimeout(function(){elm.select()}, 10); // select email field
		elm.focus();
		}
		
	}
	
	
	
	var temp='', f=''; // temp is the new string, f is the filter string
	// set the filter
	switch(filter) {
		case 'alpha':
			f = ' -abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
			break;
		case 'num':
			f = '0123456789';
			break;
		case 'ccnum':
			f = '0123456789';
			break;
		case 'alphanum':
			f = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
			break;
		case 'freetext':
			f = ' _-!@#$%&*()[]{};:,.<>?0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\n';
			break;
		case 'zip':
			f = ' -0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
			break;
		case 'phone':
			f = ' .-+()0123456789';
			break;
	}
	// loop through each character from input and exclude any not in the filter string
	for(var x=0; x<=val.length; x++) {
		//alert('current character: '+val.charAt(x));
		if (f.indexOf(val.charAt(x)) != -1) {
			temp += val.substring(x,x+1);
		}
	}
	elm.value = temp; // set the input to the new value
}

function checkPwd(elm) {
	if(elm.value == '') { return; } // if the field is empty, get out
	var msg = '', temp = '';
	if (elm.value.charAt(0) == ' ' || elm.value.charAt(elm.value.length-1) == ' ') {
		msg = 'The password you entered contained one or more spaces at the beginning or end which have been removed.';
		elm.value = elm.value.replace(/^\s*|\s*$/g,"");
	}
	if(elm.value.length < 5) {
		msg += '\nYour password must be 5 - 15 characters in length.';
	}
	if(msg != '') {
		alert(msg);
		setTimeout(function setFocus(){elm.focus()}, 10); // select field
		elm.focus();
	}		
	return;
}

// this checks for correct number of digits and formatting for phone fields
function checkPhone(elm,label) {
	if(elm.value == '') { return; } // if the field is empty, get out
	// this checks phone numbers including any international according to E.164 ITU-T recommendation
	// max length is 15 digits plus \s . or - as separators, () allowed around area/region code
	if(!elm.value.match(/^(\+?[0-9]{1,3})?[\-\.\s]?(\(?[0-9]{1,3}\)?)[\-\.\s]?([0-9\-\.\s]{7,13})$/)) {
		// alert the user and return to the phone field
		alert('Your '+label+' number appears to be invalid.\n\nPlease note:\n- area code is required and may be enclosed in parenthesis ()\n- country code is optional and may be preceded by a plus +\n- number groups may be separated by a space, period or dash');
		setTimeout(function setFocus(){elm.select()}, 10);
		elm.focus();
	}
	return;
}

// this checks for a correctly formatted email address
function checkEmail(elm,label) {
	if(elm.value == '') { return; } // if the field is empty, get out
	if(!elm.value.match(/^([a-z0-9_\.\-'])+\@([a-z0-9\-\.])+(\.([a-z]{2,4}))$/i)) {
		alert('Your '+label+' appears to be invalid.'); // display an alert
		setTimeout(function(){elm.select()}, 10); // select email field
		elm.focus();
	}
	if(elm.value){ 		//make sure email address is lower case to insure
						//emailRedirect function catches all email addresses.
	elm.value = elm.value.toLowerCase();
		return true;	
	}
	return;
}

// this checks for a correctly formatted email address
function checkZip(elm,label) {
	if(elm.value == '') { return; } // if the field is empty, get out
	if(!elm.value.match(/^[0-9A-Z\s\-]{5,10}$/)) {
		alert('Your '+label+' appears to be invalid.'); // display an alert
		setTimeout(function(){elm.select()}, 10); // select email field
		elm.focus();
	}
	return;
}

// this checks credit card numbers for correct format and valid sequence using checkLuhn()
function checkCcNum(elm,label,vendor) {
	var numOk = true;
	if(elm.value == '') { return; }
	if(elm.value.match(/^10/)) { // Air Travel (TP) -> length = 15
		if(elm.value.length == 15) {
			numOk = checkLuhn(elm.value);
			if(numOk) {
				vendor.selectedIndex = 1;
			}
		} else {
			numOk = false;
		}
	} else if(elm.value.match(/^3[47]/)) { // American Express -> length = 15
		if(elm.value.length == 15) {
			numOk = checkLuhn(elm.value);
			if(numOk) {
				vendor.selectedIndex = 2;
			}
		} else {
			numOk = false;
		}
	} else if(elm.value.match(/^3[068]/)) { // Diner's -> length = 14
		if(elm.value.length == 14) {
			numOk = checkLuhn(elm.value);
			if(numOk) {
				vendor.selectedIndex = 3;
			}
		} else {
			numOk = false;
		}
	} else if(elm.value.match(/^6011/)) { // Discover -> length = 16
		if(elm.value.length == 16) {
			numOk = checkLuhn(elm.value);
			if(numOk) {
				vendor.selectedIndex = 4;
			}
		} else {
			numOk = false;
		}
	} else if(elm.value.match(/^5[1-5]/)) { // Mastercard -> length = 16
		if(elm.value.length == 16) {
			numOk = checkLuhn(elm.value);
			if(numOk) {
				vendor.selectedIndex = 5;
			}
		} else {
			numOk = false;
		}
	} else if(elm.value.match(/^4/)) { // Visa -> length = 13 or 16
		if(elm.value.length == 13 || elm.value.length == 16) {
			numOk = checkLuhn(elm.value);
			if(numOk) {
				vendor.selectedIndex = 6;
			}
		} else {
			numOk = false;
		}
	} else { // account number didn't match any of the valid patterns for the vendors
		numOk = false;
	}
	if (!numOk) {
		alert('Your '+label+' appears to be invalid.'); // display an alert
		setTimeout(function(){elm.select()}, 10); // select email field
		elm.focus();
	}
	return;
}

// this function uses the Luhn formula to check the validity of a credit card number
function checkLuhn(val) {
	var checkNums = new Array(); // this will hold array of checksum digits
	var cardLen = val.length; // length of the card number
	var checkSum = 0; // this will hold the sum of all checksum digits
	var checkNumSum, checkNumLen, temp // temp variables for adding checkNums array digits
	var digitSum = 0;
    
	// loop through account number digits backwards starting at second digit from end
	for (var i = cardLen-2; i >= 0; i = i-2) {
		checkNums.push(val.substr(i,1)*2); // multiply current digit by 2 and add to checkNums array
	}

	// loop through the checkNums array and add all individual digits together
	for (var x = 0; x <= checkNums.length-1; x++) {
		checkNumSum = 0;
		checkNumLen = 0;
		temp = checkNums[x].toString();
		for (var y = 0; y < temp.length; y++) {
			checkNumSum = sum(checkNumSum, temp.substr(y,1));
		}
		checkSum = sum(checkSum, checkNumSum); // add the new value to the total checksum
	}

	// now add all digits not used in first loop
	for (var z = cardLen-1; z >= 0; z = z-2) {
		digitSum = sum(digitSum, val.substr(z,1));
	}
	
	// add the two results together, the final result should be evenly divisible by 10
	return (((digitSum+checkSum)%10) == 0);
}

function sum(x,y) {
	// the Number() forces arguments to be added as numbers instead of concatenated as strings
	return Number(x)+Number(y);
}


// functions for final form validation ---------------------------------------------------------------->

// called when the form is submitted, central final form validation
function validateForm(f, msg) {
	// check traveler section
	if(!checkType(f.elements[8], f.elements[9], 'Submission Type')) { return false; }
	if(!checkRequired(f.trav_name, 'Traveler Name')) { return false; }
	if(!checkRequired(f.last_name, 'Last Name')) { return false; }
	if(!checkRequired(f.first_name, 'First Name')) { return false; }
	if(!checkRequired(f.email, 'Email Address')) { return false; }
	if(f.elements[8].checked) { // for new profiles only
		if(!checkRequired(f.password, 'Password')) { return false; }
	}
	if(!checkRequired(f.company, 'Company Name')) { return false; }
	if(f.elements[8].checked) { // for new profiles only
		if(parent.location.search.substring(4) == '8121') {
			if(!checkRequired(f.branch, 'Branch')) { return false; }
			if(!checkRequired(f.dept_num, 'Department Code')) { return false; }
		}
		if(parent.location.search.substring(4) == '7231') {
			if(!checkRequired(f.mgr_name, 'Manager Name')) { return false; }
			if(!checkRequired(f.mgr_email, 'Manager Email')) { return false; }
			if(!checkRequired(f.dept_num, 'Department Number')) { return false; }
			if(!checkRequired(f.emp_num, 'Employee Number')) { return false; }
			if(!checkRequired(f.cost_center_num, 'Expenditure Org')) { return false; }
		}
		if(!checkRequired(f.bus_addr_1, 'Company Street Address')) { return false; }
		if(!checkRequired(f.bus_city, 'Company City')) { return false; }
		if(!checkRequired(f.bus_state, 'Company State/Province')) { return false; }
		if(f.bus_state.value=='Non-US/Canada') {
			if(!checkRequired(f.bus_country, 'Company Country')) { return false; }
		}
		if(!checkRequired(f.bus_zip, 'Company Zip/Postal Code')) { return false; }
		if(!checkRequired(f.bus_phone_num, 'Business Phone')) { return false; }
		if(!checkRequired(f.home_airport, 'Home Airport')) { return false; }
		if(!checkRequired(f.home_phone_num, 'Home Phone Number')) { return false; }
	}
	if(!checkCcInfo(f.cc_num_1,f.cc_exp_1_mm,f.cc_exp_1_yy,'Airline Credit Card')) { return false; }
	if(!checkCcInfo(f.cc_num_2,f.cc_exp_2_mm,f.cc_exp_2_yy,'Hotel Credit Card')) { return false; }
	// confirm submit if all validation passes
	if(confirm(msg)) {
		// uncheck the copy checkboxes
		for(x=0; x<f.elements.length-1; x++) {
			f.elements[x].disabled = false;
		}
		f.cc_copy_card.checked = false;
		f.cc_copy_addr_1.checked = false;
		f.cc_copy_addr_2.checked = false;
		return true;
	} else {
		return false;
	}
}

// this is called by validateForm to ensure a submission type is selected
function checkType(n,u,label) {
	if (!n.checked && !u.checked) {
		alert('The '+label+' selection is required.');
		n.focus(); // set the focus on the new option
		return false; // cancel the form submission
	}
	return true; // field is okay
}

// this is called by validateForm for each required field, just checks for any value
function checkRequired(elm, label) {
	// alert('elm.id: ' + elm.id);
	// arguments are 1)form element id/name, 2)form element label
	if(elm.value == '') { // the required field is empty
		alert('The '+label+' field is required.'); // alert the user
		elm.focus(); // set the focus on the required field
		return false; // cancel the form submission
	}
	return true; // field is okay
}

// check to make sure an expiration date has been entered and is not past date
function checkCcInfo(num,mm,yy,label) {
	var now = new Date();
	if (num.value != '') {
		// make sure a valid expiration date was entered
		if (mm.selectedIndex == 0 && yy.selectedIndex == 0) {
			alert('You must select an expiration month and year for your '+label+'.');
			mm.focus();
			return false;
		}
		if (mm.selectedIndex == 0) {
			alert('You must select an expiration month for your '+label+'.');
			mm.focus();
			return false;
		} else {
			// if the month is selected, check for a year and make sure the selected month is not past date
			if (yy.value == now.getFullYear()) {
				if (mm.value != '' && Number(mm.value.substr(0,2)) < now.getMonth()+1) {
					alert('The expiration date you\'ve entered for your '+label+' is past date.'); // display an alert
					mm.focus(); // select date field
					return false;
				}
			}
		}
		if (yy.selectedIndex == 0) {
			alert('You must select an expiration year for your '+label+'.');
			yy.focus();
			return false;
		}
	}
	return true;
}


// functions for date fields --------------------------------------------------------------------->

function updateDate(m,d,y) {
	// m is the month, d is the date, y is the year
	var val = document.getElementById(m).value;
		switch (val) {
			case '01':
				appendDays(31,d);
				break;
			case '02':
				if(document.getElementById(y).value!='') {
					var r = document.getElementById(y).value%4;
					if(r==0) {
						appendDays(29,d);
					} else {
						appendDays(28,d);
					}
				} else {
					appendDays(28,d);
				}
				break;
				appendDays(28,d);
				break;
			case '03':
				appendDays(31,d);
				break;
			case '04':
				appendDays(30,d);
				break;
			case '05':
				appendDays(31,d);
				break;
			case '06':
				appendDays(30,d);
				break;
			case '07':
				appendDays(31,d);
				break;
			case '08':
				appendDays(31,d);
				break;
			case '09':
				appendDays(30,d);
				break;
			case '10':
				appendDays(31,d);
				break;
			case '11':
				appendDays(30,d);
				break;
			case '12':
				appendDays(31,d);
				break;
		}
}

function appendDays(z,x){
	z=z+1
	var iv;
	var l = document.getElementById(x).options.length;
	if(z > l) {
		// add additional days to the menu
		for(i=l; i<z; i++) {
			if(i.length==1) {
				iv = '0'+i;
			} else {
				iv = i;
			}
			var o = new Option(iv, i, false, false);
			document.getElementById(x).options[i] = o;
		}
	} else {
		// remove invalid days from the menu
		// if date selected is removed, select last day on list
		if(document.getElementById(x).selectedIndex > z-1) {
			document.getElementById(x).options.length = z;
			document.getElementById(x).selectedIndex = z-1;
		} else {
			document.getElementById(x).options.length = z;
		}
	}
}

// functions for miscellaneous operations -----------------------------------------------------------

function exitNew() {
	var c = confirm('Discard your profile?\n\nNo information will be submitted.\n\n');
	if(c) {
		window.parent.location = 'http://www.gtmtravel.com';
	}
	return;
}

function clearForm(f) {
	var c = confirm('Clear the form?');
	if(c) {
		for (var x = 0; x < f.elements.length; x++) {
			f.elements[x].disabled = false;
		}
		updateType('new',document.getElementById('password_row'),f.password,f.subject);
		return true;
	} else {
		return false;
	}
}

function updateCheckbox(elm, box) {
	if(elm.value != '') {
		box.disabled = false;
	} else {
		box.checked = false;
		box.disabled = true;
	}
}

function copyField(val1, val2, ok1, val3, ok2) {
	if(ok1) {
		val2.value = val1.value;
	}
	if(ok2) {
		val3.value = val1.value;
	}
}

function getCoords(w, h) {
	// this function gets coordinates to center a window on the screen based on the
	// width and height of the window as passed into the function
	// coords are returned as 'x,y' and must be split apart
	var x, y;
	if(!document.all) {
		x = (self.screen.width - w) / 2;
		y = (self.screen.height - h) / 2;
	} else {
		x = (self.screen.width - w) / 2;
		y = (self.screen.height - h) / 2;
	}
	var z = x+','+y;
	return z;
}

function changePwd(w,h) {
	//open a new window
	var z = getCoords(w, h).split(',');
	var x = z[0];
	var y = z[1];
	pwd = window.open('change_pwd.php','pwd','menubar=no,scrollbars=yes,width='+w+',height='+h+',screenx='+x+',screeny='+y+',left='+x+',top='+y);
}

function copyCC() {
	if(document.getElementById('cc_copy_card').checked) {
		document.getElementById('cc_type_2').selectedIndex = document.getElementById('cc_type_1').selectedIndex;
		document.getElementById('cc_type_2').disabled = true;
		document.getElementById('cc_num_2').value = document.getElementById('cc_num_1').value;
		document.getElementById('cc_num_2').disabled = true;
		document.getElementById('cc_exp_2_mm').selectedIndex = document.getElementById('cc_exp_1_mm').selectedIndex;
		document.getElementById('cc_exp_2_mm').disabled = true;
		document.getElementById('cc_exp_2_yy').selectedIndex = document.getElementById('cc_exp_1_yy').selectedIndex;
		document.getElementById('cc_exp_2_yy').disabled = true;
		document.getElementById('cc_code_2').value = document.getElementById('cc_code_1').value;
		document.getElementById('cc_code_2').disabled = true;
		document.getElementById('cc_lname_2').value = document.getElementById('cc_lname_1').value;
		document.getElementById('cc_lname_2').disabled = true;
		document.getElementById('cc_fname_2').value = document.getElementById('cc_fname_1').value;
		document.getElementById('cc_fname_2').disabled = true;
		document.getElementById('cc_addr_2').value = document.getElementById('cc_addr_1').value;
		document.getElementById('cc_addr_2').disabled = true;
		document.getElementById('cc_city_2').value = document.getElementById('cc_city_1').value;
		document.getElementById('cc_city_2').disabled = true;
		document.getElementById('cc_state_2').selectedIndex = document.getElementById('cc_state_1').selectedIndex;
		document.getElementById('cc_state_2').disabled = true;
		document.getElementById('cc_zip_2').value = document.getElementById('cc_zip_1').value;
		document.getElementById('cc_zip_2').disabled = true;
		document.getElementById('cc_copy_addr_2').checked = true;
		document.getElementById('cc_copy_addr_2').disabled = true;
	} else {
		document.getElementById('cc_type_2').selectedIndex = 0;
		document.getElementById('cc_type_2').disabled = false;
		document.getElementById('cc_num_2').value = '';
		document.getElementById('cc_num_2').disabled = false;
		document.getElementById('cc_exp_2_mm').selectedIndex = 0;
		document.getElementById('cc_exp_2_mm').disabled = false;
		document.getElementById('cc_exp_2_yy').selectedIndex = 0;
		document.getElementById('cc_exp_2_yy').disabled = false;
		document.getElementById('cc_code_2').value = '';
		document.getElementById('cc_code_2').disabled = false;
		document.getElementById('cc_lname_2').value = '';
		document.getElementById('cc_lname_2').disabled = false;
		document.getElementById('cc_fname_2').value = '';
		document.getElementById('cc_fname_2').disabled = false;
		document.getElementById('cc_addr_2').value = '';
		document.getElementById('cc_addr_2').disabled = false;
		document.getElementById('cc_city_2').value = '';
		document.getElementById('cc_city_2').disabled = false;
		document.getElementById('cc_state_2').selectedIndex = 0;
		document.getElementById('cc_state_2').disabled = false;
		document.getElementById('cc_zip_2').value = '';
		document.getElementById('cc_zip_2').disabled = false;
		document.getElementById('cc_copy_addr_2').checked = false;
		document.getElementById('cc_copy_addr_2').disabled = false;
	}
}

function copyHotelCC(x) {
	if(document.getElementById('cc_copy_card').checked) {
		if(!x) {
			document.getElementById('cc_addr_2').value = '';
			document.getElementById('cc_city_2').value = '';
			document.getElementById('cc_state_2').selectedIndex = 0;
			document.getElementById('cc_zip_2').value = '';
			document.getElementById('cc_copy_addr_2').checked = false;
		} else {
			document.getElementById('cc_addr_2').value = document.getElementById('cc_addr_1').value;
			document.getElementById('cc_city_2').value = document.getElementById('cc_city_1').value;
			document.getElementById('cc_state_2').selectedIndex = document.getElementById('cc_state_1').selectedIndex;
			document.getElementById('cc_zip_2').value = document.getElementById('cc_zip_1').value;
			document.getElementById('cc_copy_addr_2').checked = true;
		}
	}
}

function copyAddr(x) {
	if(document.getElementById('cc_copy_addr_'+x).checked) {
		document.getElementById('cc_addr_'+x).value = document.getElementById('bus_addr_1').value;
		document.getElementById('cc_addr_'+x).disabled = true;
		document.getElementById('cc_city_'+x).value = document.getElementById('bus_city').value;
		document.getElementById('cc_city_'+x).disabled = true;
		document.getElementById('cc_state_'+x).selectedIndex = document.getElementById('bus_state').selectedIndex;
		document.getElementById('cc_state_'+x).disabled = true;
		document.getElementById('cc_zip_'+x).value = document.getElementById('bus_zip').value;
		document.getElementById('cc_zip_'+x).disabled = true;
	} else {
		document.getElementById('cc_addr_'+x).disabled = false;
		document.getElementById('cc_addr_'+x).value = '';
		document.getElementById('cc_city_'+x).disabled = false;
		document.getElementById('cc_city_'+x).value = '';
		document.getElementById('cc_state_'+x).disabled = false;
		document.getElementById('cc_state_'+x).value = '';
		document.getElementById('cc_zip_'+x).disabled = false;
		document.getElementById('cc_zip_'+x).value = '';
	}
}

function setOptionIndex(elm, val) {
	var i
	var s = document.getElementById(elm);
	for (i=0; i<s.options.length; i++) {
		if(s.options[i].value == val) {
			s.selectedIndex = i;
		}
	}
}

// functions to redirect for alternate forms ---------------------------------------------------------->
function compRedirect(val) { //add State auto after you take the "Q" live
	var ln = document.getElementById('last_name').value;
	var fn = document.getElementById('first_name').value;
	var mi = document.getElementById('middle_init').value;
	var sf = document.getElementById('suffix').value;
	var em = document.getElementById('email').value;
	var co = val;
	//var redirectOk = true;
	//var at = val.indexOf('@');
	// alert('domain: ' + val.substring(at));
	if (co == 'FMC TECHNOLOGIES') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the FMC TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('FMC travelers do not need to complete this form.\n\nPlease click "OK" to submit your name and email address so your TechTravel account can be set up.');
			var name = fn+' '+ln;
			window.location = 'https://www.gtmtravel.com/fmc_confirm.php?'+encodeURI('nm='+name+'&em='+em+'&co='+co);
		}
	}
	
	if (co == 'STATE AUTO' || co == 'STATEAUTO' || co == 'STATE AUTO INSURANCE') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/travelerTools/traveler_profile_v2_07.php?id=8121';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/travelerTools/traveler_profile_v2_07.php?id=8121'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (co == 'WORTHINGTON INDUSTRIES' || co == 'DIETRICH INDUSTRIES' || co == 'WORTHINGTON STEEL' || co == 'DIETRICH DESIGN GROUP' || co == 'DIETRICH SYSTEMS' || co == 'ARMSTRONG' || co == 'WORTHINGTON INTEGRATED BUILDING SYSTEMS' || co == 'WORTHINGTON IBSY' || co == 'WORTHINGTON' || co == 'ACCELERATED BUILDING TECHNOLOGIES') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C8155&company=WORTHINGTON%20INDUSTRIES&subsite=WORTHINGTON&bar=WORTHINGTON'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

	if (co == 'BOWNE') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			var name = fn+' '+ln;
			window.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C7297&company=BOWNE&subsite=BOWNE&bar=BOWNE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em+'&co='+co);
		}
	}	

	
		if (co == 'AMERICAN EAGLE' || co  == 'AE' || co == 'MARTIN AND OSA' || co == 'AERIE' || co == 'AMERICAN EAGLE OUTFITTERS') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your Cost Center number and your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for American Eagle Outfitters&BODY=Be sure to include your Cost Center number and your full legal name as shown on your government ID for travel security purposes.';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
	
/*		if (co == 'MEDRAD') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your Cost Center number and your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for American Eagle Outfitters&BODY=Be sure to include your Cost Center number and your full legal name as shown on your government ID for travel security purposes.';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
*/	
		if (co == 'SSCI' || co == 'SYSTEMS AND SOFTWARE CONSORTIUM') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for SSCI';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}

		if (co == 'MARKETBRIDGE' || co == 'MARKET BRIDGE') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Market-Bridge';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
		if (co == 'CADILLACJACK' || co == 'CADILLAC JACK' || co == 'CADILLAC-JACK') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Cadillac Jack';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
		if (co == 'CROWNCASTLE' || co == 'CROWN CASTLE' || co == 'CROWN-CASTLE' || co == 'CROWN CASTLE INTERNATIONAL') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Crown Castle';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
	
			if (co == 'MED3000' || co == 'INTEGREAT') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for MED3000';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}


			if (co == 'CONFLUENCE' || co == 'CONFLUENCE TECHNOLOGIES INC') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Confluence';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}

			if (co == 'CONFLUENCE' || co == 'CONFLUENCE TECHNOLOGIES INC') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Confluence';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}

	
		if (co == 'CELGENE') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C7261&company=CELGENE&subsite=CELGENE&bar=CELGENE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'TEGRANT') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C1959&company=TEGRANT&subsite=TEGRANT&bar=TEGRANT'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'DCS CORPORATION' || co == 'DCS CORP' || co == 'DCSCORP' || co == 'DCS') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5779&company=DCS&subsite=DCS&bar=DCS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'DORMA' || co == 'DORMA GROUP' || co == 'DORMA MODERNFOLD' || co == 'MODERNFOLD'|| co == 'CAROLINADOOR' || co == 'CAROLINA DOOR') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8118&company=DORMA%20GROUP&subsite=DORMA&bar=DORMA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}	
	if (co == 'DORMA MODERNFOLD' || co == 'MODERNFOLD') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=A10&company=DORMA%20MODERNFOLD&subsite=DORMA&bar=DORMA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}	

		if (co == 'DGI-MENARD' || co == 'DGI MENARD' || co == 'DGI') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5785&company=DGI%20MENARD&subsite=DGIGTM&bar=DGI'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
		if (co == 'UTI' || co == 'UTI WORLDWIDE' || co == 'UTI INTEGRATED SERVICES' || co == 'UTI INTEGRATED LOGISTICS') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5765&company=UTI&subsite=UTI&bar=UTI'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
		if (co == 'AZTECA' || co == 'AZTECA SYSTEMS' || co == 'AZTECA FOODS INC' || co == 'AZTECA FOODS') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C4202&company=AZTECA&subsite=AZTECA&bar=AZTECA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
		if (co == 'MICRO FOCUS' || co == 'MICROFOCUS') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5697&company=MICROFOCUS&subsite=MICROFOCUS&bar=MICROFOCUS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
		if (co == 'HAIER AMERICA TRADING' || co == 'HAIER AMERICA' || co == 'HAIER') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C7402&company=HAIER%20AMERICA%20TRADING%20LLC&subsite=HAIERGTM&bar=HAIER'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'CONVERTEAM') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C8159&company=CONVERTEAM&subsite=CONVERTEAM&bar=CONVERTEAM'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'CARDINAL' || co == 'CARDINAL LOGISTICS MANAGEMENT CORPORATION' || co == 'CARDINAL LOGISTICSS') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C5771&company=CARDINAL%20LOGISTICS&subsite=CARDINAL&bar=CARDINAL'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'PEPPERWEED' || co == 'PEPPERWEED CONSULTING') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C5772&company=PEPPERWEED%20CONSULTING&subsite=PEPPERWEED&bar=PEPPERWEED'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'AURORA' || co == 'AURORA FLIGHT SIENCES' || co == 'AURORA FLIGHT SIENCES CORPORATION') {
		var update = document.profile.elements[9].checked;
		//alert('sel: '+sel);
		if (update) { // update
			// use this until profiles are loaded into getThere
			// alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// window.parent.location = 'https://www.gtmtravel.com/profiles/default.php';
			// use this after profiles are loaded into getThere
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C5773&company=AURORA%20FLIGHT%20SCIENCES&subsite=AURORA&bar=AURORA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'WHITE CASTLE' || co == 'WHITECASTLE') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the White Castle TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('White Castle travelers do not need to complete this form.\n\nPlease click "OK" to submit your name and email address so your TechTravel account can be set up.');
			// var email = document.getElementById('Email_Address').value;
			//var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8162&company=WHITE%20CASTLE&subsite=WHITECASTLE&bar=WHITE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'DHI' || co == 'DEFENSE HOLDINGS') { //emailRedirect for Defense Holdings
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Defense Holdings TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5782&company=DEFENSE%20HOLDINGS&subsite=DHI&bar=DEFENSE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'UNION SWITCH AND SIGNAL' || co == 'UNION SWITCH' || co == 'UNION SWITCH & SIGNAL') { //emailRedirect for Union Switch & Signal
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Union Switch & Signal TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Union Switch & Signal travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8165&company=UNION%20SWITCH&subsite=SWITCH&bar=SWITCH'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'BAL' || co == 'BURDESHAW ASSOCIATES' || co == 'BURDESHAW') { //emailRedirect for Burdeshaw 
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Burdeshaw Associates TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Burdeshaw Associates travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5783&company=BURDESHAW%20ASSOCIATES&subsite=BURDESHAW&bar=BURDESHAW'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'DICK CORPORATION' || co == 'DICK CONSTRUCTION COMPANY' || co == 'DICK CORP') { //emailRedirect for dick corp 
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Dick Construction Company TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Dick Construction Company travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5741&company=DICK%20CONSTRUCTION%20COMPANY&subsite=DCC&bar=DCC'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'LADISH COMPANY' || co == 'LADISH' || co == 'LADISH CO') { //emailRedirect for Ladish Company
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Ladish Company TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Ladish Company travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C4201&company=LADISH%20COMPANY&subsite=LADISH&bar=LADISH'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	if (co == 'TIS' || co == 'TECHNOLOGY INFRASTRUCTURE SOLUTIONS' || co == 'TECHNOLOGY INFRASTRUCTURE') { //emailRedirect for Technology Infrastructure
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the TIS Company TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('TIS must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C7294&company=TECHNOLOGY%20INFRASTRUCTURE%20SOLUTIONS&subsite=TIGTM&bar=INFRASTRUCTURE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (co == 'SYDESIS' || co == 'SUBEX AZURE' || co == 'SUBEXAZURE') { //emailRedirect for Sydesis
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Subex Azure Company TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Subex Azure travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5399&company=SYNDESIS&subsite=SYNDESISGTM&bar=SYNDESIS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

	if (co == 'BYSTRONIC') { //emailRedirect for Bystronic
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the BystronicCompany TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Bystronic travlers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8161&company=BYSTRONIC%20INC&subsite=BYSTRONICGTM&bar=BYSTRONIC'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

		if (co == 'UNITED STEEL WORKERS' || co == 'USW') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the United Steel Workers TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('United Steel travelers do not need to complete this form.\n\nPlease click "OK" to submit your name and email address so your TechTravel account can be set up.');
			// var email = document.getElementById('Email_Address').value;
			//var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5482&company=UNITED%20STEELWORKERS&subsite=USW&bar=USW'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}



		if (co == 'HORTY SPRINGER & MATTERN' || co == 'HORTY SPRINGER AND MATTERN' || co == 'HORTY SPRINGER' || co == 'HORTYSPRINGER') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Horty Spriner and Mattern TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Horty Spriner and Mattern travelers do not need to complete this form.\n\nPlease click "OK" to submit your name and email address so your TechTravel account can be set up.');
			// var email = document.getElementById('Email_Address').value;
			//var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8169&company=HORTY%20SPRINGER%20AND%20MATTERN%20PC&subsite=HORTY&bar=HORTY'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
/*		if (co == 'ORBIS' || co == 'ORBIS CORPORATION') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Orbis Corporation TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Orbis Corporation travelers do not need to complete this form.\n\nPlease click "OK" to submit your name and email address so your TechTravel account can be set up.');
			// var email = document.getElementById('Email_Address').value;
			//var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8092&company=ORBIS&subsite=ORBISGTM&bar=ORBIS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

*/	
	

	if (co == 'MONTAUK' || co == 'MONTAUK ENERGY CAPITAL' || co == 'MONTAUK ENERGY') { //emailRedirect for MONTAUK
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Montauk TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Montauk travlers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C1713&company=MONTAUK%20ENERGY%20CAPITAL&subsite=MONTAUK&bar=MONTAUK'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
}




function emailRedirect(val) {
	var ln = document.getElementById('last_name').value;
	var fn = document.getElementById('first_name').value;
	var mi = document.getElementById('middle_init').value;
	var sf = document.getElementById('suffix').value;
	var em = val;
	var redirectOk = true;
	var at = val.indexOf('@');
	// alert('domain: ' + val.substring(at));
	if (em.substring(at) == '@fmcti.com') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the FMC TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('FMC travelers do not need to complete this form.\n\nPlease click "OK" to submit your name and email address so your TechTravel account can be set up.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.location = 'https://www.gtmtravel.com/fmc_confirm.php?'+encodeURI('nm='+name+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@worthingtonindustries.com' || val.substring(at).toLowerCase() == '@dietrichindustries.com' || val.substring(at).toLowerCase() == '@twbcompany.com' || val.substring(at).toLowerCase() == '@dietrichdesigngroup.com' || val.substring(at).toLowerCase() == '@dietrichsystems.com' || val.substring(at).toLowerCase() == '@armstrong.com' || val.substring(at).toLowerCase() == '@worthingtonibs.com' || val.substring(at).toLowerCase() == '@accbt.com' || val.substring(at).toLowerCase() == '@worthingtonsteel.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C8155&company=WORTHINGTON%20INDUSTRIES&subsite=WORTHINGTON&bar=WORTHINGTON'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@stateauto.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/travelerTools/traveler_profile_v2_07.php?id=8121';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/travelerTools/traveler_profile_v2_07.php?id=8121'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@bowne.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C7297&company=BOWNE&subsite=BOWNE&bar=BOWNE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@usw.org') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5482&company=UNITED%20STEELWORKERS&subsite=USW&bar=USW'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

	if (em.substring(at).toLowerCase() == '@chesterengineers.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5787&company=CHESTER%20ENGINEER&subsite=CHESTER&bar=CHESTER'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

		if (em.substring(at).toLowerCase() == '@carnegiesciencecenter.org' || val.substring(at).toLowerCase() == '@warhol.org' || val.substring(at).toLowerCase() == '@cmoa.org' || val.substring(at).toLowerCase() == '@carnegiemnh.org') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Carnegie Museums of History&BODY=Be sure to include your full legal name as shown on your government ID for travel security purposes.';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
		if (em.substring(at).toLowerCase() == '@confluence.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Confluence&BODY=Be sure to include your full legal name as shown on your government ID for travel security purposes.';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}

		
		if (em.substring(at).toLowerCase() == '@ae.com'|| val.substring(at).toLowerCase() == '@martinandosa.com'|| val.substring(at).toLowerCase() == '@aerie.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your Cost Center number and your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for American Eagle Outfitters&BODY=Be sure to include your Cost Center number and your full legal name as shown on your government ID for travel security purposes.';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
	
/*		if (em.substring(at).toLowerCase() == '@medrad.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Medrad&BODY=Be sure to include your full legal name as shown on your government ID for travel security purposes.';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
*/
	
		if (em.substring(at).toLowerCase() == '@systemsandsoftware.org') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for SSCI';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}

		if (em.substring(at).toLowerCase() == '@market-bridge.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Market Bridge';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}

		if (em.substring(at).toLowerCase() == '@cadillacjack.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Cadillac Jack';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}
	
		if (em.substring(at).toLowerCase() == '@med3000.com'|| val.substring(at).toLowerCase() == '@psapath.com'|| val.substring(at).toLowerCase() == '@integreat.com'|| val.substring(at).toLowerCase() == '@igreat.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for MED3000';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}


		if (em.substring(at).toLowerCase() == '@crowncastle.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		} else { // new
			alert('You must complete your profile by logging in to your online booking account.\n\nPlease email MIS@gtmtravel.com and you will recieve a link to complete your profile.\n\nBe sure to include your full legal name as shown on your government ID for travel security purposes.');
			location.href='mailto:mis@gtmtravel.com?SUBJECT=CliqBook Log-in Information Request for Crown Castle';
			window.parent.location = 'https://app2.outtask.com/default.asp?host=gtmtravel';
		}
	}

	
		if (em.substring(at).toLowerCase() == '@celgene.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C7261&company=CELGENE&subsite=CELGENE&bar=CELGENE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}


	
	if (em.substring(at).toLowerCase() == '@tegrant.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C1959&company=TEGRANT&subsite=TEGRANT&bar=TEGRANT'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

	if (em.substring(at).toLowerCase() == '@montaukenergy.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C1713&company=MONTAUK%20ENERGY%20CAPITAL&subsite=MONTAUK&bar=MONTAUK'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

	if (em.substring(at).toLowerCase() == '@dcscorp.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5779&company=DCS&subsite=DCS&bar=DCS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
		if (em.substring(at).toLowerCase() == '@hortyspringer.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8169&company=HORTY%20SPRINGER%20AND%20MATTERN%20PC&subsite=HORTY&bar=HORTY'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

	
	
//will this catch both dorma group AND modernfold...?  
	if (em.substring(at).toLowerCase() == '@dorma-usa.com' || val.substring(at).toLowerCase() == '@carolinadoor.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8118&company=DORMA%20GROUP&subsite=DORMA&bar=DORMA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}	
		if (em.substring(at).toLowerCase() == '@modernfold.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=A10&company=DORMA%20MODERNFOLD&subsite=DORMA&bar=DORMA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}	


/*	if (em.substring(at).toLowerCase() == '@medrad.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8083&company=MEDRAD&subsite=MEDRAD&bar=MEDRAD'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}*/

		if (em.substring(at).toLowerCase() == '@dgi-menard.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5785&company=DGI%20MENARD&subsite=DGIGTM&bar=DGI'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

		if (em.substring(at).toLowerCase() == '@go2uti.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5765&company=UTI&subsite=UTI&bar=UTI'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
		if (em.substring(at).toLowerCase() == '@azteca.com'|| val.substring(at).toLowerCase() == '@aztecafoods.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C4202&company=AZTECA&subsite=AZTECA&bar=AZTECA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
		if (em.substring(at).toLowerCase() == '@microfocus.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5697&company=MICROFOCUS&subsite=MICROFOCUS&bar=MICROFOCUS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
		if (em.substring(at).toLowerCase() == '@haieramerica.com') { 
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C7402&company=HAIER%20AMERICA%20TRADING%20LLC&subsite=HAIERGTM&bar=HAIER'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

	if (em.substring(at).toLowerCase() == '@converteam.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C8159&company=CONVERTEAM&subsite=CONVERTEAM&bar=CONVERTEAM'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@cardlog.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C5771&company=CARDINAL%20LOGISTICS&subsite=CARDINAL&bar=CARDINAL'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@pepperweed.com') {
		var update = document.profile.elements[9].checked;
		if (update) { // update
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C5772&company=PEPPERWEED%20CONSULTING&subsite=PEPPERWEED&bar=PEPPERWEED'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@aurora.aero') {
		var update = document.profile.elements[9].checked;
		//alert('sel: '+sel);
		if (update) { // update
			// use this until profiles are loaded into getThere
			// alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// window.parent.location = 'https://www.gtmtravel.com/profiles/default.php';
			// use this after profiles are loaded into getThere
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the online booking login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else { // new
			alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			window.parent.location = 'https://www.gtmtravel.com/profiles/default.php?type=new&aid=C5773&company=AURORA%20FLIGHT%20SCIENCES&subsite=AURORA&bar=AURORA'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at) == '@whitecastle.com') {
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the White Castle TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('White Castle travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8162&company=WHITE%20CASTLE&subsite=WHITECASTLE&bar=WHITE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	
	if (em.substring(at) == '@dh-inc.com') { //emailRedirect for Defense Holdings
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Defense Holdings TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Defense Holdings travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5782&company=DEFENSE%20HOLDINGS&subsite=DHI&bar=DEFENSE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at) == '@switch.com' || val.substring(at).toLowerCase() == '@exchptc1.switch.com') { //emailRedirect for Union Switch & Signal
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Union Switch & Signal TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Union Switch & Signal travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8165&company=UNION%20SWITCH&subsite=SWITCH&bar=SWITCH'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at).toLowerCase() == '@burdeshaw.com') { //emailRedirect for Burdeshaw 
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Burdeshaw Associates TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Burdeshaw Associates travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5783&company=BURDESHAW%20ASSOCIATES&subsite=BURDESHAW&bar=BURDESHAW'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	
	if (em.substring(at).toLowerCase() == '@dickcorp.com') { //emailRedirect for dick corp 
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Dick Construction Company TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Dick Construction Company travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5741&company=DICK%20CONSTRUCTION%20COMPANY&subsite=DCC&bar=DCC'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
/*	if (em.substring(at).toLowerCase() == '@orbiscorporation.com') { //emailRedirect for orbis 
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Orbis Company TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Dick Construction Company travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8092&company=ORBIS&subsite=ORBISGTM&bar=ORBIS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
*/	

	if (em.substring(at) == '@ladishco.com') { //emailRedirect for Ladish Company
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Ladish Company TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Ladish Company travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C4201&company=LADISH%20COMPANY&subsite=LADISH&bar=LADISH'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at) == '@subexazure.com') { //emailRedirect for Sydesis
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Subex Azure TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Subex Azure travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C5399&company=SYNDESIS&subsite=SYNDESISGTM&bar=SYNDESIS'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at) == '@bystronic.com') { //emailRedirect for Bystronic
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Bystronic TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Bystronic travelers must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C8161&company=BYSTRONIC%20INC&subsite=BYSTRONICGTM&bar=BYSTRONIC'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}
	
	if (em.substring(at) == '@deploytis.com') { //emailRedirect for Technological Infrastructure Solutions
		var update = document.profile.elements[9].checked;
		if(update) {
			alert('You must update your profile by logging in to your online booking account and clicking the \'Profile\' link.\n\nYou will be automatically redirected to the Technological Infrastructure Solutions TechTravel login page when you click \'OK\'.');
			window.parent.location = 'https://wx1.getthere.net/DispatcherServlet?requestType=logininq&site=gtmdirect';
		} else {
			alert('Technological Infrastructure Solutions travelersmust complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
			// var email = document.getElementById('Email_Address').value;
			var name = fn+' '+ln;
			window.parent.location = 'https://www.gtmtravel.com/profiles/php/edit_profile.php?type=new&aid=C7294&company=TECHNOLOGY%20INFRASTRUCTURE%20SOLUTIONS&subsite=TIGTM&bar=INFRASTRUCTURE'+encodeURI('&ln='+ln+'&fn='+fn+'&mi='+mi+'&sf='+sf+'&em='+em);
		}
	}

//	if (val.substring(at) == '@vcf.com') {
//		alert('You must complete an alternate form.\n\nYou will be automatically redirected to that form when you click \'OK\'.');
//		window.location = 'https://www.gtmtravel.com/forms/signature/index.html';
//	}
}

