
function checkState(field) {
	field.state.value = field.state.value.toUpperCase();
	if (field.state.value == "PR") {
		var firmname = 'firmname=' + field.firmname.value;
		var address1 = '&address1=' + field.address1.value;
		var address2 = '&address2=' + field.address2.value;
		var city = '&city=' + field.city.value;
		var state = '&state=' + field.state.value;
		var zip5 = '&zip5=' + field.zip5.value;
		var urbanization = '&urbanization=' + field.urbanization.value;
		var url = 'welcome.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
		top.location.replace(url);
	}
	return true;
}


function checkStateError(field) {
	field.state.value = field.state.value.toUpperCase();
	if (field.state.value == "PR") {
		var firmname = 'firmname=' + field.firmname.value;
		var address1 = '&address1=' + field.address1.value;
		var address2 = '&address2=' + field.address2.value;
		var city = '&city=' + field.city.value;
		var state = '&state=' + field.state.value;
		var zip5 = '&zip5=' + field.zip5.value;
		var urbanization = '&urbanization=' + field.urbanization.value;
		var url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
		top.location.replace(url);
	}
	return true;
}

function checkStateSysError(field) {
	field.state.value = field.state.value.toUpperCase();
	if (field.state.value == "PR") {
		var firmname = 'firmname=' + field.firmname.value;
		var address1 = '&address1=' + field.address1.value;
		var address2 = '&address2=' + field.address2.value;
		var city = '&city=' + field.city.value;
		var state = '&state=' + field.state.value;
		var zip5 = '&zip5=' + field.zip5.value;
		var urbanization = '&urbanization=' + field.urbanization.value;
		var url = 'zcl_0_landing_sys_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
		top.location.replace(url);
	}
	return true;
}


function statePopup(mylink, windowname) {
	if (! window.focus) {
		return true;
	}
	var mywin, href;
	if (typeof(mylink) == 'string') {
		href=mylink;
	} else {
		href=mylink.href;
	}
	mywin = window.open(href, windowname, 'width=240, height=270, left=400, top=100, resizable=1, menubar=0, toolbar=0, location=0, personalbar=0, status=0, scrollbars=0');
	mywin.focus();

	return false;
}


function validate_for_integers(inputfield, inputevent, zipcode) {
	var key;
	var keychar;

	if (zipcode.value.length == 5) {
		if (window.event) {
			key = window.event.keyCode;
		} else if (inputevent) {
			key = inputevent.which;
		} else {
			return true;
		}

		keychar = String.fromCharCode(key);
		// control keys
		if ((key==null) || (key==0) || (key==8) ||
    			(key==9) || (key==13) || (key==27)) {
			return true;

		// numbers
		} else if (("0123456789-").indexOf(keychar) > -1) {
			return true;
		} else {
			return false;
		}
	} else {
		if (window.event) {
			key = window.event.keyCode;
		} else if (inputevent) {
			key = inputevent.which;
		} else {
			return true;
		}

		keychar = String.fromCharCode(key);
		// control keys
		if ((key==null) || (key==0) || (key==8) ||
    			(key==9) || (key==13) || (key==27)) {
			return true;

		// numbers
		} else if (("0123456789").indexOf(keychar) > -1) {
			return true;
			
		} else {
			return false;
		}
	}
} // end of validate_for_integers()


function validate_for_characters(inputfield, inputevent) {
	var key;
	var keychar;

	if (window.event) {
		key = window.event.keyCode;
	} else if (inputevent) {
		key = inputevent.which;
	} else {
		return true;
	}

	keychar = String.fromCharCode(key);
	// control keys
	if ((key==null) || (key==0) || (key==8) ||
		(key==9) || (key==13) || (key==27)) {
		return true;

	// characters
	} else if (("0123456789").indexOf(keychar) > -1) {
		return false; 
	} else {
		return true;
	}
} // end of validate_for_characters()


function checkFields (field) {
	var firmname = 'firmname=' + field.firmname.value;
	var address1 = '&address1=' + field.address1.value;
	var address2 = '&address2=' + field.address2.value;
	var city = '&city=' + field.city.value;
	var state = '&state=' + field.state.value;
	var zip5 = '&zip5=' + field.zip5.value;
	var urbanization = '&urbanization=' + field.urbanization.value;
	var ok = true;

	if (field.zip5.value == "0") {
		if (field.address2.value.length == 0) {
			url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
			ok = false;
		}

		if ((field.city.value.length == 0)) {
			url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
			ok = false;
		} else {
			field.zip5.value = "";
		}
	} else {

		if (field.address2.value.length == 0) {
			url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
			ok = false;
		}

		if (field.zip5.value.length != 0) { 
			if (field.zip5.value.length < 5) {
				url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
				ok = false;
			}
		}
	
		if ((field.city.value.length == 0) && (field.state.value.length == 0)) {
			if (field.zip5.value.length < 5) {
				url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
				ok = false;
			}
		}

		if ((field.city.value.length == 0) || (field.state.value.length == 0)) {
			if (field.zip5.value.length < 5) {
				url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
				ok = false;
			};
		}

		if (field.state.value != 'PR') {
			field.urbanization.value = "";
		}

		if ((field.state.value != 'AL') &&
			(field.state.value != 'AK') &&
			(field.state.value != 'AS') &&
			(field.state.value != 'AZ') &&
			(field.state.value != 'AR') &&
			(field.state.value != 'CA') &&
			(field.state.value != 'CO') &&
			(field.state.value != 'CT') &&
			(field.state.value != 'DE') &&
			(field.state.value != 'DC') &&
			(field.state.value != 'FM') &&
			(field.state.value != 'FL') &&
			(field.state.value != 'GA') &&
			(field.state.value != 'GU') &&
			(field.state.value != 'HI') &&
			(field.state.value != 'ID') &&
			(field.state.value != 'IL') &&
			(field.state.value != 'IN') &&
			(field.state.value != 'IA') &&
			(field.state.value != 'KS') &&
			(field.state.value != 'KY') &&
			(field.state.value != 'LA') &&
			(field.state.value != 'ME') &&
			(field.state.value != 'MH') &&
			(field.state.value != 'MD') &&
			(field.state.value != 'MA') &&
			(field.state.value != 'MI') &&
			(field.state.value != 'MN') &&
			(field.state.value != 'MS') &&
			(field.state.value != 'MO') &&
			(field.state.value != 'MT') &&
			(field.state.value != 'NE') &&
			(field.state.value != 'NV') &&
			(field.state.value != 'NH') &&
			(field.state.value != 'NJ') &&
			(field.state.value != 'NM') &&
			(field.state.value != 'NY') &&
			(field.state.value != 'NC') &&
			(field.state.value != 'ND') &&
			(field.state.value != 'MP') &&
			(field.state.value != 'OH') &&
			(field.state.value != 'OK') &&
			(field.state.value != 'OR') &&
			(field.state.value != 'PW') &&
			(field.state.value != 'PA') &&
			(field.state.value != 'PR') &&
			(field.state.value != 'RI') &&
			(field.state.value != 'SC') &&
			(field.state.value != 'SD') &&
			(field.state.value != 'TN') &&
			(field.state.value != 'TX') &&
			(field.state.value != 'UT') &&
			(field.state.value != 'VT') &&
			(field.state.value != 'VI') &&
			(field.state.value != 'VA') &&
			(field.state.value != 'WA') &&
			(field.state.value != 'WV') &&
			(field.state.value != 'WI') &&
			(field.state.value != 'WY') &&
			(field.state.value != 'AE') &&
			(field.state.value != 'AA') &&
			(field.state.value != 'AE') &&
			(field.state.value != 'AP') &&
			(field.state.value != '') &&
			(field.state.value != '  ')) {
			url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + '&state=' + zip5 + urbanization;
			ok = false;
		}
	}

	if (ok == false) return url;
	else return "";
}


function validate(field) { // check if input ok
	//global variable to create error message(s)
	var url = "";
	var formerror = false;
	
	// remove leading spaces
	field.firmname.value = removeLeadingSpaces(field.firmname.value);
	field.address1.value = removeLeadingSpaces(field.address1.value);
	field.address2.value = removeLeadingSpaces(field.address2.value);
	field.city.value = removeLeadingSpaces(field.city.value);
	field.state.value = removeLeadingSpaces(field.state.value);
	field.urbanization.value = removeLeadingSpaces(field.urbanization.value);

	field.firmname.value = field.firmname.value.toUpperCase();
	field.address1.value = field.address1.value.toUpperCase();
	field.address2.value = field.address2.value.toUpperCase();
	field.city.value = field.city.value.toUpperCase();
	field.state.value = field.state.value.toUpperCase();
	field.urbanization.value = field.urbanization.value.toUpperCase();

	action = checkFields(field);

	if (action != "") formerror = true;

	if (formerror){
		top.location.replace(action);
		return false;
	} else {
		return true;
	}
}

function removeLeadingSpaces(value) {
	var regExp = /^\s*/;
	var retVal = value.replace(regExp, "");
	return retVal;
}

function createRequestObject() {
	FORM_DATA = new Object();
	// The Object ("Array") where our data will be stored.
	
	separator = ',';
	// The token used to separate data from multi-select inputs

	query = '' + this.location;
	// Get the current URL so we can parse out the data.
	// Adding a null-string '' forces an implicit type cast
	// from property to string, for NS2 compatibility.

	query = query.substring((query.indexOf('?')) + 1);
	// Keep everything after the question mark '?'.

	if (query.length < 1) { return false; }  // Perhaps we got some bad data?

	keypairs = new Object();

	numKP = 1;
	// Local vars used to store and keep track of name/value pairs
	// as we parse them back into a usable form.

	while (query.indexOf('&') > -1) {
		keypairs[numKP] = query.substring(0,query.indexOf('&'));
		query = query.substring((query.indexOf('&')) + 1);
		numKP++;
		// Split the query string at each '&', storing the left-hand side
		// of the split in a new keypairs[] holder, and chopping the query
		// so that it gets the value of the right-hand string.
	} // end of while loop

	keypairs[numKP] = query;
	// Store what's left in the query string as the final keypairs[] data.

	for (i in keypairs) {
		keyName = keypairs[i].substring(0,keypairs[i].indexOf('='));
		// Left of '=' is name.

		keyValue = keypairs[i].substring((keypairs[i].indexOf('=')) + 1);
		// Right of '=' is value.

		while (keyValue.indexOf('+') > -1) {
			keyValue = keyValue.substring(0,keyValue.indexOf('+')) + ' ' + keyValue.substring(keyValue.indexOf('+') + 1);
			// Replace each '+' in data string with a space.
		}

		keyValue = unescape(keyValue);
		// Unescape non-alphanumerics
		if (keyName == 'firmname') {
			document.form1.firmname.value = keyValue;
		}
		if (keyName == 'address1') {
			document.form1.address1.value = keyValue;
		}
		if (keyName == 'address2') {
			document.form1.address2.value = keyValue;
		}
		if (keyName == 'city') {
			document.form1.city.value = keyValue;
		}
		if (keyName == 'state') {
			document.form1.state.value = keyValue;
		}
		if (keyName == 'zip5') {
			document.form1.zip5.value = keyValue;
		}		
		if (keyName == 'urbanization') {
			document.form1.urbanization.value = keyValue;
		}
		if (keyName == 'pagenumber') {
			document.form1.pagenumber.value = keyValue;
		}

		if (FORM_DATA[keyName]) {
			FORM_DATA[keyName] = FORM_DATA[keyName] + separator + keyValue;
			// Object already exists, it is probably a multi-select input,
			// and we need to generate a separator-delimited string
			// by appending to what we already have stored.
		} else {
			FORM_DATA[keyName] = keyValue;
			// Normal case: name gets value.
		}
	} // end of for loop

	if (document.form1.state.value == 'PR') {
		document.form1.urbanization.focus();
	}

	return FORM_DATA;
} // end of createRequestObject()


function mailingIndustryPopup(carrierroute, countyname, deliverypoint, checkdigit, lac, elot, elotindicator, recordtype, pmbdesignator, pmbnumber, defaultflag, ewsflag) {
	var popupWin = window.open('','mailingIndustry','width=500,height=300,left=250,top=100,resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1');
	popupWin.focus();

	popupWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
	popupWin.document.write('<html xmlns="http://www.w3.org/1999/xhtml">');
	popupWin.document.write('<head>');
	popupWin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
	popupWin.document.write('<title>USPS - Mailing Industry Information</title>');
	popupWin.document.write('<link href="css/styles.css" rel="stylesheet" type="text/css" />');
	popupWin.document.write('</head>');
	popupWin.document.write('');
	popupWin.document.write('<body>');
	popupWin.document.write('');
	popupWin.document.write('<div style="width:100%; height:12px; background:url(images/top_tile.gif) repeat-x;"></div>');
	popupWin.document.write('<div class="popupHeader" style="width:338px; height:16px; padding:10px 8px;">');
	popupWin.document.write('  <h1>Mailing Industry Information</h1>');
	popupWin.document.write('</div>');
	popupWin.document.write('<div style="width:338px; height:16px; padding:2px 8px;" class="main"><a href="pu_mailing_industry_def.htm">Mail Industry Information Definitions</a></div>');
	popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
	popupWin.document.write('	 	<tbody>');
	popupWin.document.write('			<tr>');
	popupWin.document.write('		  	  <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
	popupWin.document.write('          <td width="16">&nbsp;</td>');
	popupWin.document.write('	  	</tr>');
	popupWin.document.write('		</tbody>');
	popupWin.document.write('</table>');
	popupWin.document.write('<table width="480" border="0" cellpadding="6" cellspacing="0" summary="This table is used to format the header of the page.">');
	popupWin.document.write('  <tbody>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td width="16">&nbsp;</td>');
	popupWin.document.write('      <td width="298" class="main" valign="top" bgcolor="#f3f3f3">Carrier Route</td>');
	popupWin.document.write('      <td width="150" align="right" valign="top" bgcolor="#f3f3f3" class="main">' + carrierroute + '</td>');
	popupWin.document.write('      <td width="16">&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">County</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + countyname + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">Delivery Point Code</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + deliverypoint + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">Check Digit</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + checkdigit + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">LAC&#8482;</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + lac + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">eLOT&#8482;</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + elot + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">eLOT Ascending/Descending Indicator</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + elotindicator + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">Record Type Code</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + recordtype + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">PMB Designator</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + pmbdesignator + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">PMB Number</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + pmbnumber + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">Default Flag</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + defaultflag + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">EWS Flag</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + ewsflag + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('  </tbody>');
	popupWin.document.write('</table>');
	popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
	popupWin.document.write('  <tbody>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
	popupWin.document.write('      <td width="16">&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('  </tbody>');
	popupWin.document.write('</table>');
	popupWin.document.write('<div align="right" style="width:100%; background: url(images/footer_bottom_tile.gif) bottom repeat-x">&nbsp;</div>');
	popupWin.document.write('	<!--- Google Analytics Begin Here --->
		<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
		</script>
		<script type="text/javascript">
		var pageTracker = _gat._getTracker("UA-5014679-1");
		pageTracker._initData();
		pageTracker._trackPageview();
		</script>	
	<!--- Google Analytics End Here --->
</body>
');
	popupWin.document.write('</html>');

	popupWin.document.close(); 
} // end of mailingIndustryPopup()


function mailingIndustryPopup2(carrierroute, countyname, deliverypoint, checkdigit, lac, elot, elotindicator, recordtype, pmbdesignator, pmbnumber, defaultflag, ewsflag, dpvconfirmation) {
	var popupWin = window.open('','mailingIndustry','width=500,height=300,left=250,top=100,resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1');
	popupWin.focus();

	popupWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
	popupWin.document.write('<html xmlns="http://www.w3.org/1999/xhtml">');
	popupWin.document.write('<head>');
	popupWin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
	popupWin.document.write('<title>USPS - Mailing Industry Information</title>');
	popupWin.document.write('<link href="css/styles.css" rel="stylesheet" type="text/css" />');
	popupWin.document.write('</head>');
	popupWin.document.write('');
	popupWin.document.write('<body>');
	popupWin.document.write('');
	popupWin.document.write('<div style="width:100%; height:12px; background:url(images/top_tile.gif) repeat-x;"></div>');
	popupWin.document.write('<div class="popupHeader" style="width:338px; height:16px; padding:10px 8px;">');
	popupWin.document.write('  <h1>Mailing Industry Information</h1>');
	popupWin.document.write('</div>');
	popupWin.document.write('<div style="width:338px; height:16px; padding:2px 8px;" class="main"><a href="pu_mailing_industry_def.htm">Mail Industry Information Definitions</a></div>');
	popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
	popupWin.document.write('	 	<tbody>');
	popupWin.document.write('			<tr>');
	popupWin.document.write('		  	  <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
	popupWin.document.write('          <td width="16">&nbsp;</td>');
	popupWin.document.write('	  	</tr>');
	popupWin.document.write('		</tbody>');
	popupWin.document.write('</table>');
	popupWin.document.write('<table width="480" border="0" cellpadding="6" cellspacing="0" summary="This table is used to format the header of the page.">');
	popupWin.document.write('  <tbody>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td width="16">&nbsp;</td>');
	popupWin.document.write('      <td width="298" class="main" valign="top" bgcolor="#f3f3f3">Carrier Route</td>');
	popupWin.document.write('      <td width="150" align="right" valign="top" bgcolor="#f3f3f3" class="main">' + carrierroute + '</td>');
	popupWin.document.write('      <td width="16">&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">County</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + countyname + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">Delivery Point Code</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + deliverypoint + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">Check Digit</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + checkdigit + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">LAC&#8482;</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + lac + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">eLOT&#8482;</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + elot + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">eLOT Ascending/Descending Indicator</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + elotindicator + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">Record Type Code</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + recordtype + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">PMB Designator</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + pmbdesignator + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">PMB Number</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + pmbnumber + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">Default Flag</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + defaultflag + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top">EWS Flag</td>');
	popupWin.document.write('      <td align="right" valign="top" class="main">' + ewsflag + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('      <td class="main" valign="top" bgcolor="#f3f3f3">DPV Confirmation Indicator</td>');
	popupWin.document.write('      <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + dpvconfirmation + '</td>');
	popupWin.document.write('      <td>&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('  </tbody>');
	popupWin.document.write('</table>');
	popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
	popupWin.document.write('  <tbody>');
	popupWin.document.write('    <tr>');
	popupWin.document.write('      <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
	popupWin.document.write('      <td width="16">&nbsp;</td>');
	popupWin.document.write('    </tr>');
	popupWin.document.write('  </tbody>');
	popupWin.document.write('</table>');
	popupWin.document.write('<div align="right" style="width:100%; background: url(images/footer_bottom_tile.gif) bottom repeat-x">&nbsp;</div>');
	popupWin.document.write('	<!--- Google Analytics Begin Here --->
		<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
		</script>
		<script type="text/javascript">
		var pageTracker = _gat._getTracker("UA-5014679-1");
		pageTracker._initData();
		pageTracker._trackPageview();
		</script>	
	<!--- Google Analytics End Here --->
</body>
');
	popupWin.document.write('</html>');

	popupWin.document.close(); 
} // end of mailingIndustryPopup2()




