function submitForm(searchForm)	{
	var key = searchForm.search.value;
	key = key == null || key == 'Search Events' ? '' : key;
	var startDt = searchForm.startDate.value;			
	var endDt = searchForm.endDate.value;
	var link = searchForm.vgnlinkfmt.value;
	window.location.href= link+'&keyword='+key+'&startDate='+startDt+'&endDate='+endDt;	
	return false;
}

	
	function searchValidation(searchForm){
		if(searchForm.startDate.value == 'mm/dd/yyyy') {
            searchForm.startDate.value = '';
        }
        if(searchForm.endDate.value == 'mm/dd/yyyy') {
            searchForm.endDate.value = '';
        }

        if((searchForm.startDate.value != '' ) && (searchForm.endDate.value != '')){

            if((validateDate(searchForm.startDate) == true) && (validateDate(searchForm.endDate) == true)){
                if(validatePeriod(searchForm.startDate, searchForm.endDate)==true){
                    submitForm(searchForm);
                }
            }

        }else if (searchForm.startDate.value!=""){

            if(validateDate(searchForm.startDate)==true){
                submitForm(searchForm);
            }

        }else if (searchForm.endDate.value!=""){

            if(validateDate(searchForm.endDate)==true){
                submitForm(searchForm);
            }

        }else{
            submitForm(searchForm);
        }       
    }
 
 
    function approvePress(CiId)
    {
            window.open('/umich-templating-cma/secure/approve.jsp?vcmId='+CiId,'Approve','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=400');
    }
