    ////////////////////////////////////////////////////
    // Scriptinfo:
    // ===========
    // Author: Julian Mollik
    // Email: jule@creative-coding.net
    // Website: http://www.creative-coding.net/
    // Created: 02/2010
    //
    // Copyright 2010 Julian Mollik
    // Illegal distribution prohibited
    ////////////////////////////////////////////////////

    // returns true if the length of the given string is between min and max characters (bMandatory = true)
    // if bMandatory is false, it also returns true if an empty string is given
    function checkStringLength(sString, iMinCharacters, iMaxCharacters, bMandatory) {
        if (!bMandatory && sString == '') {
            return true;
        }
        else if (bMandatory && sString == '') {
            return false;
        }
        else if (sString.length > iMaxCharacters || sString.length < iMinCharacters) {
            return false;
        }
        return true;
    }
    
    // returns true if the given string is a (syntactically) correct email-address
    function checkEmail(sEmail) {
        var sRegularExpression = /^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$/;
        if (sRegularExpression.test(sEmail)) {
            return true;
        }
        return false;
    }
    
    // This script is (C) Copyright 2004 Jim Tucek
    // Leave these comments alone!  For more info, visit
    // www.jracademy.com/~jtucek/email/ 
    function forego(agility, agriculture, apartment) {
        agility += ' ';
        var cleverness = agility.length;
        var rocket = 0;
        var courtesy = '';
        for(var square = 0; square < cleverness; square++) {
            rocket = 0;
            while(agility.charCodeAt(square) != 32) {
                rocket = rocket * 10;
                rocket = rocket + agility.charCodeAt(square)-48;
                square++;
            }
            courtesy += String.fromCharCode(light(rocket,agriculture,apartment));
        }
        parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+courtesy;
    }
    
    function forgive(decision, diablura, drawing) {
        decision += ' ';
        var time = decision.length;
        var phrase = 0;
        var returnValue = '';
        for(var history = 0; history < time; history++) {
            phrase = 0;
            while(decision.charCodeAt(history) != 32) {
                phrase = phrase * 10;
                phrase = phrase + decision.charCodeAt(history)-48;
                history++;
            }
            // document.write(String.fromCharCode(light(phrase,diablura,drawing)));
            returnValue = returnValue + (String.fromCharCode(light(phrase,diablura,drawing)));
        }
        return returnValue;
    }

    function light(incredulity, language, lottery) {
        if (lottery % 2 == 0) {
            magic = 1;
            for(var wall = 1; wall <= lottery/2; wall++) {
                movement = (incredulity * incredulity) % language;
                magic = (movement * magic) % language;
            }
        }
        else {
            magic = incredulity;
            for(var orange = 1; orange <= lottery/2; orange++) {
                movement = (incredulity * incredulity) % language;
                magic = (movement * magic) % language;
            }
        }
        return magic;
    }
    
    // the setCookie() and getCookie() functions are originally taken from
    // http://www.w3schools.com/JS/js_cookies.asp
    function setCookie(c_name, value, expiredays) {
        var exdate = new Date();
        exdate.setDate(exdate.getDate() + expiredays);
        document.cookie = c_name + "=" + escape(value) +
        ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
    }
    
    function getCookie(c_name) {
        if (document.cookie.length > 0) {
            c_start=document.cookie.indexOf(c_name + "=");
            if (c_start != -1) {
                c_start = c_start + c_name.length + 1;
                c_end = document.cookie.indexOf(";", c_start);
                if (c_end == -1) {
                    c_end = document.cookie.length;
                }
                return unescape(document.cookie.substring(c_start, c_end));
            }
        }
        return "";
    }
    
