// jQuery and mini-form JS
function scrollToA(selector) {
	$('html,body').animate({scrollTop: ($(selector).offset().top - 30)}, 750);
}
function showStep2(){
	var errStr = valZipInstr($("input#suggestZip").val(),$("input#suggestInstr").val());
	if (errStr != ""){
		alert(errStr);
		return false;
	}
	$('#step1').hide();
	$('#presubmit').show();
	$("#presubmit").html('<h3>Searching...</h3><img src="/assets/images/ajax-loader.gif" height="32" width="32" border="0" />');	
	$.post('/includes/display/forms/ajaxMiniForm/step2.cfm',$('#contactForm').serialize(),function(data,status){
		$("#presubmit").html(data);
		$('#step2a').show('slow', function(){
			scrollToA('#formContainer');
		});
	});
	try {
		pageTracker._trackPageview("miniForm/step1.htm");
		pageTracker._trackEvent("miniForm", "Step 1", $("input#suggestInstr").val());
	} catch(err) {}
	return false;
}

function submitForm(){
	// in case enter key is pressed while still on step 1
	if (!$('#step2a').is(':visible')) {
		showStep2();
		return false;
	}
	// Validation
	var errStr = valZipInstr($("input#suggestZip").val(),$("input#suggestInstr").val());
	if ($("input#name").val() == ""){
		errStr = errStr + "Please enter your Name.\n";
	}
	if ($("input#email").val() == "" && $("input#phone").val() == "") {
		errStr = errStr + "Please enter an Email Address or Phone.";
	}
	if ($("input#email").val() != "" && !isValidEmail($("input#email").val())) {
		errStr = errStr + "Please enter a valid Email Address.";
	}
	if ($("input#phone").val() != "" && !isPhoneNumber($("input#phone").val())){
		errStr = errStr + "Phone Number does not seem to be valid.\n  - Please write it one of these forms (incl. area code):\n     (555) 555-1212, 5555551212, 555-555-1212 ext. 5\n";
	}
	if (errStr != ""){
		alert(errStr);
	} else {
	// ****** Submit Form ******
		$('#formContent').hide();
		$('#sending').show('fast');
		$('#sending').html('<h3>Sending...</h3><img src="/assets/images/ajax-loader.gif" height="32" width="32" border="0" />');
		postMini();
		try {
			pageTracker._trackPageview("miniForm/submit.htm");
			pageTracker._trackEvent("miniForm", "Submit", $("input#suggestInstr").val());
		} catch(err) {}
		return false;
	}
};
function postMini() {
	$.post('/includes/display/forms/ajaxMiniForm/post.cfm',$('#contactForm').serialize(),function(data,status){
			$("#sending").html(data)
			.hide()
			.fadeIn(1500, function() {  
			   $('#sending');  
			 });
		});
	scrollToA('#formContainer');
}
//*** Validation ***
function isValidEmail(str) {
	var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
	return emailPattern.test(str);
}
function valZipInstr(zip,instr){
	 var errStr ="";
	 reZip = new RegExp(/(^\d{5}$)|(^\d{5}-\d{4}$)/);
	 if (!reZip.test(zip)) {
		  errStr = "Please enter a valid Zip Code.\n";
	 }
	 if (instr == "") {
			errStr = errStr + "Please enter an Instrument.\n";	
		}
	return errStr;
}
function isPhoneNumber(s){
     // Check for correct phone number
	 var phoneRegEx = /^(1\s*[-\/\.]?)?(\((\d{3})\)|(\d{3}))\s*[-\/\.]?\s*(\d{3})\s*[-\/\.]?\s*(\d{4})\s*(([xX]|[eE][xX][tT])\.?\s*(\d+))*$/;
	 if ( !phoneRegEx.test(s) ) {
		 return false;
     }
	return true;
}
/************** Instruments *****************/
instruments = ['banjo','bass','bass guitar','bassoon','cello','clarinet','cornet','drums','euphonium','flute','glockenspiel','guitar','mandolin','percussion','piano','saxophone','sousaphone','trombone','trumpet','tuba','vibraphone','viola','violin','voice'];
/* ############# AUTOCOMPLETE PACK (Edited by DMG ) ############# */
//Edited line 533: for (var i = q.length - 1; i >= 0; i--) {
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}(';(4($){$.1f.1z({18:4(1A,3){6 1B=U 1A=="1C";3=$.1z({},$.z.22,{V:1B?1A:19,7:1B?19:1A,1D:1B?$.z.22.1D:10,G:3&&!3.1E?10:3B},3);3.1F=3.1F||4(b){a b};3.1G=3.1G||3.23;a H.K(4(){24 $.z(H,3)})},l:4(1H){a H.W("l",1H)},1I:4(1H){a H.1a("1I",[1H])},26:4(){a H.1a("26")},28:4(3){a H.1a("28",[3])},29:4(){a H.1a("29")}});$.z=4(e,3){6 B={2y:38,2z:40,2A:46,2B:9,2C:13,2D:27,2E:3C,2F:33,2G:34,2H:8};6 $e=$(e).3D("18","3E").O(3.2I);6 1b;6 X="";6 1g=$.z.2J(3);6 1h=0;6 1J;6 1c={1K:r};6 g=$.z.2K(3,e,2a,1c);6 1L;$.2b.2L&&$(e.2M).W("3F.18",4(){5(1L){1L=r;a r}});$e.W(($.2b.2L?"3G":"3H")+".18",4(t){1J=t.2N;3I(t.2N){P B.2y:t.1i();5(g.L()){g.2O()}o{Y(0,y)}Q;P B.2z:t.1i();5(g.L()){g.2P()}o{Y(0,y)}Q;P B.2F:t.1i();5(g.L()){g.2Q()}o{Y(0,y)}Q;P B.2G:t.1i();5(g.L()){g.2R()}o{Y(0,y)}Q;P 3.1j&&$.1M(3.R)==","&&B.2E:P B.2B:P B.2C:5(2a()){t.1i();1L=y;a r}Q;P B.2D:g.Z();Q;3J:2c(1b);1b=2d(Y,3.1D);Q}}).2e(4(){1h++}).3K(4(){1h=0;5(!1c.1K){2S()}}).2T(4(){5(1h++>1&&!g.L()){Y(0,y)}}).W("1I",4(){6 1f=(1N.f>1)?1N[1]:19;4 2f(q,7){6 l;5(7&&7.f){1d(6 i=0;i<7.f;i++){5(7[i].l.S()==q.S()){l=7[i];Q}}}5(U 1f=="4")1f(l);o $e.1a("l",l&&[l.7,l.b])}$.K(1k($e.I()),4(i,b){2g(b,2f,2f)})}).W("26",4(){1g.1l()}).W("28",4(){$.1z(3,1N[1]);5("7"2U 1N[1])1g.1m()}).W("29",4(){g.1O();$e.1O();$(e.2M).1O(".18")});4 2a(){6 C=g.C();5(!C)a r;6 v=C.l;X=v;5(3.1j){6 A=1k($e.I());5(A.f>1){v=A.1e(0,A.f-1).2V(3.R)+3.R+v}v+=3.R}$e.I(v);1n();$e.1a("l",[C.7,C.b]);a y}4 Y(3L,2W){5(1J==B.2A){g.Z();a}6 M=$e.I();5(!2W&&M==X)a;X=M;M=1o(M);5(M.f>=3.2X){$e.O(3.2h);5(!3.1P)M=M.S();2g(M,2Y,1n)}o{1Q();g.Z()}};4 1k(b){5(!b){a[""]}6 A=b.2i(3.R);6 l=[];$.K(A,4(i,b){5($.1M(b))l[i]=$.1M(b)});a l}4 1o(b){5(!3.1j)a b;6 A=1k(b);a A[A.f-1]}4 1R(q,2j){5(3.1R&&(1o($e.I()).S()==q.S())&&1J!=B.2H){$e.I($e.I()+2j.3M(1o(X).f));$.z.2k(e,X.f,X.f+2j.f)}};4 2S(){2c(1b);1b=2d(1n,3N)};4 1n(){6 2Z=g.L();g.Z();2c(1b);1Q();5(3.30){$e.1I(4(l){5(!l){5(3.1j){6 A=1k($e.I()).1e(0,-1);$e.I(A.2V(3.R)+(A.f?3.R:""))}o $e.I("")}})}5(2Z)$.z.2k(e,e.b.f,e.b.f)};4 2Y(q,7){5(7&&7.f&&1h){1Q();g.31(7,q);1R(q,7[0].b);g.2l()}o{1n()}};4 2g(u,1S,32){5(!3.1P)u=u.S();6 7=1g.35(u);5(7&&7.f){1S(u,7)}o 5((U 3.V=="1C")&&(3.V.f>0)){6 1p={3O:+24 3P()};$.K(3.1p,4(36,1T){1p[36]=U 1T=="4"?1T():1T});$.3Q({3R:"3S",3T:"18"+e.3U,37:3.37,V:3.V,7:$.1z({q:1o(u),3V:3.G},1p),1S:4(7){6 11=3.1U&&3.1U(7)||1U(7);1g.1q(u,11);1S(u,11)}})}o{g.39();32(u)}};4 1U(7){6 11=[];6 2m=7.2i("\\n");1d(6 i=0;i<2m.f;i++){6 w=$.1M(2m[i]);5(w){w=w.2i("|");11[11.f]={7:w,b:w[0],l:3.1V&&3.1V(w,w[0])||w[0]}}}a 11};4 1Q(){$e.1r(3.2h)}};$.z.22={2I:"3W",3a:"3X",2h:"3Y",2X:1,1D:3Z,1P:r,1s:y,2n:r,1t:10,G:41,30:r,1p:{},2o:y,23:4(w){a w[0]},1G:19,1R:r,D:0,1j:r,R:", ",1F:4(b,u){a b.3b(24 42("(?![^&;]+;)(?!<[^<>]*)("+u.3b(/([\\^\\$\\(\\)\\[\\]\\{\\}\\*\\.\\+\\?\\|\\\\])/3c,"\\\\$1")+")(?![^<>]*>)(?![^&;]+;)","3c"),"<3d>$1</3d>")},1E:y,1W:43};$.z.2J=4(3){6 7={};6 f=0;4 1s(s,3e){5(!3.1P)s=s.S();6 i=s.44(3e);5(i==-1)a r;a i==0||3.2n};4 1q(q,b){5(f>3.1t){1l()}5(!7[q]){f++}7[q]=b}4 1m(){5(!3.7)a r;6 12={},3f=0;5(!3.V)3.1t=1;12[""]=[];1d(6 i=0,3g=3.7.f;i<3g;i++){6 T=3.7[i];T=(U T=="1C")?[T]:T;6 b=3.1G(T,i+1,3.7.f);5(b===r)2p;6 1X=b.45(0).S();5(!12[1X])12[1X]=[];6 w={b:b,7:T,l:3.1V&&3.1V(T)||b};12[1X].2q(w);5(3f++<3.G){12[""].2q(w)}};$.K(12,4(i,b){3.1t++;1q(i,b)})}2d(1m,25);4 1l(){7={};f=0}a{1l:1l,1q:1q,1m:1m,35:4(q){5(!3.1t||!f)a 19;5(!3.V&&3.2n){6 14=[];1d(6 k 2U 7){5(k.f>0){6 c=7[k];$.K(c,4(i,x){5(1s(x.b,q)){14.2q(x)}})}}a 14}o 5(7[q]){a 7[q]}o 5(3.1s){1d(6 i=q.f-1;i>=0;i--){6 c=7[q.47(0,i)];5(c){6 14=[];$.K(c,4(i,x){5(1s(x.b,q)){14[14.f]=x}});a 14}}}a 19}}};$.z.2K=4(3,e,g,1c){6 E={F:"48"};6 h,j=-1,7,u="",2r=y,p,m;4 3h(){5(!2r)a;p=$("<49/>").Z().O(3.3a).15("4a","4b").2s(3i.3j);m=$("<4c/>").2s(p).4d(4(t){5(16(t).3k&&16(t).3k.4e()==\'3l\'){j=$("1u",m).1r(E.F).4f(16(t));$(16(t)).O(E.F)}}).2T(4(t){$(16(t)).O(E.F);g();e.2e();a r}).4g(4(){1c.1K=y}).4h(4(){1c.1K=r});5(3.D>0)p.15("D",3.D);2r=r}4 16(t){6 p=t.16;4i(p&&p.4j!="3l")p=p.4k;5(!p)a[];a p}4 17(1Y){h.1e(j,j+1).1r(E.F);3m(1Y);6 2t=h.1e(j,j+1).O(E.F);5(3.1E){6 J=0;h.1e(0,j).K(4(){J+=H.1v});5((J+2t[0].1v-m.1w())>m[0].4l){m.1w(J+2t[0].1v-m.4m())}o 5(J<m.1w()){m.1w(J)}}};4 3m(1Y){j+=1Y;5(j<0){j=h.1x()-1}o 5(j>=h.1x()){j=0}}4 3n(2u){a 3.G&&3.G<2u?3.G:2u}4 3o(){m.3p();6 G=3n(7.f);1d(6 i=0;i<G;i++){5(!7[i])2p;6 2v=3.23(7[i].7,i+1,G,7[i].b,u);5(2v===r)2p;6 1u=$("<1u/>").4n(3.1F(2v,u)).O(i%2==0?"4o":"4p").2s(m)[0];$.7(1u,"3q",7[i])}h=m.4q("1u");5(3.2o){h.1e(0,1).O(E.F);j=0}5($.1f.3r)m.3r()}a{31:4(d,q){3h();7=d;u=q;3o()},2P:4(){17(1)},2O:4(){17(-1)},2Q:4(){5(j!=0&&j-8<0){17(-j)}o{17(-8)}},2R:4(){5(j!=h.1x()-1&&j+8>h.1x()){17(h.1x()-1-j)}o{17(8)}},Z:4(){p&&p.Z();h&&h.1r(E.F);j=-1},L:4(){a p&&p.4r(":L")},4s:4(){a H.L()&&(h.3s("."+E.F)[0]||3.2o&&h[0])},2l:4(){6 J=$(e).J();p.15({D:U 3.D=="1C"||3.D>0?3.D:$(e).D(),3t:J.3t+e.1v,2w:J.2w}).2l();5(3.1E){m.1w(0);m.15({3u:3.1W,4t:\'4u\'});5($.2b.4v&&U 3i.3j.4w.3u==="4x"){6 1Z=0;h.K(4(){1Z+=H.1v});6 2x=1Z>3.1W;m.15(\'4y\',2x?3.1W:1Z);5(!2x){h.D(m.D()-3v(h.15("3w-2w"))-3v(h.15("3w-4z")))}}}},C:4(){6 C=h&&h.3s("."+E.F).1r(E.F);a C&&C.f&&$.7(C[0],"3q")},39:4(){m&&m.3p()},1O:4(){p&&p.4A()}}};$.z.2k=4(N,20,21){5(N.3x){6 1y=N.3x();1y.4B(y);1y.4C("3y",20);1y.4D("3y",21);1y.g()}o 5(N.3z){N.3z(20,21)}o{5(N.3A){N.3A=20;N.4E=21}}N.2e()}})(4F);',62,290,'|||options|function|if|var|data|||return|value|||input|length|select|listItems||active||result|list||else|element||false||event|term||row||true|Autocompleter|words|KEY|selected|width|CLASSES|ACTIVE|max|this|val|offset|each|visible|currentValue|field|addClass|case|break|multipleSeparator|toLowerCase|rawValue|typeof|url|bind|previousValue|onChange|hide||parsed|stMatchSets||csub|css|target|moveSelect|autocomplete|null|trigger|timeout|config|for|slice|fn|cache|hasFocus|preventDefault|multiple|trimWords|flush|populate|hideResultsNow|lastWord|extraParams|add|removeClass|matchSubset|cacheLength|li|offsetHeight|scrollTop|size|selRange|extend|urlOrData|isUrl|string|delay|scroll|highlight|formatMatch|handler|search|lastKeyPressCode|mouseDownOnSelect|blockSubmit|trim|arguments|unbind|matchCase|stopLoading|autoFill|success|param|parse|formatResult|scrollHeight|firstChar|step|listHeight|start|end|defaults|formatItem|new||flushCache||setOptions|unautocomplete|selectCurrent|browser|clearTimeout|setTimeout|focus|findValueCallback|request|loadingClass|split|sValue|Selection|show|rows|matchContains|selectFirst|continue|push|needsInit|appendTo|activeItem|available|formatted|left|scrollbarsVisible|UP|DOWN|DEL|TAB|RETURN|ESC|COMMA|PAGEUP|PAGEDOWN|BACKSPACE|inputClass|Cache|Select|opera|form|keyCode|prev|next|pageUp|pageDown|hideResults|click|in|join|skipPrevCheck|minChars|receiveData|wasVisible|mustMatch|display|failure|||load|key|dataType||emptyList|resultsClass|replace|gi|strong|sub|nullData|ol|init|document|body|nodeName|LI|movePosition|limitNumberOfItems|fillList|empty|ac_data|bgiframe|filter|top|maxHeight|parseInt|padding|createTextRange|character|setSelectionRange|selectionStart|150|188|attr|off|submit|keypress|keydown|switch|default|blur|crap|substring|200|timestamp|Date|ajax|mode|abort|port|name|limit|ac_input|ac_results|ac_loading|400||100|RegExp|180|indexOf|charAt||substr|ac_over|div|position|absolute|ul|mouseover|toUpperCase|index|mousedown|mouseup|while|tagName|parentNode|clientHeight|innerHeight|html|ac_even|ac_odd|find|is|current|overflow|auto|msie|style|undefined|height|right|remove|collapse|moveStart|moveEnd|selectionEnd|jQuery'.split('|'),0,{}));
/* ############## CYCLE LITE MIN Plugin ################ */
(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery);
/***********************************************
* Drop Down/ Overlapping Content- � Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//Note: Had to use YUI Compressor 2.3.5	with preserveAllSemi, disableOpt
var dropdowncontent={disableanchorlink:true,hidedivmouseout:[true,200],ajaxloadingmsg:"Loading content. Please wait...",ajaxbustcache:true,getposOffset:function(B,A){return(B.offsetParent)?B[A]+this.getposOffset(B.offsetParent,A):B[A];},isContained:function(A,B){var B=window.event||B;var C=B.relatedTarget||((B.type=="mouseover")?B.fromElement:B.toElement);while(C&&C!=A){try{C=C.parentNode;}catch(B){C=A;}}if(C==A){return true;}else{return false;}},show:function(B,D,E){if(!this.isContained(B,E)||(E&&E.type=="click")){var E=window.event||E;if(E.type=="click"&&D.style.visibility=="visible"){D.style.visibility="hidden";return ;}var C=(D.dropposition[0]=="left")?-(D.offsetWidth-B.offsetWidth):0;var A=(D.dropposition[1]=="top")?-D.offsetHeight:B.offsetHeight;D.style.left=this.getposOffset(B,"offsetLeft")+C+"px";D.style.top=this.getposOffset(B,"offsetTop")+A+"px";D.style.clip=(D.dropposition[1]=="top")?"rect(auto auto auto 0)":"rect(0 auto 0 0)";D.style.visibility="visible";D.startTime=new Date().getTime();D.contentheight=parseInt(D.offsetHeight);if(typeof window["hidetimer_"+D.id]!="undefined"){clearTimeout(window["hidetimer_"+D.id]);}this.slideengine(D,(D.dropposition[1]=="top")?"up":"down");}},curveincrement:function(A){return(1-Math.cos(A*Math.PI))/2;},slideengine:function(E,D){var B=new Date().getTime()-E.startTime;if(B<E.glidetime){var A=(D=="down")?this.curveincrement(B/E.glidetime):1-this.curveincrement(B/E.glidetime);var C=(A*E.contentheight)+"px";E.style.clip=(D=="down")?"rect(0 auto "+C+" 0)":"rect("+C+" auto auto 0)";window["glidetimer_"+E.id]=setTimeout(function(){dropdowncontent.slideengine(E,D);},10);}else{E.style.clip="rect(0 auto auto 0)";}},hide:function(B,A,C){if(!dropdowncontent.isContained(B,C)){window["hidetimer_"+A.id]=setTimeout(function(){A.style.visibility="hidden";A.style.left=A.style.top=0;clearTimeout(window["glidetimer_"+A.id]);},dropdowncontent.hidedivmouseout[1]);}},hidediv:function(A){document.getElementById(A).style.visibility="hidden";},ajaxconnect:function(A,B){var E=false;var D="";if(window.XMLHttpRequest){E=new XMLHttpRequest();}else{if(window.ActiveXObject){try{E=new ActiveXObject("Msxml2.XMLHTTP");}catch(C){try{E=new ActiveXObject("Microsoft.XMLHTTP");}catch(C){}}}else{return false;}}document.getElementById(B).innerHTML=this.ajaxloadingmsg;E.onreadystatechange=function(){dropdowncontent.loadpage(E,B);};if(this.ajaxbustcache){D=(A.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime();}E.open("GET",A+D,true);E.send(null);},loadpage:function(B,A){if(B.readyState==4&&(B.status==200||window.location.href.indexOf("http")==-1)){document.getElementById(A).innerHTML=B.responseText;}},init:function(A,G,F,E){var C=document.getElementById(A);var D=document.getElementById(C.getAttribute("rel"));var B=C.getAttribute("rev");if(B!=null&&B!=""){this.ajaxconnect(B,C.getAttribute("rel"));}D.dropposition=G.split("-");D.glidetime=F||1000;D.style.left=D.style.top=0;if(typeof E=="undefined"||E=="mouseover"){C.onmouseover=function(H){dropdowncontent.show(this,D,H);};C.onmouseout=function(H){dropdowncontent.hide(D,D,H);};if(this.disableanchorlink){C.onclick=function(){return false;};}}else{C.onclick=function(H){dropdowncontent.show(this,D,H);return false;};}if(this.hidedivmouseout[0]==true){D.onmouseout=function(H){dropdowncontent.hide(this,D,H);};}}};

