String.prototype.format=function(format){
                var args = Array.prototype.slice.call(arguments, 1);
                return format.replace(/\{(\d+)\}/g, function(m, i){
                    return args[i];
                });
    };
    var CampusEcology=function(){
            var id_counter = 0;     // for use with generateId
            var ua = navigator.userAgent.toLowerCase();
            var isStrict = document.compatMode == "CSS1Compat",
                isOpera = ua.indexOf("opera") > -1,
                isSafari = (/webkit|khtml/).test(ua),
                isSafari3 = isSafari && ua.indexOf('webkit/5') != -1,
                isIE = !isOpera && ua.indexOf("msie") > -1,
                isIE7 = !isOpera && ua.indexOf("msie 7") > -1,
                isGecko = !isSafari && ua.indexOf("gecko") > -1,
                isBorderBox = isIE && !isStrict,
                isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1),
                isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1),
                isAir = (ua.indexOf("adobeair") != -1),
                isLinux = (ua.indexOf("linux") != -1),
                isSecure = window.location.href.toLowerCase().indexOf("https") === 0;
            ua={
                isStrict : isStrict,
                isOpera : isOpera,
                isSafari: isSafari,
                isSafari3 : isSafari3,
                isIE : isIE,
                isIE7 : isIE7,
                isGecko : isGecko,
                isBorderBox : isBorderBox,
                isWindows : isWindows,
                isMax : isMac,
                isAir : isAir,
                isLinux : isLinux,
                isSecure : isSecure
            }
            return {
                ua: ua,
                apply : function(o, c, defaults){
                    if(defaults){
                        // no "this" reference for friendly out of scope calls
                        CampusEcology.apply(o, defaults);
                    }
                    if(o && c && typeof c == 'object'){
                        for(var p in c){
                            o[p] = c[p];
                        }
                    }
                    return o;
                },
                lang:{
                    isArray: function(o) { 
                        if (o) {
                           var l = CampusEcology.lang;
                           return l.isNumber(o.length) && l.isFunction(o.splice);
                        }
                        return false;
                    },
                    isString: function(o) {
                        return typeof o === 'string';
                    },
                    isBoolean: function(o) {
                        return typeof o === 'boolean';
                    },
                    isFunction: function(o) {
                        return typeof o === 'function';
                    },
                    isNull: function(o) {
                        return o === null;
                    },
                    isNumber: function(o) {
                        return typeof o === 'number' && isFinite(o);
                    },
                    isObject: function(o) {
                        return (o && (typeof o === 'object' || CampusEcology.lang.isFunction(o))) || false;
                    },
                    isUndefined: function(o) {
                        return typeof o === 'undefined';
                    },
		            isDate : function(v){
			            return v && typeof v.getFullYear == 'function';
		            },
                    hasOwnProperty: function(o, prop) {
                        if (Object.prototype.hasOwnProperty) {
                            return o.hasOwnProperty(prop);
                        }
                        
                        return !CampusEcology.lang.isUndefined(o[prop]) && 
                                o.constructor.prototype[prop] !== o[prop];
                    },
                    trim: function(s){
                        try {
                            return s.replace(/^\s+|\s+$/g, "");
                        } catch(e) {
                            return s;
                        }
                    }
                },
                dom: function(){
                    var document= window.document,  // cache for faster lookups
                        reClassNameCache= {},          // cache regexes for className
                        propertyCache=[];           // cache for Hyphen pattern converts
                    var patterns = {
                        HYPHEN: /(-[a-z])/i, // to normalize get/setStyle
                        ROOT_TAG: /^body|html$/i // body for quirks mode, html for standards
                    };
                    var toCamel = function(property) {
                        if ( !patterns.HYPHEN.test(property) ) {
                            return property; // no hyphens
                        }                        
                        if (propertyCache[property]) { // already converted
                            return propertyCache[property];
                        }                       
                        var converted = property;                 
                        while( patterns.HYPHEN.exec(converted) ) {
                            converted = converted.replace(RegExp.$1,
                                    RegExp.$1.substr(1).toUpperCase());
                        }                        
                        propertyCache[property] = converted;
                        return converted;
                    };                    
                    var getClassRegEx = function(className) {
                        var re = reClassNameCache[className];
                        if (!re) {
                            re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
                            reClassNameCache[className] = re;
                        }
                        return re;
                    };
                    var getStyle=function(){
                            if (document.documentElement.currentStyle && isIE) { // IE method
                                    return function(el, property) {                         
                                        switch( toCamel(property) ) {
                                            case 'opacity' :// IE opacity uses filter
                                                var val = 100;
                                                try { // will error if no DXImageTransform
                                                    val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;

                                                } catch(e) {
                                                    try { // make sure its in the document
                                                        val = el.filters('alpha').opacity;
                                                    } catch(e) {
                                                    }
                                                }
                                                return val / 100;
                                            case 'float': // fix reserved word
                                                property = 'styleFloat'; // fall through
                                            default: 
                                                // test currentStyle before touching
                                                var value = el.currentStyle ? el.currentStyle[property] : null;
                                                return ( el.style[property] || value );
                                        }
                                    };
                                } else { // default to inline only
                                    return function(el, property) { return el.style[property]; };
                                }                        
                    }();
                    var setStyle=function(){
                            if (isIE) {
                                return function(el, property, val) {
                                    switch (property) {
                                        case 'opacity':
                                            if ( CampusEcology.lang.isString(el.style.filter) ) { // in case not appended
                                                el.style.filter = 'alpha(opacity=' + val * 100 + ')';
                                                
                                                if (!el.currentStyle || !el.currentStyle.hasLayout) {
                                                    el.style.zoom = 1; // when no layout or cant tell
                                                }
                                            }
                                            break;
                                        case 'float':
                                            property = 'styleFloat';
                                        default:
                                        el.style[property] = val;
                                    }
                                };
                            } else {
                                return function(el, property, val) {
                                    if (property == 'float') {
                                        property = 'cssFloat';
                                    }
                                    el.style[property] = val;
                                };
                            }
                    }();
					var getXY= function(){
                           if (document.documentElement.getBoundingClientRect) { // IE
                                return function(el) {
                                    var box = el.getBoundingClientRect();

                                    var rootNode = el.ownerDocument;
                                    return [box.left + CampusEcology.dom.getDocumentScrollLeft(rootNode), box.top +
                                            CampusEcology.dom.getDocumentScrollTop(rootNode)];
                                };
                            } else {
                                return function(el) { // manually calculate by crawling up offsetParents
                                    var pos = [el.offsetLeft, el.offsetTop];
                                    var parentNode = el.offsetParent;

                                    // safari: subtract body offsets if el is abs (or any offsetParent), unless body is offsetParent
                                    var accountForBody = (isSafari &&
                                            CampusEcology.dom.getStyle(el, 'position') == 'absolute' &&
                                            el.offsetParent == el.ownerDocument.body);

                                    if (parentNode != el) {
                                        while (parentNode) {
                                            pos[0] += parentNode.offsetLeft;
                                            pos[1] += parentNode.offsetTop;
                                            if (!accountForBody && isSafari && 
                                                    CampusEcology.dom.getStyle(parentNode,'position') == 'absolute' ) { 
                                                accountForBody = true;
                                            }
                                            parentNode = parentNode.offsetParent;
                                        }
                                    }

                                    if (accountForBody) { //safari doubles in this case
                                        pos[0] -= el.ownerDocument.body.offsetLeft;
                                        pos[1] -= el.ownerDocument.body.offsetTop;
                                    } 
                                    parentNode = el.parentNode;

                                    // account for any scrolled ancestors
                                    while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) ) 
                                    {
                                       // work around opera inline/table scrollLeft/Top bug
                                       if (CampusEcology.dom.getStyle(parentNode, 'display').search(/^inline|table-row.*$/i)) { 
                                            pos[0] -= parentNode.scrollLeft;
                                            pos[1] -= parentNode.scrollTop;
                                        }
                                        
                                        parentNode = parentNode.parentNode; 
                                    }

                                    return pos;
                                };
                            }
                     }();
                    var testElement = function(node, method) {
                        return node && node.nodeType == 1 && ( !method || method(node) );
                     };                    
					return {
                        getViewWidth : function(full) {
                            return full ? this.getDocumentWidth() : this.getViewportWidth();
                        },
                        getViewHeight : function(full) {
                            return full ? this.getDocumentHeight() : this.getViewportHeight();
                        },
                        getDocumentHeight: function() {
                            var scrollHeight = (document.compatMode != "CSS1Compat") ? document.body.scrollHeight : document.documentElement.scrollHeight;
                            return Math.max(scrollHeight, this.getViewportHeight());
                        },
                        getDocumentWidth: function() {
                            var scrollWidth = (document.compatMode != "CSS1Compat") ? document.body.scrollWidth : document.documentElement.scrollWidth;
                            return Math.max(scrollWidth, this.getViewportWidth());
                        },
                        getViewportHeight: function(){
                            if(ua.isIE){
                                return ua.isStrict ? document.documentElement.clientHeight :
                                         document.body.clientHeight;
                            }else{
                                return self.innerHeight;
                            }
                        },
                        getViewportWidth: function() {
                            if(ua.isIE){
                                return ua.isStrict ? document.documentElement.clientWidth :
                                         document.body.clientWidth;
                            }else{
                                return self.innerWidth;
                            }
                        },
                        hasClass: function(el, className) {
                            var re = getClassRegEx(className);
                            return re.test(el.className);
                        },
                        addClass: function(el, className) {
                            if (this.hasClass(el, className)) {
                                return false; // already present
                            }
                            el.className = CampusEcology.lang.trim([el.className, className].join(' '));
                            return true;
                        },
                        removeClass: function(el, className) {
                            var re = getClassRegEx(className);
                            if (!className || !this.hasClass(el, className)) {
                                return false; // not present
                            }
                            var c = el.className;
                            el.className = c.replace(re, ' ');
                            if ( this.hasClass(el, className) ) { // in case of multiple adjacent
                                this.removeClass(el, className);
                            }

                            el.className = CampusEcology.lang.trim(el.className); // remove any trailing spaces
                            return true;
                        },
                        get: function(el) {
                            var PI=CampusEcology;
                            if (el && (el.nodeType || el.item)) { // Node, or NodeList
                                return el;
                            }
                            if(el.window && el.window==window){
                                return el;
                            }
                            if (PI.lang.isString(el) || !el) { // id or null
                                return document.getElementById(el);
                            }
                            
                            if (el.length !== undefined) { // array-like 
                                var c = [];
                                for (var i = 0, len = el.length; i < len; ++i) {
                                    c[c.length] = PI.dom.get(el[i]);
                                }                            
                                return c;
                            }
                            return el; // some other object, just pass it back
                        },
                        getStyle: function(el, property) {
                            return getStyle(el, toCamel(property));
                        },
                        setStyle: function(el, property, val) {
                            setStyle(el, toCamel(property), val);
                        },                        
                        insertBefore: function(newNode, referenceNode) {
                            newNode = CampusEcology.dom.get(newNode); 
                            referenceNode = CampusEcology.dom.get(referenceNode); 
                            if (!newNode || !referenceNode || !referenceNode.parentNode) {
                                throw new Error('insertAfter failed: missing or invalid arg(s)');
                                return null;
                            }
                            return referenceNode.parentNode.insertBefore(newNode, referenceNode); 
                        },
                        insertAfter: function(newNode, referenceNode) {
                            newNode = CampusEcology.dom.get(newNode); 
                            referenceNode = CampusEcology.dom.get(referenceNode); 
                            if (!newNode || !referenceNode || !referenceNode.parentNode) {
                                throw new Error('insertAfter failed: missing or invalid arg(s)');
                                return null;
                            }       
                            if (referenceNode.nextSibling) {
                                return referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); 
                            } else {
                                return referenceNode.parentNode.appendChild(newNode);
                            }
                        },
                        getAncestorBy: function(node, method) {
                            while (node = node.parentNode) { // NOTE: assignment
                                if ( testElement(node, method) ) {
                                    return node;
                                }
                            } 

                            return null;
                        },
                        getAncestorByClassName: function(node, className) {
                            node = CampusEcology.dom.get(node);
                            if (!node) {
                                return null;
                            }
                            var method = function(el) { return CampusEcology.dom.hasClass(el, className); };
                            return CampusEcology.dom.getAncestorBy(node, method);
                        },
                        getSibling: function(el,prev){
                            var next=(prev) ? el.previousSibling : el.nextSibling;
                            while(next && next.nodeType!=1){
                                next=CampusEcology.dom.getSibling(next,prev);
                            }
                            return next;
                        },
                        getFirstChild: function(el){
                            var next=el.firstChild;
                            while(next && next.nodeType!=1){
                                next=CampusEcology.dom.getSibling(next);
                            }
                            return next;
                        },
                        generateId: function(el, prefix) {
                            prefix = prefix || 'yui-gen';
                            if (el && el.id) { // do not override existing ID
                                return el.id;
                            } 
                            var id = prefix + id_counter++;
                            if (el) {
                                el.id = id;
                            }
                            return id;
                        },
                        makeUnselectable: function(el){
                            el.unselectable="on";
                            // swallow selectstart event
                            CampusEcology.event.addListener(el,"selectstart",function(ev){
                                ev = ev || window.event;
                                CampusEcology.event.stopEvent(ev);
                                return false;
                            });
                            
                            this.addClass(el,"unselectable");
                        }, 
                        getElementsByClassName: function(className, tag, root, apply) {
                            tag = tag || '*';
                            root = (root) ? CampusEcology.dom.get(root) : null || document; 
                            if (!root) {
                                return [];
                            }

                            var nodes = [],
                                elements = root.getElementsByTagName(tag),
                                re = getClassRegEx(className);

                            for (var i = 0, len = elements.length; i < len; ++i) {
                                if ( re.test(elements[i].className) ) {
                                    nodes[nodes.length] = elements[i];
                                    if (apply) {
                                        apply.call(elements[i], elements[i]);
                                    }
                                }
                            }
                            
                            return nodes;
                        },

                        getDocumentScrollLeft: function(doc) {
                            doc = doc || document;
                            return Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);
                        }, 
                        getDocumentScrollTop: function(doc) {
                            doc = doc || document;
                            return Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);
                        },
						getXY: function(el) {
								// has to be part of document to have pageXY
								if ( (el.parentNode === null || el.offsetParent === null ||
										CampusEcology.dom.getStyle(el, 'display') == 'none') && el != el.ownerDocument.body) {
									return false;
								}
								
								return getXY(el);
						},
						setXY: function(el, pos, noRetry) {
								var style_pos = CampusEcology.dom.getStyle(el, 'position');
								if (style_pos == 'static') { // default to relative
									CampusEcology.dom.setStyle(el, 'position', 'relative');
									style_pos = 'relative';
								}
				
								var pageXY = CampusEcology.dom.getXY(el);
								if (pageXY === false) { // has to be part of doc to have pageXY
									return false; 
								}
								
								var delta = [ // assuming pixels; if not we will have to retry
									parseInt( CampusEcology.dom.getStyle(el, 'left'), 10 ),
									parseInt( CampusEcology.dom.getStyle(el, 'top'), 10 )
								];
							
								if ( isNaN(delta[0]) ) {// in case of 'auto'
									delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
								} 
								if ( isNaN(delta[1]) ) { // in case of 'auto'
									delta[1] = (style_pos == 'relative') ? 0 : el.offsetTop;
								} 
						
								if (pos[0] !== null) { el.style.left = pos[0] - pageXY[0] + delta[0] + 'px'; }
								if (pos[1] !== null) { el.style.top = pos[1] - pageXY[1] + delta[1] + 'px'; }
							  
								if (!noRetry) {
									var newXY = CampusEcology.dom.getXY(el);
				
									// if retry is true, try one more time if we miss 
								   if ( (pos[0] !== null && newXY[0] != pos[0]) || 
										(pos[1] !== null && newXY[1] != pos[1]) ) {
									   CampusEcology.dom.setXY(el, pos, true);
								   }
								}        
						
						},						
						getRegion: function(el) {
							var p = CampusEcology.dom.getXY(el);
							var t = p[1];
							var r = p[0] + el.offsetWidth;
							var b = p[1] + el.offsetHeight;
							var l = p[0];
							return {top: t,right: r,bottom: b,left: l};
						}						
                    };
                }(),
                event: function(){
                    return {
                        addListener: function () {
                            if (window.addEventListener) {
                                return function(el, sType, fn, capture) {
                                    el=CampusEcology.dom.get(el);
                                    el.addEventListener(sType, fn, (capture));
                                };
                            } else if (window.attachEvent) {
                                return function(el, sType, fn, capture) {
                                    el=CampusEcology.dom.get(el);
                                    el.attachEvent("on" + sType, fn);
                                };
                            } else {
                                return function(){};
                            }
                        }(),
                        getTarget: function(ev) {
                            var t = ev.target || ev.srcElement;
                            return this.resolveTextNode(t);
                        },
                        resolveTextNode: function(node) {
                            if (node && 3 == node.nodeType) {
                                return node.parentNode;
                            } else {
                                return node;
                            }
                        },
                        getCharCode: function(ev) {
                            return ev.keyCode || ev.charCode || 0;
                        },
                        stopEvent: function(ev) {
                            this.stopPropagation(ev);
                            this.preventDefault(ev);
                        },
                        stopPropagation: function(ev) {
                            if (ev.stopPropagation) {
                                ev.stopPropagation();
                            } else {
                                ev.cancelBubble = true;
                            }
                        },
                        preventDefault: function(ev) {
                            if (ev.preventDefault) {
                                ev.preventDefault();
                            } else {
                                ev.returnValue = false;
                            }
                        },
                        getPageX: function(ev) {
                            var x = ev.pageX;
                            if (!x && 0 !== x) {
                                x = ev.clientX || 0;

                                if ( ua.isIE ) {
                                    x += this._getScrollLeft();
                                }
                            }

                            return x;
                        },
                        getPageY: function(ev) {
                            var y = ev.pageY;
                            if (!y && 0 !== y) {
                                y = ev.clientY || 0;

                                if ( ua.IE ) {
                                    y += this._getScrollTop();
                                }
                            }


                            return y;
                        },
                        getXY: function(ev) {
                            return [this.getPageX(ev), this.getPageY(ev)];
                        }
                    };                    
                }()
	    };
    }();
    CampusEcology.addListener=CampusEcology.event.addListener;

	CampusEcology.FormValidation=function(config){
        this.subscribe=true;
		this.errMsg="There was a Problem with your Submission:";
        this.submitHandler=function(ev){
                ev=ev||window.event;
				if(typeof this.preValidate=="function"){
					if(this.pretValidate.call(this)===false){
                    	CampusEcology.event.stopEvent(ev);
					}
				}
                if(this.Validate()==false){
                    CampusEcology.event.stopEvent(ev);
                }
				if(typeof this.postValidate=="function"){
					if(this.postValidate.call(this)===false){
                    	CampusEcology.event.stopEvent(ev);
					}
				}
                this.ToggleErrors();
        };
        CampusEcology.apply(this,config);
        // get the form element
        this.el=CampusEcology.dom.get(this.el);
        this.errorContainer=CampusEcology.dom.get(this.errorContainer);
        this.isValid=true;
        if(this.subscribe && this.subscribe===true){
            // attach a submit listener to validate form
            CampusEcology.event.addListener(this.el,"submit",function(obj){
                return function(ev){
                    obj.submitHandler.apply(obj,arguments);
                }
            }(this));
        }
        // configure the fields
        for(var i=0,l=this.fields.length;i<l;i++){
            this.fields[i]=new CampusEcology.FormValidationField(this,this.fields[i]);
        }
    };
    CampusEcology.FormValidation.prototype.FindValidationField=function(fieldname){
            for(var ii=0,ll=this.fields.length;ii<ll;ii++){
                if(this.fields[ii].field==fieldname){
                    return this.fields[ii];
                }
            }
            return null;
    };

    CampusEcology.FormValidation.prototype.Validate=function(){
            this.isValid=true;
            for(var i=0,l=this.fields.length;i<l;i++){
                if(this.fields[i].Validate()==false){
                    this.isValid=false;
                }
            }
            if(this.isValid==false){
                this.ToggleFieldErrors();
            }
            return this.isValid;
    };
    CampusEcology.FormValidation.prototype.ToggleFieldErrors=function(){
                // go thru and mark the fields that are invalid.
                for(var i=0,l=this.fields.length;i<l;i++){
                    this.fields[i].isValid ? this.fields[i].ClearInvalid() : this.fields[i].MarkInvalid();
                }
    };
    CampusEcology.FormValidation.prototype.ResetErrors=function(){
            this.isValid=true;
            for(var i=0,l=this.fields.length;i<l;i++){
                this.fields[i].isValid=true;
                this.fields[i].ClearInvalid();
            }
    };
    CampusEcology.FormValidation.prototype.ToggleErrors=function(){
        if(!this.errorContainer) return;
        this.errorContainer.innerHTML="<h2 class=\"form-error-header\">"+this.errMsg+"</h2>";
        if(this.isValid){
            CampusEcology.dom.setStyle(this.errorContainer,"display","none");
        }
        else{
            var errorHTML="<table>";
            for(var i=0,l=this.fields.length;i<l;i++){
                var f=this.fields[i];
                if(f.isValid==false){
                    errorHTML+="<tr><td class=\"form-error-field\">"+(f.friendlyName || f.field)+":</td><td class=\"form-error-message\">"+f.errMsg+"</td></tr>";
                    //errorHTML+="<tr><td><div class=\"form-error-field\">"+(f.friendlyName || f.field)+":</div></td><td><div class=\"form-error-message\">"+f.errMsg+"</div></td></tr>";
                }
            }
            this.errorContainer.innerHTML+=errorHTML+"</table>";
            CampusEcology.dom.setStyle(this.errorContainer,"display","block");
        }
        this.errorContainer.innerHTML+="</table><h2 class=\"form-error-footer\">Please Try Again.</h2>";
    };
    CampusEcology.FormValidation.prototype.AddField=function(config){
        this.fields[this.fields.length]=new CampusEcology.FormValidationField(this,config);
    };
    CampusEcology.FormValidation.prototype.AddOrUpdateField=function(config){
        if(CampusEcology.lang.isArray(config)==false){
            config=[config];
        }
        for(var i=0,l=config.length;i<l;i++){
            // search existing field validators to see if one exists...
            var found=false;
            for(var ii=0,ll=this.fields.length;ii<ll;ii++){
                if(config[i].field==this.fields[ii].field){
                    found=ii;
                    // add these additional validation functions...
                    for(var iii=0,lll=config[i].validators.length;iii<lll;iii++){
                        this.fields[ii].validators[this.fields[ii].validators.length]=config[i].validators[iii];
                    }                        
                    break;
                }
            }
            if(found===false){
                this.AddField(config[i]);
            }
        }
        
    }
    CampusEcology.FormValidationField=function(form,config){
        var defaultconfig={
            validators: [],
            isValid: true,
            isRequired: false,
            errMsg: ""
        };
        CampusEcology.apply(defaultconfig,config);
        CampusEcology.apply(this,defaultconfig);
        this.form=form;
        this.el=CampusEcology.dom.get(this.field);
    };
    CampusEcology.FormValidationField.prototype.FindElement=function(){
                // couldn't get el by id. use the name to retreive from form instead.
                for(var i=0,l=this.form.el.elements.length;i<l;i++){
                    if(this.form.el.elements[i].name==this.field){
                        this.el=this.form.el.elements[i];
                        break;
                    }
                }
    };
    CampusEcology.FormValidationField.prototype.GetValue=function(){
            var value="";
            if(!this.el){
                this.FindElement();
            }
            switch(this.el.type){
                case "checkbox":
					if(this.el.checked==true){
						value=this.el.value;
					}
					break;
                case "radio":
                    // go thru form.elements for matching radio elements and use the one with checked=ture
                    for(var i=0,e=this.el.form.elements,l=e.length;i<l;i++){
                        if(this.el.name==e[i].name && e[i].checked){
                            value=e[i].value;
                            break;
                        }
                    }
                    break;
                case undefined:
                case 'reset':
                case 'button':
                    break;
                case 'submit':
                    break;
                default:
                    value=this.el.value;
                    break;
            }
            return value;
    };
    CampusEcology.FormValidationField.prototype.Validate=function(){
            var value=this.GetValue();
            this.isValid=true;
            this.errMsg="";

            if(this.isRequired==true && value==""){
                this.isValid=false;
                this.errMsg="This Field is Required.";
            }
            else{
                for(var i=0,l=this.validators.length;i<l;i++){
                    if(this.validators[i].fn(this,value)==false){
                        this.isValid=false;
                        this.errMsg=this.validators[i].errMsg;
                        break;
                    }
                }
            }
            return this.isValid;
    };
    CampusEcology.FormValidationField.prototype.ClearInvalid= function(){
            if(!this.el){
                this.FindElement();
            }
            CampusEcology.dom.removeClass(this.el,"x-form-invalid");
    };
    CampusEcology.FormValidationField.prototype.MarkInvalid= function(){
            if(!this.el){
                this.FindElement();
            }
            CampusEcology.dom.addClass(this.el,"x-form-invalid");
    };
