;

// jquery.suggest

	
	/*
	 *	jquery.suggest 1.1 - 2007-08-06
	 *	
	 *	Uses code and techniques from following libraries:
	 *	1. http://www.dyve.net/jquery/?autocomplete
	 *	2. http://dev.jquery.com/browser/trunk/plugins/interface/iautocompleter.js	
	 *
	 *	All the new stuff written by Peter Vulgaris (www.vulgarisoip.com)	
	 *	Feel free to do whatever you want with this file
	 *
	 */
	
	    jQuery.suggest = function(input, options, tabs) {

	        var $input = $(input).attr("autocomplete", "off");
	        var $results = $(document.createElement("ul"));

	        var timeout = false; 	// hold timeout ID for suggestion results to appear	
	        var prevLength = -1; 	// last recorded length of $input.val()
	        var cache = []; 			// cache MRU list
	        var cacheSize = 0; 		// size of cache in chars (bytes?)

	        $results.addClass(options.resultsClass).appendTo('body');


	        resetPosition();
	        $(window)
				.load(resetPosition)		// just in case user is changing size of page while loading
				.resize(resetPosition);

	        // Resets position when tab is clicked (prevents suggest appearing in wrong place).
//	        if (tabs != null) {
//	            tabs.bind('tabsshow', function(event, ui) {
//	                resetPosition();
//	            });
//	        }

	        $input.blur(function() {
	            setTimeout(function() { $results.hide() }, 200);
	        });

	        // reset the position of the results element when the input box gets the focus in case it moved since suggest() was called.
	        $input.focus(function() {
	            resetPosition();
	        });


	        // help IE users if possible
	        try {
	            $results.bgiframe();
	        } catch (e) { }


	        // I really hate browser detection, but I don't see any other way
	        if ($.browser.mozilla)
	            $input.keypress(processKey); // onkeypress repeats arrow keys in Mozilla/Opera
	        else
	            $input.keydown(processKey); 	// onkeydown repeats arrow keys in IE/Safari




	        function resetPosition() {
	            // requires jquery.dimension plugin
	            var offset = $input.offset();
	            $results.css({
	                top: (offset.top + input.offsetHeight) + 'px',
	                left: offset.left + 'px'
	            });
	        }


	        function processKey(e) {

	            // handling up/down/escape requires results to be visible
	            // handling enter/tab requires that AND a result to be selected
	            if ((/27$|38$|40$/.test(e.keyCode) && $results.is(':visible')) ||
					(/^13$|^9$/.test(e.keyCode) && getCurrentResult())) {

	                if (e.preventDefault)
	                    e.preventDefault();
	                if (e.stopPropagation)
	                    e.stopPropagation();

	                e.cancelBubble = true;
	                e.returnValue = false;

	                switch (e.keyCode) {

	                    case 38: // up
	                        prevResult();
	                        break;

	                    case 40: // down
	                        nextResult();
	                        break;

	                    case 9:  // tab
	                    case 13: // return
	                        selectCurrentResult();
	                        break;

	                    case 27: //	escape
	                        $results.hide();
	                        break;

	                }

	            }
	            else if (/^13$|^9$/.test(e.keyCode))
	                return; // tabs and enters should just be ignored
	            else if ($input.val().length != prevLength) {

	                if (timeout)
	                    clearTimeout(timeout);
	                timeout = setTimeout(suggest, options.delay);
	                prevLength = $input.val().length;

	            }
	        }


	        function suggest() {

	            var q = $.trim($input.val());
	            var items = null
	            var resultCollection = null;
	            if (q.length >= options.minchars) {
	                cached = checkCache(q);

	                if (cached) {
	                    if ($input.hasClass("focused")) {
	                        items = cached['items'];
	                        resultCollection = injectRecentlyEntered(items, q);
	                        displayItems(resultCollection);
	                    }
	                }
	                else {
	                    $.get(options.source, { prefix: q }, function(txt) {
	                        if ($input.hasClass("focused")) {
	                            $results.hide();
	                            items = parseTxt(txt, q);
	                            addToCache(q, items, txt.length);
	                            resultCollection = injectRecentlyEntered(items, q);
	                            displayItems(resultCollection);
	                        }


	                    });
	                }
	            }
	            else if (q.length > 0) {
	                if ($input.hasClass("focused")) {
	                    resultCollection = injectRecentlyEntered(items, q);
	                    displayItems(resultCollection);
	                }
	            }
	            else
	                $results.hide();

	        }

	        function injectRecentlyEntered(items, q) {
	            var recentlyEntered = getRecentlyEntered(q);
	            var cookieItems = recentlyEntered != null ? parseTxt(recentlyEntered, q) : null;
	            var returnedObject = new Object();
	            returnedObject.indexOfDivider = 0;

	            if (cookieItems == null) {
	                returnedObject.classToUse = "selectable_no_divider"
	            }

	            if (cookieItems != null) {
	                // figure out class to use [with divider, without divider]
	                if (items != null && items.length > 0 && cookieItems.length > 0)
	                    returnedObject.classToUse = "selectable_with_divider";
	                else if (items != null && items.length > 0)
	                    returnedObject.classToUse = "selectable_no_divider";

	                // figure out index of selectable class
	                returnedObject.indexOfDivider = cookieItems.length;

	                // combine items and cookie items into one list
	                items = (items != null) ? cookieItems.concat(items) : cookieItems;
	            }


	            returnedObject.items = items;

	            return returnedObject;
	        }


	        function escapeSuggestedValue(value) {
	            return unescape(value.toLowerCase()).replace(/\+/g, " ");
	        }

	        function getRecentlyEntered(q) {
	            if (q == null || q.length == 0)
	                return null;

	            var values = jQuery.cookie_get("userPreference", options.recentlyEnteredField);

	            if (values == null)
	                return null;

	            var items = new Array();
	            for (i = 0; i < values.length && i < 5; i++) {
	                if (escapeSuggestedValue(values[i]).substring(0, q.length) == q.toLowerCase())
	                    items.push(escapeSuggestedValue(values[i]));
	            }

	            items.sort();
	            return items.join("\n");
	        }

	        function checkCache(q) {

	            for (var i = 0; i < cache.length; i++)
	                if (cache[i]['q'] == q) {
	                cache.unshift(cache.splice(i, 1)[0]);
	                return cache[0];
	            }

	            return false;

	        }

	        function addToCache(q, items, size) {

	            while (cache.length && (cacheSize + size > options.maxCacheSize)) {
	                var cached = cache.pop();
	                cacheSize -= cached['size'];
	            }

	            cache.push({
	                q: q,
	                size: size,
	                items: items
	            });

	            cacheSize += size;

	        }

	        function displayItems(resultCollection) {


	            if (!resultCollection || !resultCollection.items)
	                return;

	            var items = resultCollection.items;

	            if (!items.length) {
	                $results.hide();
	                return;
	            }

	            var html = '';
	            for (var i = 0; i < items.length; i++) {
	                html += '<li>' + items[i] + '</li>';
	            }


	            $results.width($input.width() + parseInt($input.css("padding-left").replace("px", "")));
	            $results.html(html).show();

	            if (resultCollection.indexOfDivider < $results.children('li').length)
	                $results.children('li')[resultCollection.indexOfDivider].className = resultCollection.classToUse;

	            $results
					.children('li')
					.mouseover(function() {
					    $results.children('li').removeClass(options.selectClass);
					    $(this).addClass(options.selectClass);
					})
					.click(function(e) {
					    e.preventDefault();
					    e.stopPropagation();
					    selectCurrentResult();
					});
	        }

	        function parseTxt(txt, q) {

	            var items = [];
	            var tokens = txt.split(options.delimiter);

	            // parse returned data for non-empty items
	            for (var i = 0; i < tokens.length; i++) {
	                var token = $.trim(tokens[i]);
	                if (token) {
	                    token = token.replace(
							new RegExp(q, 'ig'),
							function(q) { return '<span class="' + options.matchClass + '">' + q + '</span>' }
							);
	                    items[items.length] = token;
	                }
	            }

	            return items;
	        }

	        function getCurrentResult() {

	            if (!$results.is(':visible'))
	                return false;

	            var $currentResult = $results.children('li.' + options.selectClass);

	            if (!$currentResult.length)
	                $currentResult = false;

	            return $currentResult;

	        }

	        function selectCurrentResult() {

	            $currentResult = getCurrentResult();

	            if ($currentResult) {
	                $input.val($currentResult.text());
	                $results.hide();

	                if (options.onSelect)
	                    options.onSelect.apply($input[0]);

	            }

	        }

	        function nextResult() {

	            $currentResult = getCurrentResult();

	            if ($currentResult)
	                $currentResult
						.removeClass(options.selectClass)
						.next()
							.addClass(options.selectClass);
	            else
	                $results.children('li:first-child').addClass(options.selectClass);

	        }

	        function prevResult() {

	            $currentResult = getCurrentResult();

	            if ($currentResult)
	                $currentResult
						.removeClass(options.selectClass)
						.prev()
							.addClass(options.selectClass);
	            else
	                $results.children('li:last-child').addClass(options.selectClass);

	        }

	    }

	    $.fn.suggest = function(source, options, tab) {

	        if (!source)
	            return;

	        options = options || {};
	        options.source = source;
	        options.delay = options.delay || 100;
	        options.resultsClass = options.resultsClass || 'ac_results';
	        options.selectClass = options.selectClass || 'ac_over';
	        options.matchClass = options.matchClass || 'ac_match';
	        options.minchars = options.minchars || 2;
	        options.delimiter = options.delimiter || '\n';
	        options.onSelect = options.onSelect || false;
	        options.maxCacheSize = options.maxCacheSize || 65536;
	        options.recentlyEnteredField = options.recentlyEnteredField || "";

	        this.each(function() {
	            new $.suggest(this, options, tab);
	        });

	        return this;

	    };
	



;

// jquery.validate

/*
 * jQuery validation plug-in 1.5.2
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){validator.settings.submitHandler.call(validator,validator.currentForm);return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=false;var validator=$(this[0].form).validate();this.each(function(){valid|=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(a.value);},filled:function(a){return!!$.trim(a.value);},unchecked:function(a){return!a.checked;}});$.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.format.apply(this,args);};if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init();};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);},highlight:function(element,errorClass){$(element).addClass(errorClass);},unhighlight:function(element,errorClass){$(element).removeClass(errorClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.format("Please enter no more than {0} characters."),minlength:$.format("Please enter at least {0} characters."),rangelength:$.format("Please enter a value between {0} and {1} characters long."),range:$.format("Please enter a value between {0} and {1}."),max:$.format("Please enter a value less than or equal to {0}."),min:$.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.formSubmitted=false;this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method");throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)return arguments[i];}return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function")message=message.call(this,rule.parameters,element);this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parents(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){return this.errors().filter("[for='"+this.idOrName(element)+"']");},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message;if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){if(response){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};errors[element.name]=response||validator.defaultMessage(element,"remote");validator.showErrors(errors);}previous.valid=response;validator.stopRequest(element,response);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){return value==$(param).val();}}});})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie)return false;this.addEventListener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie)return false;this.removeEventListener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})]);}})})(jQuery);


;

// jquery.delegate

/*
 * jQuery delegate plug-in v1.0
 *
 * Copyright (c) 2007 Jörn Zaefferer
 *
 * $Id: jquery.delegate.js 4328 2007-12-28 16:39:00Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

// provides cross-browser focusin and focusout events
// IE has native support, in other browsers, use event caputuring (neither bubbles)

// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jQuery-object for event.target 

// provides triggerEvent(type: String, target: Element) to trigger delegated events
;(function($) {
	$.extend($.event.special, {
		focusin: {
			setup: function() {
				if ($.browser.msie)
					return false;
				this.addEventListener("focus", $.event.special.focusin.handler, true);
			},
			teardown: function() {
				if ($.browser.msie)
					return false;
				this.removeEventListener("focus", $.event.special.focusin.handler, true);
			},
			handler: function(event) {
				var args = Array.prototype.slice.call( arguments, 1 );
				args.unshift($.extend($.event.fix(event), { type: "focusin" }));
				return $.event.handle.apply(this, args);
			}
		},
		focusout: {
			setup: function() {
				if ($.browser.msie)
					return false;
				this.addEventListener("blur", $.event.special.focusout.handler, true);
			},
			teardown: function() {
				if ($.browser.msie)
					return false;
				this.removeEventListener("blur", $.event.special.focusout.handler, true);
			},
			handler: function(event) {
				var args = Array.prototype.slice.call( arguments, 1 );
				args.unshift($.extend($.event.fix(event), { type: "focusout" }));
				return $.event.handle.apply(this, args);
			}
		}
	});
	$.extend($.fn, {
		delegate: function(type, delegate, handler) {
			return this.bind(type, function(event) {
				var target = $(event.target);
				if (target.is(delegate)) {
					return handler.apply(target, arguments);
				}
			});
		},
		triggerEvent: function(type, target) {
			return this.triggerHandler(type, [jQuery.event.fix({ type: type, target: target })]);
		}
	})
})(jQuery);



;

// opinionlab.onlineopinionengine

/* OnlineOpinion (S3tS v3.1) */

/* This product and other products of OpinionLab, Inc. are protected by U.S. Patent No. 6606581, 6421724, 6785717 B1 and other patents pending. */

var custom_var,_sp='%3A\\/\\/',_rp='%3A//',_poE=0.0, _poX=0.0,_sH=screen.height,_d=document,_w=window,_ht=escape(_w.location.href),_hr=_d.referrer,_tm=(new Date()).getTime(),_kp=0,_sW=screen.width;function _fC(_u){_aT=_sp+',\\/,\\.,-,_,'+_rp+',%2F,%2E,%2D,%5F';_aA=_aT.split(',');for(i=0;i<5;i++){eval('_u=_u.replace(/'+_aA[i]+'/g,_aA[i+5])')}return _u};function O_LC(){_w.open('https://secure.opinionlab.com/ccc01/comment_card.asp?time1='+_tm+'&time2='+(new Date()).getTime()+'&prev='+_fC(escape(_hr))+'&referer='+_fC(_ht)+'&height='+_sH+'&width='+_sW+'&custom_var='+custom_var,'comments','width=535,height=192,screenX='+((_sW-535)/2)+',screenY='+((_sH-192)/2)+',top='+((_sH-192)/2)+',left='+((_sW-535)/2)+',resizable=yes,copyhistory=yes,scrollbars=no')};function _fPe(){if(Math.random()>=1.0-_poE){O_LC();_poX=0.0}};function _fPx(){if(Math.random()>=1.0-_poX)O_LC()};window.onunload=_fPx;function O_GoT(_p){_d.write('<a href=\'javascript:O_LC()\' class=\'headerBarLinks\'>'+_p+'</a>');_fPe()}


;

// thickbox

/*
 * Thickbox 2.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2006 cody lindley
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 * Thickbox is built on top of the very light weight jQuery library.
 */

//on page load call TB_init
$(document).ready(TB_init);

//add thickbox to href elements that have a class of .thickbox
function TB_init(){
	$("a.thickbox").click(function(){
	var t = this.title || this.name || null;
	var g = this.rel || false;
	TB_show(t,this.href,g);
	this.blur();
	return false;
	});
}

function TB_show(caption, url, options) {//function called when the user clicks on a thickbox link
    
    // Preserve legacy calls
    var imageGroup = undefined;
    var modal = false;
    
    if (typeof(options) != "undefined" && options != null) {
        imageGroup = (typeof(options) == "string") ? options : options["imageGroup"];
        modal = options["modal"] || false;
    }
    
    
    
	try {
		if (document.getElementById("TB_HideSelect") == null) {
			$("body").append("<iframe id='TB_HideSelect' src='javascript:false'></iframe><div id='TB_overlay'></div><table cellspacing='0' cellpadding='0' border='0' id='TBwrapper' class='boxy-wrapper'><tr><td class='top-left killModal'></td><td class='top killModal'></td><td class='top-right killModal'></td></tr><tr><td class='left killModal'></td><td><div id='TB_window'></div></td><td class='right killModal'></td></tr><tr><td class='bottom-left killModal'></td><td class='bottom killModal'></td><td class='bottom-right killModal'></td></tr></table>");
		    if (modal == false) $("#TB_overlay").click(TB_remove);
		}
		
		if(caption==null){caption=""};
		
		$(window).scroll(TB_position);
 		
		TB_overlaySize();
		
		$("body").append("<div id='TB_load'><img src='/images/qi-loader.gif' /></div>");
		TB_load_position();
	
	   if(url.indexOf("?")!==-1){ //If there is a query string involved
			var baseURL = url.substr(0, url.indexOf("?"));
	   }else{ 
	   		var baseURL = url;
	   }
	   var urlString = /\.jpg|\.jpeg|\.png|\.gif|\.bmp/g;
	   var urlType = baseURL.toLowerCase().match(urlString);
		
		if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
				
			TB_PrevCaption = "";
			TB_PrevURL = "";
			TB_PrevHTML = "";
			TB_NextCaption = "";
			TB_NextURL = "";
			TB_NextHTML = "";
			TB_imageCount = "";
			TB_FoundURL = false;
			if(imageGroup){
				TB_TempArray = $("a[@rel="+imageGroup+"]").get();
				for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML == "")); TB_Counter++) {
					var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
						if (!(TB_TempArray[TB_Counter].href == url)) {						
							if (TB_FoundURL) {
								TB_NextCaption = TB_TempArray[TB_Counter].title;
								TB_NextURL = TB_TempArray[TB_Counter].href;
								TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
							} else {
								TB_PrevCaption = TB_TempArray[TB_Counter].title;
								TB_PrevURL = TB_TempArray[TB_Counter].href;
								TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
							}
						} else {
							TB_FoundURL = true;
							TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);											
						}
				}
			}

			imgPreloader = new Image();
			imgPreloader.onload = function() {
				imgPreloader.onload = null;

				// Resizing large images - orginal by Christian Montoya edited by me.
				var pagesize = TB_getPageSize();
				var x = pagesize[0] - 150;
				var y = pagesize[1] - 150;
				var imageWidth = imgPreloader.width;
				var imageHeight = imgPreloader.height;
				if (imageWidth > x) {
					imageHeight = imageHeight * (x / imageWidth);
					imageWidth = x;
					if (imageHeight > y) {
						imageWidth = imageWidth * (y / imageHeight);
						imageHeight = y;
					}
				} else if (imageHeight > y) {
					imageWidth = imageWidth * (y / imageHeight);
					imageHeight = y;
					if (imageWidth > x) {
						imageHeight = imageHeight * (x / imageWidth);
						imageWidth = x;
					}
				}
				// End Resizing

				TB_WIDTH = imageWidth + 30;
				TB_HEIGHT = imageHeight + 60;
				$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close' class='killModal'><img id='TB_Image' src='" + url + "' width='" + imageWidth + "' height='" + imageHeight + "' alt='" + caption + "'/></a>" + "<div id='TB_caption'>" + caption + "<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' class='killModal' title='Close'><img src='/images/modal_close.gif' alt='close window' /></a></div>");

				$("#TB_closeWindowButton img").click(FBCredirect);
				$("#TB_closeWindowButton").click(TB_remove);

				if (!(TB_PrevHTML == "")) {
					function goPrev() {
						//if($(document).unclick(goPrev)){$(document).unclick(goPrev)};
						if ($(document).unbind("click", goPrev)) { $(document).unbind("click", goPrev) };
						$("#TBwrapper").remove();
						$("body").append("<table cellspacing='0' cellpadding='0' border='0' id='TBwrapper' class='boxy-wrapper'><tr><td class='top-left killModal'></td><td class='top killModal'></td><td class='top-right killModal'></td></tr><tr><td class='left killModal'></td><td><div id='TB_window'></div></td><td class='right killModal'></td></tr><tr><td class='bottom-left killModal'></td><td class='bottom killModal'></td><td class='bottom-right killModal'></td></tr></table>");
						TB_show(TB_PrevCaption, TB_PrevURL, options);
						return false;
					}
					$("#TB_prev").click(goPrev);
				}

				if (!(TB_NextHTML == "")) {
					function goNext() {
						$("#TBwrapper").remove();
						$("body").append("<table cellspacing='0' cellpadding='0' border='0' id='TBwrapper' class='boxy-wrapper'><tr><td class='top-left killModal'></td><td class='top killModal'></td><td class='top-right killModal'></td></tr><tr><td class='left killModal'></td><td><div id='TB_window'></div></td><td class='right killModal'></td></tr><tr><td class='bottom-left killModal'></td><td class='bottom killModal'></td><td class='bottom-right killModal'></td></tr></table>");
						TB_show(TB_NextCaption, TB_NextURL, options);
						return false;
					}
					$("#TB_next").click(goNext);

				}

				document.onkeydown = function(e) {
					if (e == null) { // ie
						keycode = event.keyCode;
					} else { // mozilla
						keycode = e.which;
					}
					if (keycode == 27) { // close
						FBCredirect();
						TB_remove();
					} else if (keycode == 190) { // display previous image
						if (!(TB_NextHTML == "")) {
							document.onkeydown = "";
							goNext();
						}
					} else if (keycode == 188) { // display next image
						if (!(TB_PrevHTML == "")) {
							document.onkeydown = "";
							goPrev();
						}
					}
				}

				TB_position();
				$("#TB_load").remove();
				$("#TB_ImageOff").click(TB_remove);
				$("#TBwrapper").css({ display: "block" }); //for safari using css instead of show
			}
	  
			imgPreloader.src = url;
		}else{//code to show html pages
			
			var queryString = url.replace(/^[^\?]+\??/,'');
			var params = TB_parseQuery( queryString );
			
			TB_WIDTH = (params['width']*1);
			TB_HEIGHT = (params['height']*1);
			ajaxContentW = TB_WIDTH;
			ajaxContentH = TB_HEIGHT;
			
			/*
			TB_WIDTH = (params['width'] * 1) + 30;
			TB_HEIGHT = (params['height'] * 1) + 40;
			ajaxContentW = TB_WIDTH - 30;
			ajaxContentH = TB_HEIGHT - 45;
			*/
			
			if(url.indexOf('TB_iframe') != -1){				
					urlNoQuery = url.split('TB_');		
					$("#TB_window").append("<div id='TB_closeAjaxWindow' class='killModal'><a href='#' id='TB_closeWindowButton' title='Close'><img src='/images/modal_close.gif' alt='close window' /></a></div><iframe frameborder='0' allowtransparency='true' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' onload='TB_showIframe()' scrolling='no'> </iframe>");
				}else{
					$("#TB_window").append("<div id='TB_closeAjaxWindow' class='killModal'><a href='#' id='TB_closeWindowButton' title='Close'><img src='/images/modal_close.gif' alt='close window' /></a></div><div id='TB_ajaxContent' style='width:" + ajaxContentW + "px;height:" + ajaxContentH + "px;'></div>");
			}

			    $("#TB_closeWindowButton").click(modal == true ? FBCredirect : TB_remove);
			
				if(url.indexOf('TB_inline') != -1){	
					$("#TB_ajaxContent").html($('#' + params['inlineId']).html());
					TB_position();
					$("#TB_load").remove();
					$("#TBwrapper").css({display:"block"}); 
				}else if(url.indexOf('TB_iframe') != -1){
					TB_position();
					if(frames['TB_iframeContent'] == undefined){//be nice to safari
						$("#TB_load").remove();
						$("#TBwrapper").css({display:"block"});
						$(document).keyup(function(e) { var key = e.keyCode; if (key == 27) { TB_remove(); FBCredirect(); } });
					}
				}else{
					$("#TB_ajaxContent").load(url, function(){
						TB_position();
						$("#TB_load").remove();
						$("#TBwrapper").css({display:"block"}); 
					});
				}
			
		}
		
		$(window).resize(TB_position);

		document.onkeyup = function(e) {
			if (e == null) { // ie
				keycode = event.keyCode;
			} else { // mozilla
				keycode = e.which;
			}
			if (keycode == 27) { // close
				FBCredirect();
				TB_remove();
			}
		}
		
	} catch(e) {
		alert( e );
	}
}

//helper functions below

function TB_showIframe(){
	$("#TB_load").remove();
	$("#TBwrapper").css({display:"block"});
}

function TB_remove() {
// 	$("#TB_imageOff").unclick();
//	$("#TB_overlay").unclick();
//	$("#TB_closeWindowButton").unclick();
 	$("#TB_imageOff").unbind("click", null);
	$("#TB_overlay").unbind("click", null);
	$("#TB_closeWindowButton").unbind("click", null);
	$("#TBwrapper").fadeOut("fast",function(){$('#TBwrapper,#TB_overlay,#TB_HideSelect').remove();});
	$("#TB_load").remove();
	return false;
}

function TB_position() {
	var pagesize = TB_getPageSize();	
	var arrayPageScroll = TB_getPageScrollTop();
	//$("#TBwrapper").css({ width: TB_WIDTH + "px", left: (arrayPageScroll[0] + (pagesize[0] - TB_WIDTH) / 2) + "px", top: (arrayPageScroll[1] + (pagesize[1] - TB_HEIGHT) / 2) + "px" });
	$("#TBwrapper").css({left: ((arrayPageScroll[0] + (pagesize[0] - TB_WIDTH) / 2) - 44) + "px", top: ((pagesize[1] - TB_HEIGHT) / 2) + "px" });
}

function TB_overlaySize(){
	if (window.innerHeight && window.scrollMaxY || window.innerWidth && window.scrollMaxX) {	
		yScroll = window.innerHeight + window.scrollMaxY;
		xScroll = window.innerWidth + window.scrollMaxX;
		var deff = document.documentElement;
		var wff = (deff&&deff.clientWidth) || document.body.clientWidth || window.innerWidth || self.innerWidth;
		var hff = (deff&&deff.clientHeight) || document.body.clientHeight || window.innerHeight || self.innerHeight;
		xScroll -= (window.innerWidth - wff);
		yScroll -= (window.innerHeight - hff);
	} else if (document.body.scrollHeight > document.body.offsetHeight || document.body.scrollWidth > document.body.offsetWidth){ // all but Explorer Mac
		yScroll = document.body.scrollHeight;
		xScroll = document.body.scrollWidth;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		yScroll = document.body.offsetHeight;
		xScroll = document.body.offsetWidth;
  	}
	$("#TB_overlay").css({"height":yScroll +"px", "width":xScroll +"px"});
	$("#TB_HideSelect").css({"height":yScroll +"px","width":xScroll +"px"});
}

function TB_load_position() {
	var pagesize = TB_getPageSize();
	var arrayPageScroll = TB_getPageScrollTop();
	$("#TB_load")
	.css({left: (arrayPageScroll[0] + (pagesize[0] - 100)/2)+"px", top: (arrayPageScroll[1] + ((pagesize[1]-100)/2))+"px" })
	.css({display:"block"});
}

function TB_parseQuery ( query ) {
   var Params = new Object ();
   if ( ! query ) return Params; // return empty object
   var Pairs = query.split(/[;&]/);
   for ( var i = 0; i < Pairs.length; i++ ) {
      var KeyVal = Pairs[i].split('=');
      if ( ! KeyVal || KeyVal.length != 2 ) continue;
      var key = unescape( KeyVal[0] );
      var val = unescape( KeyVal[1] );
      val = val.replace(/\+/g, ' ');
      Params[key] = val;
   }
   return Params;
}


function TB_getPageScrollTop(){
	var yScrolltop;
	var xScrollleft;
	if (self.pageYOffset || self.pageXOffset) {
		yScrolltop = self.pageYOffset;
		xScrollleft = self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop || document.documentElement.scrollLeft ){	 // Explorer 6 Strict
		yScrolltop = document.documentElement.scrollTop;
		xScrollleft = document.documentElement.scrollLeft;
	} else if (document.body) {// all other Explorers
		yScrolltop = document.body.scrollTop;
		xScrollleft = document.body.scrollLeft;
	}
	arrayPageScroll = new Array(xScrollleft,yScrolltop) 
	return arrayPageScroll;
}

function TB_getPageSize(){
	var de = document.documentElement;
	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight
	arrayPageSize = new Array(w,h) 
	return arrayPageSize;
}




;

// yellowbook.ui.event


//removes an onchange event handler and returns a
//reference to the original event handler
function UnwireOnChangeEventGeneric(input) {
    var fxOnchange = input.onchange;
    input.onchange = null;
    return fxOnchange
}

//reassigns an event handler to an onchange event
function RewireOnChangeEventGeneric(input, fxOnChange) {
    input.onchange = fxOnChange;
}


//removes an onclick event handler and returns a
//reference to the original event handler
function UnwireOnClickEventGeneric(input) {
    var fxOnClick = input.onclick;
    input.onclick = null;
    return fxOnClick
}

//reassigns an event handler to an onclick event
function RewireOnClickEventGeneric(input, fxOnClick) {
    input.onclick = fxOnClick;
}


//removes an onblur event handler and returns a
//reference to the original event handler
function UnwireOnBlurEventGeneric(input) {
    var fxOnBlur = input.onblur;
    input.onblur = null;
    return fxOnBlur
}

//reassigns an event handler to an onblur event
function RewireOnBlurEventGeneric(input, fxOnBlur) {
    input.onblur = fxOnBlur;
}


//Description: Converts Keyboard codes into ASCII characters
//			Not localized, Standard US-English Keyboard.
//			Not all KeyCodes produce characters
function KeyCodeToChar(keyCode, shiftMask, ctrlMask, altMask) {
    if (ctrlMask == true && keyCode == 86) // ctrl-v
        return "ctrl-v";
    else if (shiftMask == true && keyCode == 45) // shift-insert
        return "shift-ins";
    else if ((ctrlMask == true) || (altMask == true)) {
    } else {
        if ((keyCode >= 65) && (keyCode <= 90)) {			 //a-z
            if (shiftMask == true) {
                return String.fromCharCode(keyCode + 32); //A-Z
            } else {
                return String.fromCharCode(keyCode);
            }
        } else if ((keyCode >= 96) && (keyCode <= 105)) {			   //Number Pad
            return String.fromCharCode(keyCode - 48);
        } else if (keyCode == 13) {			   //Return
            return String.fromCharCode(keyCode - 48);
        } else if ((keyCode >= 48) && (keyCode <= 57)) { //Top-row numbers
            if (shiftMask != true) {
                return String.fromCharCode(keyCode);
            } else {
                switch (keyCode) {
                    case 49:
                        return "!";
                        break;
                    case 50:
                        return "@";
                        break;
                    case 51:
                        return "#";
                        break;
                    case 52:
                        return "$";
                        break;
                    case 53:
                        return "%";
                        break;
                    case 54:
                        return "^";
                        break;
                    case 55:
                        return "&";
                        break;
                    case 56:
                        return "*";
                        break;
                    case 57:
                        return "(";
                        break;
                    case 48:
                        return ")";
                        break;
                }
            }
        } else {
            switch (keyCode) {
                case 32: // `~
                    return String.fromCharCode(keyCode)
                    break;
                case 192: 		  // `~
                    return String.fromCharCode((shiftMask == true) ? 126 : 96)
                    break;
                case 189: 		  // -_
                    return String.fromCharCode((shiftMask == true) ? 95 : 45)
                    break;
                case 187: 		  // =+
                    return String.fromCharCode((shiftMask == true) ? 43 : 61)
                    break;
                case 219: 		  // [{
                    return String.fromCharCode((shiftMask == true) ? 123 : 91)
                    break;
                case 221: 		  // ]}
                    return String.fromCharCode((shiftMask == true) ? 125 : 93)
                    break;
                case 220: 		  // \|
                    return String.fromCharCode((shiftMask == true) ? 124 : 92)
                    break;
                case 186: 		  // ;:
                    return String.fromCharCode((shiftMask == true) ? 58 : 59)
                    break;
                case 222: 		  // '"
                    return String.fromCharCode((shiftMask == true) ? 34 : 39)
                    break;
                case 188: 		  // ,<
                    return String.fromCharCode((shiftMask == true) ? 60 : 44)
                    break;
                case 190: 		  // .>
                    return String.fromCharCode((shiftMask == true) ? 62 : 46)
                    break;
                case 191: 		  // /?
                    return String.fromCharCode((shiftMask == true) ? 63 : 47)
                    break;
            }
        }
    }
    return new String();
}



;

// yellowbook.ui.text


function Trim(s) {
    if (typeof (s) == "undefined" || s == null) s = "";
    return s.replace(/^\s+|\s+$/g, "");
}


function HtmlEncode(value) {
    var sValue = new String();
    if (value != null) {

        sValue = value.toString();
        sValue = sValue.replace(/\&/g, "&amp;");
        sValue = sValue.replace(/\</g, "&lt;");
        sValue = sValue.replace(/\>/g, "&gt;");
        sValue = sValue.replace(/\"/g, "&quot;");
        //sValue = sValue.replace(/\'/g, "&apos;");
    }
    return sValue;
}


function JavaScriptEncode(value) {
    var sValue = new String();

    if (value != null) {
        sValue = value.toString();
        sValue = sValue.replace(/\'/g, "\\\'");
        sValue = sValue.replace(/\"/g, "\\\"");
        sValue = sValue.replace(/\n/g, "\\n");
        sValue = sValue.replace(/\r/g, "\\r");
        sValue = sValue.replace(/\t/g, "\\t");

        var chars = new Array();
        var sTemp = new String();
        for (var i = 0; i < sValue.length; i++) {
            var nAsc = sValue.charCodeAt(i);
            if ((nAsc < 32) && ((nAsc != 9) && (nAsc != 10) && (nAsc != 13))) {
                var sHex = new String();
                sHex = sValue.charCodeAt(i).toString(16);
                sHex = "00" + sHex;
                sHex = sHex.substring(sHex.length - 2, sHex.length);
                sTemp += "\\x" + sHex;
            } else if (nAsc > 255) {
                var sHex = new String();
                sHex = sValue.charCodeAt(i).toString(16);
                sHex = "0000" + sHex;
                sHex = sHex.substring(sHex.length - 4, sHex.length);
                sTemp += "\\u" + sHex;
            } else {
                sTemp += sValue.substring(i, i + 1);
            }
        }
        sValue = sTemp;
    }

    return sValue;
}




function HtmlPostEncode(value, LeftTagToken, RightTagToken) {
    var sValue = new String();

    if (value != null) {
        sValue = value.toString();
        sValue = sValue.replace(/\</g, LeftTagToken);
        sValue = sValue.replace(/\>/g, RightTagToken);
    }

    return sValue;
}





;

// yellowbook.ui.searchvalidation

function clearFormValue(e, elementName) {
    if (e == undefined)
        e = window.event;

    var key = e.keyCode || e.which;
    var altKey = e.altMask || e.altKey;
    var shiftKey = e.shiftMask || e.shiftKey;
    var ctrlKey = e.ctrlMask || e.ctrlKey;
    var keychar = KeyCodeToChar(key, shiftKey, ctrlKey, altKey);

    if (typeof (keychar) != "undefined" && keychar.length > 0 && $(elementName)[0].value.length > 0) {
        $(elementName)[0].value = "";
    }
}

function clearFormValueOnChange(sourceElementName, destinationElementName) {
    if ($(sourceElementName)[0].value.length > 0)
        $(destinationElementName)[0].value = "";
}


function toggleFocusCss(focusedTextbox, otherTextboxes) {
    if (otherTextboxes != null) {
        for (var i = 0; i < otherTextboxes.length; i++)
            $(otherTextboxes[i]).removeClass("focused");
    }
    $(focusedTextbox).addClass("focused");
}

function highlightOnFocus(textElement) {
    if (typeof ($(textElement)[0].selectionStart) != "undefined") {
        $(textElement)[0].selectionStart = 0;
        $(textElement)[0].selectionEnd = $(textElement)[0].value.length;
    }
}

function focusOnTab(e, what, where, source) {
    if (e == undefined)
        e = window.event;

    var key = e.keyCode || e.which;
    var shiftKey = e.shiftMask || e.shiftKey;
    var tab = (key == 9);
    var preventOtherEvents = false;

    if (((source == what && $(what)[0].value.length > 0)) && tab && !shiftKey) {  // tab from what --> where
        preventOtherEvents = true;
        $(where).focus();
        $(where)[0].select();
    }
    else if (source == where && tab && shiftKey) // shift-tab from where --> go to whatever has text
    {
        preventOtherEvents = true;
        $(what).focus();
        $(what)[0].select();
    }
    if (preventOtherEvents) {
        if (e.keyCode != undefined)
            e.keyCode = 0;
        if (e.which != undefined)
            e.which = 0;
        $(".ac_results").hide();
        return false;
    }

    return true;
}

function CreateValidationMethods() {
    /* validation rules */
    jQuery.validator.addMethod("no-what-where", function(value) {
        var what = HtmlEncode(Trim($("#what")[0].value));
        var where = HtmlEncode(Trim($("#where")[0].value));

        return !(what == "" && where == "");
    }, "");

    jQuery.validator.addMethod("no-what", function(value) {
        var what = HtmlEncode(Trim($("#what")[0].value));
        var where = HtmlEncode(Trim($("#where")[0].value));

        return !(what == "" && where.length > 0);
    }, "");

    jQuery.validator.addMethod("no-location", function(value) {
        var what = HtmlEncode(Trim($("#what")[0].value));
        var where = HtmlEncode(Trim($("#where")[0].value));

        return !(what.length > 0 && where == "");
    }, "");

    jQuery.validator.addMethod("valid-phone", function(value) {
        var phone_number = HtmlEncode(Trim($("#phone")[0].value).replace(/[^A-Za-z0-9]/gi, ""));
        var l = (phone_number.length > 0 && phone_number.substring(0,1) == "1") ? 11 : 10;
        return (phone_number.length == l);
    }, "Invalid search for {0}. Provide a valid 10-digit number");

    jQuery.validator.addMethod("no-fn-ln-where", function(value) {

        var fn = HtmlEncode(Trim($("#fn").val()));
        var ln = HtmlEncode(Trim($("#ln").val()));
        var where = HtmlEncode(Trim($("#where").val()));

        return !(fn == "" && ln == "" && where == "");

    }, "");

    jQuery.validator.addMethod("no-ln-where", function(value) {

        var fn = HtmlEncode(Trim($("#fn").val()));
        var ln = HtmlEncode(Trim($("#ln").val()));
        var where = HtmlEncode(Trim($("#where").val()));

        return !(fn.length > 0 && ln == "" && where == "");

    }, "");

    jQuery.validator.addMethod("no-fn-where", function(value) {

        var fn = HtmlEncode(Trim($("#fn").val()));
        var ln = HtmlEncode(Trim($("#ln").val()));
        var where = HtmlEncode(Trim($("#where").val()));

        return !(fn == "" && ln.length > 0 && where == "");

    }, "");

    jQuery.validator.addMethod("no-peoplewhere", function(value) {

        var fn = HtmlEncode(Trim($("#fn").val()));
        var ln = HtmlEncode(Trim($("#ln").val()));
        var where = HtmlEncode(Trim($("#where").val()));

        return !(fn.length > 0 && ln.length > 0 && where == "");

    }, "");
}

function AddValidation(error_container) {

    //var peopleSearchLastNameWhere = "Sorry, but we need the <strong>LAST NAME</strong> and <strong>LOCATION</strong> of  the person you're looking for. Please try your search again.";
    var missingLastName = "Sorry, but the <strong>Last Name</strong> must have at least 2 characters. Please try your search again.";
    var noWhatWhere = "";
    var noWhat = "Sorry, but we need <strong>What</strong> you are searching for in \"{0}.\" Please try your search again.<br/>\n<br />\n<div class=\"exceptionTipText\"><span class=\"exceptionTip\">Tip:</span><br />\nYou can also search by browsing the product and service categories.</div>";
    var noLocation = "Sorry, but we need <strong>Where</strong> you are searching for \"{0}.\" Please try your search again.";
    var businessMinSearch = "Invalid search. Include at least 3 characters in the <u>What</u> box.";
    var invalidPhone = "Sorry, but we couldn't recognize \"{0}.\" Please try your search again.\n<br/>\n<br />\n<div class=\"exceptionTipText\"><span class=\"exceptionTip\">Tip:</span><br />\nThe PHONE NUMBER must be numeric and include the area code (ex. 215-555-1212).</div>";

    var noFnLnWhere = "";
    var noPeopleWhere = "Sorry, but we need the location of the person you're looking for. Please try your search again.";
    var noLnWhere = "Sorry, but we need the last name and location of the person you're looking for. Please try your search again.";
    var containerId = "#" + error_container;

    CreateValidationMethods();

    $("#businessSearchForm").validate({
        errorLabelContainer: containerId,
        wrapper: "li",
        onfocusout: false,
        onkeyup: false,
        onclick: false,
        focusInvalid: false,
        showErrors: function(errorMap, errorList) {
            if ((errorList.length > 0) && (errorList[0].message.length > 0)) {
                $(containerId).html("<li>" + jQuery.format(errorList[0].message, HtmlEncode(errorList[0].element.value)) + "</li>");
                $('div.messageBoxCont').show();
            } else {
                clearErrors();
            }
            //this.defaultShowErrors();
        },
        rules: { where: { "no-what-where": true, "no-what": true },
            what: { minlength: 3, "no-location": true }
        },
        messages: { where: { "no-what-where": noWhatWhere, "no-what": noWhat },
            what: { minlength: businessMinSearch, "no-location": noLocation }
        }
    });


    $("#peopleSearchForm").validate({
        errorLabelContainer: containerId,
        wrapper: "li",
        onfocusout: false,
        onkeyup: false,
        onclick: false,
        focusInvalid: false,
        showErrors: function(errorMap, errorList) {
            if ((errorList.length > 0) && (errorList[0].message.length > 0)) {
                $(containerId).html("<li>" + jQuery.format(errorList[0].message, HtmlEncode(errorList[0].element.value)) + "</li>");
                $('div.messageBoxCont').show();
            } else {
                clearErrors();
            }
            //this.defaultShowErrors();
        },
        rules: {
            fn: { "no-fn-ln-where": true, "no-fn-where": true, "no-ln-where": true },
            ln: { required: true, minlength: 2 },
            where: { "no-peoplewhere": true }
        },
        messages: {
            fn: { "no-fn-ln-where": "", "no-fn-where": noLnWhere, "no-ln-where": noLnWhere },
            ln: { required: missingLastName, minlength: missingLastName },
            where: { "no-peoplewhere": noPeopleWhere }
        }
    });

    $("#reverseLookupForm").validate({
        errorLabelContainer: containerId,
        wrapper: "li",
        onfocusout: false,
        onkeyup: false,
        onclick: false,
        focusInvalid: false,
        showErrors: function(errorMap, errorList) {

            if ((errorList.length > 0) && (errorList[0].message.length > 0)) {
                $(containerId).html("<li>" + jQuery.format(errorList[0].message, HtmlEncode(errorList[0].element.value)) + "</li>");
                $('div.messageBoxCont').show();
            } else {
                clearErrors();
            }
            //this.defaultShowErrors();
        },
        rules: {
            phone: { "valid-phone": true }
        },
        messages: {
            phone: { "valid-phone": invalidPhone }
        }
    });
}



;

// jquery.cookie

jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', value, expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = cookie.substring(name.length + 1);
                    break;
                }
            }
        }
        return cookieValue;
    }
}

jQuery.cookie_get = function(cookieName, cookieValueKey)
{
    var cookie = jQuery.cookie(cookieName);
    if (cookieValueKey == null)
        return cookie;
           
    var result = null;
    if (cookie == null) return result;

    var values = cookie.split("&");
    
    var valueIndex = jQuery.getcookieValueKeyIndex(values, cookieValueKey);
    if (valueIndex != -1)
    {
        var splitvalues = values[valueIndex].split("=");
        if (splitvalues.length != 2 || splitvalues[0] == null || splitvalues[1] == null)
            result = null;
            
        if (splitvalues[0] == cookieValueKey)
            result = splitvalues[1].split(escape("|").toLowerCase());
    }

    return result;

}

jQuery.getcookieValueKeyIndex = function(valuesArray, cookieValueKey)
{
    if (cookieValueKey == null || valuesArray == null)
        return -1;
        
    for (var i=0; i < valuesArray.length; i++)
    {
        if (valuesArray[i] == null) continue;
        
        var splitvalues = valuesArray[i].split("=");
        
        if (splitvalues != null && splitvalues[0] == cookieValueKey)
            return i;
    }
    
    return -1;            
}

jQuery.cookieValue_set = function (cookieName, cookieValueKey, cookieData)
{

    // get the cookie
    // see if that value is already in the cookie
    // if it is then replace with cookieData
    // otherwise add it to the cookie value collection

    // get the cookie
    var cookie = jQuery.cookie(cookieName);
    if (cookie != null)
    {
        var values = cookie.split("&");
        var valueIndex = jQuery.getcookieValueKeyIndex(values, cookieValueKey)
        
        var valueAndData = cookieValueKey + "=" + cookieData;
        if (valueIndex == -1)
            values.push(valueAndData);
        else
            values[valueIndex] = valueAndData;
        
        jQuery.cookie(cookieName, values.join("&"), {expires: 365, path:"/"});
    }
}


;

// opinionlab.floatercore

/* OnlineOpinion v4.1.4 patch 4 */
/* This product and other products of OpinionLab, Inc. are protected by U.S. Patent No. 6606581, 6421724, 6785717 B1 and other patents pending. */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('I 1f=1a 1L();1f.25={4d:J(a){F(!L.Z|!L.3i)M;I b=17.26;F(1w 17.26!=\'J\'){17.26=a}R{17.26=J(){b();a()}}},4e:J(a){F(!L.Z|!L.3i)M;I b=17.27;F(1w 17.27!=\'J\'){17.27=a}R{17.27=J(){a();b()}}},2K:J(a,b,c){I d=17.3j(a,b,c);F(1w d==\'1G\'){F(L.2L){L.Z("28").1M=a;L.Z("28").4f()}R{I e=17.3j(a,\'4g\');e.4h()}};M 1j},3k:J(a,b,c,d){I e=29;I f=0;1N(a&&b>0){f++;F(f>=e){I g=J(){1f.25.3k(a,b,c,d)};4i(g,50);M}F(a.2a=="A"){F(c.28(a.1M)){a.3l=J(){d.G.P.1c.1o=0}}}F(a.2a=="4j"){F(a.U=="4k"||a.U=="4l"){a.3l=J(){d.G.P.1c.1o=0}}}F(a.2a=="4m"){F(1w a.2b!=\'J\'){a.2b=J(){d.G.P.1c.1o=0}}R{I h=a.2b;a.2b=J(){d.G.P.1c.1o=0;h()}}}F(a.3m==1){I i=/^(3n|Q|4n)/i;F(!i.28(a.2a)&&a.2M.1b>0){a=a.2M[0];b++;4o}}F(a.1O){a=a.1O}R{1N(b>0){a=a.4p;b--;F(a==N)2c;F(a.1O){a=a.1O;2c}}}}}};1f.1P=J(){E.1p=\'3o\';E.1Q=24*60*60*29;E.1R=J(a){I b=\'4q\',2N=\'\';1k(I j=0;j<=3;j++)2N+=b.2O((a>>(j*8+4))&3p)+b.2O((a>>(j*8))&3p);M 2N};E.3q=J(a){I b=((a.1b+8)>>6)+1,1H=1a 4r(b*16);I i=0;1k(;i<b*16;i++)1H[i]=0;1k(i=0;i<a.1b;i++)1H[i>>2]|=a.4s(i)<<((i%4)*8);1H[i>>2]|=4t<<((i%4)*8);1H[b*16-2]=a.1b*8;M 1H};E.1q=J(x,y){I a=(x&2P)+(y&2P),3r=(x>>16)+(y>>16)+(a>>16);M(3r<<16)|(a&2P)};E.3s=J(a,b){M(a<<b)|(a>>>(32-b))};E.2d=J(q,a,b,x,s,t){M E.1q(E.3s(E.1q(E.1q(a,q),E.1q(x,t)),s),b)};E.V=J(a,b,c,d,x,s){M E.2d((b&c)|((~b)&d),a,0,x,s,0)};E.X=J(a,b,c,d,x,s){M E.2d((b&c)|(b&d)|(c&d),a,0,x,s,4u)};E.Y=J(a,b,c,d,x,s){M E.2d(b^c^d,a,0,x,s,4v)};E.1S=J(e){I x=E.3q(e),a=4w,b=-4x,c=-4y,d=4z;1k(I i=0;i<x.1b;i+=16){I f=a,3t=b,3u=c,3v=d;a=E.V(a,b,c,d,x[i+0],3);d=E.V(d,a,b,c,x[i+1],7);c=E.V(c,d,a,b,x[i+2],11);b=E.V(b,c,d,a,x[i+3],19);a=E.V(a,b,c,d,x[i+4],3);d=E.V(d,a,b,c,x[i+5],7);c=E.V(c,d,a,b,x[i+6],11);b=E.V(b,c,d,a,x[i+7],19);a=E.V(a,b,c,d,x[i+8],3);d=E.V(d,a,b,c,x[i+9],7);c=E.V(c,d,a,b,x[i+10],11);b=E.V(b,c,d,a,x[i+11],19);a=E.V(a,b,c,d,x[i+12],3);d=E.V(d,a,b,c,x[i+13],7);c=E.V(c,d,a,b,x[i+14],11);b=E.V(b,c,d,a,x[i+15],19);a=E.X(a,b,c,d,x[i+0],3);d=E.X(d,a,b,c,x[i+4],5);c=E.X(c,d,a,b,x[i+8],9);b=E.X(b,c,d,a,x[i+12],13);a=E.X(a,b,c,d,x[i+1],3);d=E.X(d,a,b,c,x[i+5],5);c=E.X(c,d,a,b,x[i+9],9);b=E.X(b,c,d,a,x[i+13],13);a=E.X(a,b,c,d,x[i+2],3);d=E.X(d,a,b,c,x[i+6],5);c=E.X(c,d,a,b,x[i+10],9);b=E.X(b,c,d,a,x[i+14],13);a=E.X(a,b,c,d,x[i+3],3);d=E.X(d,a,b,c,x[i+7],5);c=E.X(c,d,a,b,x[i+11],9);b=E.X(b,c,d,a,x[i+15],13);a=E.Y(a,b,c,d,x[i+0],3);d=E.Y(d,a,b,c,x[i+8],9);c=E.Y(c,d,a,b,x[i+4],11);b=E.Y(b,c,d,a,x[i+12],15);a=E.Y(a,b,c,d,x[i+2],3);d=E.Y(d,a,b,c,x[i+10],9);c=E.Y(c,d,a,b,x[i+6],11);b=E.Y(b,c,d,a,x[i+14],15);a=E.Y(a,b,c,d,x[i+1],3);d=E.Y(d,a,b,c,x[i+9],9);c=E.Y(c,d,a,b,x[i+5],11);b=E.Y(b,c,d,a,x[i+13],15);a=E.Y(a,b,c,d,x[i+3],3);d=E.Y(d,a,b,c,x[i+11],9);c=E.Y(c,d,a,b,x[i+7],11);b=E.Y(b,c,d,a,x[i+15],15);a=E.1q(a,f);b=E.1q(b,3t);c=E.1q(c,3u);d=E.1q(d,3v)}M E.1R(a)+E.1R(b)+E.1R(c)+E.1R(d)};E.2e=J(n){I a=n+"=";I b=L.1P.3w(\';\');1k(I i=0;i<b.1b;i++){I c=b[i];1N(c.2O(0)==\' \')c=c.2f(1,c.1b);F(c.4A(a)==0)M 3x(c.2f(a.1b,c.1b))}M N};E.3y=J(n,v){L.1P=n+\'=\'+v+\';4B=/;4C=\'+(1a 1T((1a 1T()).2g()+E.1Q)).4D()};E.2h=J(u,a){I i=0,c=E.2e(E.1p);F(a==\'3z\')u=/(:\\/\\/)[\\w\\d\\:\\.]+/g.2Q(u)[0].1g(\'://\',\'\');n=E.1S(u);F(c==N)M 1j;1N(i<c.1b){j=i+n.1b;F(c.2f(i,j)==n){M(3x(c.2f(j+1,j+2))==1)}i++}M 1j};E.2R=J(u,a){F(a==\'3z\')u=/(:\\/\\/)[\\w\\d\\:\\.]+/g.2Q(u)[0].1g(\'://\',\'\');I b="";F(E.2e(E.1p)!=N){b=E.2e(E.1p).1g(3A(\'/\'+2i(E.1S(u))+\'~1:/g\'),\'\')}E.3y(E.1p,b+(b!=\'\'?\':\':\'\')+2i(E.1S(u))+\'~1\')}};1f.4E=J(D){E.1U=D;J 1A(a,b){I c=1a 4F(b);I m=c.2Q(a);F(m==N||m==\'\'){M\'\'}R{I s="";1k(i=0;i<m.1b;i++){s=s+m[i]}M s}};E.4G=J(a){3B=E.4H+\',\\\\/,\\\\.,-,4I,\'+E.4J+\',%2F,%2E,%2D,%5F\';2S=3B.3w(\',\');1k(i=0;i<5;i++){3A(\'3C=3C.1g(/\'+2S[i]+\'/g,2S[i+5])\')}M a};E.3D=J(){E.T=N;E.1e=N;I a=3E.4K.4L();F(17.4M){E.T=\'1V\';E.1e=1A(a,"3F\\\\s[0-9]\\.[0-9]+").1g(\'3F \',\'\')}R{F(17.1B){E.T=\'1B\';E.1e=1A(a,"1B.[0-9]\\.[0-9]+").1g(\'1B\',\'\').1g(\'/\',\'\')}R{F(L.2M&&!L.2L&&!3E.4N){F(1A(a,"2T\\/[0-9]+")!=N){E.T=\'2j\';E.1e=1A(a,"2T\\/[0-9]+").1g(\'2T/\',\'\')}R{E.T=\'2U\';E.1e=1A(a,"2U\\/[0-9]\\.[0-9]\\.[0-9]+").1g(\'2U/\',\'\')}}R F(L.4O!=N){E.T=\'2k\';E.1e=1A(a,"2k/[0-9]+").1g(\'2k/\',\'\')}}}};E.1r=J(a,b){I c=\'\',2l=0;1k(I i 4P a){F(1w a[i]!=\'J\'&&1w a[i]!=\'1G\'&&a[i]!=N&&a[i]!=\'\'){F(b==0){c+=(2l==0?\'\':\'&\')+i+\'=\'+2i(a[i])}R{F(b==1){c+=(2l==0?\'\':\'|\')+2i(a[i])}}2l++}}M c};E.G=1a 1L();E.G.18={1C:1I,1l:\'3G\',1p:\'3o\',1Q:24*60*60*29};E.G.K={U:\'2m\',1J:\'4Q\',3H:\'4R\',3I:\'4S\',3J:\'4T/4U.4V\',3K:\'4W\',3L:\'4X\',3M:\'4Y 4Z 51<52>53 E 3G\',2V:\'\',1x:\'1W\'};E.O=1a 1L();E.O.S={\'1D\':3N.1D,\'1E\':3N.1E,\'1m\':17.1X.1M,\'54\':L.55,\'56\':(1a 1T()).2g(),\'2W\':N};E.O.1Y=1a 1L();E.G.P=1a 1L();E.G.P.1c={2X:0.0,1o:0.0,2Y:{1h:\'\',1Z:0.0},57:0.0};E.58=J(){F(2n.2Z()>=1.0-E.G.P.1c.2X){E.2o();E.G.P.1c.1o=0.0}};E.59=J(){F(2n.2Z()>=1.0-E.G.P.1c.1o)E.2o()};E.5a=J(){F(2n.2Z()>=1.0-E.G.P.1c.2Y){E.2o();E.G.P.1c.1o=0.0;E.G.P.1c.2Y=0.0}};E.G.P.2p={3O:1j,3P:\'\',3Q:\'\'};E.G.P.1F={1C:1j,30:\'5b\',31:\'5c\'};E.3R=J(){F(E.G.P.2p.3O==1I){E.O.S.1m=E.O.S.1m.1g(E.G.P.2p.3P,E.G.P.2p.3Q)}F(1w 1f.1P!=\'1G\'&&E.G.18.1l!=N){E.1d=1a 1f.1P();F(1w E.G.18.1p!=\'1G\')E.1d.1p=E.G.18.1p;E.1d.1Q=29*E.G.18.1Q;F(E.1d.2h(E.O.S.1m,E.G.18.1l)==1){E.G.P.1c.1o=0;E.G.P.1c.2X=0;M 1j}}R{E.1d=N}M 1I};E.5d=J(f){E.3R();I b=1a E.3D();I d=L;I g=d.5e;I h=d.5f;I w=17;I i=E.G.K.1J;I j=3S(b.1e);I k=d.5g==\'5h\';I l=k?g:h;F(b.T=="2j"){l=h}F(b.T==N||b.1e==N||3T(1i(b.1e,10))||(b.T==\'1V\'&&3S(b.1e)<6)||(b.T==\'1B\'&&1i(b.1e,10)<8)||(b.T==\'2k\'&&1i(b.1e,10)<5i))M 1j;I m=d.Z(i);F(m==N){F(E.G.K.U==\'2m\'){m=h.1s(d.1t("20"));m.1h=i}}F(m.21==""){F(E.G.K.U==\'2m\'){F(E.G.18.1C&&E.G.18.1l!=N){F(E.1d.2h(E.O.S.1m,E.G.18.1l)==1)M 1j}I n=m.1s(d.1t("20"));n.1h=E.G.K.3H;I o=m.1s(d.1t("20"));o.1h=E.G.K.3I;o.Q.1u=\'22\';n.5j=J(){d.Z(o.1h).Q.1u=\'2q\';L.Z(n.1h).Q.1u=\'22\'};o.5k=J(){d.Z(o.1h).Q.1u=\'22\';L.Z(n.1h).Q.1u=\'2q\'};I p=n.1s(d.1t("5l"));p.33=E.G.K.3J;I q=n.1s(d.1t("5m"));q.1h=E.G.K.3K;q.21=E.G.K.3L;I r=N;F(E.G.K.3U){r=E.G.K.3U}R{F(L.2L){r=q.5n}R{r=q.5o}}m.5p=r;m.5q=r;o.21=E.G.K.3M}F(E.G.K.U==\'3V\'){m.21=E.G.K.5r}}F(E.G.K.U==\'2m\'){F(!E.G.K.1x)E.G.K.1x=\'1W\';I s=m.Q;I t=E;F(E.G.K.1x=="34"){J 2r(){M u.3W+u.3X+1}I u=d.Z(t.G.K.5s||"5t");F(u==N){u=h.5u;1N(u&&u.3m!=5v.5w){u=u.1O}}J 2s(){F(t.G.K.5x){h.Q.5y="35";I a=N;F(L.36&&L.36.3Y){a=1i(L.36.3Y(u,N).5z("5A-1n"))}R{a=1i(u.5B.5C)}F(3T(a)||a==0){a=u.3X||0}h.Q.5D=(2n.5E(u.5G*-0.5)-2+a)+\'1v 0\'}}}I v=J(e){F(t.G.K.1x==\'1W\'){s.1n=l.37+l.2t-m.2t}R F(t.G.K.1x=="34"){s.1n=2r()+\'1v\'}s.23=l.5H+l.2u-m.2u;F(e==N||e.U==\'38\')s.3Z=\'40\';F(e==N||e.U==\'38\'||e.U==\'2v\')2s()};F(b.T==\'1V\'&&(j<7||!k)){s.2w=\'39\';J 3a(a,b){1k(I c=0;c<b.1b;c++){I d=b[c];a.3b("5I"+d,v)}};3a(m,["5J","5K"]);3a(w,["2v","35","5L","38"])}R{s.2w=\'1W\';F(E.G.K.1x==\'1W\'){s.5M=\'2x\';s.41=\'2x\'}R F(E.G.K.1x=="34"){I x=2r()-l.37+\'1v\';s.41=\'2x\';s.1n=x;I y=d.1t("20");h.5N(y,m);y.1s(m);y.Q.2w="39";y.Q.1D=m.3W+\'1v\';y.Q.1n=x;y.Q.23=\'2x\';y.Q.1E=l.5O+\'1v\';2s();I z=J(e){I a=2r();s.1n=a-l.37+\'1v\';F(e.U==\'2v\'){y.Q.1n=a+\'1v\';2s()}};F(b.T==\'1V\'){w.3b("5P",z);w.3b("5Q",z)}R{w.42("2v",z,1j);w.42("35",z,1j)}}m.Q.3Z=\'40\'}}m.5R=f;3c{F(E.G.P.1F.1C==1I){I A=h.1s(d.1t("20"));A.1h=E.G.P.1F.30;I B=A.1s(d.1t("5S"));B.1h=E.G.P.1F.31;I W=(b.T==\'2j\')?w.5T:(b.T==\'1B\'?h.2t:g.2t);I H=(b.T==\'2j\')?w.5U:(b.T==\'1B\'?h.2u:g.2u);I C=5V,43=5W;A.Q.1n=1i((W-C)/2,10)+\'1v\';A.Q.23=1i((H-43)/2,10)+\'1v\';F(b.T==\'1V\'&&j<7)A.Q.2w=\'39\'}}3d(e){}M 1I};E.44=J(){3c{F(E.1d.2h(E.O.S.1m,E.G.18.1l)!=1){F(E.G.P.1F.1C==1I){L.Z(E.G.P.1F.31).33=\'2y://2z.2A.2B/3e/3f.2C?\'+(E.G.K.U==\'1y\'?\'1y=1&\':\'\')+\'3V=1&\'+E.1r(E.O.S,0)+\'&2G=\'+E.1r(E.O.1Y,1);L.Z(E.G.P.1F.30).Q.1u=\'2q\'}R{1f.25.2K(\'2y://2z.2A.2B/3e/3f.2C?\'+(E.G.K.U==\'1y\'?\'1y=1&\':\'\')+E.1r(E.O.S,0)+\'&2G=\'+E.1r(E.O.1Y,1),\'1f\',\'45=1K,46=1K,47=\'+(E.G.K.U==\'1y\'?\'1K\':\'1z\')+\',1X=1z,48=1z,49=1z,1D=2H,1E=2I,23=\'+1i((E.O.S.1E-2I)/2,10)+\',1n=\'+1i((E.O.S.1D-2H)/2,10))}}}3d(e){1f.25.2K(\'2y://2z.2A.2B/3e/3f.2C?\'+(E.G.K.U==\'1y\'?\'1y=1&\':\'\')+E.1r(E.O.S,0)+\'&2G=\'+E.1r(E.O.1Y,1),\'1f\',\'45=1K,46=1K,47=\'+(E.G.K.U==\'1y\'?\'1K\':\'1z\')+\',1X=1z,48=1z,49=1z,1D=2H,1E=2I,23=\'+1i((E.O.S.1E-2I)/2,10)+\',1n=\'+1i((E.O.S.1D-2H)/2,10))}};E.2o=J(){E.O.S.2W=(1a 1T()).2g();E.44();F(E.G.18.1C){L.Z(E.G.K.1J).Q.1u=\'22\'}F(E.1d!=N&&E.G.18.1l!=N){E.1d.2R(E.O.S.1m,E.G.18.1l)}E.O.S.1m=17.1X.1M};E.5X=J(){E.O.S.2W=(1a 1T()).2g();I a=L.Z(E.G.K.1J);I b=a.1s(L.1t("3n"));I c=E.1r(E.O.S,0)+\'&2G=\'+E.1r(E.O.1Y,1);I d=L.5Y[E.G.K.1J+\'4a\'].5Z;I f=[];1k(2J=0;2J<d.1b;2J++){I g=d[2J];3c{I h=g.1U;F(h!=1G&&g.1Z!=1G){61(g.U){4b"62":F(g.4c)f.3g(g.1U+\'=\'+3h(g.1Z));2c;4b"63":F(g.4c)f.3g(g.1U+\'=\'+3h(g.1Z));2c;64:f.3g(g.1U+\'=\'+3h(g.1Z))}}}3d(e){}}I i=f.65(\'&\');I j=E.1d!=N?E.1d.1S(c):"";b.33="2y://2z.2A.2B/66.2C?"+c+"&"+i+"&67="+j;F(E.G.18.1C){I k=L.Z(E.G.K.1J+"4a");k.Q.1u=\'22\'}F(E.G.K.2V!=\'\'){I l=L.Z(E.G.K.68);l.21=E.G.K.2V;l.Q.1u=\'2q\'}F(E.1d!=N&&E.G.18.1l!=N){E.1d.2R(E.O.S.1m,E.G.18.1l)}E.O.S.1m=17.1X.1M}};',62,381,'||||||||||||||||||||||||||||||||||||||||this|if|Preferences||var|function|Render|document|return|null|Metrics|Plugins|style|else|core|engine|type|_fF||_fG|_fH|getElementById||||||||window|Persistence||new|length|Events|Cookie|version|OnlineOpinion|replace|id|parseInt|false|for|cookie_type|referer|left|poX|cookie_name|_fSa|serialize|appendChild|createElement|display|px|typeof|float_style|asm|no|rematch|opera|enabled|width|height|CardOnPage|undefined|blks|true|main_div_id|yes|Object|href|while|nextSibling|cookie|expiration|rhex|_MD4|Date|name|ie|fixed|location|custom|value|div|innerHTML|none|top||util|onload|onunload|test|1000|tagName|onsubmit|break|cmn|read|substring|getTime|matchurl|escape|webkit|gecko|inc|floating|Math|show|URLRewrite|block|getRightOfContent|fixBackground|clientWidth|clientHeight|resize|position|0px|https|secure|opinionlab|com|asp||||custom_var|545|200|idx|popup|all|childNodes|_s|charAt|0xFFFF|exec|tagurl|_aA|applewebkit|khtml|ty_html|time2|poE|poC|random|div_id|iframe_id||src|rightOfContent|scroll|defaultView|scrollLeft|load|absolute|mapEvents|attachEvent|try|catch|ccc01|comment_card|push|encodeURIComponent|getElementsByTagName|open|walkAnchors|onmousedown|nodeType|script|oo_r|0x0F|str2blks_MD5|msw|rol|oldb|oldc|oldd|split|unescape|write|domain|eval|_aT|_u|_browser|navigator|msie|page|up_div_id|over_div_id|img_path|feedback_span_id|feedback_html|click_html|screen|active|regex_search_pattern|regex_replace_pattern|init|parseFloat|isNaN|div_alt_text|static|offsetWidth|offsetLeft|getComputedStyle|visibility|visible|bottom|addEventListener|hy|launchCC|resizable|copyhistory|scrollbars|status|fullscreen|_form|case|checked|SafeAddOnLoadEvent|SafeAddOnUnLoadEvent|click|_blank|focus|setTimeout|INPUT|submit|image|FORM|textarea|continue|parentNode|0123456789abcdef|Array|charCodeAt|0x80|1518500249|1859775393|1732584193|271733879|1732584194|271733878|indexOf|path|expires|toGMTString|ocode|RegExp|_fC|_sp|_|_rp|userAgent|toLowerCase|ActiveXObject|taintEnabled|getBoxObjectFor|in|oo_feedback_float|olUp|olOver|onlineopinion|oo_black|gif|fbText|FEEDBACK|Click|here||to|br|rate|prev|referrer|time1|poWC|onEntry|onExit|OnClick|onlineopinion_cc_window|onlineopinion_cc_frame|render|documentElement|body|compatMode|CSS1Compat|20041107|onmouseover|onmouseout|img|span|innerText|textContent|alt|title|main_html|main_content_id|content|firstChild|Node|ELEMENT_NODE|fix_background|backgroundAttachment|getPropertyValue|margin|currentStyle|marginLeft|backgroundPosition|floor||scrollWidth|scrollTop|on|mouseover|mouseout|mousewheel|right|replaceChild|scrollHeight|onresize|onscroll|onclick|iframe|innerWidth|innerHeight|585|400|post|forms|elements||switch|radio|checkbox|default|join|rate36s|signature|ty_div_id'.split('|'),0,{}))


;

// opinionlab.floaterplugin

// OnlineOpinion v4.1
// This product and other products of OpinionLab, Inc. are protected by U.S. Patent No. 6606581, 6421724, 6785717 B1 and other patents pending.

// Instance new  OnlineOpinion Object
var oOobj1 = new OnlineOpinion.ocode(); 

// Configure Persitence
oOobj1.Preferences.Persistence = 	{
	enabled: true,				// Disapear onClick
	cookie_name: 'oo_r',				// Cookie name 
	cookie_type: 'page',				// Remembers which page got rated
	expiration: 3600				// Cookie expiration, in seconds, after icon is clicked
}

// Configure Floating params
oOobj1.Preferences.Render = {
	type: 'floating',
	main_div_id: 'oo_feedback_float',
	up_div_id: 'olUp',
	over_div_id: 'olOver',
	//img_path: 'http://extranet.opinionlab.com/clients/Yellowbook/onlineopinionOO4S/oo_black.gif',
	img_path: '/images/sm_666_oo.gif',
	feedback_span_id: 'fbText',
	feedback_html: 'Feedback',
	click_html: 'Click here to<br>rate this page',
	float_style: "rightOfContent",
	main_content_id: "container"
}

// Configure URL rewrite
oOobj1.Preferences.Plugins.URLRewrite = {
	active: false,
	regex_search_pattern: '',
	regex_replace_pattern: ''
}

// Custom variables (optional)
// oOobj1.Metrics.custom.clientID = 1234;
// oOobj1.Metrics.custom.countryCode = 'usa';

// Call Backs (do not modify unless you know what you are doing!)
OnlineOpinion.util.SafeAddOnLoadEvent(function(){oOobj1.init();oOobj1.onEntry()});
OnlineOpinion.util.SafeAddOnUnLoadEvent(function(){oOobj1.onExit()});

// Call Back (on Site Exit), uncomment line below to enable
// OnlineOpinion.util.SafeAddOnLoadEvent(function(){oOobj1.onEntry();OnlineOpinion.util.walkAnchors(document.body, 10, /^(http:\/\/salesdemo\.opinionlab\.com|http:\/\/www\.opinionlab\.com)/i, oOobj1)});

// Render Onload (needed for static & floating)
OnlineOpinion.util.SafeAddOnLoadEvent(function(){oOobj1.render(function(){oOobj1.show()})});

oOobj1.Preferences.Plugins.URLRewrite = {
	active: true,
	regex_search_pattern: /^.+/g,
	regex_replace_pattern: 'http://www.yellowbook.com/'
}
//  OnlineOpinion v4.1, Copyright 2007-2009 Opinionlab, Inc.



