The javascript should be checking to see if the user didn't select anything in a select list if the value is the first option which is "Please choose a seminar". It appears to just ignore the script.
<apex:page controller="vfCnt_chooseSeminar" >
<apex:form >
<apex:PageBlock title="Choose Your Preferred Seminar(s) for {!progName}">
<apex:pageBlockButtons >
<apex:commandButton action="{!saveItem}" value="Next"/>
<apex:commandButton onclick="validateFunction('{!$Component.first}')" action="{!cancelAction}" value="Cancel"/>
</apex:pageBlockButtons>
<h1>First Preference:</h1><p />
<apex:selectList id="first" value="{!semName1}" multiselect="false" size="1">
<apex:selectOptions value="{!items}"/>
</apex:selectList>
<p />
<h1>Second Preference:</h1><p />
<apex:selectList id="second" value="{!semName2}" multiselect="false" size="1">
<apex:selectOptions value="{!items}"/>
</apex:selectList>
<p />
<h1>Third Preference:</h1><p />
<apex:selectList id="third" value="{!semName3}" multiselect="false" size="1">
<apex:selectOptions value="{!items}"/>
</apex:selectList>
</apex:PageBlock>
</apex:form>
<!-- Java script starts Here -->
<script>
function validateFunction(first){
var inputAmount = document.getElementById(first).value;
if(inputAmount == 'Please Choose a Seminar'){
alert('Please enter seminar1');
}
}
</script>
<!-- java script ends here -->
</apex:page>