var jsSrc = document.getElementById("affJsSrc").src;
var baseUrl = jsSrc.split("dir=")[1]+"/js/";
var sitepalAff_GB_ROOT_DIR=baseUrl+"modalcode/";if(!sitepalAff_AJS){var sitepalAff_AJS={BASE_URL:"",ajaxErrorHandler:null,isIe:function(){return(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)},isNetscape7:function(){return(navigator.userAgent.toLowerCase().indexOf("netscape")!=-1&&navigator.userAgent.toLowerCase().indexOf("7.")!=-1)},isSafari:function(){return(navigator.userAgent.toLowerCase().indexOf("khtml")!=-1)},isOpera:function(){return(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)},isMozilla:function(){return(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210)},isMac:function(){return(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)},isCamino:function(){return(navigator.userAgent.toLowerCase().indexOf("camino")!=-1)},createArray:function(a){if(sitepalAff_AJS.isArray(a)&&!sitepalAff_AJS.isString(a)){return a}else{if(!a){return[]}else{return[a]}}},forceArray:function(a){var b=[];sitepalAff_AJS.map(a,function(c){b.push(c)});return b},join:function(d,b){try{return b.join(d)}catch(c){var a=b[0]||"";sitepalAff_AJS.map(b,function(e){a+=d+e},1);return a+""}},isIn:function(c,b){var a=sitepalAff_AJS.getIndex(c,b);if(a!=-1){return true}else{return false}},getIndex:function(d,b,c){for(var a=0;a<b.length;a++){if(c&&c(b[a])||d==b[a]){return a}}return -1},update:function(b,a){for(var c in a){b[c]=a[c]}return b},flattenList:function(c){var a=[];var b=function(e,d){sitepalAff_AJS.map(d,function(f){if(f==null){}else{if(sitepalAff_AJS.isArray(f)){b(e,f)}else{e.push(f)}}})};b(a,c);return a},map:function(f,e,b,d){var c=0,a=f.length;if(b){c=b}if(d){a=d}for(c;c<a;c++){var g=e(f[c],c);if(g!=undefined){return g}}},partial:function(b){var a=sitepalAff_AJS.$FA(arguments);a.shift();return function(){a=a.concat(sitepalAff_AJS.$FA(arguments));return b.apply(window,a)}},getElement:function(a){if(sitepalAff_AJS.isString(a)||sitepalAff_AJS.isNumber(a)){return document.getElementById(a)}else{return a}},getElementsByTagAndClassName:function(h,g,e,b){var d=[];if(!sitepalAff_AJS.isDefined(e)){e=document}if(!sitepalAff_AJS.isDefined(h)){h="*"}var c=e.getElementsByTagName(h);var a=c.length;var f=new RegExp("(^|\\s)"+g+"(\\s|$)");for(i=0,j=0;i<a;i++){if(f.test(c[i].className)||g==null){d[j]=c[i];j++}}if(b){return d[0]}else{return d}},getBody:function(){return sitepalAff_AJS.$bytc("body")[0]},appendChildNodes:function(a){if(arguments.length>=2){sitepalAff_AJS.map(arguments,function(b){if(sitepalAff_AJS.isString(b)){b=sitepalAff_AJS.TN(b)}if(sitepalAff_AJS.isDefined(b)){a.appendChild(b)}},1)}return a},swapDOM:function(a,c){a=sitepalAff_AJS.getElement(a);var b=a.parentNode;if(c){c=sitepalAff_AJS.getElement(c);b.replaceChild(c,a)}else{b.removeChild(a)}return c},removeElement:function(){var a=sitepalAff_AJS.forceArray(arguments);sitepalAff_AJS.map(a,function(b){sitepalAff_AJS.swapDOM(b,null)})},createDOM:function(e,d){var f=0,a;var h=document.createElement(e);var b=d[0];if(sitepalAff_AJS.isDict(d[f])){for(k in b){a=b[k];if(k=="style"||k=="s"){h.style.cssText=a}else{if(k=="c"||k=="class"||k=="className"){h.className=a}else{h.setAttribute(k,a)}}}f++}if(b==null){f=1}for(var c=f;c<d.length;c++){var a=d[c];if(a){var g=typeof(a);if(g=="string"||g=="number"){a=sitepalAff_AJS.TN(a)}h.appendChild(a)}}return h},_createDomShortcuts:function(){var b=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];var a=function(c){sitepalAff_AJS[c.toUpperCase()]=function(){return sitepalAff_AJS.createDOM.apply(null,[c,arguments])}};sitepalAff_AJS.map(b,a);sitepalAff_AJS.TN=function(c){return document.createTextNode(c)}},showElement:function(){var a=sitepalAff_AJS.forceArray(arguments);sitepalAff_AJS.map(a,function(b){b.style.display=""})},hideElement:function(b){var a=sitepalAff_AJS.forceArray(arguments);sitepalAff_AJS.map(a,function(c){c.style.display="none"})},getCssDim:function(a){if(sitepalAff_AJS.isString(a)){return a}else{return a+"px"}},setStyle:function(){var b=sitepalAff_AJS.forceArray(arguments);var a=b.pop();var c=b.pop();sitepalAff_AJS.map(b,function(d){d.style[c]=sitepalAff_AJS.getCssDim(a)})},setWidth:function(){var a=sitepalAff_AJS.forceArray(arguments);a.splice(a.length-1,0,"width");sitepalAff_AJS.setStyle.apply(null,a)},setHeight:function(){var a=sitepalAff_AJS.forceArray(arguments);a.splice(a.length-1,0,"height");sitepalAff_AJS.setStyle.apply(null,a)},setLeft:function(){var a=sitepalAff_AJS.forceArray(arguments);a.splice(a.length-1,0,"left");sitepalAff_AJS.setStyle.apply(null,a)},setTop:function(){var a=sitepalAff_AJS.forceArray(arguments);a.splice(a.length-1,0,"top");sitepalAff_AJS.setStyle.apply(null,a)},addClass:function(){var b=sitepalAff_AJS.forceArray(arguments);var a=b.pop();var c=function(d){if(!new RegExp("(^|\\s)"+a+"(\\s|$)").test(d.className)){d.className+=(d.className?" ":"")+a}};sitepalAff_AJS.map(b,function(d){c(d)})},removeClass:function(){var c=sitepalAff_AJS.forceArray(arguments);var a=c.pop();var b=function(d){d.className=d.className.replace(new RegExp("\\s?"+a,"g"),"")};sitepalAff_AJS.map(c,function(d){b(d)})},setOpacity:function(b,a){b.style.opacity=a;b.style.filter="alpha(opacity="+a*100+")"},resetOpacity:function(a){a.style.opacity=1;a.style.filter=""},preloadImages:function(){sitepalAff_AJS.AEV(window,"load",sitepalAff_AJS.$p(function(a){sitepalAff_AJS.map(a,function(c){var b=new Image();b.src=c})},arguments))},getScrollTop:function(){var a;if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}return a},getWindowSize:function(c){c=c||document;var b,a;if(self.innerHeight){b=self.innerWidth;a=self.innerHeight}else{if(c.documentElement&&c.documentElement.clientHeight){b=c.documentElement.clientWidth;a=c.documentElement.clientHeight}else{if(c.body){b=c.body.clientWidth;a=c.body.clientHeight}}}return{w:b,h:a}},setEventKey:function(a){a.key=a.keyCode?a.keyCode:a.charCode;if(window.event){a.ctrl=window.event.ctrlKey;a.shift=window.event.shiftKey}else{a.ctrl=a.ctrlKey;a.shift=a.shiftKey}switch(a.key){case 63232:a.key=38;break;case 63233:a.key=40;break;case 63235:a.key=39;break;case 63234:a.key=37;break}},addEventListener:function(f,g,h,a,d){var c="ajsl_"+g+h;if(!d){d=false}sitepalAff_AJS.listeners=sitepalAff_AJS.$A(sitepalAff_AJS.listeners);if(sitepalAff_AJS.isIn(g,["keypress","keydown","keyup","click"])){var e=h;h=function(m){sitepalAff_AJS.setEventKey(m);return e.apply(window,arguments)}}var l=sitepalAff_AJS.isIn(g,["submit","load","scroll","resize"]);var b=sitepalAff_AJS.$A(f);sitepalAff_AJS.map(b,function(o){if(a){var p=h;h=function(q){sitepalAff_AJS.REV(o,g,h);return p.apply(window,arguments)}}if(l){var n=o["on"+g];var m=function(){if(n){h(arguments);return n(arguments)}else{return h(arguments)}};o[c]=m;o[c+"old"]=n;f["on"+g]=m}else{o[c]=h;if(o.attachEvent){o.attachEvent("on"+g,h)}else{if(o.addEventListener){o.addEventListener(g,h,d)}}sitepalAff_AJS.listeners.push([o,g,h])}})},removeEventListener:function(e,b,a,c){var d="ajsl_"+b+a;if(!c){c=false}a=e[d]||a;if(e["on"+b]==a){e["on"+b]=e[d+"old"]}if(e.removeEventListener){e.removeEventListener(b,a,c);if(sitepalAff_AJS.isOpera()){e.removeEventListener(b,a,!c)}}else{if(e.detachEvent){e.detachEvent("on"+b,a)}}},callLater:function(c,a){var b=function(){c()};window.setTimeout(b,a)},_unloadListeners:function(){if(sitepalAff_AJS.listeners){sitepalAff_AJS.map(sitepalAff_AJS.listeners,function(c,b,a){sitepalAff_AJS.REV(c,b,a)})}sitepalAff_AJS.listeners=[]},isDefined:function(a){return(a!="undefined"&&a!=null)},isArray:function(a){return a instanceof Array},isString:function(a){return(typeof a=="string")},isNumber:function(a){return(typeof a=="number")},isFunction:function(a){return(typeof a=="function")},isDict:function(b){var a=String(b);return a.indexOf(" Object")!=-1}};sitepalAff_AJS.Class=function(a){var b=function(){if(arguments[0]!="no_init"){return this.init.apply(this,arguments)}};b.prototype=a;sitepalAff_AJS.update(b,sitepalAff_AJS.Class.prototype);return b};sitepalAff_AJS.Class.prototype={extend:function(a){var b=new this("no_init");for(k in a){var c=b[k];var d=a[k];if(c&&c!=d&&typeof d=="function"){d=this._parentize(d,c)}b[k]=d}return new sitepalAff_AJS.Class(b)},implement:function(a){sitepalAff_AJS.update(this.prototype,a)},_parentize:function(b,a){return function(){this.parent=a;return b.apply(this,arguments)}}};sitepalAff_AJS.$=sitepalAff_AJS.getElement;sitepalAff_AJS.$$=sitepalAff_AJS.getElements;sitepalAff_AJS.$f=sitepalAff_AJS.getFormElement;sitepalAff_AJS.$b=sitepalAff_AJS.bind;sitepalAff_AJS.$p=sitepalAff_AJS.partial;sitepalAff_AJS.$FA=sitepalAff_AJS.forceArray;sitepalAff_AJS.$A=sitepalAff_AJS.createArray;sitepalAff_AJS.DI=sitepalAff_AJS.documentInsert;sitepalAff_AJS.ACN=sitepalAff_AJS.appendChildNodes;sitepalAff_AJS.RCN=sitepalAff_AJS.replaceChildNodes;sitepalAff_AJS.AEV=sitepalAff_AJS.addEventListener;sitepalAff_AJS.REV=sitepalAff_AJS.removeEventListener;sitepalAff_AJS.$bytc=sitepalAff_AJS.getElementsByTagAndClassName;sitepalAff_AJS.$AP=sitepalAff_AJS.absolutePosition;sitepalAff_AJSDeferred=function(a){this.callbacks=[];this.errbacks=[];this.req=a};sitepalAff_AJSDeferred.prototype={excCallbackSeq:function(c,e){var d=c.responseText;while(e.length>0){var b=e.pop();var a=b(d,c);if(a){d=a}}},callback:function(){this.excCallbackSeq(this.req,this.callbacks)},errback:function(){if(this.errbacks.length==0){alert("Error encountered:\n"+this.req.responseText)}this.excCallbackSeq(this.req,this.errbacks)},addErrback:function(a){this.errbacks.unshift(a)},addCallback:function(a){this.callbacks.unshift(a)},abort:function(){this.req.abort()},addCallbacks:function(b,a){this.addCallback(b);this.addErrback(a)},sendReq:function(a){if(sitepalAff_AJS.isObject(a)){this.req.send(sitepalAff_AJS.queryArguments(a))}else{if(sitepalAff_AJS.isDefined(a)){this.req.send(a)}else{this.req.send("")}}}};sitepalAff_AJS.addEventListener(window,"unload",sitepalAff_AJS._unloadListeners);sitepalAff_AJS._createDomShortcuts()}script_loaded=true;var sitepalAff_GB_CURRENT=null;sitepalAff_GB_hide=function(a){sitepalAff_GB_CURRENT.hide(a)};sitepalAff_GreyBox=new sitepalAff_AJS.Class({init:function(a){this.use_fx=sitepalAff_AJS.fx;this.type="page";this.overlay_click_close=false;this.salt=0;this.root_dir=sitepalAff_GB_ROOT_DIR;this.callback_fns=[];this.reload_on_close=false;this.src_loader=this.root_dir+"loader_frame.html";this.show_loading=true;sitepalAff_AJS.update(this,a)},addCallback:function(a){if(a){this.callback_fns.push(a)}},show:function(a){sitepalAff_GB_CURRENT=this;this.url=a;var b=[sitepalAff_AJS.$bytc("object"),sitepalAff_AJS.$bytc("select")];sitepalAff_AJS.map(sitepalAff_AJS.flattenList(b),function(c){c.style.visibility="hidden"});this.createElements();return false},hide:function(a){var b=this;sitepalAff_AJS.callLater(function(){var d=b.callback_fns;if(d!=[]){sitepalAff_AJS.map(d,function(f){f()})}b.onHide();if(b.use_fx){var e=b.overlay;sitepalAff_AJS.fx.fadeOut(b.overlay,{onComplete:function(){sitepalAff_AJS.removeElement(e);e=null},duration:300});sitepalAff_AJS.removeElement(b.g_window)}else{sitepalAff_AJS.removeElement(b.g_window,b.overlay)}b.removeFrame();sitepalAff_AJS.REV(window,"scroll",_sitepalAff_GB_setOverlayDimension);sitepalAff_AJS.REV(window,"resize",_sitepalAff_GB_update);var c=[sitepalAff_AJS.$bytc("object"),sitepalAff_AJS.$bytc("select")];sitepalAff_AJS.map(sitepalAff_AJS.flattenList(c),function(f){f.style.visibility="visible"});sitepalAff_GB_CURRENT=null;if(b.reload_on_close){window.location.reload()}if(sitepalAff_AJS.isFunction(a)){a()}},10)},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition()},createElements:function(){this.initOverlay();this.g_window=sitepalAff_AJS.DIV({id:"sitepalAff_GB_window"});sitepalAff_AJS.hideElement(this.g_window);sitepalAff_AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);var c=sitepalAff_GB_ROOT_DIR+"modal.css";var a=sitepalAff_AJS.createDOM("link",[{rel:"stylesheet",href:c}]);sitepalAff_AJS.ACN(this.g_window,a);this.initFrame();this.initHook();this.update();var b=this;if(this.use_fx){sitepalAff_AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){b.onShow();sitepalAff_AJS.showElement(b.g_window);b.startLoading()}})}else{sitepalAff_AJS.setOpacity(this.overlay,0.7);sitepalAff_AJS.showElement(this.g_window);this.onShow();this.startLoading()}sitepalAff_AJS.AEV(window,"scroll",_sitepalAff_GB_setOverlayDimension);sitepalAff_AJS.AEV(window,"resize",_sitepalAff_GB_update)},removeFrame:function(){try{sitepalAff_AJS.removeElement(this.iframe)}catch(a){}this.iframe=null},startLoading:function(){this.iframe.src=this.src_loader+"?s="+this.salt+++"&url="+encodeURIComponent(this.url);sitepalAff_AJS.showElement(this.iframe)},setOverlayDimension:function(){var b=sitepalAff_AJS.getWindowSize();if(sitepalAff_AJS.isMozilla()||sitepalAff_AJS.isOpera()){sitepalAff_AJS.setWidth(this.overlay,"100%")}else{sitepalAff_AJS.setWidth(this.overlay,b.w)}var a=Math.max(sitepalAff_AJS.getScrollTop()+b.h,sitepalAff_AJS.getScrollTop()+this.height);if(a<sitepalAff_AJS.getScrollTop()){sitepalAff_AJS.setHeight(this.overlay,a)}else{sitepalAff_AJS.setHeight(this.overlay,sitepalAff_AJS.getScrollTop()+b.h)}},initOverlay:function(){this.overlay=sitepalAff_AJS.DIV({id:"sitepalAff_GB_overlay"});if(this.overlay_click_close){sitepalAff_AJS.AEV(this.overlay,"click",sitepalAff_GB_hide)}sitepalAff_AJS.setOpacity(this.overlay,0);sitepalAff_AJS.getBody().insertBefore(this.overlay,sitepalAff_AJS.getBody().firstChild)},initFrame:function(){if(!this.iframe){var a={name:"sitepalAff_GB_frame","class":"sitepalAff_GB_frame",frameBorder:0};if(sitepalAff_AJS.isIe()){a.src='javascript:false;document.write("");'}this.iframe=sitepalAff_AJS.IFRAME(a);this.middle_cnt=sitepalAff_AJS.DIV({"class":"sitepalAff_content"},this.iframe);this.top_cnt=sitepalAff_AJS.DIV();this.bottom_cnt=sitepalAff_AJS.DIV();sitepalAff_AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt)}},onHide:function(){},onShow:function(){},setFrameSize:function(){},setWindowPosition:function(){},initHook:function(){}});_sitepalAff_GB_update=function(){if(sitepalAff_GB_CURRENT){sitepalAff_GB_CURRENT.update()}};_sitepalAff_GB_setOverlayDimension=function(){if(sitepalAff_GB_CURRENT){sitepalAff_GB_CURRENT.setOverlayDimension()}};sitepalAff_AJS.preloadImages(sitepalAff_GB_ROOT_DIR+"indicator.gif");script_loaded=true;sitepalAff_GB_showCenter=function(d,e,a,b,g){var c={caption:b||"",center_win:true,width:e||705,height:a||555,fullscreen:false,callback_fn:g};var f=new sitepalAff_GB_Window(c);return f.show(d)};sitepalAff_GB_Window=sitepalAff_GreyBox.extend({init:function(a){this.parent({});this.img_header=this.root_dir+"header_bg.gif";this.img_close=this.root_dir+"w_close.gif";this.show_close_img=true;sitepalAff_AJS.update(this,a);this.addCallback(this.callback_fn)},initHook:function(){sitepalAff_AJS.addClass(this.g_window,"sitepalAff_GB_Window");this.header=sitepalAff_AJS.TABLE({"class":"sitepalAff_header"});this.header.style.backgroundImage="url("+this.img_header+")";var b=sitepalAff_AJS.TD({"class":"sitepalAff_caption"},this.caption);var a=sitepalAff_AJS.TD({"class":"sitepalAff_close"});if(this.show_close_img){var e=sitepalAff_AJS.IMG({src:this.img_close});var d=sitepalAff_AJS.SPAN("Close");var c=sitepalAff_AJS.DIV(e,d);sitepalAff_AJS.AEV([e,d],"mouseover",function(){sitepalAff_AJS.addClass(d,"sitepalAff_on")});sitepalAff_AJS.AEV([e,d],"mouseout",function(){sitepalAff_AJS.removeClass(d,"sitepalAff_on")});sitepalAff_AJS.AEV([e,d],"mousedown",function(){sitepalAff_AJS.addClass(d,"sitepalAff_click")});sitepalAff_AJS.AEV([e,d],"mouseup",function(){sitepalAff_AJS.removeClass(d,"sitepalAff_click")});sitepalAff_AJS.AEV([e,d],"click",sitepalAff_GB_hide);sitepalAff_AJS.ACN(a,c)}tbody_header=sitepalAff_AJS.TBODY();sitepalAff_AJS.ACN(tbody_header,sitepalAff_AJS.TR(b,a));sitepalAff_AJS.ACN(this.header,tbody_header);sitepalAff_AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){sitepalAff_AJS.AEV(window,"scroll",sitepalAff_AJS.$b(this.setWindowPosition,this))}},setFrameSize:function(){if(this.fullscreen){var a=sitepalAff_AJS.getWindowSize();overlay_h=a.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10)}sitepalAff_AJS.setWidth(this.header,this.width+6);sitepalAff_AJS.setWidth(this.iframe,this.width);sitepalAff_AJS.setHeight(this.iframe,this.height)},setWindowPosition:function(){var a=sitepalAff_AJS.getWindowSize();sitepalAff_AJS.setLeft(this.g_window,((a.w-this.width)/2)-13);if(!this.center_win){sitepalAff_AJS.setTop(this.g_window,sitepalAff_AJS.getScrollTop())}else{var b=((a.h-this.height)/2)-20+sitepalAff_AJS.getScrollTop();if(b<0){b=0}sitepalAff_AJS.setTop(this.g_window,b)}}});sitepalAff_AJS.preloadImages(sitepalAff_GB_ROOT_DIR+"w_close.gif",sitepalAff_GB_ROOT_DIR+"header_bg.gif");