    var decimal = new Array('latDec','longDec');
    
    var latDec  = new Array('document.decimalForm.latDecimal',0.0,180.0,'decimal latitude');
    var longDec = new Array('document.decimalForm.longDecimal',0.0,180.0,'decimal longitude');
    
    var Nord = 1;
    var Est = 1;


    function submitForm(type) {
        //
        // Verify Fields
        //
        if (verify(type) != true) {
            return false ;
        }

        // 
        // Build lat long vars
        // 
        var typeArray = eval(type);
        var url       = ""
        

        if ((type == "decimal")&&(Nord==1)&&(Est==1)) {
            url  = "latlongtype=decimal"
            url += "&latitude=" + eval(eval(typeArray[0])[0]).value;
            url += "&longitude=" + eval(eval(typeArray[1])[0]).value;
        }
        if ((type == "decimal")&&(Nord==0)&&(Est==1)) {
            url  = "latlongtype=decimal"
            url += "&latitude=" + "-" + eval(eval(typeArray[0])[0]).value;
            url += "&longitude=" + eval(eval(typeArray[1])[0]).value;
        }
        if ((type == "decimal")&&(Nord==1)&&(Est==0)) {
				url  = "latlongtype=decimal"
            url += "&latitude=" + eval(eval(typeArray[0])[0]).value;
            url += "&longitude=" + "-" + eval(eval(typeArray[1])[0]).value;
        }
        if ((type == "decimal")&&(Nord==0)&&(Est==0)) {
            url  = "latlongtype=decimal"
            url += "&latitude=" + "-" + eval(eval(typeArray[0])[0]).value;
            url += "&longitude=" + "-" + eval(eval(typeArray[1])[0]).value;
        }

        
        // Redirect alla mappa        // 
        var location = "http://www.mapquest.com/maps/map.adp?" + url;
        mywin=open(location,"map"); 
        //close();


    }

	function submitForm2(type) {
        //
        // Verify Fields
        //
        if (verify(type) != true) {
            return false ;
        }

        // 
        // Build lat long vars
        // 
        var typeArray = eval(type);
        var url       = ""
        
		
		http://mapy.cz/?st=search&fr=loc:%2050N%2015E

        if ((type == "decimal")&&(Nord==1)&&(Est==1)) {
            url  = eval(eval(typeArray[0])[0]).value;
            url += "N%20" + eval(eval(typeArray[1])[0]).value;
			url += "E";
        }
        if ((type == "decimal")&&(Nord==0)&&(Est==1)) {
            url  = "latlongtype=decimal"
            url += "&latitude=" + "-" + eval(eval(typeArray[0])[0]).value;
            url += "&longitude=" + eval(eval(typeArray[1])[0]).value;
        }
        if ((type == "decimal")&&(Nord==1)&&(Est==0)) {
				url  = "latlongtype=decimal"
            url += "&latitude=" + eval(eval(typeArray[0])[0]).value;
            url += "&longitude=" + "-" + eval(eval(typeArray[1])[0]).value;
        }
        if ((type == "decimal")&&(Nord==0)&&(Est==0)) {
            url  = "latlongtype=decimal"
            url += "&latitude=" + "-" + eval(eval(typeArray[0])[0]).value;
            url += "&longitude=" + "-" + eval(eval(typeArray[1])[0]).value;
        }

        
        // Redirect alla mappa        // 
        var location = "http://mapy.cz/?st=search&fr=loc:" + url;
        mywin=open(location,"map"); 
        //close();


    }
	
    function verify (type) {
        var message   = new String() ;
        var typeArray = eval(type) ;

        for (i = 0; i < typeArray.length; i++) {
            var fieldArray = eval(typeArray[i]);
            var value      = eval(fieldArray[0]).value;
            var min        = fieldArray[1]; 
            var max        = fieldArray[2];
            var longName   = fieldArray[3];

            if (vuoto(fieldArray[0])) {
                message = "- You must enter a value in all fields"
                break;
            }
           if (isNaN(value)) {
                message += "- " + longName + " Must be a number \n";
            }
            if ((value < min) || (value > max)) {
                message += "- The " + longName + " must be a number that is " ;
                message += "greater than " + min + " and less than " + max ;
                message += "\n";
            }
        }
        
        if (message.length > 0) {
            errMsg  = "Your request was not submitted because of the  ";
            errMsg += "following error(s)\nPlease correct these error(s) ";
            errMsg += "and re-submit.\n\n" + message;                        
            
            alert(errMsg);
            return false;
        }

        return true;
    }
    
    function vuoto (fieldName) {
        var value = eval(fieldName).value;
        if (value.indexOf(' ') != -1) {
            return true
        }
        if (value == "" || value == "\t" || value == "\s" || value == "\r") {
            return true
        }
        return false
    }
