function showPrpInfo(check,id)
{
	//check.checked = false;
	var show = document.getElementById('prpInfo'+id+'Expanded');
	var hide = document.getElementById('prpInfo'+id+'Collapsed');
	if(check.checked)
	{
	     show.style.display='block';
	}
	else
	{
		show.style.display='none';
	}
	//hide.style.display='none';
}
function showFinance()
{
	document.getElementById('company').style.display='none';
	document.getElementById('financial').style.display='block';
	setForm1();
}
function showCompany()
{
	document.getElementById('company').style.display='block';
	document.getElementById('financial').style.display='none';
}
function submitForm(form)
{
	setForm2();
	document.forms[form].submit();
}
function setForm1()
{
	var cFirstName=document.form1.cFirstName;
	var cMiddle=document.form1.cMiddle;
	var cLastName=document.form1.cLastName;
	var cCompanyName=document.form1.cCompanyName;
	var cAddress=document.form1.cAddress;
	var cAddress2=document.form1.cAddress2;
	var cCountry=document.form1.cCountry;
	var cCity=document.form1.cCity;
	var cState=document.form1.cState;
	var cZip=document.form1.cZip;
	var cCompanyPhone=document.form1.cCompanyPhone;
	var cCompanyFax=document.form1.cCompanyFax;
	var cEmail=document.form1.cEmail;
	var cBillingAddress=document.form1.cBillingAddress;
	var cBillingAddress2=document.form1.cBillingAddress2;
	var cBillingCity=document.form1.cBillingCity;
	var cBillingState=document.form1.cBillingState;
	var cBillingZip=document.form1.cBillingZip;
	var cBillingCountry=document.form1.cBillingCountry;
	var cShippingAddress=document.form1.cShippingAddress;
	var cShippingAddress2=document.form1.cShippingAddress2;
	var cShippingCity=document.form1.cShippingCity;
	var cShippingState=document.form1.cShippingState;
	var cShippingZip=document.form1.cShippingZip;
	var cShippingCountry=document.form1.cShippingCountry;
	var cShippingAddressName=document.form1.cShippingAddressName;
	var sLastName=document.form1.sLastName;
	var sFirstName=document.form1.sFirstName;
	var sMiddle=document.form1.sMiddle;
	var sCompanyAddress=document.form1.sCompanyAddress;
	var sCompanyAddress2=document.form1.sCompanyAddress2;
	var sCity=document.form1.sCity;
	var sState=document.form1.sState;
	var sZip=document.form1.sZip;
	var sCountry=document.form1.sCountry;
	var sCompanyPhone=document.form1.sCompanyPhone;
	var sCompanyFax=document.form1.sCompanyFax;
	var sEmail=document.form1.sEmail;
	
	if(document.form1.cOfficial.checked)
	{
		document.registrationForm.elements['administratorFirstName'].value=cFirstName.value;
		document.registrationForm.elements['administratorMiddleName'].value=cMiddle.value;
		document.registrationForm.elements['administratorLastName'].value=cLastName.value;
		document.registrationForm.elements['COMPANY.firstName'].value=cFirstName.value;
		document.registrationForm.elements['COMPANY.lastName'].value=cLastName.value;
		document.registrationForm.elements['COMPANY.middleName'].value=cMiddle.value;
		document.registrationForm.elements['orgEntityName'].value=cCompanyName.value;
		document.registrationForm.elements['COMPANY.phone1'].value=cCompanyPhone.value;
		document.registrationForm.elements['COMPANY.fax1'].value=cCompanyFax.value;
		document.registrationForm.elements['COMPANY.email1'].value=cEmail.value;
	}
	if(document.form1.cOfficialAddress.checked)
	{
		document.registrationForm.elements['COMPANY.address1'].value=cAddress.value;
		document.registrationForm.elements['COMPANY.address2'].value=cAddress2.value;
		document.registrationForm.elements['COMPANY.country'].value=cCountry.value;
		document.registrationForm.elements['COMPANY.city'].value=cCity.value;
		document.registrationForm.elements['COMPANY.state'].value=cState.value;
		document.registrationForm.elements['COMPANY.zipCode'].value=cZip.value;
	}
	if(document.form1.cBilling.checked)
	{
		document.registrationForm.elements['BILLTO.address1'].value=cBillingAddress.value;
		document.registrationForm.elements['BILLTO.address2'].value=cBillingAddress2.value;
		document.registrationForm.elements['BILLTO.city'].value=cBillingCity.value;
		document.registrationForm.elements['BILLTO.state'].value=cBillingState.value;
		document.registrationForm.elements['BILLTO.zipCode'].value=cBillingZip.value;
		document.registrationForm.elements['BILLTO.country'].value=cBillingCountry.value;
	}
	if(document.form1.cShipping.checked)
	{
		document.registrationForm.elements['address1'].value=cShippingAddress.value;
		document.registrationForm.elements['address2'].value=cShippingAddress2.value;
		document.registrationForm.elements['city'].value=cShippingCity.value;
		document.registrationForm.elements['state'].value=cShippingState.value;
		document.registrationForm.elements['zipCode'].value=cShippingZip.value;
		document.registrationForm.elements['country'].value=cShippingCountry.value;
		document.registrationForm.elements['shipTo'].value=cShippingAddressName.value;
	}
	if(document.form1.sSignatory.checked)
	{
		document.registrationForm.elements['SIGNATORY.lastName'].value=sLastName.value;
		document.registrationForm.elements['SIGNATORY.firstName'].value=sFirstName.value;
		document.registrationForm.elements['SIGNATORY.middleName'].value=sMiddle.value;
		document.registrationForm.elements['SIGNATORY.phone1'].value=sCompanyPhone.value;
		document.registrationForm.elements['SIGNATORY.fax1'].value=sCompanyFax.value;
		document.registrationForm.elements['SIGNATORY.emai1'].value=sEmail.value;
	}
	if(document.form1.sSignatoryAddress.checked)
	{
		document.registrationForm.elements['SIGNATORY.address1'].value=sCompanyAddress.value;
		document.registrationForm.elements['SIGNATORY.address2'].value=sCompanyAddress2.value;
		document.registrationForm.elements['SIGNATORY.city'].value=sCity.value;
		document.registrationForm.elements['SIGNATORY.state'].value=sState.value;
		document.registrationForm.elements['SIGNATORY.zipCode'].value=sZip.value;
		document.registrationForm.elements['SIGNATORY.country'].value=sCountry.value;
	}

}
function setForm2()
{
	var fAccountReceivable;
	var fEin=document.form2.fEin;
	var fBankName=document.form2.fBankName;
	var fBankAccountN=document.form2.fBankAccountN;
	var fBankRoutingN=document.form2.fBankRoutingN;
	var fDuns=document.form2.fDuns;
	var fSwift=document.form2.fSwift;
	if (document.form2.fAccountReceivable[0].checked == true) {
		fAccountReceivable=document.form2.fAccountReceivable[0];
	}
	else if (document.form2.fAccountReceivable[1].checked == true) {
		fAccountReceivable=document.form2.fAccountReceivable[1];
	}
	var fBankLastName=document.form2.fBankLastName;
	var fBankFirstName=document.form2.fBankFirstName;
	var fBankAddress=document.form2.fBankAddress;
	var fBankAddress2=document.form2.fBankAddress2;
	var fCity=document.form2.fCity;
	var fState=document.form2.fState;
	var fZip=document.form2.fZip;
	var fCountry=document.form2.fCountry;
	var fBankPhone=document.form2.fBankPhone;
	var fBankFax=document.form2.fBankFax;

	document.registrationForm.elements['taxPayerId_null_r_null'].value=fEin.value;
	document.registrationForm.elements['BankName_null_r_null'].value=fBankName.value;
	document.registrationForm.elements['BankAccountNbr_null_r_null'].value=fBankAccountN.value;
	document.registrationForm.elements['BankRoutingTransitNbr_null_r_null'].value=fBankRoutingN.value;
	document.registrationForm.elements['DUNS_null_r_null'].value=fDuns.value;
	document.registrationForm.elements['SwiftNbr_null_r_null'].value=fSwift.value;
	document.registrationForm.elements['BillingInfoPreference_null_r_null'].value=fAccountReceivable.value;
	document.registrationForm.elements['BANK.lastName'].value=fBankLastName.value;
	document.registrationForm.elements['BANK.firstName'].value=fBankFirstName.value;
	document.registrationForm.elements['BANK.address1'].value=fBankAddress.value;
	document.registrationForm.elements['BANK.address2'].value=fBankAddress2.value;
	document.registrationForm.elements['BANK.city'].value=fCity.value;
	document.registrationForm.elements['BANK.state'].value=fState.value;
	document.registrationForm.elements['BANK.zipCode'].value=fZip.value;
	document.registrationForm.elements['BANK.country'].value=fCountry.value;
	document.registrationForm.elements['BANK.phone1'].value=fBankPhone.value;
	document.registrationForm.elements['BANK.fax1'].value=fBankFax.value;

}

function loadData(firstName,lastName,middle,company,address,address2,country,state,city,zip,phone, fax, email)
{
	document.registrationForm.elements['administratorFirstName'].value=firstName;

	document.registrationForm.elements['administratorMiddleName'].value=middle;
	document.registrationForm.elements['administratorLastName'].value=lastName;
	document.registrationForm.elements['orgEntityName'].value=company;
	document.registrationForm.elements['COMPANY.phone1'].value=phone;
	document.registrationForm.elements['COMPANY.fax1'].value=fax;
	document.registrationForm.elements['COMPANY.email1'].value=email;
	document.registrationForm.elements['COMPANY.firstName'].value=firstName;
	document.registrationForm.elements['COMPANY.lastName'].value=lastName;
	document.registrationForm.elements['COMPANY.middleName'].value=middle;
	document.registrationForm.elements['COMPANY.address1'].value=address;
	document.registrationForm.elements['COMPANY.address2'].value=address2;
	document.registrationForm.elements['COMPANY.country'].value=country;
	document.registrationForm.elements['COMPANY.city'].value=city;
	document.registrationForm.elements['COMPANY.state'].value=state;
	document.registrationForm.elements['COMPANY.zipCode'].value=zip;
	document.registrationForm.elements['BILLTO.address1'].value=address;
	document.registrationForm.elements['BILLTO.address2'].value=address2;
	document.registrationForm.elements['BILLTO.city'].value=city;
	document.registrationForm.elements['BILLTO.state'].value=state;
	document.registrationForm.elements['BILLTO.zipCode'].value=zip;
	document.registrationForm.elements['BILLTO.country'].value=country;
	document.registrationForm.elements['address1'].value=address;
	document.registrationForm.elements['address2'].value=address2;
	document.registrationForm.elements['city'].value=city;
	document.registrationForm.elements['state'].value=state;
	document.registrationForm.elements['zipCode'].value=zip;
	document.registrationForm.elements['country'].value=country;
	document.registrationForm.elements['SIGNATORY.lastName'].value=lastName;
	document.registrationForm.elements['SIGNATORY.firstName'].value=firstName;
	document.registrationForm.elements['SIGNATORY.middleName'].value=middle;
	document.registrationForm.elements['SIGNATORY.phone1'].value=phone;
	document.registrationForm.elements['SIGNATORY.fax1'].value=fax;
	document.registrationForm.elements['SIGNATORY.emai1'].value=email;
	document.registrationForm.elements['SIGNATORY.address1'].value=address;
	document.registrationForm.elements['SIGNATORY.address2'].value=address2;
	document.registrationForm.elements['SIGNATORY.city'].value=city;
	document.registrationForm.elements['SIGNATORY.state'].value=state;
	document.registrationForm.elements['SIGNATORY.zipCode'].value=zip;
	document.registrationForm.elements['SIGNATORY.country'].value=country;
}