function filter(element) {	var value = element.value;	value = value.replace(/\</g,"");	value = value.replace(/\>/g,"");	value = value.replace(/\"/g,"");	value = value.replace(/\'/g,"");	value = value.replace(/\%/g,"");	value = value.replace(/\;/g,"");	value = value.replace(/\(/g,"");	value = value.replace(/\)/g,"");	value = value.replace(/\&/g,"");	value = value.replace(/\+/g,"");	element.value = value;}function CheckStateActive(theAction)
{
	if(document.TheForm.EndDate.options[document.TheForm.EndDate.selectedIndex].value=='NULL')
	{
		alert('You must select an Resume Date before clicking "Continue." ');
	
	}else
	{
		SetAction(theAction);
	}

}

function CheckState(theAction)
{
	if (document.TheForm.StartDate.options[document.TheForm.StartDate.selectedIndex].value =='NULL')
	{
		alert('You must select a Start Date and Resume Date before clicking "Continue." ');
	}
	
	else if(document.TheForm.EndDate.options[document.TheForm.EndDate.selectedIndex].value=='NULL')
	{
		alert('You must select an Resume Date before clicking "Continue." ');
	
	}else
	{
		SetAction(theAction);
	}

}

function CheckRedState(theAction)
{
	if (document.TheForm.NoticeDate.value =='NULL')
	{
		alert('You must select a Notice Date before clicking "Continue." ');
	}
	else if(document.TheForm.RedeliveryType.value=='NULL')
	{
		alert('You must select an Redelivery Option before clicking "Continue." ');
	
	}else if(document.TheForm.RedeliveryType.value=='1')
	{
		if (document.TheForm.RedeliveryDate.value=='NULL')
		{
			alert('You must select a Redelivery date before clicking "Continue."');
		}else
		{
			SetAction(theAction);
		}
		
	}else
	{
		SetAction(theAction);
	}

}


function SetAction(theAction) 
{
	document.TheForm.action.value = theAction;
	document.TheForm.submit();
}
function printPage() {	if (window.print) 		window.print(); }

function checkCheckBox() {
	if (document.TheForm.agree.checked)	{
		SetAction('CustomerInfo');
	}else{
		alert('Please check the box to acknowledge the statements on this page before clicking "Continue." ');	
	}
}




function openArticleNumberHelp() 
{
	 window.open ("ArticleNumberHelp.html", "ArticleNumberHelp", "width=450,height=490,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no");
}


function openFinalNoticeHelp() 
{
	 window.open ("FinalNoticeHelp.html", "FinalNoticeHelp", "width=450,height=540,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no");
}

function openMailTypeHelp() 
{
	 window.open ("MailTypeHelp.html", "MailTypeHelp", "width=450,height=460,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no");
}

function openSpecialServicesHelp() 
{
	 window.open ("SpecialServicesHelp.html", "SpecialServicesHelp", "width=460,height=540,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no");
}

function openNoticeHelp() 
{
	 window.open ("NoticeHelp.html", "NoticeHelp", "width=450,height=490,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no");
}

function openReturnDateHelp() 
{
	 window.open ("ReturnDateHelp.html", "ReturnDateHelp", "width=450,height=540,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no");
}

function secondarySubmit()
{
	document.TheForm2.submit();
}
