// TPC Javascript Library
// Nov 27, 2008
// Created - gmp

// March 2010 - GMP

String.prototype.r13 = function(){
    return this.replace(/[a-zA-Z]/g, function(c){
        return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
    });
};

/**************************** BEGIN INCLUDES ***************************/

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

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, '=', encodeURIComponent(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 = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};


// <script type="text/javascript" src="/lib/jquery.easing.1.3.js"></script>
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
 
// <script type="text/javascript" src="/lib/jquery.lavalamp.1.3.js">
(function($){$.fn.lavaLamp=function(o){o=$.extend({fx:'linear',speed:500,click:function(){return true},linum:'no'},o||{});return this.each(function(){var path=location.pathname+location.search+location.hash;var $current=new Object;var $li=$('li',this);if(o.linum=='no')
$current=$('li a[href$="'+path+'"]',this).parent('li');if($current.length==0&&o.linum=='no')
$current=$('li a[href$="'+location.hash+'"]',this).parent('li');if($current.length==0||o.linum!='no'){if(o.linum=='no')o.linum=0;$current=$($li[o.linum]);}
var $back=$('<li class="back"><div class="left"></div><div class="bottom"></div><div class="corner"></div></li>').appendTo(this);var curr=$('li.current',this)[0]||$($current).addClass('current')[0];$li.not('.back').hover(function(){move(this);},function(){});$(this).hover(function(){},function(){if(!StopLavaMove){move(curr);};});$li.click(function(e){setCurr(this);return o.click.apply(this,[e,this]);});setCurr(curr);function setCurr(el){$back.css({"left":el.offsetLeft+"px","width":el.offsetWidth+"px","top":el.offsetTop+"px"});curr=el;};function move(el){$back.each(function(){$(this).dequeue();}).animate({width:el.offsetWidth,left:el.offsetLeft,top:el.offsetTop},o.speed,o.fx);};});};})(jQuery);

// <script type="text/javascript" src="/lib/dimmer.js">

jQuery.extend({dimScreen:function(speed,opacity,callback){if(jQuery('#__dimScreen').size()>0)return;if(typeof speed=='function'){callback=speed;speed=null;}
if(typeof opacity=='function'){callback=opacity;opacity=null;}
if(speed<1){var placeholder=opacity;opacity=speed;speed=placeholder;}
if(opacity>=1){var placeholder=speed;speed=opacity;opacity=placeholder;}
speed=(speed>0)?speed:500;opacity=(opacity>0)?opacity:0.5;return jQuery('<div></div>').attr({id:'__dimScreen',fade_opacity:opacity,speed:speed}).css({background:'#000',height:$(document).height()+'px',left:'0px',opacity:0,position:'absolute',top:'0px',width:$(document).width()+'px',zIndex:999}).appendTo(document.body).fadeTo(speed,0.7,callback);},dimScreenStop:function(callback){var x=jQuery('#__dimScreen');var opacity=x.attr('fade_opacity');var speed=x.attr('speed');x.fadeOut(speed,function(){x.remove();if(typeof callback=='function')callback();});}});

// <script type="text/javascript" src="/lib/dimensions.pack.js">
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4257 $
 *
 * Version: 1.2
 *
 * Requires: jQuery 1.2+
 */
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}('(5($){$.19={P:\'1.2\'};$.u([\'j\',\'w\'],5(i,d){$.q[\'O\'+d]=5(){p(!3[0])6;g a=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';6 3.B(\':y\')?3[0][\'L\'+d]:4(3,d.x())+4(3,\'n\'+a)+4(3,\'n\'+e)};$.q[\'I\'+d]=5(b){p(!3[0])6;g c=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';b=$.F({t:Z},b||{});g a=3.B(\':y\')?3[0][\'8\'+d]:4(3,d.x())+4(3,\'E\'+c+\'w\')+4(3,\'E\'+e+\'w\')+4(3,\'n\'+c)+4(3,\'n\'+e);6 a+(b.t?(4(3,\'t\'+c)+4(3,\'t\'+e)):0)}});$.u([\'m\',\'s\'],5(i,b){$.q[\'l\'+b]=5(a){p(!3[0])6;6 a!=W?3.u(5(){3==h||3==r?h.V(b==\'m\'?a:$(h)[\'U\'](),b==\'s\'?a:$(h)[\'T\']()):3[\'l\'+b]=a}):3[0]==h||3[0]==r?S[(b==\'m\'?\'R\':\'Q\')]||$.N&&r.M[\'l\'+b]||r.A[\'l\'+b]:3[0][\'l\'+b]}});$.q.F({z:5(){g a=0,f=0,o=3[0],8,9,7,v;p(o){7=3.7();8=3.8();9=7.8();8.f-=4(o,\'K\');8.k-=4(o,\'J\');9.f+=4(7,\'H\');9.k+=4(7,\'Y\');v={f:8.f-9.f,k:8.k-9.k}}6 v},7:5(){g a=3[0].7;G(a&&(!/^A|10$/i.16(a.15)&&$.14(a,\'z\')==\'13\'))a=a.7;6 $(a)}});5 4(a,b){6 12($.11(a.17?a[0]:a,b,18))||0}})(X);',62,72,'|||this|num|function|return|offsetParent|offset|parentOffset|||||borr|top|var|window||Height|left|scroll|Left|padding|elem|if|fn|document|Top|margin|each|results|Width|toLowerCase|visible|position|body|is|Right|Bottom|border|extend|while|borderTopWidth|outer|marginLeft|marginTop|client|documentElement|boxModel|inner|version|pageYOffset|pageXOffset|self|scrollTop|scrollLeft|scrollTo|undefined|jQuery|borderLeftWidth|false|html|curCSS|parseInt|static|css|tagName|test|jquery|true|dimensions'.split('|'),0,{}));

// <script type="text/javascript" src="/lib/akModal.js"></script>
jQuery.extend({showAkModal:function(navurl,title,box_width,box_height)
{var offset={};var options={margin:1,border:1,padding:1,scroll:0};var win_width=$(window).width();var scrollToLeft=$(window).scrollLeft();var win_height=$(window).height();var scrollToBottom=$(window).scrollTop();$('body').append("<div id='ak_modal_div' style='padding-top:0px;border:1px solid #FF6633;background-color:#FFF;position: absolute;z-index:1000;display:none;' ><div style='background-color:#FF6633;color:white;display:block;padding-top:0px;margin-top:0px;font-family: Geneva, Arial, Helvetica, sans-serif;'> <b> "+title+"</b><img src='cross.png' id='close' style='position:absolute;cursor:pointer;'></div><iframe width='"+box_width+"' height='"+box_height+"'  frameborder=0 marginwidth='0' marginheight='0' scrolling='NO'  name='frmTest' src='"+navurl+"'></iframe></div>");$('#ak_modal_div').css({left:(((win_width/2-box_width/2))+scrollToLeft)+'px',top:(((win_height/2-box_height/2))+scrollToBottom)+'px'});$('#close').click(function(){$('#ak_modal_div').fadeOut(500);$('#ak_modal_div').remove();$.dimScreenStop();});$.dimScreen(500,0.7,function(){$('#ak_modal_div').fadeIn(500);});var offset={}
offset=$("#ak_modal_div").offset({scroll:false})
X_left=offset.left+box_width-16;X_top=offset.top;$('#close').css({left:X_left,top:X_top});},akModalRemove:function()
{$('#ak_modal_div').fadeOut(500);$.dimScreenStop();},akModalHideAndRedirect:function(redirect_url)
{$('#ak_modal_div').fadeOut(500);$.dimScreenStop();window.location=redirect_url;}});

// <script type="text/javascript" src="/lib/jcorner-1.92.js"></script>
(function($){$.fn.corner=function(o){var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function sz(el,p){return parseInt($.css(el,p))||0;};function hex2(s){var s=parseInt(s).toString(16);return(s.length<2)?'0'+s:s;};function gpc(node){for(;node&&node.nodeName.toLowerCase()!='html';node=node.parentNode){var v=$.css(node,'backgroundColor');if(v.indexOf('rgb')>=0){if($.browser.safari&&v=='rgba(0, 0, 0, 0)')
continue;var rgb=v.match(/\d+/g);return'#'+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2]);}
if(v&&v!='transparent')
return v;}
return'#ffffff';};function getW(i){switch(fx){case'round':return Math.round(width*(1-Math.cos(Math.asin(i/width))));case'cool':return Math.round(width*(1+Math.cos(Math.asin(i/width))));case'sharp':return Math.round(width*(1-Math.cos(Math.acos(i/width))));case'bite':return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case'slide':return Math.round(width*(Math.atan2(i,width/i)));case'jut':return Math.round(width*(Math.atan2(width,(width-i-1))));case'curl':return Math.round(width*(Math.atan(i)));case'tear':return Math.round(width*(Math.cos(i)));case'wicked':return Math.round(width*(Math.tan(i)));case'long':return Math.round(width*(Math.sqrt(i)));case'sculpt':return Math.round(width*(Math.log((width-i-1),width)));case'dog':return(i&1)?(i+1):width;case'dog2':return(i&2)?(i+1):width;case'dog3':return(i&3)?(i+1):width;case'fray':return(i%2)*width;case'notch':return width;case'bevel':return i+1;}};o=(o||"").toLowerCase();var keep=/keep/.test(o);var cc=((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc=((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width=parseInt((o.match(/(\d+)px/)||[])[1])||10;var re=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var fx=((o.match(re)||['round'])[0]);var edges={T:0,B:1};var opts={TL:/top|tl/.test(o),TR:/top|tr/.test(o),BL:/bottom|bl/.test(o),BR:/bottom|br/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR)
opts={TL:1,TR:1,BL:1,BR:1};var strip=document.createElement('div');strip.style.overflow='hidden';strip.style.height='1px';strip.style.backgroundColor=sc||'transparent';strip.style.borderStyle='solid';return this.each(function(index){var pad={T:parseInt($.css(this,'paddingTop'))||0,R:parseInt($.css(this,'paddingRight'))||0,B:parseInt($.css(this,'paddingBottom'))||0,L:parseInt($.css(this,'paddingLeft'))||0};if($.browser.msie)this.style.zoom=1;if(!keep)this.style.border='none';strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=$.curCSS(this,'height');for(var j in edges){var bot=edges[j];if((bot&&(opts.BL||opts.BR))||(!bot&&(opts.TL||opts.TR))){strip.style.borderStyle='none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');var d=document.createElement('div');$(d).addClass('jquery-corner');var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!='auto'){if($.css(this,'position')=='static')
this.style.position='relative';ds.position='absolute';ds.bottom=ds.left=ds.padding=ds.margin='0';if($.browser.msie)
ds.setExpression('width','this.parentNode.offsetWidth');else
ds.width='100%';}
else if(!bot&&$.browser.msie){if($.css(this,'position')=='static')
this.style.position='relative';ds.position='absolute';ds.top=ds.left=ds.right=ds.padding=ds.margin='0';var bw=0;if(ie6||!$.boxModel)
bw=sz(this,'borderLeftWidth')+sz(this,'borderRightWidth');ie6?ds.setExpression('width','this.parentNode.offsetWidth - '+bw+'+ "px"'):ds.width='100%';}
else{ds.margin=!bot?'-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px':(pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';}
for(var i=0;i<width;i++){var w=Math.max(0,getW(i));var e=strip.cloneNode(false);e.style.borderWidth='0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';bot?d.appendChild(e):d.insertBefore(e,d.firstChild);}}}});};$.fn.uncorner=function(o){return $('.jquery-corner',this).remove();};})(jQuery);


// <script type="text/javascript" src="/lib/jquery.validate.pack.js"></script>
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}('(7($){$.G($.38,{1z:7(c){l(!6.E){c&&c.21&&2U.1v&&1v.4Y("3p 2B, 4A\'t 1z, 6c 3p");8}p b=$.15(6[0],\'u\');l(b){8 b}b=2l $.u(c,6[0]);$.15(6[0],\'u\',b);l(b.q.3v){6.4I("1Y, 4D").1o(".4w").4q(7(){b.35=v});6.31(7(a){l(b.q.21)a.5V();7 2g(){l(b.q.40){b.q.40.12(b,b.W);8 H}8 v}l(b.35){b.35=H;8 2g()}l(b.L()){l(b.19){b.1u=v;8 H}8 2g()}1a{b.2o();8 H}})}8 b},N:7(){l($(6[0]).2J(\'L\')){8 6.1z().L()}1a{p b=H;p a=$(6[0].L).1z();6.O(7(){b|=a.I(6)});8 b}},4K:7(c){p d={},$I=6;$.O(c.1K(/\\s/),7(a,b){d[b]=$I.1J(b);$I.4G(b)});8 d},17:7(h,k){p f=6[0];l(h){p i=$.15(f.L,\'u\').q;p d=i.17;p c=$.u.2t(f);2p(h){1b"1f":$.G(c,$.u.1U(k));d[f.r]=c;l(k.J)i.J[f.r]=$.G(i.J[f.r],k.J);2u;1b"63":l(!k){Q d[f.r];8 c}p e={};$.O(k.1K(/\\s/),7(a,b){e[b]=c[b];Q c[b]});8 e}}p g=$.u.49($.G({},$.u.44(f),$.u.43(f),$.u.3G(f),$.u.2t(f)),f);l(g.11){p j=g.11;Q g.11;g=$.G({11:j},g)}8 g}});$.G($.5A[":"],{5w:7(a){8!$.1j(a.T)},5o:7(a){8!!$.1j(a.T)},5m:7(a){8!a.3P}});$.1d=7(c,b){l(S.E==1)8 7(){p a=$.3K(S);a.5a(c);8 $.1d.1Q(6,a)};l(S.E>2&&b.2i!=3F){b=$.3K(S).4U(1)}l(b.2i!=3F){b=[b]}$.O(b,7(i,n){c=c.3B(2l 3z("\\\\{"+i+"\\\\}","g"),n)});8 c};$.u=7(b,a){6.q=$.G({},$.u.2I,b);6.W=a;6.3w()};$.G($.u,{2I:{J:{},1Z:{},17:{},1c:"3s",2G:"4J",2o:v,3m:$([]),2D:$([]),3v:v,3l:[],3k:H,4H:7(a){6.3i=a;l(6.q.4F&&!6.4E){6.q.1I&&6.q.1I.12(6,a,6.q.1c);6.1P(a).2x()}},4C:7(a){l(!6.1x(a)&&(a.r Z 6.1k||!6.F(a))){6.I(a)}},4v:7(a){l(a.r Z 6.1k||a==6.39){6.I(a)}},4t:7(a){l(a.r Z 6.1k)6.I(a)},2r:7(a,b){$(a).2q(b)},1I:7(a,b){$(a).37(b)}},6i:7(a){$.G($.u.2I,a)},J:{11:"6f 4o 2J 11.",1S:"K 33 6 4o.",1T:"K M a N 1T 6a.",1w:"K M a N 65.",1m:"K M a N 1m.",1W:"K M a N 1m (61).",2j:"4d 4c 3n 2Y 5U¼5R 5Q 2Y.",1s:"K M a N 1s.",24:"4d 4c 3n 5O 5L 2Y.",1N:"K M 5J 1N",2e:"K M a N 5F 5D 1s.",3Y:"K M 3W 5y T 5v.",3U:"K M a T 5s a N 5r.",16:$.1d("K M 3R 5n 2P {0} 2O."),1D:$.1d("K M 5l 5k {0} 2O."),2b:$.1d("K M a T 3N {0} 3M {1} 2O 5f."),2a:$.1d("K M a T 3N {0} 3M {1}."),1t:$.1d("K M a T 5b 2P 3J 3I 4a {0}."),1y:$.1d("K M a T 55 2P 3J 3I 4a {0}.")},3H:H,53:{3w:7(){6.2k=$(6.q.2D);6.4g=6.2k.E&&6.2k||$(6.W);6.26=$(6.q.3m).1f(6.q.2D);6.1k={};6.4V={};6.19=0;6.1e={};6.1g={};6.1V();p f=(6.1Z={});$.O(6.q.1Z,7(d,c){$.O(c.1K(/\\s/),7(a,b){f[b]=d})});p e=6.q.17;$.O(e,7(b,a){e[b]=$.u.1U(a)});7 1C(a){p b=$.15(6[0].L,"u");b.q["3A"+a.1r]&&b.q["3A"+a.1r].12(b,6[0])}$(6.W).1C("3y 3x 4O",":2H, :4N, :4M, 20, 4L",1C).1C("4q",":3u, :3t",1C);l(6.q.3r)$(6.W).3q("1g-L.1z",6.q.3r)},L:7(){6.3o();$.G(6.1k,6.1q);6.1g=$.G({},6.1q);l(!6.N())$(6.W).2F("1g-L",[6]);6.1h();8 6.N()},3o:7(){6.2E();P(p i=0,Y=(6.22=6.Y());Y[i];i++){6.23(Y[i])}8 6.N()},I:7(a){a=6.2C(a);6.39=a;6.2L(a);6.22=$(a);p b=6.23(a);l(b){Q 6.1g[a.r]}1a{6.1g[a.r]=v}l(!6.3E()){6.13=6.13.1f(6.26)}6.1h();8 b},1h:7(b){l(b){$.G(6.1q,b);6.R=[];P(p c Z b){6.R.1X({18:b[c],I:6.28(c)[0]})}6.1i=$.3h(6.1i,7(a){8!(a.r Z b)})}6.q.1h?6.q.1h.12(6,6.1q,6.R):6.3g()},2A:7(){l($.38.2A)$(6.W).2A();6.1k={};6.2E();6.2z();6.Y().37(6.q.1c)},3E:7(){8 6.29(6.1g)},29:7(a){p b=0;P(p i Z a)b++;8 b},2z:7(){6.2y(6.13).2x()},N:7(){8 6.3f()==0},3f:7(){8 6.R.E},2o:7(){l(6.q.2o){3e{$(6.3d()||6.R.E&&6.R[0].I||[]).1o(":4B").3c()}3b(e){}}},3d:7(){p a=6.3i;8 a&&$.3h(6.R,7(n){8 n.I.r==a.r}).E==1&&a},Y:7(){p a=6,2w={};8 $([]).1f(6.W.Y).1o(":1Y").1H(":31, :1V, :4z, [4y]").1H(6.q.3l).1o(7(){!6.r&&a.q.21&&2U.1v&&1v.3s("%o 4x 3R r 4u",6);l(6.r Z 2w||!a.29($(6).17()))8 H;2w[6.r]=v;8 v})},2C:7(a){8 $(a)[0]},2v:7(){8 $(6.q.2G+"."+6.q.1c,6.4g)},1V:7(){6.1i=[];6.R=[];6.1q={};6.1l=$([]);6.13=$([]);6.1u=H;6.22=$([])},2E:7(){6.1V();6.13=6.2v().1f(6.26)},2L:7(a){6.1V();6.13=6.1P(a)},23:7(d){d=6.2C(d);l(6.1x(d)){d=6.28(d.r)[0]}p a=$(d).17();p c=H;P(U Z a){p b={U:U,2s:a[U]};3e{p f=$.u.1F[U].12(6,d.T,d,b.2s);l(f=="1E-1R"){c=v;6l}c=H;l(f=="1e"){6.13=6.13.1H(6.1P(d));8}l(!f){6.4r(d,b);8 H}}3b(e){6.q.21&&2U.1v&&1v.6k("6j 6h 6g 6e I "+d.4p+", 23 3W \'"+b.U+"\' U");6d e;}}l(c)8;l(6.29(a))6.1i.1X(d);8 v},4n:7(a,b){l(!$.1A)8;p c=6.q.34?$(a).1A()[6.q.34]:$(a).1A();8 c&&c.J&&c.J[b]},4m:7(a,b){p m=6.q.J[a];8 m&&(m.2i==4l?m:m[b])},4k:7(){P(p i=0;i<S.E;i++){l(S[i]!==2n)8 S[i]}8 2n},2m:7(a,b){8 6.4k(6.4m(a.r,b),6.4n(a,b),!6.q.3k&&a.6b||2n,$.u.J[b],"<4j>69: 68 18 67 P "+a.r+"</4j>")},4r:7(b,a){p c=6.2m(b,a.U);l(14 c=="7")c=c.12(6,a.2s,b);6.R.1X({18:c,I:b});6.1q[b.r]=c;6.1k[b.r]=c},2y:7(a){l(6.q.2h)a=a.1f(a.64(6.q.2h));8 a},3g:7(){P(p i=0;6.R[i];i++){p a=6.R[i];6.q.2r&&6.q.2r.12(6,a.I,6.q.1c);6.30(a.I,a.18)}l(6.R.E){6.1l=6.1l.1f(6.26)}l(6.q.1n){P(p i=0;6.1i[i];i++){6.30(6.1i[i])}}l(6.q.1I){P(p i=0,Y=6.4i();Y[i];i++){6.q.1I.12(6,Y[i],6.q.1c)}}6.13=6.13.1H(6.1l);6.2z();6.2y(6.1l).4h()},4i:7(){8 6.22.1H(6.3a())},3a:7(){8 $(6.R).3j(7(){8 6.I})},30:7(a,c){p b=6.1P(a);l(b.E){b.37().2q(6.q.1c);b.1J("4f")&&b.4e(c)}1a{b=$("<"+6.q.2G+"/>").1J({"P":6.2Z(a),4f:v}).2q(6.q.1c).4e(c||"");l(6.q.2h){b=b.2x().4h().60("<"+6.q.2h+"/>").5Y()}l(!6.2k.5X(b).E)6.q.4b?6.q.4b(b,$(a)):b.5W(a)}l(!c&&6.q.1n){b.2H("");14 6.q.1n=="1p"?b.2q(6.q.1n):6.q.1n(b)}6.1l=6.1l.1f(b)},1P:7(a){8 6.2v().1o("[P=\'"+6.2Z(a)+"\']")},2Z:7(a){8 6.1Z[a.r]||(6.1x(a)?a.r:a.4p||a.r)},1x:7(a){8/3u|3t/i.V(a.1r)},28:7(d){p c=6.W;8 $(5T.5S(d)).3j(7(a,b){8 b.L==c&&b.r==d&&b||48})},1L:7(a,b){2p(b.47.3D()){1b\'20\':8 $("46:2B",b).E;1b\'1Y\':l(6.1x(b))8 6.28(b.r).1o(\':3P\').E}8 a.E},45:7(b,a){8 6.2X[14 b]?6.2X[14 b](b,a):v},2X:{"5P":7(b,a){8 b},"1p":7(b,a){8!!$(b,a.L).E},"7":7(b,a){8 b(a)}},F:7(a){8!$.u.1F.11.12(6,$.1j(a.T),a)&&"1E-1R"},42:7(a){l(!6.1e[a.r]){6.19++;6.1e[a.r]=v}},4s:7(a,b){6.19--;l(6.19<0)6.19=0;Q 6.1e[a.r];l(b&&6.19==0&&6.1u&&6.L()){$(6.W).31()}1a l(!b&&6.19==0&&6.1u){$(6.W).2F("1g-L",[6])}},2f:7(a){8 $.15(a,"2f")||$.15(a,"2f",5K={2W:48,N:v,18:6.2m(a,"1S")})}},1M:{11:{11:v},1T:{1T:v},1w:{1w:v},1m:{1m:v},1W:{1W:v},2j:{2j:v},1s:{1s:v},24:{24:v},1N:{1N:v},2e:{2e:v}},3Z:7(a,b){a.2i==4l?6.1M[a]=b:$.G(6.1M,a)},43:7(b){p a={};p c=$(b).1J(\'5I\');c&&$.O(c.1K(\' \'),7(){l(6 Z $.u.1M){$.G(a,$.u.1M[6])}});8 a},3G:7(c){p a={};p d=$(c);P(U Z $.u.1F){p b=d.1J(U);l(b){a[U]=b}}l(a.16&&/-1|5H|5G/.V(a.16)){Q a.16}8 a},44:7(a){l(!$.1A)8{};p b=$.15(a.L,\'u\').q.34;8 b?$(a).1A()[b]:$(a).1A()},2t:7(b){p a={};p c=$.15(b.L,\'u\');l(c.q.17){a=$.u.1U(c.q.17[b.r])||{}}8 a},49:7(d,e){$.O(d,7(c,b){l(b===H){Q d[c];8}l(b.2V||b.2d){p a=v;2p(14 b.2d){1b"1p":a=!!$(b.2d,e.L).E;2u;1b"7":a=b.2d.12(e,e);2u}l(a){d[c]=b.2V!==2n?b.2V:v}1a{Q d[c]}}});$.O(d,7(a,b){d[a]=$.5C(b)?b(e):b});$.O([\'1D\',\'16\',\'1y\',\'1t\'],7(){l(d[6]){d[6]=2T(d[6])}});$.O([\'2b\',\'2a\'],7(){l(d[6]){d[6]=[2T(d[6][0]),2T(d[6][1])]}});l($.u.3H){l(d.1y&&d.1t){d.2a=[d.1y,d.1t];Q d.1y;Q d.1t}l(d.1D&&d.16){d.2b=[d.1D,d.16];Q d.1D;Q d.16}}l(d.J){Q d.J}8 d},1U:7(a){l(14 a=="1p"){p b={};$.O(a.1K(/\\s/),7(){b[6]=v});a=b}8 a},5B:7(c,a,b){$.u.1F[c]=a;$.u.J[c]=b;l(a.E<3){$.u.3Z(c,$.u.1U(c))}},1F:{11:7(b,c,a){l(!6.45(a,c))8"1E-1R";2p(c.47.3D()){1b\'20\':p d=$("46:2B",c);8 d.E>0&&(c.1r=="20-5z"||($.2S.2M&&!(d[0].5x[\'T\'].5u)?d[0].2H:d[0].T).E>0);1b\'1Y\':l(6.1x(c))8 6.1L(b,c)>0;5t:8 $.1j(b).E>0}},1S:7(e,h,d){l(6.F(h))8"1E-1R";p g=6.2f(h);l(!6.q.J[h.r])6.q.J[h.r]={};6.q.J[h.r].1S=14 g.18=="7"?g.18(e):g.18;d=14 d=="1p"&&{1w:d}||d;l(g.2W!==e){g.2W=e;p i=6;6.42(h);p f={};f[h.r]=e;$.2R($.G(v,{1w:d,3T:"2Q",3S:"1z"+h.r,5q:"5p",15:f,1n:7(a){l(a){p b=i.1u;i.2L(h);i.1u=b;i.1i.1X(h);i.1h()}1a{p c={};c[h.r]=a||i.2m(h,"1S");i.1h(c)}g.N=a;i.4s(h,a)}},d));8"1e"}1a l(6.1e[h.r]){8"1e"}8 g.N},1D:7(b,c,a){8 6.F(c)||6.1L($.1j(b),c)>=a},16:7(b,c,a){8 6.F(c)||6.1L($.1j(b),c)<=a},2b:7(b,d,a){p c=6.1L($.1j(b),d);8 6.F(d)||(c>=a[0]&&c<=a[1])},1y:7(b,c,a){8 6.F(c)||b>=a},1t:7(b,c,a){8 6.F(c)||b<=a},2a:7(b,c,a){8 6.F(c)||(b>=a[0]&&b<=a[1])},1T:7(a,b){8 6.F(b)||/^((([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^X`{\\|}~]|[\\A-\\B\\w-\\x\\C-\\y])+(\\.([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^X`{\\|}~]|[\\A-\\B\\w-\\x\\C-\\y])+)*)|((\\3Q)((((\\2c|\\1O)*(\\2N\\3X))?(\\2c|\\1O)+)?(([\\3V-\\5E\\3L\\3O\\5j-\\5i\\41]|\\5h|[\\5g-\\5M]|[\\5N-\\5e]|[\\A-\\B\\w-\\x\\C-\\y])|(\\\\([\\3V-\\1O\\3L\\3O\\2N-\\41]|[\\A-\\B\\w-\\x\\C-\\y]))))*(((\\2c|\\1O)*(\\2N\\3X))?(\\2c|\\1O)+)?(\\3Q)))@((([a-z]|\\d|[\\A-\\B\\w-\\x\\C-\\y])|(([a-z]|\\d|[\\A-\\B\\w-\\x\\C-\\y])([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])*([a-z]|\\d|[\\A-\\B\\w-\\x\\C-\\y])))\\.)+(([a-z]|[\\A-\\B\\w-\\x\\C-\\y])|(([a-z]|[\\A-\\B\\w-\\x\\C-\\y])([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])*([a-z]|[\\A-\\B\\w-\\x\\C-\\y])))\\.?$/i.V(a)},1w:7(a,b){8 6.F(b)||/^(5d?|5c):\\/\\/(((([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])|(%[\\1G-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|[\\A-\\B\\w-\\x\\C-\\y])|(([a-z]|\\d|[\\A-\\B\\w-\\x\\C-\\y])([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])*([a-z]|\\d|[\\A-\\B\\w-\\x\\C-\\y])))\\.)+(([a-z]|[\\A-\\B\\w-\\x\\C-\\y])|(([a-z]|[\\A-\\B\\w-\\x\\C-\\y])([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])*([a-z]|[\\A-\\B\\w-\\x\\C-\\y])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])|(%[\\1G-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])|(%[\\1G-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])|(%[\\1G-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|[\\59-\\58]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|X|~|[\\A-\\B\\w-\\x\\C-\\y])|(%[\\1G-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.V(a)},1m:7(a,b){8 6.F(b)||!/57|5Z/.V(2l 56(a))},1W:7(a,b){8 6.F(b)||/^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.V(a)},2j:7(a,b){8 6.F(b)||/^\\d\\d?\\.\\d\\d?\\.\\d\\d\\d?\\d?$/.V(a)},1s:7(a,b){8 6.F(b)||/^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.V(a)},24:7(a,b){8 6.F(b)||/^-?(?:\\d+|\\d{1,3}(?:\\.\\d{3})+)(?:,\\d+)?$/.V(a)},1N:7(a,b){8 6.F(b)||/^\\d+$/.V(a)},2e:7(b,e){l(6.F(e))8"1E-1R";l(/[^0-9-]+/.V(b))8 H;p a=0,d=0,27=H;b=b.3B(/\\D/g,"");P(n=b.E-1;n>=0;n--){p c=b.62(n);p d=54(c,10);l(27){l((d*=2)>9)d-=9}a+=d;27=!27}8(a%10)==0},3U:7(b,c,a){a=14 a=="1p"?a:"52|66?g|51";8 6.F(c)||b.50(2l 3z(".("+a+")$","i"))},3Y:7(b,c,a){8 b==$(a).4Z()}}})})(32);(7($){p c=$.2R;p d={};$.2R=7(a){a=$.G(a,$.G({},$.4X,a));p b=a.3S;l(a.3T=="2Q"){l(d[b]){d[b].2Q()}8(d[b]=c.1Q(6,S))}8 c.1Q(6,S)}})(32);(7($){$.O({3c:\'3y\',4W:\'3x\'},7(b,a){$.1B.2K[a]={4T:7(){l($.2S.2M)8 H;6.4S(b,$.1B.2K[a].36,v)},4R:7(){l($.2S.2M)8 H;6.4Q(b,$.1B.2K[a].36,v)},36:7(e){S[0]=$.1B.33(e);S[0].1r=a;8 $.1B.2g.1Q(6,S)}}});$.G($.38,{1C:7(d,e,c){8 6.3q(d,7(a){p b=$(a.3C);l(b.2J(e)){8 c.1Q(b,S)}})},4P:7(a,b){8 6.2F(a,[$.1B.33({1r:a,3C:b})])}})})(32);',62,394,'||||||this|function|return|||||||||||||if||||var|settings|name|||validator|true|uF900|uFDCF|uFFEF||u00A0|uD7FF|uFDF0||length|optional|extend|false|element|messages|Please|form|enter|valid|each|for|delete|errorList|arguments|value|method|test|currentForm|_|elements|in||required|call|toHide|typeof|data|maxlength|rules|message|pendingRequest|else|case|errorClass|format|pending|add|invalid|showErrors|successList|trim|submitted|toShow|date|success|filter|string|errorMap|type|number|max|formSubmitted|console|url|checkable|min|validate|metadata|event|delegate|minlength|dependency|methods|da|not|unhighlight|attr|split|getLength|classRuleSettings|digits|x09|errorsFor|apply|mismatch|remote|email|normalizeRule|reset|dateISO|push|input|groups|select|debug|currentElements|check|numberDE||containers|bEven|findByName|objectLength|range|rangelength|x20|depends|creditcard|previousValue|handle|wrapper|constructor|dateDE|labelContainer|new|defaultMessage|undefined|focusInvalid|switch|addClass|highlight|parameters|staticRules|break|errors|rulesCache|hide|addWrapper|hideErrors|resetForm|selected|clean|errorLabelContainer|prepareForm|triggerHandler|errorElement|text|defaults|is|special|prepareElement|msie|x0d|characters|than|abort|ajax|browser|Number|window|param|old|dependTypes|ein|idOrName|showLabel|submit|jQuery|fix|meta|cancelSubmit|handler|removeClass|fn|lastElement|invalidElements|catch|focus|findLastActive|try|size|defaultShowErrors|grep|lastActive|map|ignoreTitle|ignore|errorContainer|Sie|checkForm|nothing|bind|invalidHandler|error|checkbox|radio|onsubmit|init|focusout|focusin|RegExp|on|replace|target|toLowerCase|numberOfInvalids|Array|attributeRules|autoCreateRanges|equal|or|makeArray|x0b|and|between|x0c|checked|x22|no|port|mode|accept|x01|the|x0a|equalTo|addClassRules|submitHandler|x7f|startRequest|classRules|metadataRules|depend|option|nodeName|null|normalizeRules|to|errorPlacement|geben|Bitte|html|generated|errorContext|show|validElements|strong|findDefined|String|customMessage|customMetaMessage|field|id|click|formatAndAdd|stopRequest|onclick|assigned|onkeyup|cancel|has|disabled|image|can|visible|onfocusout|button|blockFocusCleanup|focusCleanup|removeAttr|onfocusin|find|label|removeAttrs|textarea|file|password|keyup|triggerEvent|removeEventListener|teardown|addEventListener|setup|slice|valueCache|blur|ajaxSettings|warn|val|match|gif|png|prototype|parseInt|greater|Date|Invalid|uF8FF|uE000|unshift|less|ftp|https|x7e|long|x23|x21|x1f|x0e|least|at|unchecked|more|filled|json|dataType|extension|with|default|specified|again|blank|attributes|same|multiple|expr|addMethod|isFunction|card|x08|credit|524288|2147483647|class|only|previous|Nummer|x5b|x5d|eine|boolean|Datum|ltiges|getElementsByName|document|gÃ|preventDefault|insertAfter|append|parent|NaN|wrap|ISO|charAt|remove|parents|URL|jpe|defined|No|Warning|address|title|returning|throw|checking|This|when|occured|setDefaults|exception|log|continue'.split('|'),0,{}));

// <script type="text/javascript" src="/lib/thickbox-compressed.js"></script>
/*
 * Thickbox 3 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/

var tb_pathToImage = "/graphics/loadingAnimation.gif";

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}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}',62,211,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Esc|or|close|tb_showIframe|TB_imageCount|Close|new|browser|TB_FoundURL|Key|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox'.split('|'),0,{}))


// <script type="text/javascript" src="/lib/PageHeader.js"></script>

/******************************END INCLUDES ****************************/

var regexEmail=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;
var regexPhone = /^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/i;

function showFull(filename) {
	$("#functionSmokedGlass").css("display","block");
	$("#dummyBody").html('<div style="margin: auto;"><img src="' + filename + '" style="background-color: #fff; padding: 5px;"></div>');
	$("#dummyBody").css("display","block");
}



function searchBarSubmit() {

	var occupationId = $("#Occupation").val();
	var specialtyId = $("#Specialty"+occupationId).val();
	
	if (occupationId==2) {
		if (specialtyId < 1) {
			alert('You must specify your allied specialty.');
			$("#Specialty"+occupationId).focus();
			return false;
		}; //if
	}; //if
	
	var ix = document.getElementById("Specialty"+occupationId).selectedIndex;
	var specialty = '';
	if (ix > 0) {
		specialty = document.getElementById("Specialty"+occupationId).options[ix].text;
		specialty = specialty.replace("/","-");
		specialty = specialty.replace(" ","-");
		specialty = specialty.replace(" ","-");
		specialty = specialty.replace(" ","-");
		specialty = specialty.replace("---","-");
		specialty = specialty.replace("---","-").replace("--","-").replace("--","-");
	}; //if

	var bTravel = $("#travel").attr("checked") == true;
	var bPerDiem = $("#perdiem").attr("checked") == true;
	var bContract = $("#contract").attr("checked") == true;
	var bPerm = $("#permanent").attr("checked") == true;
	var bBeach = $("#beach").attr("checked") == true;
	var bHiking = $("#hiking").attr("checked") == true;
	var bNatPark = $("#natpark").attr("checked") == true;
	var bCompact = $("#compact").attr("checked") == true;
	var city = $("#City").val();
	var state = $("#State").val();
	if (state=='' && city!='') {
		alert('You need to specify a state when you look for a city');
		$("#State").focus();
		return false;
	}; //if

	if (bPerDiem && state == '') {
		alert('Sorry, but you cannot search for per diem without selecting a location.');
		if (bCompact) {
			$("#compact").focus();
		} else {
			$("#State").focus();
		}; //if
		return false;
	}; //if
	
	var url = makeUrl(occupationId, specialty, bPerm, bTravel, bPerDiem, bContract, bBeach, bHiking, bNatPark, bCompact, city, state);


	if (state!='' && city!='') {
		$.post('/ajax.php', {
			cmd: 'testlocation',
			city: city,
			state: state
		}, function(data) {
			if (data.Metro=="") {
				alert("Sorry but we can't find a city named " + city + ", " + state + ".");
				$("#City").focus();
			} else {
				document.location = '/' + url;
			}; //if
		}, "json");
	} else {
		// just load it
		document.location =  '/' + url;
	}; //if
	
	return false;

	
};  // searchBarSubmit

function SetupErinRect() {
	SizeErinRect();
	$('#ErinRect').corner("20px");
}; //SetupErinRect

function SizeErinRect() {
	var erinHeight = $("#ErinRect").height();
	var pnlContentHeight = $("#pnlContent").height();
	var newH = parseFloat(pnlContentHeight) + 430;
	if (newH > erinHeight) {
		$("#ErinRect").css("height",newH + 'px');
	}; //if
}


function SearchOccupationChange(c) {
	var ix = c.selectedIndex;
	var occupationId = 	c.options[ix].value;
	$(".SearchSpecialties:visible").css("display","none");
	if (occupationId==1 || occupationId==4) {
		$("#newGradsPane").show("slow");
	} else {
		$("#newGradsPane").hide("slow");
	}; //if
	$("#Specialty" + occupationId).css("display","inline");
}

function ResumeOccupationChange(c) {
	var ix = c.selectedIndex;
	var occupationId = 	c.options[ix].value;
	$(".SearchSpecialties:visible").css("display","none");
	$("#Specialty1_" + occupationId).css("display","inline");
	$("#Specialty2_" + occupationId).css("display","inline");
	$("#Specialty3_" + occupationId).css("display","inline");
}

function CompactChange(chk) {
	if (chk.checked) {
		document.getElementById("map").style.display = 'none';
		document.getElementById("compactMap").style.display = 'inline';
		document.getElementById("City").value = '';
		document.getElementById("cityLabel").style.visibility = 'hidden';
		document.getElementById("cityValues").style.visibility = 'hidden';
		
	} else {
		document.getElementById("map").style.display = 'inline';
		document.getElementById("compactMap").style.display = 'none';
		document.getElementById("cityLabel").style.visibility = 'visible';
		document.getElementById("cityValues").style.visibility = 'visible';
	}; //if
}

function SetState(v) {
	var stateList = document.getElementById("State");
	for (i=0; i < stateList.options.length; i++) {
		if (stateList.options[i].value == v) {
			stateList.selectedIndex = i;
			if (v.length > 2) {
				document.getElementById("City").value = '';
			}; //if
			return false;
		}; //if
	}; //for
	stateList.selectedIndex = -1;
	return false;
}

function ValidEmail(e) {
	var returnval=regexEmail.test(e.value);
	return returnval;
}


function ValidPhone(e){
	var returnval=regexPhone.test(e.value);
 	return returnval;
}



function ValidChoice(e, msg) {
	if (e.selectedIndex==0) {
		alert(msg);
		e.select();
		return false;
	} else {
		return true;
	}; //if
}

function ValidText(e, msg) {
	if (e.value == '' ) {
		alert(msg);
		e.select();
		return false;
	} else {
		return true;
	}; //if
}

jQuery.fn.autoGrow = function(options) {
	if (!options.pad) options.pad = 25;
	return this.each(function(i){
		var e = jQuery(this);
		// create copy for each element
		var o = { pad: options.pad, min_limit: options.min_limit, max_limit: options.max_limit }; 
		if ((e.attr('type') == 'text') || (e.attr('type') == 'password'))  {
			if (!o.min_limit) o.min_limit = parseInt(e.css('min-width'));
			if (!o.max_limit) o.max_limit = parseInt(e.css('max-width'));
			
			if (o.min_limit < 0 || isNaN(o.min_limit)) o.min_limit = 0;
			if (o.max_limit < 0 || isNaN(o.max_limit)) o.max_limit = 0;

			var html = '<' + 'div style="position:absolute; top:0; visibility:hidden; left:0; padding:0 ' + o.pad + 'px 0 0!important; margin:0!important" id="_grow' + i + '"></' + 'div>';
			var c = jQuery('body').append(html);
			// adjust the style of the container to match the font of this element
			var ff = e.css('font-family');
			var fs = e.css('font-size');

			jQuery('div#_grow' + i).css({ 'font-size': fs, 'font-family': ff });

			resize = function(){
				var dl = jQuery('div#_grow' + i).html(e.val().replace(/ /g,'&nbsp;')).get(0).offsetWidth;
				if (o.max_limit && (dl + o.pad) > o.max_limit) {
					e.css('width', o.max_limit + 'px')
				} else if ((dl + o.pad) <= o.min_limit) {
					e.css('width', o.min_limit + 'px')
				} else { // resize
					e.css('width', dl + 'px')
				}
			}

			// resize based on the current
			resize();
			e.keypress(resize);
		}
	})
}


//included libs
//numeric
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}('r.E.W=7(c,d){c=c||".";d=q d=="7"?d:7(){};6.K(7(e){g a=e.i?e.i:e.h?e.h:0;2(a==k&&6.N.J()=="G"){5 3}f 2(a==k){5 j}g b=j;2((e.4&&a==y)||(e.4&&a==v))5 3;2((e.4&&a==t)||(e.4&&a==u))5 3;2((e.4&&a==V)||(e.4&&a==S))5 3;2((e.4&&a==R)||(e.4&&a==Q))5 3;2((e.4&&a==P)||(e.4&&a==O)||(e.L&&a==p))5 3;2(a<I||a>H){2(a==p&&6.l.F==0)5 3;2(a==c.n(0)&&6.l.o(c)!=-1){b=j}2(a!=8&&a!=9&&a!=k&&a!=D&&a!=C&&a!=M&&a!=B&&a!=A){b=j}f{2(q e.i!="z"){2(e.h==e.m&&e.m!=0){b=3}f 2(e.h!=0&&e.i==0&&e.m==0){b=3}}}2(a==c.n(0)&&6.l.o(c)==-1){b=3}}f{b=3}5 b}).x(7(){g a=r(6).w();2(a!=""){g b=T U("^\\\\d+$|\\\\d*"+c+"\\\\d+");2(!b.s(a)){d.X(6)}}});5 6}',60,60,'||if|true|ctrlKey|return|this|function||||||||else|var|keyCode|charCode|false|13|value|which|charCodeAt|indexOf|45|typeof|jQuery|exec|120|88|65|val|blur|97|undefined|46|39|36|35|fn|length|input|57|48|toLowerCase|keypress|shiftKey|37|nodeName|86|118|90|122|67|new|RegExp|99|numeric|apply'.split('|'),0,{}))



/* jQuery FlyOut - Jolyon Terwilliger, Nixbox Web Designs - http://nixboxdesigns.com/jquery.flyout.php */
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}('$.1L.1a({1M:6(c){7 d=8;7 e=8;7 f;7 g;7 h;7 i;7 j;7 k=1b 1c();7 l=\'E\';7 m;s.1d(6(){9(e==F){G 8}9(d){J(s)}t{K(s)}G 8});7 o=1N.1a({L:1O,M:1e,N:\'1f\',O:\'1f\',P:Q,n:\'n\',1g:1e,1h:1i,1j:1i,R:"1P...",S:" - 1Q 1R 1S 1T",T:20,U:0,V:0,W:0,X:0,1k:6(){},1l:6(){},1m:6(){},1n:6(){},Y:\'1U\'},c);6 K(b){e=F;f=$(b);g=$(\'E\',b);k=1b 1c();1o=$(u).1V();1p=$(u).1W();h=g.Z();h.p+=o.U;h.q+=o.V;i=(o.W>0?o.W:g.3());j=(o.X>0?o.X:g.4());$(\'<1q></1q>\').r(\'1X\',o.n).1Y(\'1Z\').v({\'10\':\'21\',\'q\':h.q,\'p\':h.p,\'3\':i,\'4\':j,\'1r\':.5,\'1s\':\'22\',\'z-23\':o.1g});9(o.P){$(\'#\'+o.n).11($(\'<E/>\').1t(6(){$(s).v({\'10\':\'1u\',\'q\':i/2-(s.3/2),\'p\':j/2-(s.4/2)}).r(\'12\',o.R)}).r(\'13\',o.P))}t{$(\'#\'+o.n).v(\'24-1v\',\'#25\').11($(\'<1w></1w>\').26(o.R).v({\'10\':\'1u\',\'q\':\'1x\',\'p\':\'1x\',\'1v\':\'#27\',\'28-29\':\'2a\'}))}$(k).1t(6(){1y=$(\'<E/>\').r(\'13\',f.r(\'1z\')).r(\'1A\',g.r(\'1A\')+o.S).r(\'12\',g.r(\'12\')+o.S).3(i).4(j);o.1k.H(b);9(o.14){7 a=$(o.14);15=a.2b()-(o.T*2);16=a.2c()-(o.T*2)}t{15=$(u).4()-o.1h;9($.1B.1C)w=1D.1E(\'1F\')[0].1G;t w=$(u).3();16=w-o.1j}4=k.4;3=k.3;C=15/4;D=16/3;9(C<=D){D=C}t{C=D}x=y.A(4*C);B=y.A(3*D);9(x>4){x=4}9(B>3){B=3}9(o.14){17=a.Z();18=y.A((a.2d()/2)-(x/2)+17.p);19=y.A((a.2e()/2)-(B/2)+17.q)}t{18=y.A(($(u).4()/2)-(x/2)+1o);9($.1B.1C)w=1D.1E(\'1F\')[0].1G;t w=$(u).3();19=y.A((w/2)-(B/2)+1p)}$(\'#\'+o.n).2f().v(\'1r\',1).11(1y).4(\'1H\').3(\'1H\').I({q:19,p:18},{1I:o.L,1J:8,1K:o.N});$(\'#\'+o.n+\' \'+l).I({3:B,4:x},o.L,o.N,6(){o.1l.H(b);d=b;f.2g(o.Y);e=8;$(\'#\'+o.n+\' \'+l).1d(6(){J(Q)})})});k.13=f.r(\'1z\')}6 J(a){9(e==F||d==8){G 8}o.1m.H(d);e=F;h=g.Z();h.p+=o.U;h.q+=o.V;$(\'#\'+o.n).I({q:h.q,p:h.p},{1I:o.M,1J:8,1K:o.O});$(\'#\'+o.n+\' \'+l).I({3:i,4:j},o.M,o.O,6(){$(\'#\'+o.n).v(\'1s\',\'2h\').2i();o.1n.H(d);e=8;k=Q;9(a&&a!=d){d=8;K(a)}d=8;f.2j(o.Y)})}G s}});',62,144,'|||height|width||function|var|false|if||||||||||||||loader||left|top|attr|this|else|window|css|wh|dw|Math||round|dh|x_dim|y_dim|img|true|return|call|animate|putAway|flyOut|outSpeed|inSpeed|outEase|inEase|loadingSrc|null|loadingText|closeTip|destPadding|startOffsetX|startOffsetY|startHeight|startWidth|shownClass|offset|position|append|alt|src|destElement|max_x|max_y|dPos|dl|dt|extend|new|Image|click|500|swing|loaderZIndex|widthMargin|40|heightMargin|flyOutStart|flyOutFinish|putAwayStart|putAwayFinish|sL|sT|div|opacity|display|load|relative|color|span|2px|imgtag|href|title|browser|opera|document|getElementsByTagName|html|clientHeight|auto|duration|queue|easing|fn|flyout|jQuery|1000|Loading|Click|here|to|close|shown|scrollLeft|scrollTop|id|appendTo|body||absolute|block|index|background|000|text|FFF|font|size|9px|innerWidth|innerHeight|outerWidth|outerHeight|empty|addClass|none|remove|removeClass'.split('|'),0,{}))


function doLogin() {
	$.post('/login.php', {
		login: $("#login").val(),
		keepLoggedIn: $("#stayLoggedin").val(),            
		pw: $("#pw").val()
	}, function(data) {
		if (data.status == 'ok') {
			var s = "Logged in as " + $("#login").val() + '&nbsp;&bull;&nbsp;<a href="/SearchForJobs.php?Log=out" class="MouseOverLink" >Logout</a>' + data.link;
			$("#loginTouch").html(s);
			$("#loginPanel").css("display", "none");
			$("#mnuResume").html("Update My Resume");
			$.cookie('ProfileCookie',data.cookie, { expires: 2000 });
			loggedIn = true;
		} else {
			alert('Login failure:  ' + data.message );
		}; //if
	}, "json");
}; //doLogin()

function dofunction() {
	if (!regexEmail.test($("#regEmail").val())) {
		alert("Please correct the email before continuing.");
		$("#regEmail").select();
		return;
	}; //if
	if ($("#regpassword1").val().length < 5) {
		alert("Please correct the password before continuing.");
		$("#regpassword1").select();
		return;
	}; //if
	if ($("#regpassword1").val() != $("#regpassword2").val()) {
		alert("Please correct the password before continuing.");
		$("#regpassword1").select();
		return;
	}; //if
	if ($("#regFirstName").val().length < 1) {
		alert("Please supply your first name.");
		$("#regFirstName").select();
		return;
	}; //if
	if ($("#regLastName").val().length < 1) {
		alert("Please supply your last name.");
		$("#regLastName").select();
		return;
	}; //if
	if (!regexPhone.test($("#regPhone").val())) {
		alert("Phone numbers should be formated like 415-555-1234.");
		$("#regPhone").select();
		return;
	}; //if 


	var occupationId = $("#regOccupation").val();
	var specialtyId = $("#regSpecialty1_" + occupationId).val();
	params = {
		email: $("#regEmail").val(),
		password: $("#regpassword1").val(),
		first: $("#regFirstName").val(),
		last: $("#regLastName").val(),
		phone: $("#regPhone").val(),
		occupation: occupationId,
		specialty: specialtyId,
		keepLoggedIn: $("#regKeepLoggedIn").val(),
		captcha: $("captcha_code").val()
	};
	$.post('/CreateProfile.php', params, function(data) {
		if (data.status=="ok") {
			$("#functionSmokedGlass").css("display","none");
			$("#functionFakeForm").css("display","none");
			$("#loginTouch").html("Logged in as " + $("#regEmail").val());
			$("#mnuResume").html("Update My Resume");

			alert(data.message);
			loggedIn = true;
		} else if (data.status=="exception") {
			alert(data.debug);
		} else if (data.status=="inuse") { // email in use
			alert(data.message);
		} else if (data.status=="bad") { // no cookies
			$("#functionSmokedGlass").css("display","none");
			$("#functionFakeForm").css("display","none");
			alert(data.message);
		} else {
			alert(data.message);
		}; //if
	}, "json");
}; //dofunction

function makeUrlEx(occupation, specialty, bPerm, bTravel, bPerDiem, bContract, bBeach,bHiking,bNationalPark,bCompact,city,state, newNurses) {
	var url = occupationID2name(occupation) + '/';
	
	if (state=='OR' || state=='or') {
		state='Oregon';
	}; //if
	
	
	if (bPerDiem && bContract && bTravel && bPerm) {
	} else {
		if (bPerDiem) {
			url += "per-diem/";
		}; //if
		if (bPerm) {
			url += "permanent/";
		}; //if
		if (bContract) {
			url += "contract/";
		}; //if
		if (bTravel) {
			url += "travel/";
		}; //if
	}; //if
	
	if (bCompact) {
		url += "compact/";
	} else if (state != '') {
		url += state + "/";
		if (city != '') {
			url += city.replace(".","").replace(" ","-").replace("--","-").replace("--","-") + "/";
		}; //if
	}; //if
	
	if (specialty != '') {
		url += specialty + '/';
	}; //if
	
	if (bBeach) {
		url += "beach/";
	}; //if
	if (bHiking) {
		url += "hiking/";
	}; //if
	if (bNationalPark) {
		url += "national-park/";
	}; //if
	
	url += "jobs.php";
	
	if (newNurses) {
		url += "?flags=newNurseJobs";
	};
	
	return url.toLowerCase();
}     

function makeUrl(occupation, specialty, bPerm, bTravel, bPerDiem, bContract, bBeach,bHiking,bNationalPark,bCompact,city,state) {
	var url = occupationID2name(occupation) + '/';
	
	if (bPerDiem && bContract && bTravel && bPerm) {
	} else {
		if (bPerDiem) {
			url += "per-diem/";
		}; //if
		if (bPerm) {
			url += "permanent/";
		}; //if
		if (bContract) {
			url += "contract/";
		}; //if
		if (bTravel) {
			url += "travel/";
		}; //if
	}; //if
	
	if (bCompact) {
		url += "compact/";
	} else if (state != '') {
		url += state + "/";
		if (city != '') {
			url += city.replace(".","").replace(" ","-").replace("--","-").replace("--","-") + "/";
		}; //if
	}; //if
	
	if (specialty != '') {
		url += specialty + '/';
	}; //if
	
	if (bBeach) {
		url += "beach/";
	}; //if
	if (bHiking) {
		url += "hiking/";
	}; //if
	if (bNationalPark) {
		url += "national-park/";
	}; //if
	
	url += "jobs.php";
	
	return url.toLowerCase();
}  

$(document).ready(function() { // jquery initialize
	$('#ResourceMenu').lavaLamp({ fx: 'easeIn'+'Circ', speed: 800, linum: 1 });

	$(".DatePicker").datepicker({minDate: '-60y', yearRange: '1950:2050'});


	$("#pnlContent").mouseover(function() {
		$("#ResourceMenuPanel").hide("slow");
		StopLavaMove = false;
	});
	
	$(".resourceClear").mouseover(function() {
		$("#ResourceMenuPanel").hide("slow");
		StopLavaMove = false;
	});
	$("#ResourceTopLI").mouseover(function() {
		$("#ResourceMenuPanel").show("slow");
		StopLavaMove = true;
	});
	
	
	$("#btnSendPassword").click(function () {
		// xxxyy  gmp finish email password
		var em = $("#lostEmail").val();
		$("#lostEmail").val('');
		$.post('/LostPassword.php', {
			email: em
		}, function(data) {
			if (data.status == 'ok') {
				$("#functionSmokedGlass").css("display","none");
				$("#functionEmailPassword").css("display","none");
				alert('Check your email.  Your password is on the way.');
			} else {
				$("#functionSmokedGlass").css("display","none");
				$("#functionEmailPassword").css("display","none");
				alert('Failure: ' + data.message );
			}; //if
		}, "json");
	});
	
	$("#btnCancelSendPassword").click(function () {
		$("#functionSmokedGlass").css("display","none");
		$("#functionEmailPassword").css("display","none");
		$("#lostEmail").val('');
	});

	$("#dummyBody").click(function () {
		$("#dummyBody").css("display","none");
		$("#functionSmokedGlass").css("display","none");
		$("#dummyBody").html("");
	});
	
	$(".MouseOverLink").mouseover(function() {
		$(this).addClass("MouseOverLinkHover");
	});
   
	$(".MouseOverLink").mouseout(function() {
		$(this).removeClass("MouseOverLinkHover");
	}); 
	
	
	// SetupErinRect();
	setTimeout("SetupErinRect();", 100);

/*		
	$('#login').autoGrow({
		pad: 15, min_width: 100, max_width: 300
	});
	$('#pw').autoGrow({
		pad: 15, min_width: 100, max_width: 300
	}); 
*/

	$("#loginLink").click(function() {
		if ($("#loginPanel").css("display")=="none") {
			$("#loginPanel").css("display", "block");
			$("#heading").css("display","none");
			//$("#functionPanel").css("display","none");
		} else {
			$("#loginPanel").css("display", "none");
			$("#heading").css("display","inline");
		}; //if
	}).mouseover(function() {
		$(this).addClass("loginHover");
	}).mouseout(function() {
		$(this).removeClass("loginHover");
	});

	$("#forgottenPassword").click(function() { 
		$("#functionSmokedGlass").css("display","block");
		$("#functionEmailPassword").css("display","block");
	}).mouseover(function() {
		$(this).addClass("loginHover");
	}).mouseout(function() {
		$(this).removeClass("loginHover");
	});
	
	$("#registerLink").click(function() { 
		$("#functionSmokedGlass").css("display","block");
		$("#functionFakeForm").css("display","block");
	}).mouseover(function() {
		$(this).addClass("loginHover");
	}).mouseout(function() {
		$(this).removeClass("loginHover");
	});


	$("#regEmail").blur(function() {
		if (!regexEmail.test($(this).val())) {
			$("#regwarnEmail").css("display","block");
			$("#regwarnboxEmail").addClass("vwarningBox");
			this.select();
		} else {
			$("#regwarnEmail").css("display","none");
			$("#regwarnboxEmail").removeClass("vwarningBox");
		};
	});
	
	$("#regPhone").blur(function() {
		if ($(this).val().length > 0) {
			if (!regexPhone.test($(this).val())) {
				$("#regwarnPhone").css("display","block");
				$("#regwarnboxPhone").addClass("vwarningBox");
				this.select();
			} else {
				$("#regwarnPhone").css("display","none");
				$("#regwarnboxPhone").removeClass("vwarningBox");
			};
		 } else {
			$("#regwarnPhone").css("display","none");
			$("#regwarnboxPhone").removeClass("vwarningBox");
		 }; //if
	});
	
	$("#regpassword1").blur(function() {
		if ($("#regpassword1").val().length < 5) {
			$("#regwarnPassword").css("display","block");
			$("#regwarnboxPassword").addClass("vwarningBox");
			this.select();
		} else {
			$("#regwarnPassword").css("display","none");
			$("#regwarnboxPassword").removeClass("vwarningBox");
		}; //if
	});
	
	$("#regpassword2").blur(function() {
		if ($("#regpassword1").val() != $("#regpassword2").val()) {
			$("#regwarnPassword2").css("display","block");
			$("#regwarnboxPassword2").addClass("vwarningBox");
			this.select();
		} else {
			$("#regwarnPassword2").css("display","none");
			$("#regwarnboxPassword2").removeClass("vwarningBox");
		}; //if
	});
	
	$("#regFirstName").blur(function() {
		if ($("#regFirstName").val().length < 1) {
			$("#regwarnFirstName").css("display","block");
			$("#regwarnboxFirstName").addClass("vwarningBox");
			this.select();
		} else {
			$("#regwarnFirstName").css("display","none");
			$("#regwarnboxFirstName").removeClass("vwarningBox");
		}; //if
	});
	$("#regLastName").blur(function() {
		if ($("#regLastName").val().length < 1) {
			$("#regwarnLastName").css("display","block");
			$("#regwarnboxLastName").addClass("vwarningBox");
			this.select();
		} else {
			$("#regwarnLastName").css("display","none");
			$("#regwarnboxLastName").removeClass("vwarningBox");
		}; //if
	});        
	
	$(".regFields").keypress(function(e) {
		if (e.which == 13) {
			dofunction();
		}; //if
	}); 
	$("#regbtnSaveApp").click(dofunction);
	$("#regbtnCancel").click(function() {
			$("#functionSmokedGlass").css("display","none");
			$("#functionFakeForm").css("display","none");
			$("#regEmail").val('');
			$("#regpassword1").val('');
			$("#regpassword2").val('');
			$("#regFirstName").val('');
			$("#regLastName").val('');
			$("#regPhone").val('');
			// hide the error for next time
			$("#regwarnEmail").css("display","none");
			$("#regwarnboxEmail").removeClass("vwarningBox");

			$("#regwarnPassword").css("display","none");
			$("#regwarnboxPassword").removeClass("vwarningBox");

			$("#regwarnPassword2").css("display","none");
			$("#regwarnboxPassword2").removeClass("vwarningBox");

			$("#regwarnFirstName").css("display","none");
			$("#regwarnboxFirstName").removeClass("vwarningBox");

			$("#regwarnLastName").css("display","none");
			$("#regwarnboxLastName").removeClass("vwarningBox");

			$("#regwarnPhone").css("display","none");
			$("#regwarnboxPhone").removeClass("vwarningBox");
		   
	});
	
	$("#pw").keypress(function(e) {
		if (e.which==13) {
			doLogin();
		}; //if
	}); //keypress
	
	$("#btnLogin").click(doLogin, "json");
	
});
