function setDynaCombo(a,b){remDynaField.options[0]=new Option(b,a);hideDynaCombo()}function hideDynaCombo(){dd=document.getElementById(remDynaDiv);if(dd.style.visibility=="visible"){dd.style.visibility="hidden"}}function showDynaCombo(a,b){remDynaField=a;remDynaDiv="_DynaDiv_"+a.name;dd=document.getElementById(remDynaDiv);if(dd.style.visibility=="visible"){dd.style.visibility="hidden"}else{a.options[0]=new Option(a.options[0].text,a.options[0].value);dd.innerHTML='<iframe width=100% style="padding:0; margin:0;" height=300 src="'+b+'"></iframe>';dd.style.visibility="visible"}}function getDynaCombo(a,b,c,d,e){var f='<select name="'+a+'" onclick="showDynaCombo(this,\''+d+'\')" style="'+e+'"><option value="'+b+'">'+c+"</option></select>";return f+'<span id="_DynaDiv_'+a+'" style="position: absolute; display: block; width: 300px; height: 300px; visibility: hidden; padding:0; margin:0; "></span>'}function writeDynaCombo(a,b,c,d,e){document.write(getDynaCombo(a,b,c,d,e))}function cmsAddThisRoot(a){if(!a)a="xa-4bfc6aa61733b4da";document.write('<div class="addthis_toolbox addthis_default_style" addthis:url="'+location.host+'" addthis:title=""><a href="http://www.addthis.com/bookmark.php?v=250&username='+a+'" class="addthis_button_compact">Share</a>');document.write('<span class="addthis_separator">|</span><a class="addthis_button_email"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a g:plusone:count="false" class="addthis_button_google_plusone"></a><a class="addthis_button_twitter"></a></div>');document.write("<scri"+'pt type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username='+a+'"></scri'+"pt>")}function cmsAddThis(a){if(!a)a="xa-4bfc6aa61733b4da";document.write('<div class="addthis_toolbox addthis_default_style"><a href="http://www.addthis.com/bookmark.php?v=250&username='+a+'" class="addthis_button_compact">Share</a>');document.write('<span class="addthis_separator">|</span><a class="addthis_button_email"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a g:plusone:count="false" class="addthis_button_google_plusone"></a><a class="addthis_button_twitter"></a></div>');document.write("<scri"+'pt type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username='+a+'"></scri'+"pt>")}function validatePWReminder(a){if(a.memberEmail.value==""){alert("Please enter your email address first.");return false}return true}function validateLoginForm(a){if(a.memberEmail.value==""||a.memberPassword.value==""){alert("Please enter your email and password");return false}return true}function validateSubscribeForm(a){if(a.MBR_NAME.value==""){alert("Sorry, name is mandatory.");a.MBR_NAME.focus();return false}if(a.MBR_EMAIL.value==""){alert("Sorry, the email address is mandatory.");a.MBR_EMAIL.focus();return false}if(a.MBR_EMAIL.value.indexOf("@")<0||a.MBR_EMAIL.value.indexOf(".")<1||a.MBR_EMAIL.value.indexOf(" ")>0){alert("Sorry, your email address looks invalid");a.MBR_EMAIL.focus();return false}return true}function slide(a,b,c,d,e,f){var g=$(a+" li").length;$(a+" li").css({"float":"left",position:"relative",display:"block"});$(a+" li").wrapAll('<div class="viewfinder" />');$(a+" .viewfinder").css({height:e,position:"relative",width:d*g});if(c=="left"){$(a+" .viewfinder").css({left:"0px"});setInterval(function(){$(a+" .viewfinder").animate({left:"-="+d},f,function(){$(a+" .viewfinder li:first-child").appendTo($(a+" .viewfinder"));$(a+" .viewfinder").css({left:"0px"})})},b)}else if(c=="right"){$(a+" .viewfinder").css({left:"0px"});$(a+" .viewfinder li:last-child").prependTo($(a+" .viewfinder"));setInterval(function(){$(a+" .viewfinder").css({left:"-"+d+"px"});$(a+" .viewfinder li:last-child").prependTo($(a+" .viewfinder"));$(a+" .viewfinder").animate({left:"+="+d},f,function(){})},b)}else if(c=="down"){$(a+" .viewfinder li").css({clear:"both",height:e+"px"});$(a+" .viewfinder").css({left:"0px"});$(a+" .viewfinder li:last-child").prependTo($(a+" .viewfinder"));setInterval(function(){$(a+" .viewfinder").css({top:"-"+e+"px"});$(a+" .viewfinder li:last-child").prependTo($(a+" .viewfinder"));$(a+" .viewfinder").animate({top:"+="+e},f,function(){})},b)}else if(c=="up"){$(a+" .viewfinder li").css({clear:"both",top:"0px"});$(a+" .viewfinder").css({left:"0px"});setInterval(function(){$(a+" .viewfinder").animate({top:"-="+e+"px"},f,function(){$(a+" .viewfinder").css({top:"0px"});$(a+" .viewfinder li:first-child").appendTo($(a+" .viewfinder"))})},b)}}function fade(a,b,c,d){setInterval(function(){$(a+" li:first-child").next("li").show().end().appendTo(a).fadeOut(c)},b)}function init_slideShow(a,b,c,d){var e=$(a+" img:first").width();var f=$(a+" img:first").height();$(a).width(e);$(a).height(f);$(a).find("img").each(function(a){$(this).attr("width",e);$(this).attr("height",f)});$(a+" li:gt(0)").hide();switch(c){case"fade":fade(a,b,d);break;case"fadeFast":fade(a,b,700);break;case"slideRight":slide(a,b,"right",e,f,d);break;case"slideDown":slide(a,b,"down",e,f,d);break;break;case"slideLeft":slide(a,b,"left",e,f,d);break;case"slideUp":slide(a,b,"up",e,f,d);break;default:fade(a,b,2e3);break}}function cmsSlideShow(a,b,c,d,e){e=noNulls(e,800);webwgt_divID="#"+a;var f=noNulls($(webwgt_divID).find("a").attr("href"),"/");var g=noNulls($(webwgt_divID).find("a").attr("title"),"");var h=noNulls($(webwgt_divID).find("a").attr("target"),"_self");f=noNulls(f,"#nogo");g=noNulls(g,"");h=noNulls(h,"_self");$(webwgt_divID).empty();$(webwgt_divID).append('<ul class="webwgt_ul" />');var i=webwgt_divID+" .webwgt_ul";$(i).css({position:"relative",margin:"0",padding:"0",border:"none",overflow:"hidden"});for(var j=0;j<c.length;j++){var k='<img src="'+c[j][0]+'" border="0" />';var l=noNulls(c[j][1],f);if(l&&l!=""){var m='<a border="0" ';m+='href="'+l+'"';m+=' target="'+noNulls(c[j][3],h)+'" ';m+=' title="'+noNulls(c[j][2],g)+'" ';k=m+" >"+k+"</a>"}k='<li style="list-style-type:none; position:absolute; left:0; top:0;padding:0;margin:0;">'+k+"</li>";$(i).append(k)}$(i+" li:first a img").load(function(){init_slideShow(i,b,d,e)})}function noNulls(a,b){return a&&a!=""?a:b}function startSlideShow(a,b,c,d,e,f){var g=new Array;for(i=0;i<d.length;i++)g[i]=[d[i],"","",""];f=noNulls(f,800);cmsSlideShow(b,c,g,e,f)}function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=new Array;for(a=0;a<d.length-2;a+=3)if((c=MM_findObj(d[a]))!=null){document.MM_sr[b++]=c;if(!c.oSrc)c.oSrc=c.src;c.src=d[a+2]}}function MM_findObj(a,b){var c,d,e;if(!b)b=document;if((c=a.indexOf("?"))>0&&parent.frames.length){b=parent.frames[a.substring(c+1)].document;a=a.substring(0,c)}if(!(e=b[a])&&b.all)e=b.all[a];for(d=0;!e&&d<b.forms.length;d++)e=b.forms[d][a];for(d=0;!e&&b.layers&&d<b.layers.length;d++)e=MM_findObj(a,b.layers[d].document);if(!e&&b.getElementById)e=b.getElementById(a);return e}function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p)a.MM_p=new Array;var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++)if(d[b].indexOf("#")!=0){a.MM_p[c]=new Image;a.MM_p[c++].src=d[b]}}}function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++)b.src=b.oSrc}$(document).ready(function(){$("li").hover(function(){$(this).addClass("sfhover")},function(){$(this).removeClass("sfhover")});$("#menu li a").addClass("menulink");$("#menu li").addClass("menulilink")});var RecaptchaOptions={theme:"white"};(function(a,b,c){function bc(b){if(!U){P=b;_();y=a(P);Q=0;if(K.rel!=="nofollow"){y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel});Q=y.index(P);if(Q===-1){y=y.add(P);Q=y.length-1}}if(!S){S=T=true;r.show();if(K.returnFocus){try{P.blur();a(P).one(l,function(){try{this.focus()}catch(a){}})}catch(c){}}q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show();K.w=Z(K.initialWidth,"x");K.h=Z(K.initialHeight,"y");X.position();if(o){z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p)}ba(h,K.onOpen);J.add(D).hide();I.html(K.close).show()}X.load(true)}}function bb(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;if(K.slideshow&&y[1]){d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q<y.length-1||K.loop){a=setTimeout(X.next,K.slideshowSpeed)}}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e);r.removeClass(b+"off").addClass(b+"on");a=setTimeout(X.next,K.slideshowSpeed)};e=function(){clearTimeout(a);F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,d);r.removeClass(b+"on").addClass(b+"off")};if(K.slideshowAuto){d()}else{e()}}else{r.removeClass(b+"off "+b+"on")}}function ba(b,c){if(c){c.call(P)}a.event.trigger(b)}function _(b){K=a.extend({},a.data(P,e));for(b in K){if(a.isFunction(K[b])&&b.substring(0,2)!=="on"){K[b]=K[b].call(P)}}K.rel=K.rel||P.rel||"nofollow";K.href=K.href||a(P).attr("href");K.title=K.title||P.title;if(typeof K.href==="string"){K.href=a.trim(K.href)}}function $(a){return K.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function Z(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function Y(c,d,e){e=b.createElement("div");if(c){e.id=f+c}e.style.cssText=d||"";return a(e)}var d={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,returnFocus:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,top:false,bottom:false,left:false,right:false,fixed:false,data:false},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=a.browser.msie&&!a.support.opacity,o=n&&a.browser.version<7,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;X=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{};if(!f[0]){if(f.selector){return f}f=a("<a/>");b.open=true}if(c){b.onComplete=c}f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b));a(this).addClass(g)});if(a.isFunction(b.open)&&b.open.call(f)||b.open){bc(f[0])}return f};X.init=function(){z=a(c);r=Y().attr({id:e,"class":n?f+(o?"IE6":"IE"):""});q=Y("Overlay",o?"position:absolute":"").hide();s=Y("Wrapper");t=Y("Content").append(A=Y("LoadedContent","width:0; height:0; overflow:hidden"),C=Y("LoadingOverlay").add(Y("LoadingGraphic")),D=Y("Title"),E=Y("Current"),G=Y("Next"),H=Y("Previous"),F=Y("Slideshow").bind(h,bb),I=Y("Close"));s.append(Y().append(Y("TopLeft"),u=Y("TopCenter"),Y("TopRight")),Y(false,"clear:left").append(v=Y("MiddleLeft"),t,w=Y("MiddleRight")),Y(false,"clear:left").append(Y("BottomLeft"),x=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"});B=Y(false,"position:absolute; width:9999px; visibility:hidden; display:none");a("body").prepend(q,r.append(s,B));t.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover");L=u.height()+x.height()+t.outerHeight(true)-t.height();M=v.width()+w.width()+t.outerWidth(true)-t.width();N=A.outerHeight(true);O=A.outerWidth(true);r.css({"padding-bottom":L,"padding-right":M}).hide();G.click(function(){X.next()});H.click(function(){X.prev()});I.click(function(){X.close()});J=G.add(H).add(E).add(F);t.children().removeClass("hover");q.click(function(){if(K.overlayClose){X.close()}});a(b).bind("keydown."+f,function(a){var b=a.keyCode;if(S&&K.escKey&&b===27){a.preventDefault();X.close()}if(S&&K.arrowKey&&y[1]){if(b===37){a.preventDefault();H.click()}else if(b===39){a.preventDefault();G.click()}}})};X.remove=function(){r.add(q).remove();a("."+g).removeData(e).removeClass(g)};X.position=function(a,c){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width;C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var d=0,e=0;z.unbind("resize."+f);r.hide();if(K.fixed&&!o){r.css({position:"fixed"})}else{d=z.scrollTop();e=z.scrollLeft();r.css({position:"absolute"})}if(K.right!==false){e+=Math.max(z.width()-K.w-O-M-Z(K.right,"x"),0)}else if(K.left!==false){e+=Z(K.left,"x")}else{e+=Math.round(Math.max(z.width()-K.w-O-M,0)/2)}if(K.bottom!==false){d+=Math.max(b.documentElement.clientHeight-K.h-N-L-Z(K.bottom,"y"),0)}else if(K.top!==false){d+=Z(K.top,"y")}else{d+=Math.round(Math.max(b.documentElement.clientHeight-K.h-N-L,0)/2)}r.show();a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0;s[0].style.width=s[0].style.height="9999px";r.dequeue().animate({width:K.w+O,height:K.h+N,top:d,left:e},{duration:a,complete:function(){g(this);T=false;s[0].style.width=K.w+O+M+"px";s[0].style.height=K.h+N+L+"px";if(c){c()}setTimeout(function(){z.bind("resize."+f,X.position)},1)},step:function(){g(this)}})};X.resize=function(a){if(S){a=a||{};if(a.width){K.w=Z(a.width,"x")-O-M}if(a.innerWidth){K.w=Z(a.innerWidth,"x")}A.css({width:K.w});if(a.height){K.h=Z(a.height,"y")-N-L}if(a.innerHeight){K.h=Z(a.innerHeight,"y")}if(!a.innerHeight&&!a.height){var b=A.wrapInner("<div style='overflow:auto'></div>").children();K.h=b.height();b.replaceWith(b.children())}A.css({height:K.h});X.position(K.transition==="none"?0:K.speed)}};X.prep=function(b){function h(){K.h=K.h||A.height();K.h=K.mh&&K.mh<K.h?K.mh:K.h;return K.h}function g(){K.w=K.w||A.width();K.w=K.mw&&K.mw<K.w?K.mw:K.w;return K.w}if(!S){return}var c,d=K.transition==="none"?0:K.speed;A.remove();A=Y("LoadedContent").append(b);A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t);B.hide();a(R).css({"float":"none"});if(o){a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"})}c=function(){function o(){if(n){r[0].style.removeAttribute("filter")}}var b,c,g,h,i=y.length,k,l;if(!S){return}l=function(){clearTimeout(W);C.hide();ba(j,K.onComplete)};if(n){if(R){A.fadeIn(100)}}D.html(K.title).add(A).show();if(i>1){if(typeof K.current==="string"){E.html(K.current.replace("{current}",Q+1).replace("{total}",i)).show()}G[K.loop||Q<i-1?"show":"hide"]().html(K.next);H[K.loop||Q?"show":"hide"]().html(K.previous);b=Q?y[Q-1]:y[i-1];g=Q<i-1?y[Q+1]:y[0];if(K.slideshow){F.show()}if(K.preloading){h=a.data(g,e).href||g.href;c=a.data(b,e).href||b.href;h=a.isFunction(h)?h.call(g):h;c=a.isFunction(c)?c.call(b):c;if($(h)){a("<img/>")[0].src=h}if($(c)){a("<img/>")[0].src=c}}}else{J.hide()}if(K.iframe){k=a("<iframe/>").addClass(f+"Iframe")[0];if(K.fastIframe){l()}else{a(k).one("load",l)}k.name=f+ +(new Date);k.src=K.href;if(!K.scrolling){k.scrolling="no"}if(n){k.frameBorder=0;k.allowTransparency="true"}a(k).appendTo(A).one(m,function(){k.src="//about:blank"})}else{l()}if(K.transition==="fade"){r.fadeTo(d,1,o)}else{o()}};if(K.transition==="fade"){r.fadeTo(d,0,function(){X.position(0,c)})}else{X.position(d,c)}};X.load=function(b){var c,d,e=X.prep;T=true;R=false;P=y[Q];if(!b){_()}ba(m);ba(i,K.onLoad);K.h=K.height?Z(K.height,"y")-N-L:K.innerHeight&&Z(K.innerHeight,"y");K.w=K.width?Z(K.width,"x")-O-M:K.innerWidth&&Z(K.innerWidth,"x");K.mw=K.w;K.mh=K.h;if(K.maxWidth){K.mw=Z(K.maxWidth,"x")-O-M;K.mw=K.w&&K.w<K.mw?K.w:K.mw}if(K.maxHeight){K.mh=Z(K.maxHeight,"y")-N-L;K.mh=K.h&&K.h<K.mh?K.h:K.mh}c=K.href;W=setTimeout(function(){C.show()},100);if(K.inline){Y().hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())});e(a(c))}else if(K.iframe){e(" ")}else if(K.html){e(K.html)}else if($(c)){a(R=new Image).addClass(f+"Photo").error(function(){K.title=false;e(Y("Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null;if(K.scalePhotos){d=function(){R.height-=R.height*a;R.width-=R.width*a};if(K.mw&&R.width>K.mw){a=(R.width-K.mw)/R.width;d()}if(K.mh&&R.height>K.mh){a=(R.height-K.mh)/R.height;d()}}if(K.h){R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"}if(y[1]&&(Q<y.length-1||K.loop)){R.style.cursor="pointer";R.onclick=function(){X.next()}}if(n){R.style.msInterpolationMode="bicubic"}setTimeout(function(){e(R)},1)});setTimeout(function(){R.src=c},1)}else if(c){B.load(c,K.data,function(b,c,d){e(c==="error"?Y("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})}};X.next=function(){if(!T&&y[1]&&(Q<y.length-1||K.loop)){Q=Q<y.length-1?Q+1:0;X.load()}};X.prev=function(){if(!T&&y[1]&&(Q||K.loop)){Q=Q?Q-1:y.length-1;X.load()}};X.close=function(){if(S&&!U){U=true;S=false;ba(k,K.onCleanup);z.unbind("."+f+" ."+p);q.fadeTo(200,0);r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide();ba(m);A.remove();setTimeout(function(){U=false;ba(l,K.onClosed)},1)})}};X.element=function(){return a(P)};X.settings=d;V=function(a){if(!(a.button!==0&&typeof a.button!=="undefined"||a.ctrlKey||a.shiftKey||a.altKey)){a.preventDefault();bc(this)}};if(a.fn.delegate){a(b).delegate("."+g,"click",V)}else{a("."+g).live("click",V)}a(X.init)})(jQuery,document,this);jQuery(document).ready(function(){jQuery(".colorbox").colorbox();jQuery(".colorboxIframe600x500").colorbox({iframe:true,width:600,height:500})})
