    <!-- RCSid: $Header: /opt/utm/pse/src/app/ptm/war/src/main/webapp/js/Attic/ptm.js,v 1.1.4.2.4.6.2.1.42.1 2008/06/03 11:40:03 stjo701 Exp $ -->

    function PTMCountrySearch (theForm) {
        /*
            Validates the country search form
        */
        var va = new Validator();
        var er = new ErrorRenderer();

        theForm.country.value = theForm.country.value.trim();

        /*
        if (va.isRadioSelected(theForm.searchType)) {
           theForm.action.value = va.getRadioValue();
        } else {
            va.addError(new Error(theForm.searchType,'Här måste du välja söksätt'));
        }
        */
        
        theForm.action.value = "searchCountry";

        if (!theForm.country.value || theForm.country.value.length < 3) {
            theForm.country.focus();
            var countryErr = new Error(theForm.country,'Här måste du fylla i land, minst 3 tecken');
            va.addError(countryErr);
        }
        theForm.tmpCountry.value = theForm.country.value;
        return er.displayErrors(theForm,va.getErrors());
    }

    function PTMCountriesForContinent (theForm) {
        /*
            Validates the country for continent form
        */

        var va = new Validator();
        var er = new ErrorRenderer();

        if (!theForm.continent.value) {
            var continentErr = new Error(theForm.continent,'Här måste du välja portozon');
            va.addError(continentErr);
        }
        
        return er.displayErrors(theForm,va.getErrors());

   }

    function PTMCountry (theForm,theCountry) {
        theForm = document.getElementById(theForm);
        theForm.country.value = theCountry;
        theForm.submit();
    }

