function copyAll(){
var check=document.getElementById('copy').value;
document.getElementById('Customer_BillFirstName').value=document.getElementById('Customer_ShipFirstName').value;
document.getElementById('Customer_BillLastName').value=document.getElementById('Customer_ShipLastName').value;
document.getElementById('Customer_BillEmail').value=document.getElementById('Customer_ShipEmail').value;
document.getElementById('Customer_BillPhone').value=document.getElementById('Customer_ShipPhone').value;
document.getElementById('Customer_BillFax').value=document.getElementById('Customer_ShipFax').value;
document.getElementById('Customer_BillCompany').value=document.getElementById('Customer_ShipCompany').value;
document.getElementById('Customer_BillAddress').value=document.getElementById('Customer_ShipAddress').value;
document.getElementById('Customer_BillCity').value=document.getElementById('Customer_ShipCity').value;
document.customerForm.BillStateSelect.selectedIndex= document.customerForm.ShipStateSelect.selectedIndex;
document.getElementById('Customer_BillState').value=document.getElementById('Customer_ShipState').value;
document.getElementById('Customer_BillZip').value=document.getElementById('Customer_ShipZip').value;
document.customerForm.BillCountry.selectedIndex = document.customerForm.ShipCountry.selectedIndex ;
}

function copyAll_Ac(){
var check=document.getElementById('copy').value;
document.getElementById('Customer_BillFirstName').value=document.getElementById('Customer_ShipFirstName').value;
document.getElementById('Customer_BillLastName').value=document.getElementById('Customer_ShipLastName').value;
document.getElementById('Customer_BillEmail').value=document.getElementById('Customer_ShipEmail').value;
document.getElementById('Customer_BillPhone').value=document.getElementById('Customer_ShipPhone').value;
document.getElementById('Customer_BillFax').value=document.getElementById('Customer_ShipFax').value;
document.getElementById('Customer_BillCompany').value=document.getElementById('Customer_ShipCompany').value;
document.getElementById('Customer_BillAddress').value=document.getElementById('Customer_ShipAddress').value;
document.getElementById('Customer_BillCity').value=document.getElementById('Customer_ShipCity').value;
document.create_account.Customer_BillStateSelect.selectedIndex= document.create_account.Customer_ShipStateSelect.selectedIndex;
document.getElementById('Customer_BillState').value=document.getElementById('Customer_ShipState').value;
document.getElementById('Customer_BillZip').value=document.getElementById('Customer_ShipZip').value;
document.create_account.Customer_BillCountry.selectedIndex = document.create_account.Customer_ShipCountry.selectedIndex ;
}

function changeEmail(){
document.getElementById('login_email').value=document.getElementById('Customer_ShipEmail').value;
}

function showPopAdd(event){
var id='addpop'+event;
document.getElementById(id).style.visibility="visible";
}

function hidePopAdd(event){
var id='addpop'+event;
document.getElementById(id).style.visibility="hidden"
}

function chkEmailFriend(){
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var femail=document.email_friend.sendto.value;
var sub=document.email_friend.subject.value;
var yname=document.email_friend.yname.value;
var email=document.email_friend.yemail.value;
if((((femail == "" || reg.test(femail) == false) || (sub == "")) || (yname = "")) || (email == "" || reg.test(email) == false)){
alert("-Friend email\n-Subject line\n-Your name\n-Your email\n can not be blank");
return false;
}
}

function chkEmailEnq(){
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var name=document.inquiry.name.value;
var sendto_inqu=document.inquiry.sendto_inqu.value;
var zipcode=document.inquiry.zipcode.value;
var pmessage=document.inquiry.pmessage.value;
if((name == "" || reg.test(sendto_inqu) == false) || (zipcode == "" || pmessage =="")){
alert("-Your Name\n-Your Email\n-Your Zip Code\n-Message\n can not be blank");
return false;
}
}


function chkValMore(){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var CompanyName=document.emuoil.CompanyName.value;
	var TypeofBusiness=document.emuoil.TypeofBusiness.selectedIndex;
	var ContactName=document.emuoil.ContactName.value;
	var email=document.emuoil.email.value;
	var country=document.emuoil.country.value;	
	var Comments=document.emuoil.Comments.value;
	
	if(CompanyName == "" || CompanyName == " "){
		alert("Enter your Company Name");
		document.emuoil.CompanyName.focus();
		return false;
	}
	/*if(TypeofBusiness == ""){
		alert("Select your Type of Business");		
		return false;
	}*/
	if(ContactName == "" || ContactName == " "){
		alert("Enter your Contact Name");
		document.emuoil.ContactName.focus();
		return false;
	}
	if(reg.test(email) == false){
		alert("Enter your email");
		document.emuoil.email.focus();
		return false;
	}
	if(country == "" || country == " "){
		alert("Enter your country");
		document.emuoil.country.focus();
		return false;
	}
	if(Comments == "" || Comments == " "){
		alert("Enter your Comments");
		document.emuoil.Comments.focus();
		return false;
	}
}

function chkValContact(){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var email=document.contactus.Email.value;
	var Comments=document.contactus.Comments.value;		
	
	if(reg.test(email) == false){
		alert("Enter your email");
		document.contactus.Email.focus();
		return false;
	}	
	if(Comments == "" || Comments == " "){
		alert("Enter your Comments");
		document.contactus.Comments.focus();
		return false;
	}	
}

function chkValWant(){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var CompanyName=document.dist_wanted.CompanyName.value;
	var TypeofBusiness=document.dist_wanted.TypeofBusiness.selectedIndex;
	var ContactName=document.dist_wanted.ContactName.value;
	var email=document.dist_wanted.EmailAddress.value;
	var Comments=document.dist_wanted.Comments.value;
	
	if(CompanyName == "" || CompanyName == " "){
		alert("Enter your Company Name");
		document.dist_wanted.CompanyName.focus();
		return false;
	}
	/*if(TypeofBusiness == ""){
		alert("Select your Type of Business");		
		return false;
	}*/
	if(ContactName == "" || ContactName == " "){
		alert("Enter your Contact Name");
		document.dist_wanted.ContactName.focus();
		return false;
	}
	if(reg.test(email) == false){
		alert("Enter your email");
		document.dist_wanted.EmailAddress.focus();
		return false;
	}
/*	if(document.getElementById('select').selectedIndex == ""){
		alert("Select your Country");
		document.dist_wanted.select.focus();
		return false;
	}
*/
	/*if(Comments == "" || Comments == " "){
		alert("Enter your Comments");
		document.dist_wanted.Comments.focus();
		return false;
	}*/
	
}