
var ArrSalut = new Array("Dr.","Miss","Mr.","Mrs.","Ms.","Prof.");
var ArrSector = new Array();
var ArrArea = new Array();
var Arrstate = new Array("ACT","NSW","NT","QLD","SA","TAS","VIC","VA");
var ArrContactMethod = new Array("Email","Phone","Post");

//Occupation
var ArrOcc = new Array("Consumer/Other","Dentist","Faculty/Educator","Fellow","Librarian","Nurse","Other Health Professional","Physician","Researcher/Scientist","Resident","Student","Veterinarian");

//Speciality
var ArrSpecialty = new Array();



	var ArrOcc = new Array("Dentist","Faculty/Educator","Fellow","Librarian","Health Professional","Nurse","Physician","Researcher/Scientist","Resident","Student","Veterinarian","Consumer/Other");
    var ArrSector = new Array("Academic Institution","Automated Solution Provider","Corporate/Industry","Fire/Police Department","Government Agency","Group Practice","Home Care/Hospice","Hospital","Insurance Company","Law Office","Long-Term Care Facility","Medical Transcription Service Organization","Outpatient Clinic","Pharmaceutical/Biotechnology Firm","Private Practice","Psychiatric Hospital","Public Health","Rehabilitation Center","Research Institute","Other");
    var ArrArea = new Array();                              var ArrSpecialty = new Array();
    ArrArea[0]= "Dentist";                                  ArrSpecialty[0]= new Array("Dental Assisting","Dental Hygiene","Dentistry- General","Dentistry - Pediatric","Orthodontics","Endodontics","Oral & Maxillofacial Surgery","Periodontics","Prosthodontics","Other");
    ArrArea[1]= "Faculty/Educator";                         ArrSpecialty[1]= new Array("Dentistry","Health Professions","Medical","Nursing","Veterinary");
    ArrArea[2]= "Fellow";                                   ArrSpecialty[2]= new Array("Abdominal Radiology","Addiction Psychiatry","Adolescent Medicine","Adult Reconstructive Orthopedics","Allergy & Immunology","Blood Banking/Transfusion Medicine","Cardiothoracic Radiology","Cardiovascular Disease","Chemical Pathology","Child Neurology","Child Psychiatry","Clinical Cardiac Electrophysiology","Clinical Neurophysiology","Colon & Rectal Surgery","Craniofacial Surgery","Critical Care Medicine","Cytopathology","Dentistry","Dermatopathology","Endocrinology","Endovascular Surgical Neuroradiology","Foot & Ankle Orthopedics","Forensic Pathology","Forensic Psychiatry","Gastroenterology","Geriatric Medicine","Geriatric Psychiatry","Hand Surgery","Hematology","Immunopathology","Infectious Diseases","Interventional Cardiology","Musculoskeletal Oncology","Musculoskeletal Radiology","Neonatal-Perinatal Medicine","Nephrology","Neuropathology","Neuroradiology","Nuclear Radiology","Oncology","Otology/Neurotology","Pain Medicine","Pediatric Anesthesiology","Pediatric Cardiology","Pediatric Critical Care Medicine","Pediatric Emergency Medicine","Pediatric Endocrinology","Pediatric Gastroenterology","Pediatric Hematology-Oncology","Pediatric Infectious Diseases","Pediatric Nephrology","Pediatric Orthopedics","Pediatric Otolaryngology","Pediatric Pulmonology","Pediatric Radiology","Pediatric Rheumatology","Pediatric Sports Medicine","Pediatric Surgery","Pediatric Urology","Pulmonary Disease","Rheumatology","Spinal Cord Injury Medicine","Spine Surgery","Sports Medicine","Surgical Critical Care","Thoracic Surgery","Toxicology","Trauma","Vascular & Interventional Radiology","Vascular Surgery","Veterinary","Other");
    ArrArea[3]= "Librarian";                                ArrSpecialty[3]= new Array("Academic","Corporate","Engineering","Legal","Medical","Scientific","Other");
    ArrArea[4]= "Health Professional";                      ArrSpecialty[4]= new Array("Athletic Training","Audiology","Chiropractic","Clinical Laboratory Science","Complementary Medicine","Dental Assisting","Dental Hygiene","EMT-Basic","EMT-Intermediate","EMT-Paramedic","Fire fighting","First Responder","Hand Therapy","Health Information Administration/Technology","Health Unit Coordinator","Massage Therapy","Medical Assisting","Medical Coding/Insurance Specialist","Medical Technology","Medical Transcription","Nurse Assisting/Patient Care Tech","Occupational Therapy","Occupational Therapy Assisting","Optometry","Pharmacy ","Pharmacy Technician","Phlebotomy","Physical Therapy","Physical Therapy Assisting","Physician Assisting","Podiatry","Psychology","Radiologic/Imaging Technology","Registered Dietician","Respiratory Therapy/Technician","Sonographer","Speech Pathology/Therapist","Surgical Technologist","Veterinary Technician","Other");
    ArrArea[5]= "Nurse";                                    ArrSpecialty[5]= new Array("Nurse Assistant/Patient Care Tech","LPN/LVN","RN - administration","RN - Case management","RN - community health","RN - critical care","RN - emergency","RN - general medical-surgical","RN - home care","RN - maternity/OB","RN - occupational health","RN - oncology","RN - operating room","RN - patient care management","RN - pediatrics","RN - psychiatric","RN - rehabilitation","RN - school nurse","RN - staff education/training","Advanced Practice Nurse - Administration","Advanced Practice Nurse - Anesthetist","Advanced Practice Nurse - Clinical Nurse Specialist","Advanced Practice Nurse - Midwifery","Nurse Practitioner - Acute Care","Nurse Practitioner - Adult","Nurse Practitioner - Family","Nurse Practitioner - Gerontologic","Nurse Practitioner - Neonatal","Nurse Practitioner - Pediatric","Nurse Practitioner - Psychiatric","Nurse Practitioner - Women's Health","Other");
    ArrArea[6]= "Physician";                                ArrSpecialty[6]= new Array("Allergy & Immunology","Anesthesiology","Cardiology","Critical Care","Dermatology","Endocrinology & Metabolism","Epidemiology/Public Health","Family Practice","Gastroenterology","Genetics","Geriatrics","Hematology","Hepatology","Infectious Diseases","Integrative Medicine","Internal Medicine","Neonatology","Nephrology","Neurology","Neurosurgery","Nutrition","Obstetrics/Gynecology","Occupational Medicine/Health","Oncology","Ophthalmology","Orthopedics - Foot/Ankle","Orthopedics - General","Orthopedics - Hand","Orthopedics - Knee","Orthopedics - Other","Osteopathy","Otolaryngology","Pain ","Palliative Medicine","Pathology","Pediatrics","Physical Medicine & Rehabilitation","Plastic Surgery","Psychiatry","Radiology - Abdominal","Radiology - Cardiac","Radiology - General","Radiology - Musculoskeletal","Radiology - Neurologic","Radiology - Nuclear Medicine","Radiology - Pediatrics","Radiology - Thoracic","Respiratory Medicine","Rheumatology","Sports Medicine","Surgery - Cardiac","Surgery - Colon/Rectal","Surgery - General","Surgery - Other","Surgery - Vascular","Urology","Other");
    ArrArea[7]= "Researcher/Scientist";                     ArrSpecialty[7]= new Array("Automated Biology/HTS","Automated Chemistry","Clinical Automation","Forensic Medicine","Genetics","Lab Director","Lab Technician ","Laboratory Medicine","Paraoptometric Assistant/Technician","Pharmocology","Public Health","Scientist","Other");
    ArrArea[8]= "Resident";                                 ArrSpecialty[8]= new Array("Anesthesiology","Dentistry","Dermatology","Emergency Medicine","Family Medicine","Internal Medicine","Medical Genetics","Neurology","Neurosurgery","Nuclear Medicine","Obstetrics/Gynecology","Ophthalmology","Orthopedic Surgery","Otolaryngology","Pathology","Pediatrics","Physical Medicine & Rehabilitation","Plastic Surgery","Preventive Medicine","Psychiatry","Radiation Oncology","Radiology - Diagnostic","Surgery - General","Urology","Veterinary","Other");
    ArrArea[9]= "Student";                                  ArrSpecialty[9]= new Array("Dentistry","Medical","Nursing - LPN/LVN","Nursing - RN","Veterinary","Other");
    ArrArea[10]= "Veterinarian";                            ArrSpecialty[10]= new Array("Veterinary - Equine","Veterinary - Exotic","Veterinary - Large Animal","Veterinary - Mixed Practice","Veterinary - Small Animal","Veterinary Technician","Other");
    ArrArea[11]= "Consumer/Other";                          ArrSpecialty[11]= new Array("Buyer","Consulting","Engineer/Programmer","Informatics Professional","Information Technology Professional","Legal","Medical Writing/Editing/Translating","Pharmaceutical","Other");


    var Arrstate = new Array("Alabama","Alaska","American Samoa","Arizona","Arkansas","Armed Forces Africa","Armed Forces Americas","Armed Forces Canada","Armed Forces Europe","Armed Forces Middle East","Armed Forces Pacific","California","Colorado","Connecticut","Delaware","District of Columbia","Federated States of Micronesia","Florida","Georgia","Guam","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Marshall Islands","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Northern Mariana Islands","Ohio","Oklahoma","Ontario","Oregon","Palau","Pennsylvania","Puerto Rico ","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virgin Islands ","Virginia","Washington","West Virginia","Wisconsin","Wyoming","Alberta","British Columbia","Manitoba","New Brunswick","New Foundland and Labrador","Nova Scotia","Nunavut Territory","Northwest Territories","Prince Edward Island","Quebec","Saskatchewan","Yukon Territory");



	    function areaOfint() {
        var index = document.getElementById("areaofInterest1").selectedIndex;
        var text = document.getElementById("areaofInterest1").options[index].text;
        document.registration.areaofInterest.value=text;
    }//End function

    function onchangeAreaofInterest(){
        var spec = ArrSpecialty[document.getElementById('areaofInterest1').value];
        document.getElementById("Specialty1").innerHTML="";
        if ((spec!=undefined && spec !='') && (spec.length > 0)){
            for(i=0;i<spec.length;i++) {
                 document.getElementById("Specialty1").options[document.getElementById("Specialty1").options.length] = new Option(spec[i],i);
                }

        } else {
                document.getElementById("Specialty1").options[0] = new Option("All",-1);
        }

    }//End function

// As from requirement excel sheet.
// Selection of Area of interest dropdown drives Specialty dropdown

// Populate Salutation
for(i=0;i<ArrSalut.length;i++) {
	document.getElementById("Salutation1").options[document.getElementById("Salutation1").options.length] = new Option(ArrSalut[i],i);
	document.getElementById("Salutation1").options[document.getElementById("Salutation1").options.value] = new Option(ArrSalut[i],i);
}
function salut() {
	var index = document.getElementById("Salutation1").selectedIndex;
	var text = document.getElementById("Salutation1").options[index].text;
	document.registration.salutation.value=text;
}

// Populate Billing State
for(i=0;i<Arrstate.length;i++) {
	document.getElementById("bstate").options[document.getElementById("bstate").options.length] = new Option(Arrstate[i],Arrstate[i]);
}

// Populate Occupation
for(i=0;i<ArrOcc.length;i++) {
	document.getElementById("Occupation1").options[document.getElementById("Occupation1").options.length] = new Option(ArrOcc[i],ArrOcc[i]);
}
function occup() {
	var index = document.getElementById("Occupation1").selectedIndex;
	var text = document.getElementById("Occupation1").options[index].text;
	document.registration.Occupation.value=text;
}

// Populate Sector
for(i=0;i<ArrSector.length;i++) {
	document.getElementById("Sector1").options[document.getElementById("Sector1").options.length] = new Option(ArrSector[i],i);
}
function sector() {
	var index = document.getElementById("Sector1").selectedIndex;
	var text = document.getElementById("Sector1").options[index].text;
	document.registration.Sector.value=text;
}

//Settings for AU HS Site done here

function selbstate() {
	var index = document.getElementById("bstate").selectedIndex;
	var text = document.getElementById("bstate").options[index].text;
	document.registration.bstate.value=text;
}

for(i=0;i<ArrArea.length;i++) {
        document.getElementById("areaofInterest1").options[document.getElementById("areaofInterest1").options.length] = new Option(ArrArea[i],i);
    }//End function
function onchangeOccupation(){
	var index = document.getElementById("Occupation1").selectedIndex;
	var text = document.getElementById("Occupation1").options[index].text;
	//Clear old values
	/*document.getElementById("Specialty1").options.length = 0;
	document.getElementById("SubSpecialty1").options.length = 0;
	//alert ('Occupation Index  = ' + index);
	if(index == 0){
		document.getElementById("Specialty1").options[0] = new Option("Please Select","-1");
		document.getElementById("SubSpecialty1").options[0] = new Option("Please Select","-1");
		document.registration.Specialty.value = '';
		document.registration.SubSpecialty.value = '';
	} else {
		document.getElementById("SubSpecialty1").options[0] = new Option("Please Select","-1");
		document.registration.SubSpecialty.value = '';
		document.getElementById("Specialty1").options[0] = new Option("Please Select","-1");
		document.registration.Specialty.value = '';
		//Add new values
		for(i=0;i<ArrSpecialty[index-1].length;i++) {
			document.getElementById("Specialty1").options[document.getElementById("Specialty1").options.length] = new Option(ArrSpecialty[index-1][i],ArrSpecialty[index-1][i]);
		}
	} */
	document.registration.Occupation.value = text;
//alert ('Profession = ' + document.registration.Occupation.value);
}//End function
function onchangeSpecialty(){
	//alert("onchangeSpecialty called");
	var occupationindex = document.getElementById("Occupation1").selectedIndex;
	var specialtyindex = document.getElementById("Specialty1").selectedIndex;
	var text = document.getElementById("Specialty1").options[specialtyindex].text;
	//Clear old values
	document.getElementById("SubSpecialty1").options.length = 0;

	if (occupationindex ==0 ){
		document.getElementById("Specialty1").options[0] = new Option("Please Select","-1");
		document.getElementById("SubSpecialty1").options[0] = new Option("Please Select","-1");
		document.registration.Specialty.value = '';
		document.registration.SubSpecialty.value = '';
	} else {
		document.getElementById("SubSpecialty1").options[0] = new Option("Please Select","-1");
		document.registration.SubSpecialty.value = '';
		document.getElementById("Specialty1").options[0] = new Option("Please Select","-1");
		document.registration.Specialty.value = '';
		//Add new values
		for(var i=0;i<ArrSubSpecialty[occupationindex-1][specialtyindex].length;i++) {
			document.getElementById("SubSpecialty1").options[document.getElementById("SubSpecialty1").options.length] = new Option(ArrSubSpecialty[occupationindex-1][specialtyindex][i],ArrSubSpecialty[occupationindex-1][specialtyindex][i]);
		}//End-for
	}//End-if
	document.registration.Specialty.value = text;
	//alert ('Specialty = ' + document.registration.Specialty.value);
}//End function
function subspecialty() {
	//alert("subspecialty called");
	var index = document.getElementById("SubSpecialty1").selectedIndex;
	var text = document.getElementById("SubSpecialty1").options[index].text;
	document.registration.SubSpecialty.value = text;
	//alert ('Sub Specialty value = ' +  document.registration.SubSpecialty.value);
}

function onchangeCountry(){
	var index1 = document.getElementById("country1").selectedIndex;
	var selcountry = document.getElementById("country1").options[index1].value;
	document.registration.country.value=selcountry;
}//End function

function specialty() {
	var index = document.getElementById("Specialty1").selectedIndex;
	var text = document.getElementById("Specialty1").options[index].text;
	document.registration.Specialty.value=text;
}

function yograd() {
var index = document.getElementById("YearofGraduation1").selectedIndex;
var text = document.getElementById("YearofGraduation1").options[index].text;
document.registration.YearofGraduation.value=text;
}
function selstate() {
var index = document.getElementById("bstate").selectedIndex;
var text = document.getElementById("bstate").options[index].text;
document.registration.bstate.value=text;
}



var selcountry=''
var selstateother  = ''
var selstate = ''
if (selcountry != '') {
	document.registration.country.value=selcountry
	if (selcountry == 'US' || selcountry=='CA') {
		document.getElementById("state").style.display='block'
		document.getElementById("state_other").style.display='none'
	} else {
		document.getElementById("state").style.display='none'
		document.getElementById("state_other").style.display='block'
	}
}



function formsubmit(){
	// Validations
	var reValue=true;

	if ((document.getElementById("country1").value =='')) {
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Please select your country</b></font></TD></TR>";
		return reValue;
	}
	else if (document.getElementById("username").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Please enter a user name</b></font></TD></TR>";
		return reValue;
	}
	else if (!document.getElementById("username").value.match(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/)){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Please enter valid email id as user name</b></font></TD></TR>";
		return reValue;
	}
	else if (document.getElementById("password").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Please enter a password</b></font></TD></TR>";
		return reValue;
	}
	else if (document.getElementById("confirmpassword").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Please confirm your password</b></font></TD></TR>";
		return reValue;
	}
	else if ( document.getElementById("password").value != document.getElementById("confirmpassword").value){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Password mismatch. Please try again</b></font></TD></TR>";
		document.getElementById("password").value="";
		document.getElementById("confirmpassword").value="";
		document.getElementById("password").focus();
		return reValue;
	}
	else if (document.getElementById("Salutation1").value=='choose..'){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Please select your salutation</b></font></TD></TR>";
		return reValue;
	}
	else if (document.getElementById("bfname").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Billing First Name is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("blname").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Billing Last Name is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("baddress1").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Billing Address1 is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("bcity").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Billing City is required</b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("bstate").value=='' && document.getElementById("stateother").value==''  ){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Billing State is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if ((document.getElementById("stateother").value =='') && (document.getElementById("bstate").value =='-1') && (document.getElementById("country1").value!='NZ') && (document.getElementById("country1").value!='FJ')){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Please select your state</b></font></TD></TR>";
		return reValue;
	}
	else if (document.getElementById("bzip").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Billing ZIP is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("dayphone").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Phone is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("sfname").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Shipping First Name is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("slname").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Shipping Last Name is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("saddress1").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Shipping Address1 is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("scity").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Shipping City is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("sstate").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Shipping State is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.getElementById("szip").value==''){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Shipping ZIP is required </b></font></TD></TR><br>";
		return reValue;
	} else if (((document.getElementById("country1").value=='AU')|| (document.getElementById("country1").value=='NZ') || (document.getElementById("country1").value=='FJ'))&& (document.getElementById("Occupation1").value=='-1')){
		document.getElementById("divUPErr").innerHTML="<TR><TD><font color=red><b>Profession is required </b></font></TD></TR><br>";
		return reValue;
	}
	else if (document.registration.showProfile.value == "true") {
		if (document.getElementById("PersonalDescription").value != '' && document.getElementById("PersonalDescription").value.length > document.registration.profilecharlimit.value) {
			alert ("Character limit for \"Describe Yourself\" exceeds the specified limit !");
			return reValue;
		}
	}

	if(document.getElementById("bfname").value!=''){
		document.getElementById("bfname").value.replace("\'","");
	} if(document.getElementById("blname").value!=''){
		document.getElementById("blname").value.replace("\'","");
	} if(document.getElementById("baddress1").value!=''){
		document.getElementById("baddress1").value.replace("\'","");
	} if(document.getElementById("bcity").value!=''){
		document.getElementById("bcity").value.replace("\'","");
	} if(document.getElementById("bzip").value!=''){
		document.getElementById("bzip").value.replace("\'","");
	} if(document.getElementById("sfname").value!=''){
		document.getElementById("sfname").value.replace("\'","");
	} if(document.getElementById("slname").value!=''){
		document.getElementById("slname").value.replace("\'","");
	} if(document.getElementById("saddress1").value!=''){
		document.getElementById("saddress1").value.replace("\'","");
	} if(document.getElementById("scity").value!=''){
		document.getElementById("scity").value.replace("\'","");
	} if(document.getElementById("szip").value!=''){
		document.getElementById("szip").value.replace("\'","");
	}


	if(reValue){
		document.registration.submit();
	}
	return true;
}


<!-- Changes for Profile Creation -->

function changeViewableText(property, level) {
	if (level == "public") {
		document.getElementById('privacyText_' + property).innerHTML = "Viewable by everyone";
	}
	else if (level == "private") {
		document.getElementById('privacyText_' + property).innerHTML = "Viewable only by you";
	}
}

function togglePrivacyContent(property, plusUrl, minusUrl) {
	return;
}

<!-- Changes End -->

<!-- Bill to Ship to same -->

function checkout(element) {
	if(document.registration.shiptobilltosame[0].checked) {
		element.blur();
	}
}

function fxnbillto(selectedRadioButton){
	var test = 0
	var message = "The Required Fields Are: \n"
	var bstate = document.registration.bstate.value
	var stateother = document.registration.stateother.value
	if(selectedRadioButton==0) {
	document.registration.sfname.value = document.registration.bfname.value;
	document.registration.smname.value = document.registration.bmname.value;
	document.registration.slname.value = document.registration.blname.value;
	document.registration.saddress1.value = document.registration.baddress1.value;
	document.registration.saddress2.value = document.registration.baddress2.value;
//	document.registration.saddress3.value = document.registration.baddress3.value;
	document.registration.scity.value = document.registration.bcity.value;
	document.registration.ssuffix.value = document.registration.bsuffix.value;
	document.registration.szip.value = document.registration.bzip.value;
	
			if(stateother !=null && !stateother==''){
               document.registration.sstate.value= stateother;
	      }
            else if(bstate!=null){
		       document.registration.sstate.value = bstate;
          }
		
	} else {
		document.registration.sfname.value = "";
		document.registration.smname.value = "";
		document.registration.slname.value = "";
		document.registration.ssuffix.value = "";
		document.registration.saddress1.value = "";
		document.registration.saddress2.value ="";
		//document.registration.saddress3.value ="";
		document.registration.scity.value = "";
		document.registration.sstate.value = "";
		document.registration.szip.value = "";
	}
	var shipto=document.registration.stateOfShipTo.value;
	document.registration.stateOfShipTo.value=selectedRadioButton;
}
function checkUpdates(){
	var selectedValue = document.registration.updates.value;
	if (selectedValue == 'N'){
		document.registration.updates.value = 'Y';
	} else if (selectedValue == 'Y'){
		document.registration.updates.value = 'N';
	}
}
function checkCondition(){
	var selectedValue = document.registration.condition.value;
	if (selectedValue == 0){
		document.registration.condition.value = '1';
	} else if (selectedValue == 1){
		document.registration.condition.value = '0';
	}
}