function setOption(form, index) {
	for (var i = 0; i < form.List2.length; i++) {
		form.List2.options[i].text = "";
		form.List2.options[i].value = "";
	}

	if (index == 0) {
		form.List2.options[0].text = "-Select Solution-";
		form.List2.options[0].value = "-Select Solution-";
	}
	if (index == 1) {
		form.List2.options[0].text = "-Select Solution-";
		form.List2.options[0].value = "-Select Solution-";
		form.List2.options[1].text = "Visit website";
		form.List2.options[1].value = "rs_everyday_visitwebsite";
		form.List2.options[2].text = "Sales promotion";
		form.List2.options[2].value = "rs_everyday_salespromotion";
		form.List2.options[3].text = "Marketing promotion";
		form.List2.options[3].value = "rs_everyday_marketingpromotion";
		form.List2.options[4].text = "Product launch";
		form.List2.options[4].value = "rs_everyday_productlaunch";
		form.List2.options[5].text = "Customer surveys";
		form.List2.options[5].value = "rs_everyday_customersurveys";
		form.List2.options[6].text = "Donations";
		form.List2.options[6].value = "rs_everyday_donations";
		form.List2.options[7].text = "View video";
		form.List2.options[7].value = "rs_everyday_viewvideo";
		form.List2.options[8].text = "Event registration";
		form.List2.options[8].value = "rs_everyday_eventregistration";
		form.List2.options[9].text = "News &amp; RSS";
		form.List2.options[9].value = "rs_everyday_newsandrss";
		form.List2.options[10].text = "Sponsorship";
		form.List2.options[10].value = "rs_everyday_sponsorship";
		form.List2.options[11].text = "Corporate identity";
		form.List2.options[11].value = "rs_everyday_corporateidentity";
		form.List2.options[12].text = "Email letterhead";
		form.List2.options[12].value = "rs_everyday_letterhead";
		form.List2.options[13].text = "Compliance";
		form.List2.options[13].value = "rs_everyday_compliance";
	}
	else if (index == 2) {
		form.List2.options[0].text = "-Select Solution-";
		form.List2.options[0].value = "-Select Solution-";
		form.List2.options[1].text = "News update";
		form.List2.options[1].value = "rs_newsletter_newsupdate";
		form.List2.options[2].text = "Event registration";
		form.List2.options[2].value = "rs_newsletter_eventregistration";
		form.List2.options[3].text = "Customer survey";
		form.List2.options[3].value = "rs_newsletter_customersurvey";
		form.List2.options[4].text = "Promotional";
		form.List2.options[4].value = "rs_newsletter_promotional";
	}
	else if (index == 3) {
		form.List2.options[0].text = "-Select Solution-";
		form.List2.options[0].value = "-Select Solution-";
		form.List2.options[1].text = "Charity";
		form.List2.options[1].value = "rs_social_charity";
		form.List2.options[2].text = "Sports";
		form.List2.options[2].value = "rs_social_sports";
		form.List2.options[3].text = "Music";
		form.List2.options[3].value = "rs_social_music";
		form.List2.options[4].text = "Brand";
		form.List2.options[4].value = "rs_social_brand";
	}
	form.List2.selectedIndex = 0;
	form.template.value = form.List2.options[form.List2.selectedIndex].value;
}

function validate_form(thisform) {

	with (thisform) {
		if( name.value==null || name.value==""	|| name.value=="Your Name" ) {
			alert( "Please tell us your name.");
			name.focus();
			return false;
		}
		if( email.value==null || email.value=="" || email.value=="Your Email" ) {
			alert( "Please provide your email address.\nWe will send a sample branded email to the address you provide.");
			email.focus();
			return false;
		}

		if( List1.value==null || List1.value=="" || List1.value=="-Select Solution-" || List1.value=="-Select Product-" ) {
			alert( "Please select a template type to see in your sample branded email." );
			List2.focus();
			return false;
		}
		
		if( List2.value==null || List2.value=="" || List2.value=="-Select Solution-" || List2.value=="-Select Product-" ) {
			alert( "Please select a solution category for your sample branded email." );
			List2.focus();
			return false;
		}
	}
	return true;
}
