if(typeof JC=="undefined"||!JC){var JC={}}JC.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=b[e].split(".");g=JC;for(c=(f[0]=="JC")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};var JcJsVars={PrintPanelButtonHtml:"&nbsp;&nbsp;<a class='jc_sinilinkki printpanelbtn' href='javascript:void(0)'>Tulosta</a>"};
JC.namespace("util.string");JC.util.string.summary=function(a,c,d){var b="";if(!c||a.length<=c){b=a}else{b=a.substring(0,c).replace(/\.+$/,"")+d}return b};JC.util.string.htmlDecode=function(s){var out="",i,ch,semicolonIndex,entity;if(s===null){return""}var l=s.length;for(i=0;i<l;i++){ch=s.charAt(i);if(ch=="&"){semicolonIndex=s.indexOf(";",i+1);if(semicolonIndex>0){entity=s.substring(i+1,semicolonIndex);if(entity.length>1&&entity.charAt(0)=="#"){if(entity.charAt(1)=="x"||entity.charAt(1)=="X"){ch=String.fromCharCode(eval("0"+entity.substring(1)))}else{ch=String.fromCharCode(eval(entity.substring(1)))}}else{switch(entity){case"quot":ch=String.fromCharCode(34);break;case"amp":ch=String.fromCharCode(38);break;case"lt":ch=String.fromCharCode(60);break;case"gt":ch=String.fromCharCode(62);break;case"nbsp":ch=String.fromCharCode(160);break;case"iexcl":ch=String.fromCharCode(161);break;case"cent":ch=String.fromCharCode(162);break;case"pound":ch=String.fromCharCode(163);break;case"curren":ch=String.fromCharCode(164);break;case"yen":ch=String.fromCharCode(165);break;case"brvbar":ch=String.fromCharCode(166);break;case"sect":ch=String.fromCharCode(167);break;case"uml":ch=String.fromCharCode(168);break;case"copy":ch=String.fromCharCode(169);break;case"ordf":ch=String.fromCharCode(170);break;case"laquo":ch=String.fromCharCode(171);break;case"not":ch=String.fromCharCode(172);break;case"shy":ch=String.fromCharCode(173);break;case"reg":ch=String.fromCharCode(174);break;case"macr":ch=String.fromCharCode(175);break;case"deg":ch=String.fromCharCode(176);break;case"plusmn":ch=String.fromCharCode(177);break;case"sup2":ch=String.fromCharCode(178);break;case"sup3":ch=String.fromCharCode(179);break;case"acute":ch=String.fromCharCode(180);break;case"micro":ch=String.fromCharCode(181);break;case"para":ch=String.fromCharCode(182);break;case"middot":ch=String.fromCharCode(183);break;case"cedil":ch=String.fromCharCode(184);break;case"sup1":ch=String.fromCharCode(185);break;case"ordm":ch=String.fromCharCode(186);break;case"raquo":ch=String.fromCharCode(187);break;case"frac14":ch=String.fromCharCode(188);break;case"frac12":ch=String.fromCharCode(189);break;case"frac34":ch=String.fromCharCode(190);break;case"iquest":ch=String.fromCharCode(191);break;case"Agrave":ch=String.fromCharCode(192);break;case"Aacute":ch=String.fromCharCode(193);break;case"Acirc":ch=String.fromCharCode(194);break;case"Atilde":ch=String.fromCharCode(195);break;case"Auml":ch=String.fromCharCode(196);break;case"Aring":ch=String.fromCharCode(197);break;case"AElig":ch=String.fromCharCode(198);break;case"Ccedil":ch=String.fromCharCode(199);break;case"Egrave":ch=String.fromCharCode(200);break;case"Eacute":ch=String.fromCharCode(201);break;case"Ecirc":ch=String.fromCharCode(202);break;case"Euml":ch=String.fromCharCode(203);break;case"Igrave":ch=String.fromCharCode(204);break;case"Iacute":ch=String.fromCharCode(205);break;case"Icirc":ch=String.fromCharCode(206);break;case"Iuml":ch=String.fromCharCode(207);break;case"ETH":ch=String.fromCharCode(208);break;case"Ntilde":ch=String.fromCharCode(209);break;case"Ograve":ch=String.fromCharCode(210);break;case"Oacute":ch=String.fromCharCode(211);break;case"Ocirc":ch=String.fromCharCode(212);break;case"Otilde":ch=String.fromCharCode(213);break;case"Ouml":ch=String.fromCharCode(214);break;case"times":ch=String.fromCharCode(215);break;case"Oslash":ch=String.fromCharCode(216);break;case"Ugrave":ch=String.fromCharCode(217);break;case"Uacute":ch=String.fromCharCode(218);break;case"Ucirc":ch=String.fromCharCode(219);break;case"Uuml":ch=String.fromCharCode(220);break;case"Yacute":ch=String.fromCharCode(221);break;case"THORN":ch=String.fromCharCode(222);break;case"szlig":ch=String.fromCharCode(223);break;case"agrave":ch=String.fromCharCode(224);break;case"aacute":ch=String.fromCharCode(225);break;case"acirc":ch=String.fromCharCode(226);break;case"atilde":ch=String.fromCharCode(227);break;case"auml":ch=String.fromCharCode(228);break;case"aring":ch=String.fromCharCode(229);break;case"aelig":ch=String.fromCharCode(230);break;case"ccedil":ch=String.fromCharCode(231);break;case"egrave":ch=String.fromCharCode(232);break;case"eacute":ch=String.fromCharCode(233);break;case"ecirc":ch=String.fromCharCode(234);break;case"euml":ch=String.fromCharCode(235);break;case"igrave":ch=String.fromCharCode(236);break;case"iacute":ch=String.fromCharCode(237);break;case"icirc":ch=String.fromCharCode(238);break;case"iuml":ch=String.fromCharCode(239);break;case"eth":ch=String.fromCharCode(240);break;case"ntilde":ch=String.fromCharCode(241);break;case"ograve":ch=String.fromCharCode(242);break;case"oacute":ch=String.fromCharCode(243);break;case"ocirc":ch=String.fromCharCode(244);break;case"otilde":ch=String.fromCharCode(245);break;case"ouml":ch=String.fromCharCode(246);break;case"divide":ch=String.fromCharCode(247);break;case"oslash":ch=String.fromCharCode(248);break;case"ugrave":ch=String.fromCharCode(249);break;case"uacute":ch=String.fromCharCode(250);break;case"ucirc":ch=String.fromCharCode(251);break;case"uuml":ch=String.fromCharCode(252);break;case"yacute":ch=String.fromCharCode(253);break;case"thorn":ch=String.fromCharCode(254);break;case"yuml":ch=String.fromCharCode(255);break;case"OElig":ch=String.fromCharCode(338);break;case"oelig":ch=String.fromCharCode(339);break;case"Scaron":ch=String.fromCharCode(352);break;case"scaron":ch=String.fromCharCode(353);break;case"Yuml":ch=String.fromCharCode(376);break;case"fnof":ch=String.fromCharCode(402);break;case"circ":ch=String.fromCharCode(710);break;case"tilde":ch=String.fromCharCode(732);break;case"Alpha":ch=String.fromCharCode(913);break;case"Beta":ch=String.fromCharCode(914);break;case"Gamma":ch=String.fromCharCode(915);break;case"Delta":ch=String.fromCharCode(916);break;case"Epsilon":ch=String.fromCharCode(917);break;case"Zeta":ch=String.fromCharCode(918);break;case"Eta":ch=String.fromCharCode(919);break;case"Theta":ch=String.fromCharCode(920);break;case"Iota":ch=String.fromCharCode(921);break;case"Kappa":ch=String.fromCharCode(922);break;case"Lambda":ch=String.fromCharCode(923);break;case"Mu":ch=String.fromCharCode(924);break;case"Nu":ch=String.fromCharCode(925);break;case"Xi":ch=String.fromCharCode(926);break;case"Omicron":ch=String.fromCharCode(927);break;case"Pi":ch=String.fromCharCode(928);break;case" Rho ":ch=String.fromCharCode(929);break;case"Sigma":ch=String.fromCharCode(931);break;case"Tau":ch=String.fromCharCode(932);break;case"Upsilon":ch=String.fromCharCode(933);break;case"Phi":ch=String.fromCharCode(934);break;case"Chi":ch=String.fromCharCode(935);break;case"Psi":ch=String.fromCharCode(936);break;case"Omega":ch=String.fromCharCode(937);break;case"alpha":ch=String.fromCharCode(945);break;case"beta":ch=String.fromCharCode(946);break;case"gamma":ch=String.fromCharCode(947);break;case"delta":ch=String.fromCharCode(948);break;case"epsilon":ch=String.fromCharCode(949);break;case"zeta":ch=String.fromCharCode(950);break;case"eta":ch=String.fromCharCode(951);break;case"theta":ch=String.fromCharCode(952);break;case"iota":ch=String.fromCharCode(953);break;case"kappa":ch=String.fromCharCode(954);break;case"lambda":ch=String.fromCharCode(955);break;case"mu":ch=String.fromCharCode(956);break;case"nu":ch=String.fromCharCode(957);break;case"xi":ch=String.fromCharCode(958);break;case"omicron":ch=String.fromCharCode(959);break;case"pi":ch=String.fromCharCode(960);break;case"rho":ch=String.fromCharCode(961);break;case"sigmaf":ch=String.fromCharCode(962);break;case"sigma":ch=String.fromCharCode(963);break;case"tau":ch=String.fromCharCode(964);break;case"upsilon":ch=String.fromCharCode(965);break;case"phi":ch=String.fromCharCode(966);break;case"chi":ch=String.fromCharCode(967);break;case"psi":ch=String.fromCharCode(968);break;case"omega":ch=String.fromCharCode(969);break;case"thetasym":ch=String.fromCharCode(977);break;case"upsih":ch=String.fromCharCode(978);break;case"piv":ch=String.fromCharCode(982);break;case"ensp":ch=String.fromCharCode(8194);break;case"emsp":ch=String.fromCharCode(8195);break;case"thinsp":ch=String.fromCharCode(8201);break;case"zwnj":ch=String.fromCharCode(8204);break;case"zwj":ch=String.fromCharCode(8205);break;case"lrm":ch=String.fromCharCode(8206);break;case"rlm":ch=String.fromCharCode(8207);break;case"ndash":ch=String.fromCharCode(8211);break;case"mdash":ch=String.fromCharCode(8212);break;case"lsquo":ch=String.fromCharCode(8216);break;case"rsquo":ch=String.fromCharCode(8217);break;case"sbquo":ch=String.fromCharCode(8218);break;case"ldquo":ch=String.fromCharCode(8220);break;case"rdquo":ch=String.fromCharCode(8221);break;case"bdquo":ch=String.fromCharCode(8222);break;case"dagger":ch=String.fromCharCode(8224);break;case"Dagger":ch=String.fromCharCode(8225);break;case"bull":ch=String.fromCharCode(8226);break;case"hellip":ch=String.fromCharCode(8230);break;case"permil":ch=String.fromCharCode(8240);break;case"prime":ch=String.fromCharCode(8242);break;case"Prime":ch=String.fromCharCode(8243);break;case"lsaquo":ch=String.fromCharCode(8249);break;case"rsaquo":ch=String.fromCharCode(8250);break;case"oline":ch=String.fromCharCode(8254);break;case"frasl":ch=String.fromCharCode(8260);break;case"euro":ch=String.fromCharCode(8364);break;case"image":ch=String.fromCharCode(8465);break;case"weierp":ch=String.fromCharCode(8472);break;case"real":ch=String.fromCharCode(8476);break;case"trade":ch=String.fromCharCode(8482);break;case"alefsym":ch=String.fromCharCode(8501);break;case"larr":ch=String.fromCharCode(8592);break;case"uarr":ch=String.fromCharCode(8593);break;case"rarr":ch=String.fromCharCode(8594);break;case"darr":ch=String.fromCharCode(8595);break;case"harr":ch=String.fromCharCode(8596);break;case"crarr":ch=String.fromCharCode(8629);break;case"lArr":ch=String.fromCharCode(8656);break;case"uArr":ch=String.fromCharCode(8657);break;case"rArr":ch=String.fromCharCode(8658);break;case"dArr":ch=String.fromCharCode(8659);break;case"hArr":ch=String.fromCharCode(8660);break;case"forall":ch=String.fromCharCode(8704);break;case"part":ch=String.fromCharCode(8706);break;case"exist":ch=String.fromCharCode(8707);break;case"empty":ch=String.fromCharCode(8709);break;case"nabla":ch=String.fromCharCode(8711);break;case"isin":ch=String.fromCharCode(8712);break;case"notin":ch=String.fromCharCode(8713);break;case"ni":ch=String.fromCharCode(8715);break;case"prod":ch=String.fromCharCode(8719);break;case"sum":ch=String.fromCharCode(8721);break;case"minus":ch=String.fromCharCode(8722);break;case"lowast":ch=String.fromCharCode(8727);break;case"radic":ch=String.fromCharCode(8730);break;case"prop":ch=String.fromCharCode(8733);break;case"infin":ch=String.fromCharCode(8734);break;case"ang":ch=String.fromCharCode(8736);break;case"and":ch=String.fromCharCode(8743);break;case"or":ch=String.fromCharCode(8744);break;case"cap":ch=String.fromCharCode(8745);break;case"cup":ch=String.fromCharCode(8746);break;case"int":ch=String.fromCharCode(8747);break;case"there4":ch=String.fromCharCode(8756);break;case"sim":ch=String.fromCharCode(8764);break;case"cong":ch=String.fromCharCode(8773);break;case"asymp":ch=String.fromCharCode(8776);break;case"ne":ch=String.fromCharCode(8800);break;case"equiv":ch=String.fromCharCode(8801);break;case"le":ch=String.fromCharCode(8804);break;case"ge":ch=String.fromCharCode(8805);break;case"sub":ch=String.fromCharCode(8834);break;case"sup":ch=String.fromCharCode(8835);break;case"nsub":ch=String.fromCharCode(8836);break;case"sube":ch=String.fromCharCode(8838);break;case"supe":ch=String.fromCharCode(8839);break;case"oplus":ch=String.fromCharCode(8853);break;case"otimes":ch=String.fromCharCode(8855);break;case"perp":ch=String.fromCharCode(8869);break;case"sdot":ch=String.fromCharCode(8901);break;case"lceil":ch=String.fromCharCode(8968);break;case"rceil":ch=String.fromCharCode(8969);break;case"lfloor":ch=String.fromCharCode(8970);break;case"rfloor":ch=String.fromCharCode(8971);break;case"lang":ch=String.fromCharCode(9001);break;case"rang":ch=String.fromCharCode(9002);break;case"loz":ch=String.fromCharCode(9674);break;case"spades":ch=String.fromCharCode(9824);break;case"clubs":ch=String.fromCharCode(9827);break;case"hearts":ch=String.fromCharCode(9829);break;case"diams":ch=String.fromCharCode(9830);break;default:ch="";break}}i=semicolonIndex}}out+=ch}return out};var HtmlTag={img:{title:"",src:"",width:"",height:"",style:"","class":"",id:"",border:""},a:{href:"",target:"",style:"","class":"",id:"",title:"",onclick:""},div:{style:"","class":"",id:""},span:{style:"","class":"",id:""},GetImageTag:function(){var a="<img "+this.AssignProperties(this.img)+" />";this.CleanUp(this.img);return a},GetAhrefTag:function(b){var a="<a "+this.AssignProperties(this.a)+">"+b+"</a>";this.CleanUp(this.a);return a},GetDivTag:function(b){var a="<div "+this.AssignProperties(this.div)+">"+b+"</div>";this.CleanUp(this.div);return a},GetSpanTag:function(b){var a="<span "+this.AssignProperties(this.span)+">"+b+"</span>";this.CleanUp(this.span);return a},AssignProperties:function(a){var b="";var c;for(c in a){if(a[c]!==""){b=b+" "+c+"='"+a[c]+"'"}}return b},CleanUp:function(a){for(var b in a){a[b]=""}}};JC.namespace("util.form");JC.util.form.clearErrors=function(){var c=["input","select","textarea"];var b;for(var a=0;a<c.length;a++){b=YAHOO.util.Dom.getElementsByClassName("error",c[a]);if(b.length>0){YAHOO.util.Dom.removeClass(b,"error")}}};JC.namespace("util.pageloading");JC.util.pageloading.show=function(){if(!JC.util.pageloading.panel){JC.util.pageloading.panel=new YAHOO.widget.Panel("loading_panel",{width:"120px",fixedcenter:true,close:false,draggable:false,zindex:4,modal:true,visible:false});JC.util.pageloading.panel.setHeader('<div class="jc_teksti">Sivua ladataan...</div>');JC.util.pageloading.panel.setBody('<div align="center"><img src="'+UrlRoot+'/lib/images/jc/loading.gif" alt="" width="32" height="32" /></div>');JC.util.pageloading.panel.render(document.body)}JC.util.pageloading.panel.show()};JC.util.pageloading.hide=function(){if(JC.util.pageloading.panel){JC.util.pageloading.panel.hide()}};var Kuukaudet=[];Kuukaudet[0]="";Kuukaudet[1]="Tammikuu";Kuukaudet[2]="Helmikuu";Kuukaudet[3]="Maaliskuu";Kuukaudet[4]="Huhtikuu";Kuukaudet[5]="Toukokuu";Kuukaudet[6]="Kesäkuu";Kuukaudet[7]="Heinäkuu";Kuukaudet[8]="Elokuu";Kuukaudet[9]="Syyskuu";Kuukaudet[10]="Lokakuu";Kuukaudet[11]="Marraskuu";Kuukaudet[12]="Joulukuu";JC.namespace("util.time");JC.util.time.getStamp=function(){var a=Math.round(new Date().getTime()/1000);return a};JC.namespace("util.print");JC.util.print.panel=function(){window.open(UrlRoot+"/lib/jc/print/index.php","print_window")};JC.util.print.mainarea=function(){var a=document.getElementById("PrintArea");PrintThis=a.innerHTML;window.open(UrlRoot+"/lib/jc/print/index.php","print_window")};
JC.namespace("tapahtuma");JC.tapahtuma.init=function(){var c=function(){var f=YAHOO.util.Dom.getViewportWidth(),g=((f-100)<600)?600:f-100;return g},d=function(){var g=YAHOO.util.Dom.getViewportHeight(),f=((g-100)<400)?400:g-100;return f},e=function(){var g=parseInt((YAHOO.util.Dom.getViewportWidth()-c())/2),f=parseInt((YAHOO.util.Dom.getViewportHeight()-d())/2);JC.tapahtuma.panel.cfg.setProperty("xy",[g,f])},a=new YAHOO.util.Resize("tapahtuma_panel",{handles:["br"],autoRatio:false,minWidth:600,minHeight:400,status:false,proxy:false}),b;JC.tapahtuma.panel=new YAHOO.widget.Panel("tapahtuma_panel",{width:"600px",autofillheight:"body",constraintoviewport:true,close:true,draggable:true,modal:true,visible:false});JC.tapahtuma.panel.setHeader("");JC.tapahtuma.panel.setBody("");JC.tapahtuma.panel.setFooter("");e();JC.tapahtuma.panel.render(document.body);a.on("startResize",function(f){if(this.cfg.getProperty("constraintoviewport")){var g=YAHOO.util.Dom,i=g.getClientRegion(),h=g.getRegion(this.element);a.set("maxWidth",i.right-h.left-YAHOO.widget.Overlay.VIEWPORT_OFFSET);a.set("maxHeight",i.bottom-h.top-YAHOO.widget.Overlay.VIEWPORT_OFFSET)}else{a.set("maxWidth",null);a.set("maxHeight",null)}},JC.tapahtuma.panel,true);a.on("resize",function(f){var g=f.height;this.cfg.setProperty("height",g+"px")},JC.tapahtuma.panel,true);JC.tapahtuma.ajaxShowTapahtuma={handleSuccess:function(f){this.processResult(f)},handleFailure:function(f){},processResult:function(k){var g=YAHOO.lang.JSON.parse(k.responseText),f="",h,i,j;f=f+"<div class='FloatContainer'>";if(g.MetaData!==false&&g.MetaData[1]["Kuvat"]!==""){f=f+"<span id='TapahtumaKuvat' class='FloatRight'>"+g.MetaData[1]["Kuvat"]+"</span>"}f=f+"<div class='jc_teksti'>"+g.Data[0]["Asia"]+"</div>";f=f+"</div><div class='Spacer'></div>";if(g.MetaData!==false&&g.MetaData[0]["Liitteet"]!==""){f=f+"<div class='jc_teksti'>"+g.MetaData[0]["Liitteet"]+"</div>"}h="<div class='jc_pikkuteksti'><a class='jc_sinilinkki' target='_blank' href='"+UrlRoot+"/tapahtumat/nayta.php?Id="+g.Data[0]["Id"]+"'>Suora linkki t&auml;h&auml;n tapahtumaan &gt;&gt;</a> "+JcJsVars.PrintPanelButtonHtml+"</div>";i=g.Data[0]["Pvm"]+" "+g.Data[0]["LuokkaKuvaus"]+": "+g.Data[0]["Otsikko"];PrintThis="<div class='jc_otsikko'>"+i+"</div>"+f;JC.tapahtuma.panel.setHeader(i);JC.tapahtuma.panel.setBody(f);JC.tapahtuma.panel.setFooter(h);JC.tapahtuma.panel.show();e();JC.tapahtuma.panel.cfg.setProperty("width",c()+"px");JC.tapahtuma.panel.cfg.setProperty("height",d()+"px");j=YAHOO.util.Dom.getElementsByClassName("printpanelbtn","a");YAHOO.util.Event.addListener(j,"click",JC.util.print.panel);if(_gaq){_gaq.push(["_trackEvent","Tapahtumat","Näyttö",i])}},startRequest:function(f){YAHOO.util.Connect.asyncRequest("POST",UrlRoot+"/lib/jc/tapahtumat/json_tapahtuma.php",b,"Id="+f)}};b={success:JC.tapahtuma.ajaxShowTapahtuma.handleSuccess,failure:JC.tapahtuma.ajaxShowTapahtuma.handleFailure,scope:JC.tapahtuma.ajaxShowTapahtuma};JC.tapahtuma.WindowResize={_timeoutId:0,_process:function(){e();JC.tapahtuma.panel.cfg.setProperty("width",c()+"px");JC.tapahtuma.panel.cfg.setProperty("height",d()+"px");if(JC.tapahtumat!==undefined){JC.tapahtumat.resize_calDayColumn()}},process:function(){clearTimeout(this._timeoutId);var f=this;this._timeoutId=setTimeout(function(){f._process()},250)}};JC.tapahtuma.onWindowResize=function(f){JC.tapahtuma.WindowResize.process()};YAHOO.util.Event.addListener(window,"resize",JC.tapahtuma.onWindowResize)};
JC.namespace("tapahtumat");JC.tapahtumat.init=function(){JC.tapahtumat.getDayColumnWidth=function(){var f=YAHOO.util.Dom.getViewportWidth(),j=250,h=225,i=125,g=parseInt((f-j-h)/5);g=(g<i)?i:g;return g};JC.tapahtumat.resize_calDayColumn=function(){var f=YAHOO.util.Dom.getElementsByClassName("TapahtumaPaiva","div"),h=JC.tapahtumat.getDayColumnWidth(),g=parseInt(YAHOO.util.Dom.getStyle(f[0],"width"));if(f.length>0){if(g&&g!=h){YAHOO.util.Dom.setStyle(f,"width",h+"px")}}};JC.tapahtumat.DataSource=new YAHOO.util.DataSource(UrlRoot+"/lib/jc/tapahtumat/json_tapahtumat.php?");JC.tapahtumat.DataSource.responseType=YAHOO.util.DataSource.TYPE_JSON;JC.tapahtumat.DataSource.responseSchema={resultsList:"Data",fields:["Id","Otsikko","Luokka","LuokkaKuvaus","LuokkaIkoni","Pv","Kk","Vuosi"]};JC.tapahtumat.DataSource.connMethodPost=false;JC.tapahtumat.DataSource.maxCacheEntries=0;var d="&nbsp;<br>&nbsp;<br>",c={success:function(f,i,p){var m=YAHOO.lang.JSON.stringify(i.results),u,n,q,r,k,j,l=[],v=HtmlTag,t=HtmlTag,h,g=document.getElementById("KalenteriIkonit"),o="",s;g.innerHTML="";m=YAHOO.lang.JSON.parse(m);for(s=0;s<25;s++){l[s]=""}k=m.length;for(q=0;q<k;q++){u=document.getElementById("tpv"+m[q]["Pv"]);j=JC.util.string.summary(m[q]["Otsikko"],50,"..");if(u){n=u.innerHTML;v.a.title=m[q]["LuokkaKuvaus"]+": "+m[q]["Otsikko"];v.a.href="javascript:void(0)";v.a.onclick="JC.tapahtuma.ajaxShowTapahtuma.startRequest("+m[q]["Id"]+");";v.a["class"]="TapahtumaLinkki";if(m[q]["LuokkaIkoni"]!==""){t.img.src=UrlRoot+"/lib/images/jc/tapahtumat/ikonit/"+m[q]["LuokkaIkoni"];t.img["class"]="TapahtumaIkoni";h=t.GetImageTag();j=h+" "+j;l[m[q]["Luokka"]]="<span class='TapahtumaIkonit'>"+h+" "+m[q]["LuokkaKuvaus"]+"</span> "}if(n==d){n=v.GetAhrefTag(j)}else{n=n+v.GetAhrefTag(j)}u.innerHTML=n}}for(r=0;r<l.length;r++){if(l[r]!==""){o=o+l[r]}}if(o!==""){g.innerHTML="Värien kuvaukset: <br />"+o}JC.tapahtumat.resize_calDayColumn()},failure:function(g,f,h){document.getElementById("KalenteriIkonit").innerHTML=""},scope:JC.tapahtumat.DataSource,argument:this},b=function(m,l,j){var k,f=YAHOO.util.Dom.getElementsByClassName("calweekdaycell"),p=true,o,g=["0","1","2","3","4","5","6","12","13","19","20","26","27","33","34","40","41"],h=["5","6","12","13","19","20","26","27","33","34","40","41"],n,i;for(k=0;k<f.length;k++){if(f[k].innerHTML===""){YAHOO.util.Dom.addClass(f[k],"Viikonloppu")}}for(k=0;k<5;k++){o=document.getElementById("calendar_cell"+k);if(o&&!YAHOO.util.Dom.hasClass(o,"oom")){p=false}}if(p){h=g;if(YAHOO.env.ua.ie){o.parentNode.firstChild.innerHTML=""}else{o.parentNode.innerHTML=""}}for(k=0;k<h.length;k++){o=document.getElementById("calendar_cell"+h[k]);if(o){YAHOO.util.Dom.addClass(o,"Viikonloppu")}}n=e.cfg.getProperty("pagedate");i=(n.getMonth()+1)+"_"+n.getFullYear();JC.tapahtumat.DataSource.sendRequest("MonthYear="+i+"&ts="+JC.util.time.getStamp(),c)},e,a=function(){YAHOO.widget.Calendar.prototype.renderCellDefault=function(m,h){var l=""+m+"",g=HtmlTag,i=HtmlTag,k,j;l=l.substring(0,3);k=this.buildMonthLabel(m);j=this.buildDayLabel(m);if(l=="Sun"||l=="Sat"){h.innerHTML=""}else{g.div["class"]="TapahtumaPaiva";g.div.style="width: "+JC.tapahtumat.getDayColumnWidth()+"px";i.span.id="tpv"+j;h.innerHTML=g.GetDivTag(j+i.GetSpanTag(d))}};YAHOO.widget.Calendar.prototype.styleCellDefault=function(h,g){};YAHOO.widget.Calendar.prototype.renderCellNotThisMonth=function(h,g){YAHOO.util.Dom.addClass(g,this.Style.CSS_CELL_OOM);return YAHOO.widget.Calendar.STOP_RENDER};var f={strings:{month:"Valitse kuukausi",year:"Kirjoita vuosi",submit:"OK",cancel:"Peruuta",invalidYear:"Kirjoita vuosi oikeassa muodossa"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"month"};e=new YAHOO.widget.Calendar("calendar","TapahtumaKalenteri",{LOCALE_WEEKDAYS:"long",START_WEEKDAY:1,MULTI_SELECT:false,navigator:f,show_week_header:false,hide_blank_weeks:true});e.cfg.setProperty("DATE_FIELD_DELIMITER",".");e.cfg.setProperty("MDY_DAY_POSITION",1);e.cfg.setProperty("MDY_DAY_POSITION",1);e.cfg.setProperty("MDY_MONTH_POSITION",2);e.cfg.setProperty("MDY_YEAR_POSITION",3);e.cfg.setProperty("MD_DAY_POSITION",1);e.cfg.setProperty("MD_MONTH_POSITION",2);e.cfg.setProperty("MONTHS_SHORT",["Tam","Hel","Maa","Huh","Tou","Kes","Hei","Elo","Syy","Lok","Mar","Jou"]);e.cfg.setProperty("MONTHS_LONG",["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"]);e.cfg.setProperty("WEEKDAYS_1CHAR",["","M","T","K","T","P",""]);e.cfg.setProperty("WEEKDAYS_SHORT",["","Ma","Ti","Ke","To","Pe",""]);e.cfg.setProperty("WEEKDAYS_MEDIUM",["","Maa","Tii","Kes","Tor","Per",""]);e.cfg.setProperty("WEEKDAYS_LONG",["","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai",""]);e.renderEvent.subscribe(b,e,true);e.render()};a()};
JC.namespace("oikopolku");JC.oikopolku.init=function(){var a=document.getElementById("OikoPolkuToimistot"),b=new YAHOO.widget.Menu("OikoPolkuToimistotMenu",{fixedcenter:false,context:["OikoPolkuToimistotContainer","tl","bl"]});b.addItems([{text:"Turku",url:"http://www.turunte-toimisto.fi/",target:"_blank"},{text:"Kaarina",url:"http://www.mol.fi/kaarina/",target:"_blank"},{text:"Laitila",url:"http://www.mol.fi/laitila/",target:"_blank"},{text:"Loimaa",url:"http://www.mol.fi/loimaa/",target:"_blank"},{text:"Paimio",url:"http://www.mol.fi/paimio/",target:"_blank"},{text:"Raisio",url:"http://www.mol.fi/raisio/",target:"_blank"},{text:"Salo",url:"http://www.mol.fi/salo/",target:"_blank"},{text:"Turunmaa",url:"http://www.mol.fi/turunmaa/",target:"_blank"},{text:"Uusikaupunki",url:"http://www.mol.fi/uusikaupunki/",target:"_blank"}]);b.render("OikoPolkuToimistotContainer");YAHOO.util.Event.addListener(a,"mouseover",b.show,null,b)};
JC.namespace("print_page");JC.print_page.init=function(){YAHOO.util.Event.addListener("btnPrint","click",JC.util.print.mainarea)};
