jQuery.extend(jQuery.validator.messages,{required:"Campo obbligatorio.",remote:"Controlla questo campo.",email:"Inserisci un indirizzo email valido.",url:"Inserisci un indirizzo web valido.",date:"Inserisci una data valida.",dateISO:"Inserisci una data valida (ISO).",number:"Inserisci un numero valido.",digits:"Inserisci solo numeri.",creditcard:"Inserisci un numero di carta di credito valido.",equalTo:"Il valore non corrisponde.",accept:"Inserisci un valore con un&apos;estensione valida.",maxlength:jQuery.validator.format("Non inserire pi&ugrave; di {0} caratteri."),minlength:jQuery.validator.format("Inserisci almeno {0} caratteri."),rangelength:jQuery.validator.format("Inserisci un valore compreso tra {0} e {1} caratteri."),range:jQuery.validator.format("Inserisci un valore compreso tra {0} e {1}."),max:jQuery.validator.format("Inserisci un valore minore o uguale a {0}."),min:jQuery.validator.format("Inserisci un valore maggiore o uguale a {0}.")});/*
* jQuery hashchange event - v1.3 - 7/21/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
* 
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,i,h){var f="hashchange",a=document,c,e=$.event.special,b=a.documentMode,g="on"+f in i&&(b===h||b>7);function d(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[f]=function(j){return j?this.bind(f,j):this.trigger(f)};$.fn[f].delay=50;e[f]=$.extend(e[f],{setup:function(){if(g){return false}$(c.start)},teardown:function(){if(g){return false}$(c.stop)}});c=(function(){var o={},p,m=d(),j=function(q){return q},l=j,k=j;o.start=function(){p||n()};o.stop=function(){p&&clearTimeout(p);p=h};function n(){var q=d(),r=k(m);if(q!==m){l(m=q,r);$(i).trigger(f)}else{if(r!==m){location.href=location.href.replace(/#.*/,"")+r}}p=setTimeout(n,$.fn[f].delay)}$.browser.msie&&!g&&(function(){var q,r;o.start=function(){if(!q){r=$.fn[f].src;r=r&&r+d();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(d());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;a.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=a.title}}catch(s){}}}};o.stop=j;k=function(){return d(q.location.href)};l=function(t,u){var v=q.document,s=$.fn[f].domain;if(t!==u){v.title=a.title;v.open();s&&v.write('<script>document.domain="'+s+'"</script>');v.close();q.location.hash=t}}})();return o})()})(jQuery,this);jQuery.cookie=function(c,g,d){if(arguments.length>1&&String(g)!=="[object Object]"){d=jQuery.extend({},d);if(g===null||g===undefined){d.expires=-1}if(typeof d.expires==="number"){var a=d.expires,f=d.expires=new Date();f.setDate(f.getDate()+a)}g=String(g);return(document.cookie=[encodeURIComponent(c),"=",d.raw?g:encodeURIComponent(g),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join(""))}d=g||{};var e,b=d.raw?function(h){return h}:decodeURIComponent;return(e=new RegExp("(?:^|; )"+encodeURIComponent(c)+"=([^;]*)").exec(document.cookie))?b(e[1]):null};(function(a){a.fn.tooltip=function(e){config={dialog_content_selector:".jq_tooltip",animation_distance:50,opacity:1,arrow_left_offset:100,arrow_top_offset:42,arrow_height:15,arrow_width:15,animation_duration_ms:300,event_in:"mouseover",event_out:"mouseout",event_change:"change",isvalidation:true};if(e){a.extend(config,e)}this.each(function(){a(this).bind(config.event_in,function(){var f=a(this).attr("class");if(config.isvalidation){if(f.indexOf("error")>-1||f.indexOf("Info")>-1){d(this)}}else{d(this)}}).bind(config.event_out,function(){c(this)}).bind(config.event_change,function(){var f=a(this).attr("class");if(config.isvalidation&&f.indexOf("valid")>-1){c(this)}})});function d(n){var g=a(n).parent().find(config.dialog_content_selector);var f=b(g);var l=a(n).hasClass("tooltiptopright");var j=a(n).hasClass("tooltipbottomright");var k=a(n).hasClass("tooltiptop");var i=a(n).hasClass("tooltipbottom");var h=l||j||k||i;var m;var o=a(n).offset();if(k||!h&&(o.top+config.animation_distance>a(f).outerHeight()&&o.left>=config.arrow_left_offset)){m={start:{left:o.left+(a(n).outerWidth()/2)-config.arrow_left_offset,top:o.top-config.animation_distance-a(f).outerHeight()},end:{left:o.left+(a(n).outerWidth()/2)-config.arrow_left_offset,top:o.top-a(f).outerHeight()+config.arrow_height},arrow_class:"div.down_arrow"}}else{if(l||!h&&(o.top<a(f).outerHeight()&&o.top>=config.arrow_top_offset)){m={start:{left:o.left+a(n).outerWidth()+config.animation_distance,top:o.top+(a(n).outerHeight()/2)-config.arrow_top_offset},end:{left:o.left+a(n).outerWidth(),top:o.top+(a(n).outerHeight()/2)-config.arrow_top_offset},arrow_class:"div.left_arrow"}}else{if(j||!h&&(o.left<config.arrow_left_offset+a(n).outerWidth()&&o.top>a(f).outerHeight())){m={start:{left:o.left+a(n).outerWidth()+config.animation_distance,top:o.top+(a(n).outerHeight()/2)+config.arrow_top_offset-a(f).outerHeight()+config.arrow_height},end:{left:o.left+a(n).outerWidth(),top:o.top+(a(n).outerHeight()/2)+config.arrow_top_offset-a(f).outerHeight()+config.arrow_height},arrow_class:"div.left_arrow"};a(f).find("div.left_arrow").css({top:a(f).outerHeight()-(config.arrow_top_offset*2)+"px"})}else{if(i||!h&&(o.top+config.animation_distance<a(f).outerHeight())){m={start:{left:o.left+(a(n).outerWidth()/2)-config.arrow_left_offset,top:o.top+a(n).outerHeight()+config.animation_distance},end:{left:o.left+(a(n).outerWidth()/2)-config.arrow_left_offset,top:o.top+a(n).outerHeight()},arrow_class:"div.up_arrow"}}}}}a(f).css({top:m.start.top+"px",left:m.start.left+"px",opacity:config.opacity});a(f).find("div.arrow").hide();a(f).find(m.arrow_class).show();a(f).animate({top:m.end.top,left:m.end.left,opacity:"toggle"},config.animation_duration_ms)}function c(f){a("body").find("div.jq_tooltipBox").stop().remove()}function b(f){var g=(a(f).attr("title"))?"<h1>"+a(f).attr("title")+"</h1>":"";return a("<div class='jq_tooltipBox tooltip'>         <div class='up_arrow arrow'></div>         <div class='content'>            <span class='top'></span>                <span class='center'>"+g+a(f).html()+"</span>            <span class='btm'></span>            </div>        <div class='left_arrow arrow'></div>        <div class='down_arrow arrow'></div>       </div>").appendTo("body")}return this}})(jQuery);(function($){$.extend({PrettyUrl:{Subscribers:{},PrettyUrlSeparator:"&!",Submitter:null,AutomaticScroll:false,TimeOutDuration:30000,Setup:function(widgetTag,anchorTagSelector,widgetSelector,beforeSendCallback,successCallback,errorCallBack){$.PrettyUrl.RegisterWidgetLinks(widgetTag,anchorTagSelector,widgetSelector,beforeSendCallback,successCallback,errorCallBack,false);$(anchorTagSelector).click(function(e){e.preventDefault();$.PrettyUrl.ClickEvent($(this))})},PageLinkSetup:function(anchorTagSelector,widgetSelector){var pageUrl=$.param.fragment($(anchorTagSelector).attr("href").replace("!",""));var parts=pageUrl.split("=");if(parts[1]==null){return}pageListStorage={Url:parts[1],HttpMethod:"GET",WidgetSelector:widgetSelector};localStorage.setItem("pageList",JSON.stringify(pageListStorage))},Get:function(url,parameters,targetTagSelector,beforeSendCallback,successCallback,errorCallback,dataType,timeout){$.PrettyUrl.Request(url,parameters,"GET",targetTagSelector,beforeSendCallback,successCallback,errorCallback,dataType,timeout)},Post:function(url,parameters,targetTagSelector,beforeSendCallback,successCallback,errorCallback,dataType,timeout){$.PrettyUrl.Request(url,parameters,"POST",targetTagSelector,beforeSendCallback,successCallback,errorCallback,dataType,timeout)},Request:function(url,arguments,httpMethod,targetTagSelector,beforeSendCallback,successCallback,errorCallback,dataType,timeout){var sep=url.indexOf("?")==-1?"?":"&";var parameters=$.param({nocache:new Date().getTime()});var rewrittenUrl=url+sep+parameters;jQuery.ajax({url:rewrittenUrl,type:httpMethod,data:arguments,beforeSend:beforeSendCallback==null?(function(){$(targetTagSelector).Loading(true)}):beforeSendCallback,success:successCallback==null?(function(result){$(targetTagSelector).Loading(false);$(targetTagSelector).replaceWith(result);$.PrettyUrl.UpdateCache(url,result);if($.PrettyUrl.AutomaticScroll){$("html, body").animate({scrollTop:$(targetTagSelector).offset().top},"normal");$.PrettyUrl.AutomaticScroll=false}}):successCallback,error:errorCallback==null?(function(){$(targetTagSelector).Loading(false);alert("error")}):errorCallback,dataType:dataType==null?"html":dataType,timeout:timeout==null?$.PrettyUrl.TimeOutDuration:timeout})},ClickEvent:function(obj){var url=$.param.fragment(obj.attr("href").replace("!",""));var meta=$.PrettyUrl.Subscribers[url];if(meta!=null){var state={};$.PrettyUrl.Submitter=url;state["!"+meta.Tag]=url;$.bbq.pushState(state)}},UpdateCache:function(url,content){url=$.param.fragment(url.replace("!",""));var meta=$.PrettyUrl.Subscribers[url];if(meta!=null){meta.Cache=content}},GetCache:function(anchorSelector){url=$.param.fragment(anchorSelector.attr("href").replace("!",""));var meta=$.PrettyUrl.Subscribers[url];return meta==null?null:meta.Cache},RegisterLink:function(url,parameters,widgetTag,httpMethod,beforeSendCallback,successCallback,errorCallBack){if(url){url=$.param.fragment(url.replace("!",""));$.PrettyUrl.Subscribers[url]={Url:url,Parameters:parameters,Tag:widgetTag,HttpMethod:httpMethod,BeforeSendCallback:beforeSendCallback,SuccessCallback:successCallback,ErrorCallback:errorCallBack,Cache:$(this).find($(widgetTag))}}},RegisterWidgetLinks:function(widgetTag,anchorsTagSelector,widgetSelector,beforeSendCallback,successCallback,errorCallBack,persist){$(anchorsTagSelector).each(function(index,elem){$.PrettyUrl.RegisterLink($(this).attr("href"),null,widgetTag,"GET",beforeSendCallback==null?(function(){$(widgetSelector).Loading(true)}):beforeSendCallback,successCallback==null?(function(result){$(widgetSelector).Loading(false);$(widgetSelector).replaceWith(result);$.PrettyUrl.UpdateCache(widgetSelector,result);if($.PrettyUrl.AutomaticScroll){$("html, body").animate({scrollTop:$(widgetSelector).offset().top},"normal");$.PrettyUrl.AutomaticScroll=false}}):successCallback,errorCallBack==null?(function(){$(widgetSelector).Loading(false);alert("error")}):errorCallBack)})},Fire:function(hash){var doAjaxRequest=function(url,tag){var request=null;var item=$.PrettyUrl.Subscribers[url];var sep=url.indexOf("?")==-1?"?":"&";var parameters=$.param({nocache:new Date().getTime()});var rewrittenUrl=url+sep+parameters;if(item==null){item=JSON.parse(localStorage.getItem("pageList"));localStorage.removeItem("pageList");if(item==null){var selector="#"+tag+", ."+tag;if(tag!=null&&$(selector).size()==1){request={url:url,type:"GET",beforeSend:function(){$(selector).Loading(true)},success:function(result){$(selector).Loading(false);$(selector).replaceWith(result)},error:function(){$(selector).Loading(false);alert("error")},dataType:"html"}}else{request=null}}else{request={url:rewrittenUrl,type:item.HttpMethod,beforeSend:function(){$(item.WidgetSelector).Loading(true)},success:function(result){$(item.WidgetSelector).Loading(false);$(item.WidgetSelector).replaceWith(result)},error:function(){$(item.WidgetSelector).Loading(false);alert("error")},dataType:"html"}}}else{request={url:rewrittenUrl,type:item.HttpMethod,data:item.Parameters,beforeSend:item.BeforeSendCallback,success:item.SuccessCallback,error:item.ErrorCallback,dataType:"html"}}if(request!=null){jQuery.ajax(request)}};var hashParts=hash.split($.PrettyUrl.PrettyUrlSeparator);if($.PrettyUrl.Submitter!=null){var url=$.PrettyUrl.Submitter;$.PrettyUrl.Submitter=null;doAjaxRequest(url);return}for(urlCount=0;urlCount<hashParts.length;urlCount++){var operators=hashParts[urlCount].split("=");if(operators[1]==null){continue}var url=unescape(operators[1]);var tag=operators[0];doAjaxRequest(url,tag)}},InitTrigger:(function(){$(document).ready(function(){$(window).bind("hashchange",function(event){if(event.fragment!=null){$.PrettyUrl.Fire(event.fragment.replace("!",""))}});$(window).trigger("hashchange")})})()}});$.fn.extend({pager:function(options){var defaults={resultSet:undefined,onclick:function(page){alert("Implement an Ajax method for paging results for page "+page);return false},separator:" - ",firstText:"<<",prevText:"<",nextText:">",lastText:">>",linksVisible:5,url:"javascript:void(0)"};var options=$.extend(defaults,options);return this.each(function(){var rnd=Math.floor(Math.random()*9999);var result="";if(options.firstText.length>0&&options.resultSet.CurrentPage!=1){result+='<a href="'+options.url+'" id="'+rnd+'_pagerPage_first">'+options.firstText+"</a> "}if(options.prevText.length>0&&options.resultSet.CurrentPage!=1){result+=' <a href="'+options.url+'" id="'+rnd+'_pagerPage_prev">'+options.prevText+"</a> "}var startPageToDisplay=1;var endPageToDisplay=options.resultSet.PageCount;if(options.resultSet.PageCount>options.linksVisible){var tempCounterStart=options.resultSet.CurrentPage-Math.ceil((options.linksVisible/2))+1;var tempCounterEnd=options.resultSet.CurrentPage+Math.floor((options.linksVisible/2));if(tempCounterStart>1&&tempCounterEnd<options.resultSet.PageCount+1){startPageToDisplay=tempCounterStart;endPageToDisplay=tempCounterEnd}else{if(tempCounterStart<=1){endPageToDisplay=startPageToDisplay+options.linksVisible-1}else{if(tempCounterEnd>=options.resultSet.PageCount){endPageToDisplay=options.resultSet.PageCount;startPageToDisplay=endPageToDisplay-options.linksVisible+1}}}}if(options.resultSet!=undefined){for(var i=startPageToDisplay;i<=endPageToDisplay;i++){if(i==options.resultSet.CurrentPage){result+=i}else{result+='<a href="'+options.url+'" id="'+rnd+"_pagerPage_"+i+'">'+i+"</a>"}if(i!=endPageToDisplay){result+=options.separator}}}if(options.nextText.length>0&&options.resultSet.CurrentPage!=options.resultSet.PageCount){result+=' <a href="'+options.url+'" id="'+rnd+'_pagerPage_next">'+options.nextText+"</a>"}if(options.lastText.length>0&&options.resultSet.CurrentPage!=options.resultSet.PageCount){result+=' <a href="'+options.url+'" id="'+rnd+'_pagerPage_last">'+options.lastText+"</a>"}$(this).html(result);var createClickHandler=function(n){return function(){options.onclick(n)}};$("#"+rnd+"_pagerPage_first").click(function(){options.onclick(1)});$("#"+rnd+"_pagerPage_prev").click(function(){options.onclick(options.resultSet.CurrentPage-1)});$("#"+rnd+"_pagerPage_next").click(function(){options.onclick(options.resultSet.CurrentPage+1)});$("#"+rnd+"_pagerPage_last").click(function(){options.onclick(options.resultSet.PageCount)});for(var i=startPageToDisplay;i<=endPageToDisplay;i++){$("#"+rnd+"_pagerPage_"+i).click(createClickHandler(i))}})},AjaxPager:function(currentPage,settings){settings=this.extend({separatorHtml:" - ",firstHtml:"<< ",lastHtml:" >>",prevHtml:"previous ",nextHtml:" next",linksVisible:5,currentPageClass:null,onClickEvent:null},settings);settings.linksVisible=settings.linksVisible%2==0?settings.linksVisible+1:settings.linksVisible;$.type(settings.currentPageClass)!="string"?"":settings.currentPageClass;function Pager(obj,currentPage){this.$Object=$(obj);this.PageCount=this.$Object.children("a").size();this.CurrentPageIndex=currentPage==null?1:currentPage-1;this.CurrentPageNumber=currentPage;this.GetPageLinks=function(){var _this=this;var _pageLinks=new Array();_this.$Object.children("a").each(function(i){var _pagelink=new PageLink(this,i);if(_pagelink.Index==0){_pagelink.IsFirstPage=true}if(_pagelink.Index==_this.PageCount-1){_pagelink.IsLastPage=true}if(_pagelink.Index==_this.CurrentPageIndex){_pagelink.IsCurrentPage=true}_pageLinks.push(_pagelink)});return _pageLinks};this.PageLinks=this.GetPageLinks();this.Render=function(){var _this=this;var _lowerUpperLinksCount=Math.floor(settings.linksVisible/2);_this.$Object.empty();if(this.PageCount&&settings.linksVisible>1){_this.$Object.append($("<span />").html(_this.CurrentPageNumber).addClass(settings.currentPageClass))}var counter=_lowerUpperLinksCount;if(_this.CurrentPageIndex<_lowerUpperLinksCount){counter=settings.linksVisible-_this.CurrentPageNumber}if(_this.CurrentPageIndex>((_this.PageCount-1)-_lowerUpperLinksCount)){counter=_this.CurrentPageNumber-(_this.PageCount-(settings.linksVisible-1))}for(var i=0;i<counter;i++){if((_this.CurrentPageIndex-i)>0){_this.$Object.prepend(_this.PageLinks[_this.CurrentPageIndex-(i+1)].$Object.html(_this.CurrentPageNumber-(i+1)))}if((_this.CurrentPageIndex+i)<(_this.PageCount-1)){_this.$Object.append(_this.PageLinks[_this.CurrentPageIndex+(i+1)].$Object.html(_this.CurrentPageNumber+(i+1)))}}_this.$Object.children(":gt(0)").filter("a, span").before(settings.separatorHtml);if(_this.CurrentPageIndex>0){_this.$Object.prepend(_this.PageLinks[_this.CurrentPageIndex-1].$Object.clone(true).html(settings.prevHtml)).prepend(_this.PageLinks[0].$Object.clone(true).html(settings.firstHtml))}if(_this.CurrentPageIndex<(_this.PageCount-1)){_this.$Object.append(_this.PageLinks[_this.CurrentPageIndex+1].$Object.clone(true).html(settings.nextHtml)).append(_this.PageLinks[_this.PageCount-1].$Object.clone(true).html(settings.lastHtml))}return _this};return this.Render()}function PageLink(obj,pageIndex){this.$Object=$(obj).clone(true);this.Index=pageIndex==null?0:pageIndex;this.PrettyUrl=this.$Object.attr("href");this.AjaxUrl=this.$Object.attr("href");this.IsCurrentPage=false;this.IsFirstPage=false;this.IsLastPage=false;switch($.type(settings.onClickEvent)){case"function":this.$Object.click(function(event){event.preventDefault();settings.onClickEvent(this)});break;case"string":this.$Object.click(function(event){event.preventDefault();eval(settings.onClickEvent)});break}return this}$AjaxPager=this.extend({_init:function($matchedObject){return pager=new Pager($matchedObject,currentPage)}});return this.each(function(){$AjaxPager._init(this)})},Loading:function(loading,settings){settings=this.extend({animationDelay:333,fadeDuration:250,overlayColor:"#fff",opacityPercentage:80,spinnerColor:"#000"},settings);var $Object=this;function LoadingDom(obj){this.$Object=$(obj);this.NodeName=obj.nodeName!=null?obj.nodeName.toUpperCase():this.$Object[0].nodeName.toUpperCase();this.Height=this.$Object.outerHeight(true);this.Width=this.$Object.outerWidth(true);this.Position=this.$Object.position();this.Zindex=isNaN(parseInt(this.$Object.css("z-index")))?1:parseInt(this.$Object.css("z-index"));this.StartLoading=function(){if(this.$Object.data("Loading")==null){new LoadingOverlay(this.Height,this.Width,this.Position.top,this.Position.left).$Object.css("z-index",this.Zindex+1).insertBefore(this.$Object).children().delay(settings.animationDelay).fadeIn(settings.fadeDuration);this.$Object.data("Loading",{loading:true})}return this};this.StopLoading=function(){if(this.$Object.data("Loading")!=null){this.$Object.prev(".jq_LoadingOverlay").remove();this.$Object.removeData("Loading")}return this};return this}function LoadingOverlay(height,width,top,left){this.$Object=$("<div />").css({position:"absolute",top:top,left:left}).height(height).width(width).addClass("jq_LoadingOverlay").append(new OverLayer(height,width,"#fff",0).$Object).append(new OverLayer(height,width,settings.overlayColor,settings.opacityPercentage).$Object.hide()).append(new Spinner(14,7,12,2,settings.spinnerColor).$Object.css({position:"absolute",top:Math.floor((height/2)-(14+2))+"px",left:Math.floor((width/2)-(14+2))+"px",height:32,width:32}).hide());return this}function OverLayer(height,width,color,opacitypercentage){this.$Object=$("<div />").css({position:"absolute",filter:"alpha(opacity="+opacitypercentage+")",opacity:opacitypercentage/100,"background-color":color}).height(height).width(width);return this}function Spinner(R1,R2,count,stroke_width,colour){this.$Object=$("<div>");var sectorsCount=count||12,color=colour||"#fff",width=stroke_width||15,r1=Math.min(R1,R2)||35,r2=Math.max(R1,R2)||60,cx=r2+width,cy=r2+width,r=Raphael(this.$Object[0],r2*2+width*2,r2*2+width*2),sectors=[],opacity=[],beta=2*Math.PI/sectorsCount,pathParams={stroke:color,"stroke-width":width,"stroke-linecap":"round"};Raphael.getColor.reset();for(var i=0;i<sectorsCount;i++){var alpha=beta*i-Math.PI/2,cos=Math.cos(alpha),sin=Math.sin(alpha);opacity[i]=1/sectorsCount*i;sectors[i]=r.path([["M",cx+r1*cos,cy+r1*sin],["L",cx+r2*cos,cy+r2*sin]]).attr(pathParams);if(color=="rainbow"){sectors[i].attr("stroke",Raphael.getColor())}}var tick;(function ticker(){opacity.unshift(opacity.pop());for(var i=0;i<sectorsCount;i++){sectors[i].attr("opacity",opacity[i])}r.safari();tick=setTimeout(ticker,1000/sectorsCount)})();return this}$.Loading=this.extend({_init:function(){}});return this.each(function(i){if(this.nodeName.toUpperCase()=="#WINDOW"&&this.nodeName.toUpperCase()=="#DOCUMENT"&&this.nodeName.toUpperCase()=="BODY"){throw new Error('Using Loading plugin on "window", "document" or "body" is not allowed.')}else{if(loading){new LoadingDom($(this)).StartLoading()}else{new LoadingDom($(this)).StopLoading()}}})},NavigationMenuTA:function(settings){settings=jQuery.extend({subMenuWidth:0,verticalMenu:false,checkForWindowSize:false},settings);var OpeningDirection={Right:"right",Left:"left"};function Navigation(obj,level,parentNavigationItem){this.Type="Navigation";this.ID=parentNavigationItem==null?level.toString():parentNavigationItem.ID+"_"+level;this.baseObject=obj;this.level=level;this.items=_getNavigationItems(this,this.level);this.parentNavigationItem=parentNavigationItem==null?null:parentNavigationItem;this.parentNavigation=parentNavigationItem==null?null:parentNavigationItem.parentNavigation;this.openingDirection=null;this.addHtmlData=function(obj){$(obj.baseObject).attr("navigationLevel",obj.level)};this.setInitialState=function(obj){$(obj.baseObject).css({"list-style-type":"none","z-index":this.level});if(obj.level>0){$(obj.baseObject).css({position:"absolute",width:settings.subMenuWidth+"px"}).hide()}};this.open=function(){if(this.level==1&&!settings.verticalMenu){$(this.baseObject).show()}if(this.level>1||settings.verticalMenu){if(settings.checkForWindowSize){if(this.parentNavigation.openingDirection==OpeningDirection.Right||this.parentNavigation.openingDirection==null){var windowWidth=$(window).width();var maxOffset=windowWidth-(2*settings.subMenuWidth);this.openingDirection=$(this.parentNavigationItem.baseObject).offset().left>maxOffset?OpeningDirection.Left:OpeningDirection.Right}if(this.parentNavigation.openingDirection==OpeningDirection.Left){this.openingDirection=$(this.parentNavigationItem.baseObject).offset().left<settings.subMenuWidth?OpeningDirection.Right:OpeningDirection.Left}}else{this.openingDirection=OpeningDirection.Right}$(this.baseObject).css({left:this.openingDirection==OpeningDirection.Right?(settings.verticalMenu&&this.parentNavigation.level==0?$(this.parentNavigationItem.baseObject).width()+"px":settings.subMenuWidth+"px"):-settings.subMenuWidth+"px",top:"0px"}).show()}};this.close=function(){this.openingDirection=null;$(this.baseObject).hide()};this.addHtmlData(this);this.setInitialState(this)}function NavigationItem(obj,level,index,parentNavigation){this.Type="NavigationItem";this.ID=parentNavigation.ID+"-"+index;this.baseObject=obj;this.level=level;this.parentNavigation=parentNavigation;this.subNavigation=$(obj).children("ul:first").length>0?new Navigation($(obj).children("ul:first"),level+1,this):null;this.hasSubNavigation=this.subNavigation!=null;this.setInitialState=function(obj){if(obj.level==0&&!settings.verticalMenu){$(obj.baseObject).css({"float":"left"})}};this.setHoverBehavior=function(obj){$(obj.baseObject).hover(function(){if(obj.subNavigation!=null&&obj.subNavigation.baseObject!=null){obj.subNavigation.open()}},function(){if(obj.subNavigation!=null&&obj.subNavigation.baseObject!=null){obj.subNavigation.close()}})};this.setInitialState(this);this.setHoverBehavior(this)}function _getNavigationItems(navigationObj,level){var items=new Array();$(navigationObj.baseObject).children("li").each(function(){var item=new NavigationItem($(this),level,$(this).index(),navigationObj);items.push(item)});return items}function _getsubLevelWidth(itemCollection){var itemMaxWidth=0;$(itemCollection).each(function(){var itemWidth=$(this).outerWidth(true);if(itemWidth>itemMaxWidth){itemMaxWidth=itemWidth}});return itemMaxWidth}var jQueryMatchedObj=null;var navigation=null;function _initNavigationMenu(){jQueryMatchedObj=this;settings.subMenuWidth=settings.subMenuWidth==null||settings.subMenuWidth==0?_getsubLevelWidth($(jQueryMatchedObj).find("ul").find("a")):settings.subMenuWidth;navigation=new Navigation(jQueryMatchedObj,0,null)}return this.each(_initNavigationMenu)},RatingTA:function(pictureNonRated,pictureRated,settings){settings=jQuery.extend({ratingSteps:5,readOnly:false,onRatingElementClick:false,onFinish:false},settings);var jQueryMatchedObj=null;function _setInitialState(){$(jQueryMatchedObj).children(".ratingElement").each(function(){var elementValue=parseInt($(this).attr("alt"));var ratingValue=parseInt($(jQueryMatchedObj).find(".ratingValue").val());if(elementValue<=ratingValue){$(this).attr("src",pictureRated)}else{$(this).attr("src",pictureNonRated)}})}function _initRatingTA(){jQueryMatchedObj=this;$(jQueryMatchedObj).find(".ratingValue:input").each(function(){for(var i=0;i<settings.ratingSteps;i++){var ratingPicture=$("<img />").insertBefore($(this)).attr("src",pictureNonRated).attr("alt",i+1).addClass("ratingElement");if(!settings.readOnly){$(ratingPicture).css({cursor:"pointer"}).hover(function(){var realtedRatingElements=$(this).parent().children(".ratingElement");var elementHoverValue=parseInt($(this).attr("alt"));$(realtedRatingElements).each(function(){var elementValue=parseInt($(this).attr("alt"));if(elementValue<=elementHoverValue){$(this).attr("src",pictureRated)}else{$(this).attr("src",pictureNonRated)}})},function(){_setInitialState($(this).parent())}).click(function(){var ratingInput=$(this).parent().children(".ratingValue");$(ratingInput).val($(this).attr("alt"));_setInitialState();eval(settings.onRatingElementClick)})}}eval(settings.onFinish)});_setInitialState()}return this.each(_initRatingTA)},ItemSliderTA:function(itemWidth,itemHeight,settings){settings=jQuery.extend({padding:0,numberOfLines:1,itemsPerLine:2,nextButtonSelector:"",previewButtonSelector:"",slideValue:1,slideLoop:false,frameClass:null},settings);var _$this=this;var _numberOfItems=_$this.children().length;var setWidthFunction=function(width){this.$Object.width(width)};var setHeightFunction=function(height){this.$Object.height(height)};function Frame(){this.$Object=$("<div />");if(settings.frameClass!=null&&$.type(settings.frameClass)=="string"){this.$Object.addClass(settings.frameClass)}this.Width=(itemWidth+settings.padding)*settings.itemsPerLine-settings.padding;this.Height=itemHeight*settings.numberOfLines;this.Slider=new Slider();this.SetWidth=setWidthFunction;this.SetHeight=setHeightFunction;this.Slider.$Object.appendTo(this.$Object);this.SetWidth(this.Width);this.SetHeight(this.Height);this.$Object.css("overflow","hidden")}function SliderButton($obj,slider,slideDirectionRight,slideSteps){this.$Object=$obj;this.SlideDirection=slideDirectionRight;this.SlideSteps=slideSteps;this.$Object.click(function(){slider.Slide(slideDirectionRight,slideSteps)});if(_numberOfItems<=settings.itemsPerLine){this.$Object.hide()}}function Slider(){var dummies=Math.floor(settings.itemsPerLine/2);var fillSliderColumnList=function(slider){var columnList=new Array();numberofcolumns=Math.floor(_numberOfItems/settings.numberOfLines)+(_numberOfItems%settings.numberOfLines>0?1:0);for(var c=0;c<numberofcolumns;c++){var slidercolumn=new SliderColumn(c);columnList.push(slidercolumn);slidercolumn.$Object.appendTo(slider.$Object)}return columnList};var fillSliderItemList=function(slider){var columnIndex=0;for(var i=0;i<_numberOfItems;i++){var sliderItem=new SliderColumnItem(i);sliderItem.$Object.appendTo(slider.SliderColumnList[columnIndex].$Object);if((i+1)%settings.numberOfLines==0){columnIndex++}}};this.$Object=$("<ul></ul>");this.SliderColumnList=fillSliderColumnList(this);this.SliderItemList=fillSliderItemList(this);this.Width=this.SliderColumnList.length*(itemWidth+settings.padding);this.Height=settings.numberOfLines*itemHeight;this.PageWidth=settings.slideValue*(itemWidth+settings.padding);this.Pages=Math.floor(this.SliderColumnList.length/settings.slideValue)+(this.SliderColumnList.length%settings.slideValue!=0?1:0);this.CurrentPage=1;this.Position=0;this.MaxPosition=settings.slideValue>1?((this.Pages-1)*this.PageWidth)*-1:((this.SliderColumnList.length-settings.itemsPerLine)*(itemWidth+settings.padding))*-1;this.SliderButtonNext=settings.nextButtonSelector!=null&&settings.nextButtonSelector!=""?new SliderButton($(settings.nextButtonSelector),this,true,settings.slideValue):null;this.SliderButtonPrevious=settings.previewButtonSelector!=null&&settings.previewButtonSelector!=""?new SliderButton($(settings.previewButtonSelector),this,false,settings.slideValue):null;this.SetWidth=setWidthFunction;this.SetHeight=setHeightFunction;this.Slide=function(slideDirectionRight,slideSteps){this.Position=slideDirectionRight?this.Position-this.PageWidth:this.Position+this.PageWidth;if(settings.slideLoop){this.Position=this.Position>0?this.MaxPosition:this.Position<this.MaxPosition?0:this.Position}else{this.Position=this.Position>0?0:this.Position<this.MaxPosition?this.MaxPosition:this.Position}this.$Object.animate({marginLeft:this.Position+"px"},"slow")};this.BuildPaging=null;this.SetHeight(this.Height);this.SetWidth(this.Width);this.$Object.css({"list-style-type":"none",margin:"0",padding:"0"})}function SliderColumn(index){this.$Object=$("<li></li>").attr("sliderColumnIndex",index);this.Index=index;this.Width=itemWidth;this.Height=itemHeight*settings.numberOfLines;this.SetWidth=setWidthFunction;this.SetHeight=setHeightFunction;this.SetHeight(this.Height);this.SetWidth(this.Width);this.$Object.css({display:"block","float":"left"})}function SliderColumnItem(index){this.$Object=$("<div></div>").attr("sliderColumnItem",index);this.Width=itemWidth+settings.padding;this.Height=itemHeight;this.SetWidth=setWidthFunction;this.SetHeight=setHeightFunction;this.SetWidth(this.Width);this.SetHeight(this.Height);this.$Object.css({overflow:"hidden"});if(index!=-1){this.$Object.html(_$this.children("li:eq("+index+")").html())}}var $ItemSliderTA=$.ItemSliderTA=jQuery.extend({_init:function(){var itemSlider=new Frame();itemSlider.$Object.insertAfter(_$this);_$this.remove()}});return _$this.each($ItemSliderTA._init)},CharLimit:function(settings){settings=this.extend({charsCount:0,height:0,ellipsis:" ...",ellipsisCssClass:"",wordWrap:false,onEllipsisClick:null,expandCollapse:""},settings);var _betweenTagSpacesRegEx=new RegExp(">\\s+<","g");var _multipleSpacesRegEx=new RegExp("\\s+","g");var level0ContentDom=null;var level0Ellipsis=null;var $variableHeightObj=null;var HeightLimit=0;function ContentDom(obj,domLevel,parentContentDom){this.$Object=$(obj);this.NodeName=obj.nodeName.toLowerCase();this.Level=domLevel==null?0:domLevel;this.GetTrimmedHtml=function(){if(this.NodeName=="#text"){return $.trim(this.$Object[0].nodeValue).replace(_multipleSpacesRegEx," ")}else{return $.trim(this.$Object.html()).replace(_multipleSpacesRegEx," ").replace(_betweenTagSpacesRegEx,"><")}};this.HTMLText=this.GetTrimmedHtml();this.HTML=this.$Object.html(this.textHTML);this.Text=this.NodeName=="#text"?this.$Object.text().replace(_multipleSpacesRegEx," "):$.trim(this.$Object.text().replace(_multipleSpacesRegEx," "));this.TotalTextLength=this.Text.length;this.GetSubDomList=function(){var subdomlist=new Array();var contents=this.$Object.contents();for(var i=0;i<contents.length;i++){subdomlist.push(new ContentDom(contents[i],this.Level-1,this))}return subdomlist};this.SubDomList=this.GetSubDomList();this.MaxHeight=this.SubDomList.length!=0?this.$Object.height():0;this.IsLimited=false;this.SetData=function(){var _this=this;_this.$Object.data("CharLimit",{isLimited:_this.IsLimited,initialHTML:_this.HTML})};this.LimitByCharCount=function(charCount){if(charCount>=this.TotalTextLength){return}this.$Object.empty();var availableCharCount=charCount;for(var i=0;i<this.SubDomList.length;i++){var child=this.SubDomList[i];if(child.TotalTextLength<availableCharCount){this.$Object.append(child.$Object);availableCharCount=availableCharCount-child.TotalTextLength}else{if(child.SubDomList.length==0){child.$Object[0].nodeValue=child.Text.substring(0,availableCharCount);this.$Object.append(child.$Object)}else{child.LimitByCharCount(availableCharCount);this.$Object.append(child.$Object)}break}}if(this.Level==0){level0ContentDom.IsLimited=true;level0ContentDom.SetData();this.$Object.append(new CharLimitEllipsis().$Object)}return this};this.LimitByHeight=function(forcedHeight){if(this.Level==0){level0Ellipsis=new CharLimitEllipsis();if(forcedHeight!=0){HeightLimit=forcedHeight}else{HeightLimit=level0ContentDom.$Object.empty().height();level0ContentDom.$Object.html(level0ContentDom.HTML)}if(HeightLimit==0||HeightLimit>level0ContentDom.$Object.css("height","auto").height()){level0ContentDom.$Object.css("height",level0ContentDom.MaxHeight);return}$variableHeightObj=level0ContentDom.$Object.css("height","auto")}this.$Object.empty();var parent=this.$Object;for(var i=0;i<this.SubDomList.length;i++){var child=this.SubDomList[i];child.$Object.appendTo(parent);if($variableHeightObj.append(level0Ellipsis.$Object).height()<HeightLimit){level0Ellipsis.$Object.remove();$.noop()}else{level0Ellipsis.$Object.remove();if(child.SubDomList.length==0){if(child.NodeName=="#text"){child.$Object[0].nodeValue="";child.$Object.appendTo(parent);var fill=function(content){if(content.length>0){var currentNodeValue=child.$Object[0].nodeValue;var cutIndex=Math.round(content.length/2);var firstHalf=content.substring(0,cutIndex);var secondHalf=content.substring(cutIndex);child.$Object[0].nodeValue+=firstHalf;if($variableHeightObj.append(level0Ellipsis.$Object).height()>HeightLimit){level0Ellipsis.$Object.remove();child.$Object[0].nodeValue=currentNodeValue;if(firstHalf.length>1){fill(firstHalf)}}else{currentNodeValue=child.$Object[0].nodeValue;child.$Object[0].nodeValue+=secondHalf;if($variableHeightObj.append(level0Ellipsis.$Object).height()>HeightLimit){level0Ellipsis.$Object.remove();child.$Object[0].nodeValue=currentNodeValue;if(secondHalf.length>1){fill(secondHalf)}}level0Ellipsis.$Object.remove()}level0Ellipsis.$Object.remove()}};fill(child.Text);if(settings.wordWrap==true){child.$Object[0].nodeValue=child.$Object[0].nodeValue.substring(0,child.$Object[0].nodeValue.lastIndexOf(" "))}}}else{child.$Object.empty();child.LimitByHeight()}break}}if(this.Level==0){var lastchild=level0ContentDom.$Object.children().last();if(lastchild.html()==""){lastchild.remove()}level0ContentDom.$Object.css("height",forcedHeight!=0?forcedHeight:level0ContentDom.MaxHeight);level0ContentDom.IsLimited=true;level0ContentDom.SetData();level0ContentDom.$Object.append(new CharLimitEllipsis().$Object)}return this};this.Limit=function(){var data=this.$Object.data("CharLimit");if(data==null||data.isLimited==false){this.$Object.removeData("CharLimit");if(settings.charsCount>0){return this.LimitByCharCount(settings.charsCount)}else{return this.LimitByHeight(settings.height)}}};if(this.Level==0){level0ContentDom=this}return this}function CharLimitEllipsis(){var expandCollapse=function(){if(settings.expandCollapse=="expand"){level0ContentDom.$Object.css("height","auto").DisableCharLimit()}if(settings.expandCollapse.indexOf("expand-collapse")==0&&settings.expandCollapse.indexOf("|")!=-1){var collapseEllipsis=settings.expandCollapse.substring(settings.expandCollapse.indexOf("|")+1);if(settings.charsCount>0){level0ContentDom.$Object.DisableCharLimit({ellipsis:collapseEllipsis,ellipsisCssClass:settings.ellipsisCssClass,onEllipsisClick:function(){level0ContentDom.$Object.CharLimit(settings)}})}else{level0ContentDom.$Object.css("height","auto").DisableCharLimit({ellipsis:collapseEllipsis,ellipsisCssClass:settings.ellipsisCssClass,onEllipsisClick:function(){level0ContentDom.$Object.height(level0ContentDom.MaxHeight).CharLimit(settings)}})}}};this.$Object=$("<span />").addClass("charLimitEllipsis").addClass(settings.ellipsisCssClass).html(settings.ellipsis).click(function(event){event.preventDefault();expandCollapse();switch($.type(settings.onEllipsisClick)){case"function":settings.onEllipsisClick();break;case"string":eval(settings.onEllipsisClick);break}});this.HTML=settings.ellipsis;return this}return this.each(function(){var contentDom=new ContentDom(this);contentDom.Limit()})},DisableCharLimit:function(settings){settings=this.extend({ellipsis:"",ellipsisCssClass:"",onEllipsisClick:null},settings);function UnLimitedContent(obj){this.$Object=$(obj);this.Data=this.$Object.data("CharLimit");this.ResetText=function(){var initialhtml=this.Data.initialHTML;this.$Object.empty().html(initialhtml);if(settings.ellipsis!=null&&settings.ellipsis!=""){this.$Object.append(new DisableCharLimitEllipsis().$Object)}return this};this.UpdateData=function(){var data=this.Data;$.extend(data,{isLimited:false});return this};return this.ResetText().UpdateData().$Object}function DisableCharLimitEllipsis(){this.$Object=$("<span />").addClass("disableCharLimitEllipsis").addClass(settings.ellipsisCssClass).html(settings.ellipsis).click(function(event){event.preventDefault();$(this).remove();switch($.type(settings.onEllipsisClick)){case"function":settings.onEllipsisClick();break;case"string":eval(settings.onEllipsisClick);break}});this.HTML=settings.ellipsis;return this}return this.each(function(){new UnLimitedContent(this)})},DefaultTextTA:function(settings){settings=jQuery.extend({CssClassWhenDefault:null,SubmitElementClass:null,onInputFill:false},settings);var jQueryMatchedObject=this;function _initDefaultTextInputTA(){$(jQueryMatchedObject).find("*[defaulttextvalue]").each(function(i){if($(this).is("[alwaysdefault=true]")){$(this).val($(this).attr("defaulttextvalue")).addClass(settings.CssClassWhenDefault)}$(this).attr("initialvalue",$(this).attr("value"));if($(this).val()==""){$(this).val($(this).attr("defaulttextvalue")).addClass(settings.CssClassWhenDefault)}$(this).focus(function(){if($(this).val()==$(this).attr("defaulttextvalue")){$(this).val("").removeClass(settings.CssClassWhenDefault)}else{$(this).select()}});$(this).blur(function(){if($(this).val()==""){if(($(this).attr("initialvalue")=="")||($(this).attr("initialvalue")==$(this).attr("defaulttextvalue"))){$(this).val($(this).attr("defaulttextvalue")).addClass(settings.CssClassWhenDefault)}else{$(this).val($(this).attr("initialvalue"))}}});$(this).keyup(function(){eval(settings.onInputFill)})});$(jQueryMatchedObject).find(":submit ").each(function(i){$(this).click(function(){ClearValue()})});if(settings.SubmitElementClass!=null){$(jQueryMatchedObject).find("."+settings.SubmitElementClass).each(function(i){$(this).click(function(){ClearValue()})})}}function ClearValue(widgetId){$(jQueryMatchedObject).find("*[defaulttextvalue]").each(function(i){if($(this).val()==$(this).attr("defaulttextvalue")){$(this).val("")}})}return this.each(_initDefaultTextInputTA)},PrintWidget:function(settings){settings=jQuery.extend({cssPrintFile:"",height:"600",width:"1000",autoPrint:false},settings);var $objets=this;var domainURL=window.location.protocol+"//"+document.domain+(window.location.port!=null?":"+window.location.port:"");Methods={BuildPrintWindowHead:function(){var printWindowHead=$("<head />");$(window.document.documentElement).children("head").children("link[rel='stylesheet']").clone().each(function(){var hrefValue=$(this).attr("href");if(hrefValue.indexOf(domainURL,0)==-1){$(this).attr("href",domainURL+hrefValue)}}).appendTo(printWindowHead);if(settings.cssPrintFile!=""){$("<link />").attr({type:"text/css",rel:"stylesheet",href:domainURL+settings.cssPrintFile}).appendTo(printWindowHead)}return printWindowHead},BuildPrintWindowBody:function(){var printWindowBody=$("<body />");$objets.each(function(i){$(this).clone().appendTo(printWindowBody)});printWindowBody.find("img").each(function(){var srcValue=$(this).attr("src");if(srcValue.indexOf("http",0)==-1&&srcValue.indexOf(domainURL,0)==-1){$(this).attr("src",domainURL+srcValue)}});return printWindowBody},CreatePrintWindow:function(){var newWindow=window.open("","Print","dependent=yes, menubar=yes, toolbar=no, scrollbars=yes, location=no, height="+settings.height+", width="+settings.width+", resizable=yes");$(newWindow.document).find("head").html(Methods.BuildPrintWindowHead().html()).end().find("body").html(Methods.BuildPrintWindowBody().html());return newWindow},Init_PrintWidget:function(){var newWindow=this.CreatePrintWindow();if(settings.autoPrint){newWindow.focus();newWindow.print()}}};Methods.Init_PrintWidget()}})})(jQuery);function initAutoScalingNav(c){if(!c.menuId){c.menuId="main-nav"}if(!c.tag){c.tag="a"}if(!c.spacing){c.spacing=0}if(!c.constant){c.constant=0}if(!c.minPaddings){c.minPaddings=0}if(!c.liHovering){c.liHovering=false}if(!c.sideClasses){c.sideClasses=false}var a=document.getElementById(c.menuId);if(a){var j=a.getElementsByTagName("li");var h=[];var d=[];for(var f=0,e=0;f<j.length;f++){if(j[f].parentNode==a){var i=j[f].getElementsByTagName(c.tag).item(0);h.push(i);h[e++].width=i.offsetWidth;d.push(j[f])}if(c.liHovering){j[f].onmouseover=function(){this.className+=" hover"};j[f].onmouseout=function(){this.className=this.className.replace("hover","")}}}var g=a.clientWidth-h.length*c.spacing-c.constant;if(b(h)<g){for(var f=0;b(h)<g;f++){h[f].width++;if(f>=h.length-1){f=-1}}for(var f=0;f<h.length;f++){h[f].style.width=h[f].width+"px"}}else{if(c.minPaddings>0){for(var f=0;f<h.length;f++){h[f].style.width=h[f].width+c.minPaddings*2+"px"}}}}function b(l){var k=0;for(var m=0;m<l.length;m++){k+=l[m].width}return k}if(c.sideClasses){d[0].className+=" first-child";d[d.length-1].className+=" last-child"}};var timeoutGuid=null;var DoCascadingAjaxCall=false;var lastObjId=new Array(null,null,null,null,null);if(typeof AjaxResponse=="undefined"){AjaxResponse={Status:{Successful:0,Redirected:1,Unauthorized:2,ClientError:3,ServerError:4},Format:{Html:0,Json:1}}}if(typeof ECCore=="undefined"){ECCore={}}ECCore.Ajax=function(f,d,c,g,a,b){var e=jQuery.param(d);if(c){if(e.length>0){portData+="&"}e+=$(c).serialize()}$.ajax({type:"POST",url:f,data:e,dataType:g?"xml":"json",success:function(h){if(a&&h!=null){a(h)}else{if(b){b(h)}}},error:function(j,h,i){if(b){b(h)}}})};function OnTimeOut(){alert("Warning !! The request has timed out !!")}function OnAjaxBeforeSend(a){$("body").css("cursor","wait");timeoutGuid=setTimeout("OnTimeOut",60000)}function HandleSuccess(a){$("body").css("cursor","default");clearTimeout(timeoutGuid)}function OnAjaxLoadComplete(b,c,e,d,a){clearTimeout(timeoutGuid);$("body").css("cursor","default");if(c=="success"){if(d!=null){if($(d).data("Loading")!=null){$(d).Loading(false)}if(a==true){d.html(b)}else{d.replaceWith(b)}}return true}return false}function OnAjaxError(d,c,a,b){clearTimeout(timeoutGuid);if($(b).data("Loading")!=null){$(b).Loading(false)}$("body").css("cursor","default");alert("Warning !! An error occured during your request ("+c+" - "+a+").\r\nPlease try again")}function PostRequest(g,d,f,e,b,a,c){Request(g,"POST",d,f,e,b,a,c)}function GetRequest(g,d,f,e,b,a,c){Request(g,"GET",d,f,e,b,a,c)}function PostRequestWithLoader(g,d,f,e,b,a,c){if(f==null){$(d).Loading(true)}else{$(f).Loading(true)}PostRequest(g,d,f,e,b,a,c)}function GetRequestWithLoader(g,d,f,e,b,a,c){if(f==null){$(d).Loading(true)}else{$(f).Loading(true)}GetRequest(g,d,f,e,b,a,c)}function Request(h,e,d,g,f,b,a,c){$.ajax({type:e,url:h,context:document.body,data:d==null?null:d.serialize(),beforeSend:a==null?OnAjaxBeforeSend:a,success:f==null?function(i,j,k){OnAjaxLoadComplete(i,j,k,g==null?d:g,c)}:function(i,j,k){f(i,j,k,g==null?d:g)},error:b==null?OnAjaxError:b})}function ShowSubMenu(b,a){if(a==0){$(".subNav").hide()}if(lastObjId[a]!=null){HideSubMenu(lastObjId[a])}if($("#"+b)!=null){$("#"+b).show();lastObjId[a]=b}}function HideSubMenu(a){if($("#"+a)!=null){$("#"+a).hide()}}function SetLastObjectId(b,a){lastObjId[a]=b}function GotoPage(c,a,b){$(a).attr("value",b);$(c).click()}var AdSpeedParameters={"do":"js",wd:-1,ht:-1,wmode:"transparent",target:"_blank"};var AdSpeedZoneIdsDivAssociation={};var AdSpeedZoneIds=[];var AdSpeedKeywords=[];var AdSpeedLink="http://g.adspeed.net/ad.php?";extendAdSpeedZoneIdsDivAssociation=function(a,b){if(AdSpeedZoneIdsDivAssociation[a]==null){AdSpeedZoneIdsDivAssociation[a]=[b]}else{var c=AdSpeedZoneIdsDivAssociation[a];if($.inArray(b,c)==-1){c.push(b)}}};extendAdSpeedKeywords=function(a){if($.inArray(a,AdSpeedKeywords)==-1){AdSpeedKeywords.push(a)}};PlaceAdSpeedAds=function(){if(!$.isEmptyObject(AdSpeedZoneIdsDivAssociation)){for(zoneId in AdSpeedZoneIdsDivAssociation){attacheddivs=AdSpeedZoneIdsDivAssociation[zoneId].length;if(attacheddivs>1){AdSpeedZoneIds.push(zoneId+"x"+attacheddivs.toString())}else{AdSpeedZoneIds.push(zoneId)}}var d="&zids="+AdSpeedZoneIds.join("-");var b="&keywords="+AdSpeedKeywords.join(",");var c=$.param(AdSpeedParameters)+d+b;var a=AdSpeedLink+c;$.getScript(a,function(){if(AdSpeed_div!=null&&$.isFunction(AdSpeed_div)){for(zoneId in AdSpeedZoneIdsDivAssociation){var e=AdSpeedZoneIdsDivAssociation[zoneId];if(e.length>1){for(var f=0;f<e.length;f++){AdSpeed_div(e[f],zoneId,f)}}else{AdSpeed_div(e[0],zoneId)}}}else{}})}};$(document).ready(function(){$(".adspeed_Zone").each(function(d){var a=$(this).data("adspeed_DivData");var b="adspeed_Div_"+d;$(this).attr("id",b);extendAdSpeedZoneIdsDivAssociation(a.zid,b);var c=a.keywords.split(",");for(keyword in c){extendAdSpeedKeywords(c[keyword])}});PlaceAdSpeedAds()});$.urlParam=function(a){var b=new RegExp("[\\?&]"+a+"=([^&#]*)").exec(window.location.href);if(!b){return 0}return b[1]||0};function stopPageForm(){var a=$.urlParam("cognome");var d=$.urlParam("nome");var c=$.urlParam("email1");var b=$.urlParam("email");var f=$.urlParam("userName");var e=$.urlParam("password");if(a!="0"){$('.jq_spFreeTrialForm input[name="LastName"]').val(a)}if(d!="0"){$('.jq_spFreeTrialForm input[name="Name"]').val(d)}if(c!="0"){$('.jq_spFreeTrialForm input[name="Email1"]').val(c)}if(b!="0"){$('.jq_spFreeTrialForm input[name="Email"]').val(b)}if(f!="0"){$('.jq_spLoginForm input[name="userName"]').val(f)}if(e!="0"){$('.jq_spLoginForm input[name="password"]').val(e)}}$(".jq_spFreeTrialForm").live("submit",function(){if($('.jq_spFreeTrialForm input[name="LastName"]').val()==""){alert("Il cognome ? obbligatorio");return false}else{if($('.jq_spFreeTrialForm input[name="Name"]').val()==""){alert("Il nome ? obbligatorio");return false}else{if($('.jq_spFreeTrialForm input[name="Email1"]').val()==""){alert("La e-mail ? obbligatoria");return false}else{if($('.jq_spFreeTrialForm input[name="Email"]').val()==""){alert("La conferma e-mail ? obbligatoria");return false}else{if($('.jq_spFreeTrialForm input[name="Email1"]').val()!=$('.jq_spFreeTrialForm input[name="Email"]').val()){alert("e-mail e conferma e-mail non corrispondono");return false}else{if($('.jq_spFreeTrialForm input[name="Privacy"]').not(":checked").length>0){alert("Il consenso per la privacy ? obbligatorio");return false}}}}}}});$(".jq_spLoginForm").live("submit",function(){var c=true;if($('.jq_spLoginForm input[name="userName"]').val()==""){alert("Il nome utente ? obbligatorio");c=false}else{if($('.jq_spLoginForm input[name="password"]').val()==""){alert("La password ? obbligatoria");c=false}}if(c==true){var a=window.location.pathname;if($("#stopPageReturnUrl").length>0){var b=$("#stopPageReturnUrl").val();if(b.length>0){a=$("#stopPageReturnUrl").val()}}$(".jq_spLoginForm").attr("action",$(".jq_spLoginForm").attr("action")+encodeURIComponent(a))}return c});$("document").ready(function(){stopPageForm()});function handle(a,b,c){if((typeof(a.onerror)==="function"&&c==="fail")||(a.width===0)){a.src=b}};function sitestat(a){a+="&amp;ns__t="+(new Date()).getTime();ns_pixelUrl=a;ns_0=document.referrer;ns_0=(ns_0.lastIndexOf("/")==ns_0.length-1)?ns_0.substring(ns_0.lastIndexOf("/"),0):ns_0;if(ns_0.length>0){a+="&amp;ns_referrer="+escape(ns_0)}if(document.images){ns_1=new Image();ns_1.src=a}else{document.write('<img src="'+a+'" width="1" height="1" alt="">')}}function loggingStats(a){temp=document.referrer;temp=(temp.lastIndexOf("/")==temp.length-1)?temp.substring(temp.lastIndexOf("/"),0):temp;if(temp.length>0){a+="&log_referrer="+temp}a+="&log__t="+(new Date()).getTime();a+="&log_pageUrl="+document.URL;if(document.images){track_img=new Image();track_img.src=a}else{document.write('<img src="'+a+'" width="1" height="1" alt="">')}};function AC_ReturnObj(c,d,a){var e="<object ";for(var b in c){e+=b+'="'+c[b]+'" '}e+=">";for(var b in d){e+='<param name="'+b+'" value="'+d[b]+'" /> '}e+="<embed ";for(var b in a){e+=b+'="'+a[b]+'" '}e+=" ></embed></object>";return e}function AC_FL_ReturnContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");return AC_ReturnObj(a.objAttrs,a.params,a.embedAttrs)}function AC_AddExtension(b,a){if(b.indexOf("?")!=-1){return b.replace(/\?/,a+"?")}else{return b+a}}function AC_Generateobj(c,d,a){var e="<object ";for(var b in c){e+=b+'="'+c[b]+'" '}e+=">";for(var b in d){e+='<param name="'+b+'" value="'+d[b]+'" /> '}e+="<embed ";for(var b in a){e+=b+'="'+a[b]+'" '}e+=" ></embed></object>";document.write(e)}function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_SW_RunContent(){var a=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_GetArgs(a,d,h,b,f){var g=new Object();g.embedAttrs=new Object();g.params=new Object();g.objAttrs=new Object();for(var e=0;e<a.length;e=e+2){var c=a[e].toLowerCase();switch(c){case"classid":break;case"pluginspage":g.embedAttrs[a[e]]=a[e+1];break;case"src":case"movie":a[e+1]=AC_AddExtension(a[e+1],d);g.embedAttrs.src=a[e+1];g.params[h]=a[e+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":g.objAttrs[a[e]]=a[e+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"id":case"tabindex":g.embedAttrs[a[e]]=g.objAttrs[a[e]]=a[e+1];break;default:g.embedAttrs[a[e]]=g.params[a[e]]=a[e+1]}}g.objAttrs.classid=b;if(f){g.embedAttrs.type=f}return g};
