function check() {
	with (document.forms['registration_download']) {
		if (ltrim(Name.value)=='') { alert('Name not specified'); return false; }
		if (ltrim(Company.value)=='') { alert('Company not specified'); return false; }
		if (ltrim(Email.value)=='') { alert('E-mail address not specified'); return false; }
		if (ltrim(Phone.value)=='') { alert('Telephone number not specified'); return false; }
    if (ltrim(State.options[State.options.selectedIndex].value)=='') { alert('State not specified'); return false; }
		if (ltrim(Position.options[Position.options.selectedIndex].value)==0) { alert('Position not specified'); return false; }

    /* if (ltrim(NumberStreet.value)=='') { alert('Number & Street not specified'); return false; }
		if (ltrim(City.value)=='') { alert('City not specified'); return false; }
		if (ltrim(Country.options[Country.options.selectedIndex].value)=='') { alert('Country not specified'); return false; }
		if (ltrim(ZipCode.value)=='') { alert(' Postal / Zip Code not specified'); return false; }
    
    if (SelectTimeframe && ltrim(SelectTimeframe.value)=='') { alert('Solution timeframe not specified'); return false; }				
    if (CMSPhase && ltrim(CMSPhase.value)=='') { alert('Solution selection phase not specified'); return false; }				
    if (BudgetAllocated  && ltrim(BudgetAllocated.value)=='') { alert('Solution budget allocation not specified'); return false; } */
		
    if (elements['Reason']) {
			if (ltrim(Reason.value)=='') { alert('Reason for request not specified'); return false; }
		}
	}
}

function check_2() {
	with (document.forms['registration_download_customer_id']) {
		if (ltrim(CustomerCode.value)=='') { alert('Customer ID not specified'); return false; }
		if (elements['Reason']) {
			if (ltrim(Reason.value)=='') { alert('Reason for download not specified'); return false; }
		}	
	}
}

function ltrim(str) {
	while (str.charAt(0) == " ")
		str = str.substring(1, str.length);
	return str;
}