function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}};function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;};function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;};function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}};function getWindowHeight(){var myHeight=0;if(typeof(window.innerHeight)=='number')myHeight=window.innerHeight;else if(document.documentElement&&(document.documentElement.clientHeight||document.documentElement.clientHeight))myHeight=document.documentElement.clientHeight;else if(document.body&&(document.body.clientWidth||document.body.clientHeight))myHeight=document.body.clientHeight;return(myHeight);};function getWindowWidth(){var myWidth=0;if(typeof(window.innerWidth)=='number')myWidth=window.innerWidth;else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientWidth))myWidth=document.documentElement.clientWidth;else if(document.body&&(document.body.clientWidth||document.body.clientWidth))myWidth=document.body.clientWidth;return(myWidth);};function fixFlashSize(){try{var myHeight=getWindowHeight();var myWidth=getWindowWidth();var objFlashPage=document.getElementById("flashPage");if(myHeight<660)objFlashPage.style.height='660px';else objFlashPage.style.height='100%';if(myWidth<850)objFlashPage.style.width='850px';else objFlashPage.style.width='100%';}catch(e){}};var popUpWin=0;var arrPopups=new Array();function messageWindow(title,msg){var width="300",height="125";var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2;var styleStr='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;var msgWindow=window.open("","msgWindow",styleStr);var head='<head><title>'+title+'</title><link href="/inc/styles.css" rel="stylesheet" type="text/css"></head>';var body='<body><center>'+msg+'<br><p><form><input type="button" value="   Ok   " onClick="self.close()"></form></body>';msgWindow.document.write(head+body);};function popUpWindow(URLStr,left,top,width,height,scrollbar){if(popUpWin){if(!popUpWin.closed)popUpWin.close();}if(!scrollbar)scrollbar='scrollbar=no';else scrollbar='scrollbars';if(!left)left=(screen.width/2)-width/2;if(!top)top=(screen.height/2)-height/2;popUpWin=open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,'+scrollbar+',resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');};var isReady=false;function onLoadPage(){isReady=true;};function printAddFavorite(lang){if(window.external){if(lang=='EN')document.write('<a href="javascript:addFavorite();"><img src="images/bullets/bullet_favoritos.gif" width="25" height="17" align="absmiddle" border="0">bookmark</a>');else document.write('<a href="javascript:addFavorite();"><img src="images/bullets/bullet_favoritos.gif" width="25" height="17" align="absmiddle" border="0">favoritos</a>');}};function printSavePage(lang){if(document.execCommand){if(lang=='EN')document.write('<a href="javascript:doSaveAs();"><img src="images/bullets/bullet_gravar.gif" width="25" height="17" align="absmiddle" border="0">save</a>');else document.write('<a href="javascript:doSaveAs();"><img src="images/bullets/bullet_gravar.gif" width="25" height="17" align="absmiddle" border="0">gravar</a>');}};function addFavorite(){if(window.external){external.AddFavorite(location.href,document.title)}else{alert("Sorry, your browser doesn't support this feature."+"\nPlease use the bookmark feature of your browser to save the location of this page.");}};function doSaveAs(){if(document.execCommand){if(isReady){document.execCommand("SaveAs");}}else{alert('Feature available only in Internet Exlorer 4.0 and later.');}};function fixFlashContainerHeight(sDivId,iHeight){el=document.getElementById(sDivId);el.style.height=iHeight+'px';};function xGetElementById(e){if(typeof(e)=='string'){if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;}return e;};function Gallery(){this.sBaseId='detailImage';this.iSelectedImage=1;this.sLinkClass='transON';this.sLinkClassSel='transOFF';this.bSetImage=true;this.bSetBackground=false;this.bSetNav=true;this.bSetText=true;this.IE=false;if(navigator.appName=="Microsoft Internet Explorer"){this.IE=true;}this.switchImage=function(iKey){this.iSelectedImage=iKey;if(this.bSetImage){this.setImage(this.iSelectedImage);}if(this.bSetBackground){this.setBackground(this.iSelectedImage);}if(this.bSetNav){this.setNav(this.iSelectedImage);}if(this.bSetText){this.setText(this.iSelectedImage);}return(void(0));};this.setImage=function(iKey){if(iKey==''){iKey=this.iSelectedImage;}try{objImageHidden=document.images[this.sBaseId+'_'+iKey];objImage=document.images[this.sBaseId];if(this.IE&&objImage.filters[0]){objImage.filters[0].apply();}objImage.src=objImageHidden.src;objImage.alt=objImageHidden.alt;if(this.IE&&objImage.filters[0]){objImage.filters[0].play();}}catch(err){}return(void(0));};this.setBackground=function(iKey){if(iKey==''){iKey=this.iSelectedImage;}try{objImageHidden=document.images[this.sBaseId+'_'+iKey];objBgElement=xGetElementById(this.sBaseId+'_Background');objBgElement.style.backgroundImage='url('+objImageHidden.src+')';}catch(err){}return(void(0));};this.setNav=function(iKey){if(iKey==''){iKey=this.iSelectedImage;}try{xGetElementById(this.sBaseId+'_Link'+iKey).className=this.sLinkClassSel;}catch(e){}var i=1;while(1){if(i==iKey){i++;continue;}try{xGetElementById(this.sBaseId+'_Link'+i).className=this.sLinkClass;}catch(err){return(void(0));}i++;}return(void(0));};this.setText=function(iKey){if(iKey==''){iKey=this.iSelectedImage;}try{xGetElementById(this.sBaseId+'_Text').innerHTML=xGetElementById(this.sBaseId+'_Text'+iKey).innerHTML;}catch(err){}return(void(0));};this.prev=function(){var iNewKey;try{iNewKey=this.iSelectedImage-1;if(document.images[this.sBaseId+'_'+iNewKey]){this.switchImage(iNewKey);}}catch(err){}return(void(0));};this.next=function(){var iNewKey;try{iNewKey=this.iSelectedImage+1;if(document.images[this.sBaseId+'_'+iNewKey]){this.switchImage(iNewKey);}}catch(err){}return(void(0));}};(function(){var $$;$$=jQuery.fn.flash=function(htmlOptions,pluginOptions,replace,update){var block=replace||$$.replace;pluginOptions=$$.copy($$.pluginOptions,pluginOptions);if(!$$.hasFlash(pluginOptions.version)){if(pluginOptions.expressInstall&&$$.hasFlash(6,0,65)){var expressInstallOptions={flashvars:{MMredirectURL:location,MMplayerType:'PlugIn',MMdoctitle:jQuery('title').text()}};}else if(pluginOptions.update){block=update||$$.update;}else{return this;}}htmlOptions=$$.copy($$.htmlOptions,expressInstallOptions,htmlOptions);return this.each(function(){block.call(this,$$.copy(htmlOptions));});};$$.copy=function(){var options={},flashvars={};for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg==undefined)continue;jQuery.extend(options,arg);if(arg.flashvars==undefined)continue;jQuery.extend(flashvars,arg.flashvars);}options.flashvars=flashvars;return options;};$$.hasFlash=function(){if(/hasFlash\=true/.test(location))return true;if(/hasFlash\=false/.test(location))return false;var pv=$$.hasFlash.playerVersion().match(/\d+/g);var rv=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String($$.pluginOptions.version).match(/\d+/g);for(var i=0;i<3;i++){pv[i]=parseInt(pv[i]||0);rv[i]=parseInt(rv[i]||0);if(pv[i]<rv[i])return false;if(pv[i]>rv[i])return true;}return true;};$$.hasFlash.playerVersion=function(){try{try{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try{axo.AllowScriptAccess='always';}catch(e){return '6,0,0';}}catch(e){}return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}catch(e){}}return '0,0,0';};$$.htmlOptions={height:240,flashvars:{},pluginspage:'http://www.adobe.com/go/getflashplayer',src:'#',type:'application/x-shockwave-flash',width:320};$$.pluginOptions={expressInstall:false,update:true,version:'6.0.65'};$$.replace=function(htmlOptions){this.innerHTML='<div class="alt">'+this.innerHTML+'</div>';jQuery(this).addClass('flash-replaced').prepend($$.transform(htmlOptions));};$$.update=function(htmlOptions){var url=String(location).split('?');url.splice(1,0,'?hasFlash=true&');url=url.join('');var msg='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+'</span>';jQuery(this).addClass('flash-update').prepend(msg);};function toAttributeString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'="'+this[key]+'" ';return s;};function toFlashvarsString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'='+encodeURIComponent(this[key])+'&';return s.replace(/&$/,'');};$$.transform=function(htmlOptions){var isIE=(navigator.appVersion.indexOf("MSIE")!= -1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!= -1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!= -1)?true:false;htmlOptions.toString=toAttributeString;if(htmlOptions.flashvars)htmlOptions.flashvars.toString=toFlashvarsString;var str='';if(isIE&&isWin&& !isOpera){swfNode='<object id="'+htmlOptions.id+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+htmlOptions.width+'" height="'+htmlOptions.height+'" style="'+htmlOptions.style+'">';for(var i in htmlOptions){swfNode+='<param name="'+i+'" value="'+htmlOptions[i]+'" /> ';}swfNode+='</object>';}else{swfNode='<embed '+String(htmlOptions)+'/>'}return swfNode;};function AC_Generateobj(objAttrs,params,embedAttrs){var str='';if(isIE&&isWin&& !isOpera){str+='<object ';for(var i in objAttrs){str+=i+'="'+objAttrs[i]+'" ';}str+='>';for(var i in params){str+='<param name="'+i+'" value="'+params[i]+'" /> ';}str+='</object>';}else{str+='<embed ';for(var i in embedAttrs){str+=i+'="'+embedAttrs[i]+'" ';}str+='> </embed>';}document.write(str);};function AC_FL_RunContent(){var ret=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}})();var tb_pathToImage="/images/icons/loading.gif";var tb_pathToCloseIcon="/images/icons/close.gif";$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage;});function tb_init(domChunk){try{$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false;});}catch(err){}};function tb_show(caption,url,imageGroup){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{$("#TB_overlay").addClass("TB_overlayBG");}if(caption===null){caption="";}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$('#TB_load').show();var baseURL;if(url.indexOf("?")!== -1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|xmsimg\.php/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'||urlType=='xmsimg.php'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=$("a[@rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;$("#TB_window").fadeIn("slow").append("<div style='background-color:#FFFFFF;'><a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a></div>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='"+tb_pathToCloseIcon+"' border=0 ></a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;};$("#TB_prev").click(goPrev);}if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;};$("#TB_next").click(goNext);}document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"});};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)||630;TB_HEIGHT=(params['height']*1)||440;ajaxContentW=TB_WIDTH;ajaxContentH=TB_HEIGHT;if(url.indexOf('TB_iframe')!= -1){urlNoQuery=url.split('TB_');$("#TB_iframeContent").remove();if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div></div><iframe scrolling='no'  frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW)+"px;height:"+(ajaxContentH)+"px;' > </iframe><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='"+tb_pathToCloseIcon+"' border=0 ></a></div>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW)+"px;height:"+(ajaxContentH)+"px;'> </iframe>");}}else{if($("#TB_window").css("display")!="block"){if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='"+tb_pathToCloseIcon+"' border=0 ></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(caption);}}$("#TB_closeWindowButton").click(tb_remove);if(url.indexOf('TB_inline')!= -1){$("#TB_ajaxContent").append($('#'+params['inlineId']).children());$("#TB_window").unload(function(){$('#'+params['inlineId']).append($("#TB_ajaxContent").children());});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!= -1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"});}}else{$("#TB_ajaxContent").load(url+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"});});}}if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}if(keycode==27){tb_remove();}};}}catch(e){}};function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"});};function tb_remove(){$("#TB_window #TB_iframeContent").attr({src:""});$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("html").css("overflow","");}document.onkeydown="";document.onkeyup="";return false;};function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}};function tb_parseQuery(query){var Params={};if(!query){return Params;}var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}return Params;};function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;};function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!= -1&&userAgent.indexOf('firefox')!= -1){return true;}}(function($){$.fn.addOption=function(){var add=function(el,v,t,sO){var option=document.createElement("option");option.value=v,option.text=t;var o=el.options;var oL=o.length;if(!el.cache){el.cache={};for(var i=0;i<oL;i++){el.cache[o[i].value]=i;}}if(typeof el.cache[v]=="undefined")el.cache[v]=oL;el.options[el.cache[v]]=option;if(sO){option.selected=true;}};var a=arguments;if(a.length==0)return this;var sO=true;var m=false;var items,v,t;if(typeof(a[0])=="object"){m=true;items=a[0];}if(a.length>=2){if(typeof(a[1])=="boolean")sO=a[1];else if(typeof(a[2])=="boolean")sO=a[2];if(!m){v=a[0];t=a[1];}}this.each(function(){if(this.nodeName.toLowerCase()!="select")return;if(m){for(var item in items){add(this,item,items[item],sO);}}else{add(this,v,t,sO);}});return this;};$.fn.ajaxAddOption=function(url,params,select,fn,args){if(typeof(url)!="string")return this;if(typeof(params)!="object")params={};if(typeof(select)!="boolean")select=true;this.each(function(){var el=this;$.getJSON(url,params,function(r){$(el).addOption(r,select);if(typeof fn=="function"){if(typeof args=="object"){fn.apply(el,args);}else{fn.call(el);}}});});return this;};$.fn.removeOption=function(){var a=arguments;if(a.length==0)return this;var ta=typeof(a[0]);var v,index;if(ta=="string"||ta=="object"||ta=="function")v=a[0];else if(ta=="number")index=a[0];else return this;this.each(function(){if(this.nodeName.toLowerCase()!="select")return;if(this.cache)this.cache=null;var remove=false;var o=this.options;if(! !v){var oL=o.length;for(var i=oL-1;i>=0;i--){if(v.constructor==RegExp){if(o[i].value.match(v)){remove=true;}}else if(o[i].value==v){remove=true;}if(remove&&a[1]===true)remove=o[i].selected;if(remove){o[i]=null;}remove=false;}}else{if(a[1]===true){remove=o[index].selected;}else{remove=true;}if(remove){this.remove(index);}}});return this;};$.fn.sortOptions=function(ascending){var a=typeof(ascending)=="undefined"?true: ! !ascending;this.each(function(){if(this.nodeName.toLowerCase()!="select")return;var o=this.options;var oL=o.length;var sA=[];for(var i=0;i<oL;i++){sA[i]={v:o[i].value,t:o[i].text}}sA.sort(function(o1,o2){o1t=o1.t.toLowerCase(),o2t=o2.t.toLowerCase();if(o1t==o2t)return 0;if(a){return o1t<o2t? -1:1;}else{return o1t>o2t? -1:1;}});for(var i=0;i<oL;i++){o[i].text=sA[i].t;o[i].value=sA[i].v;}});return this;};$.fn.selectOptions=function(value,clear){var v=value;var vT=typeof(value);var c=clear||false;if(vT!="string"&&vT!="function"&&vT!="object")return this;this.each(function(){if(this.nodeName.toLowerCase()!="select")return this;var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(v.constructor==RegExp){if(o[i].value.match(v)){o[i].selected=true;}else if(c){o[i].selected=false;}}else{if(o[i].value==v){o[i].selected=true;}else if(c){o[i].selected=false;}}}});return this;};$.fn.copyOptions=function(to,which){var w=which||"selected";if($(to).size()==0)return this;this.each(function(){if(this.nodeName.toLowerCase()!="select")return this;var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(w=="all"||(w=="selected"&&o[i].selected)){$(to).addOption(o[i].value,o[i].text);}}});return this;};$.fn.containsOption=function(value,fn){var found=false;var v=value;var vT=typeof(v);var fT=typeof(fn);if(vT!="string"&&vT!="function"&&vT!="object")return fT=="function"?this:found;this.each(function(){if(this.nodeName.toLowerCase()!="select")return this;if(found&&fT!="function")return false;var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(v.constructor==RegExp){if(o[i].value.match(v)){found=true;if(fT=="function")fn.call(o[i]);}}else{if(o[i].value==v){found=true;if(fT=="function")fn.call(o[i]);}}}});return fT=="function"?this:found;};$.fn.selectedValues=function(){var v=[];this.find("option:selected").each(function(){v[v.length]=this.value;});return v;};})(jQuery);var dropdown_iTimeout=700;var dropdown_xOffset=0;var dropdown_yOffset=2;var dropdown_pTimeout;var dropdown_bHover=false;var dropdown_arrContainers=['#DropDownMenu','#DropDownTopMenu'];$(document).ready(function(){for(i=0;i<dropdown_arrContainers.length;i++){$(dropdown_arrContainers[i]).find('a').hover(function(){if($(this)[0].getAttribute("dropdown")==undefined){return(false);}dropdown_bHover=true;clearTimeout(dropdown_pTimeout);for(d=0;d<dropdown_arrContainers.length;d++){$(dropdown_arrContainers[d]).find('A:not([@dropdown="'+$(this)[0].getAttribute("dropdown")+'"])').each(function(){if($(this)[0].getAttribute("dropdown")!=undefined){$('#'+$(this)[0].getAttribute("dropdown")).hide();}})}var sIdDropdown='#'+$(this)[0].getAttribute("dropdown");var offset=$(this).offset();var voffset=0;var hoffset=0;try{if($(sIdDropdown)[0].getAttribute("voffset")){voffset=Number($(sIdDropdown)[0].getAttribute("voffset"));}if($(sIdDropdown)[0].getAttribute("hoffset")){hoffset=Number($(sIdDropdown)[0].getAttribute("hoffset"));}$(sIdDropdown)[0].style.left=(offset.left+hoffset+dropdown_xOffset)+'px';$(sIdDropdown)[0].style.top=(offset.top+$(this).height()+voffset+dropdown_yOffset)+'px';$(sIdDropdown).show();$(sIdDropdown).hover(function(){clearTimeout(dropdown_pTimeout);},function(){clearTimeout(dropdown_pTimeout);dropdown_pTimeout=setTimeout("dropdown_mouseOut('"+sIdDropdown+"')",dropdown_iTimeout);})}catch(err){}},function(){$('#DebugDiv').html('MouseOUT: '+$(this).attr('id'));if($(this)[0].getAttribute("dropdown")==undefined){return(false);}dropdown_bHover=false;var sIdDropdown='#'+$(this)[0].getAttribute("dropdown");clearTimeout(dropdown_pTimeout);dropdown_pTimeout=setTimeout("dropdown_mouseOut('"+sIdDropdown+"')",dropdown_iTimeout);});}});function dropdown_mouseOut(sIdDropdown){if(dropdown_bHover==false){$(sIdDropdown).hide();}};(function(G){var A="2.30";var B=G.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function D(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments,""))}}G.fn.cycle=function(I){var J=arguments[1];return this.each(function(){if(I===undefined||I===null){I={}}if(I.constructor==String){switch(I){case "stop":if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;G(this).data("cycle.opts","");return;case "pause":this.cyclePause=1;return;case "resume":this.cyclePause=0;if(J===true){I=G(this).data("cycle.opts");if(!I){D("options not found, can not resume");return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}E(I.elements,I,1,1)}return;default:I={fx:I}}}else{if(I.constructor==Number){var O=I;I=G(this).data("cycle.opts");if(!I){D("options not found, can not advance slide");return}if(O<0||O>=I.elements.length){D("invalid slide index: "+O);return}I.nextSlide=O;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}E(I.elements,I,1,O>=I.currSlide);return}}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var R=G(this);var P=I.slideExpr?G(I.slideExpr,this):R.children();var L=P.get();if(L.length<2){D("terminating; too few slides: "+L.length);return}var K=G.extend({},G.fn.cycle.defaults,I||{},G.metadata?R.metadata():G.meta?R.data():{});if(K.autostop){K.countdown=K.autostopCount||L.length}R.data("cycle.opts",K);K.container=this;K.elements=L;K.before=K.before?[K.before]:[];K.after=K.after?[K.after]:[];K.after.unshift(function(){K.busy=0});if(K.continuous){K.after.push(function(){E(L,K,0,!K.rev)})}if(B&&K.cleartype&& !K.cleartypeNoBg){C(P)}var T=this.className;K.width=parseInt((T.match(/w:(\d+)/)||[])[1])||K.width;K.height=parseInt((T.match(/h:(\d+)/)||[])[1])||K.height;K.timeout=parseInt((T.match(/t:(\d+)/)||[])[1])||K.timeout;if(R.css("position")=="static"){R.css("position","relative")}if(K.width){R.width(K.width)}if(K.height&&K.height!="auto"){R.height(K.height)}if(K.startingSlide){K.startingSlide=parseInt(K.startingSlide)}if(K.random){K.randomMap=[];for(var M=0;M<L.length;M++){K.randomMap.push(M)}K.randomMap.sort(function(V,U){return Math.random()-0.5});K.randomIndex=0;K.startingSlide=K.randomMap[0]}else{if(K.startingSlide>=L.length){K.startingSlide=0}}var N=K.startingSlide||0;P.css({position:"absolute",top:0,left:0}).hide().each(function(U){var V=N?U>=N?L.length-(U-N):N-U:L.length-U;G(this).css("z-index",V)});G(L[N]).css("opacity",1).show();if(G.browser.msie){L[N].style.removeAttribute("filter")}if(K.fit&&K.width){P.width(K.width)}if(K.fit&&K.height&&K.height!="auto"){P.height(K.height)}if(K.pause){R.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}var S=G.fn.cycle.transitions[K.fx];if(G.isFunction(S)){S(R,P,K)}else{if(K.fx!="custom"){D("unknown transition: "+K.fx)}}P.each(function(){var U=G(this);this.cycleH=(K.fit&&K.height)?K.height:U.height();this.cycleW=(K.fit&&K.width)?K.width:U.width()});K.cssBefore=K.cssBefore||{};K.animIn=K.animIn||{};K.animOut=K.animOut||{};P.not(":eq("+N+")").css(K.cssBefore);if(K.cssFirst){G(P[N]).css(K.cssFirst)}if(K.timeout){K.timeout=parseInt(K.timeout);if(K.speed.constructor==String){K.speed=G.fx.speeds[K.speed]||parseInt(K.speed)}if(!K.sync){K.speed=K.speed/2}while((K.timeout-K.speed)<250){K.timeout+=K.speed}}if(K.easing){K.easeIn=K.easeOut=K.easing}if(!K.speedIn){K.speedIn=K.speed}if(!K.speedOut){K.speedOut=K.speed}K.slideCount=L.length;K.currSlide=N;if(K.random){K.nextSlide=K.currSlide;if(++K.randomIndex==L.length){K.randomIndex=0}K.nextSlide=K.randomMap[K.randomIndex]}else{K.nextSlide=K.startingSlide>=(L.length-1)?0:K.startingSlide+1}var Q=P[N];if(K.before.length){K.before[0].apply(Q,[Q,Q,K,true])}if(K.after.length>1){K.after[1].apply(Q,[Q,Q,K,true])}if(K.click&& !K.next){K.next=K.click}if(K.next){G(K.next).bind("click",function(){return F(L,K,K.rev? -1:1)})}if(K.prev){G(K.prev).bind("click",function(){return F(L,K,K.rev?1: -1)})}if(K.pager){H(L,K)}K.addSlide=function(V,W){var U=G(V),X=U[0];if(!K.autostopCount){K.countdown++}L[W?"unshift":"push"](X);if(K.els){K.els[W?"unshift":"push"](X)}K.slideCount=L.length;U.css("position","absolute");U[W?"prependTo":"appendTo"](R);if(W){K.currSlide++;K.nextSlide++}if(B&&K.cleartype&& !K.cleartypeNoBg){C(U)}if(K.fit&&K.width){U.width(K.width)}if(K.fit&&K.height&&K.height!="auto"){P.height(K.height)}X.cycleH=(K.fit&&K.height)?K.height:U.height();X.cycleW=(K.fit&&K.width)?K.width:U.width();U.css(K.cssBefore);if(K.pager){G.fn.cycle.createPagerAnchor(L.length-1,X,G(K.pager),L,K)}if(typeof K.onAddSlide=="function"){K.onAddSlide(U)}};if(K.timeout||K.continuous){this.cycleTimeout=setTimeout(function(){E(L,K,0,!K.rev)},K.continuous?10:K.timeout+(K.delay||0))}})};function E(N,I,M,O){if(I.busy){return}var L=I.container,Q=N[I.currSlide],P=N[I.nextSlide];if(L.cycleTimeout===0&& !M){return}if(!M&& !L.cyclePause&&((I.autostop&&(--I.countdown<=0))||(I.nowrap&& !I.random&&I.nextSlide<I.currSlide))){if(I.end){I.end(I)}return}if(M|| !L.cyclePause){if(I.before.length){G.each(I.before,function(R,S){S.apply(P,[Q,P,I,O])})}var J=function(){if(G.browser.msie&&I.cleartype){this.style.removeAttribute("filter")}G.each(I.after,function(R,S){S.apply(P,[Q,P,I,O])})};if(I.nextSlide!=I.currSlide){I.busy=1;if(I.fxFn){I.fxFn(Q,P,I,J,O)}else{if(G.isFunction(G.fn.cycle[I.fx])){G.fn.cycle[I.fx](Q,P,I,J)}else{G.fn.cycle.custom(Q,P,I,J,M&&I.fastOnEvent)}}}if(I.random){I.currSlide=I.nextSlide;if(++I.randomIndex==N.length){I.randomIndex=0}I.nextSlide=I.randomMap[I.randomIndex]}else{var K=(I.nextSlide+1)==N.length;I.nextSlide=K?0:I.nextSlide+1;I.currSlide=K?N.length-1:I.nextSlide-1}if(I.pager){G.fn.cycle.updateActivePagerLink(I.pager,I.currSlide)}}if(I.timeout&& !I.continuous){L.cycleTimeout=setTimeout(function(){E(N,I,0,!I.rev)},I.timeout)}else{if(I.continuous&&L.cyclePause){L.cycleTimeout=setTimeout(function(){E(N,I,0,!I.rev)},10)}}}G.fn.cycle.updateActivePagerLink=function(I,J){G(I).find("a").removeClass("activeSlide").filter("a:eq("+J+")").addClass("activeSlide")};function F(I,J,M){var L=J.container,K=L.cycleTimeout;if(K){clearTimeout(K);L.cycleTimeout=0}if(J.random&&M<0){J.randomIndex--;if(--J.randomIndex== -2){J.randomIndex=I.length-2}else{if(J.randomIndex== -1){J.randomIndex=I.length-1}}J.nextSlide=J.randomMap[J.randomIndex]}else{if(J.random){if(++J.randomIndex==I.length){J.randomIndex=0}J.nextSlide=J.randomMap[J.randomIndex]}else{J.nextSlide=J.currSlide+M;if(J.nextSlide<0){if(J.nowrap){return false}J.nextSlide=I.length-1}else{if(J.nextSlide>=I.length){if(J.nowrap){return false}J.nextSlide=0}}}}if(J.prevNextClick&&typeof J.prevNextClick=="function"){J.prevNextClick(M>0,J.nextSlide,I[J.nextSlide])}E(I,J,1,M>=0);return false}function H(J,K){var I=G(K.pager);G.each(J,function(L,M){G.fn.cycle.createPagerAnchor(L,M,I,J,K)});G.fn.cycle.updateActivePagerLink(K.pager,K.startingSlide)}G.fn.cycle.createPagerAnchor=function(K,L,I,J,M){var N=(typeof M.pagerAnchorBuilder=="function")?G(M.pagerAnchorBuilder(K,L)):G('<a href="#">'+(K+1)+"</a>");if(N.parents("body").length==0){N.appendTo(I)}N.bind(M.pagerEvent,function(){M.nextSlide=K;var P=M.container,O=P.cycleTimeout;if(O){clearTimeout(O);P.cycleTimeout=0}if(typeof M.pagerClick=="function"){M.pagerClick(M.nextSlide,J[M.nextSlide])}E(J,M,1,M.currSlide<K);return false});if(M.pauseOnPagerHover){N.hover(function(){M.container.cyclePause=1},function(){M.container.cyclePause=0})}};function C(K){function J(L){var L=parseInt(L).toString(16);return L.length<2?"0"+L:L}function I(N){for(;N&&N.nodeName.toLowerCase()!="html";N=N.parentNode){var L=G.css(N,"background-color");if(L.indexOf("rgb")>=0){var M=L.match(/\d+/g);return "#"+J(M[0])+J(M[1])+J(M[2])}if(L&&L!="transparent"){return L}}return "#ffffff"}K.each(function(){G(this).css("background-color",I(this))})}G.fn.cycle.custom=function(T,N,I,K,J){var S=G(T),O=G(N);O.css(I.cssBefore);var L=J?1:I.speedIn;var R=J?1:I.speedOut;var M=J?null:I.easeIn;var Q=J?null:I.easeOut;var P=function(){O.animate(I.animIn,L,M,K)};S.animate(I.animOut,R,Q,function(){if(I.cssAfter){S.css(I.cssAfter)}if(!I.sync){P()}});if(I.sync){P()}};G.fn.cycle.transitions={fade:function(J,K,I){K.not(":eq("+I.startingSlide+")").css("opacity",0);I.before.push(function(){G(this).show()});I.animIn={opacity:1};I.animOut={opacity:0};I.cssBefore={opacity:0};I.cssAfter={display:"none"};I.onAddSlide=function(L){L.hide()}}};G.fn.cycle.ver=function(){return A};G.fn.cycle.defaults={fx:"fade",timeout:4000,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:0,nowrap:0,fastOnEvent:0}})(jQuery);(function(A){A.fn.cycle.transitions.scrollUp=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.top=E.offsetHeight;F.animOut.top=0-G.offsetHeight});B.cssFirst={top:0};B.animIn={top:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.scrollDown=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.top=0-E.offsetHeight;F.animOut.top=G.offsetHeight});B.cssFirst={top:0};B.animIn={top:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.scrollLeft=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.left=E.offsetWidth;F.animOut.left=0-G.offsetWidth});B.cssFirst={left:0};B.animIn={left:0}};A.fn.cycle.transitions.scrollRight=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.left=0-E.offsetWidth;F.animOut.left=G.offsetWidth});B.cssFirst={left:0};B.animIn={left:0}};A.fn.cycle.transitions.scrollHorz=function(C,D,B){C.css("overflow","hidden").width();B.before.push(function(I,G,H,F){A(this).show();var E=I.offsetWidth,J=G.offsetWidth;H.cssBefore=F?{left:J}:{left: -J};H.animIn.left=0;H.animOut.left=F? -E:E;D.not(I).css(H.cssBefore)});B.cssFirst={left:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.scrollVert=function(C,D,B){C.css("overflow","hidden");B.before.push(function(J,G,H,F){A(this).show();var I=J.offsetHeight,E=G.offsetHeight;H.cssBefore=F?{top: -E}:{top:E};H.animIn.top=0;H.animOut.top=F?I: -I;D.not(J).css(H.cssBefore)});B.cssFirst={top:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.slideX=function(C,D,B){B.before.push(function(G,E,F){A(G).css("zIndex",1)});B.onAddSlide=function(E){E.hide()};B.cssBefore={zIndex:2};B.animIn={width:"show"};B.animOut={width:"hide"}};A.fn.cycle.transitions.slideY=function(C,D,B){B.before.push(function(G,E,F){A(G).css("zIndex",1)});B.onAddSlide=function(E){E.hide()};B.cssBefore={zIndex:2};B.animIn={height:"show"};B.animOut={height:"hide"}};A.fn.cycle.transitions.shuffle=function(E,F,D){var B=E.css("overflow","visible").width();F.css({left:0,top:0});D.before.push(function(){A(this).show()});D.speed=D.speed/2;D.random=0;D.shuffle=D.shuffle||{left: -B,top:15};D.els=[];for(var C=0;C<F.length;C++){D.els.push(F[C])}for(var C=0;C<D.startingSlide;C++){D.els.push(D.els.shift())}D.fxFn=function(L,J,K,G,I){var H=I?A(L):A(J);H.animate(K.shuffle,K.speedIn,K.easeIn,function(){I?K.els.push(K.els.shift()):K.els.unshift(K.els.pop());if(I){for(var N=0,M=K.els.length;N<M;N++){A(K.els[N]).css("z-index",M-N)}}else{var O=A(L).css("z-index");H.css("z-index",parseInt(O)+1)}H.animate({left:0,top:0},K.speedOut,K.easeOut,function(){A(I?this:L).hide();if(G){G()}})})};D.onAddSlide=function(G){G.hide()}};A.fn.cycle.transitions.turnUp=function(C,D,B){B.before.push(function(G,E,F){A(this).show();F.cssBefore.top=E.cycleH;F.animIn.height=E.cycleH});B.onAddSlide=function(E){E.hide()};B.cssFirst={top:0};B.cssBefore={height:0};B.animIn={top:0};B.animOut={height:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.turnDown=function(C,D,B){B.before.push(function(G,E,F){A(this).show();F.animIn.height=E.cycleH;F.animOut.top=G.cycleH});B.onAddSlide=function(E){E.hide()};B.cssFirst={top:0};B.cssBefore={top:0,height:0};B.animOut={height:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.turnLeft=function(C,D,B){B.before.push(function(G,E,F){A(this).show();F.cssBefore.left=E.cycleW;F.animIn.width=E.cycleW});B.onAddSlide=function(E){E.hide()};B.cssBefore={width:0};B.animIn={left:0};B.animOut={width:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.turnRight=function(C,D,B){B.before.push(function(G,E,F){A(this).show();F.animIn.width=E.cycleW;F.animOut.left=G.cycleW});B.onAddSlide=function(E){E.hide()};B.cssBefore={left:0,width:0};B.animIn={left:0};B.animOut={width:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.zoom=function(C,D,B){B.cssFirst={top:0,left:0};B.cssAfter={display:"none"};B.before.push(function(G,E,F){A(this).show();F.cssBefore={width:0,height:0,top:E.cycleH/2,left:E.cycleW/2};F.cssAfter={display:"none"};F.animIn={top:0,left:0,width:E.cycleW,height:E.cycleH};F.animOut={width:0,height:0,top:G.cycleH/2,left:G.cycleW/2};A(G).css("zIndex",2);A(E).css("zIndex",1)});B.onAddSlide=function(E){E.hide()}};A.fn.cycle.transitions.fadeZoom=function(C,D,B){B.before.push(function(G,E,F){F.cssBefore={width:0,height:0,opacity:1,left:E.cycleW/2,top:E.cycleH/2,zIndex:1};F.animIn={top:0,left:0,width:E.cycleW,height:E.cycleH}});B.animOut={opacity:0};B.cssAfter={zIndex:0}};A.fn.cycle.transitions.blindX=function(D,E,C){var B=D.css("overflow","hidden").width();E.show();C.before.push(function(H,F,G){A(H).css("zIndex",1)});C.cssBefore={left:B,zIndex:2};C.cssAfter={zIndex:1};C.animIn={left:0};C.animOut={left:B}};A.fn.cycle.transitions.blindY=function(D,E,C){var B=D.css("overflow","hidden").height();E.show();C.before.push(function(H,F,G){A(H).css("zIndex",1)});C.cssBefore={top:B,zIndex:2};C.cssAfter={zIndex:1};C.animIn={top:0};C.animOut={top:B}};A.fn.cycle.transitions.blindZ=function(E,F,D){var C=E.css("overflow","hidden").height();var B=E.width();F.show();D.before.push(function(I,G,H){A(I).css("zIndex",1)});D.cssBefore={top:C,left:B,zIndex:2};D.cssAfter={zIndex:1};D.animIn={top:0,left:0};D.animOut={top:C,left:B}};A.fn.cycle.transitions.growX=function(C,D,B){B.before.push(function(G,E,F){F.cssBefore={left:this.cycleW/2,width:0,zIndex:2};F.animIn={left:0,width:this.cycleW};F.animOut={left:0};A(G).css("zIndex",1)});B.onAddSlide=function(E){E.hide().css("zIndex",1)}};A.fn.cycle.transitions.growY=function(C,D,B){B.before.push(function(G,E,F){F.cssBefore={top:this.cycleH/2,height:0,zIndex:2};F.animIn={top:0,height:this.cycleH};F.animOut={top:0};A(G).css("zIndex",1)});B.onAddSlide=function(E){E.hide().css("zIndex",1)}};A.fn.cycle.transitions.curtainX=function(C,D,B){B.before.push(function(G,E,F){F.cssBefore={left:E.cycleW/2,width:0,zIndex:1,display:"block"};F.animIn={left:0,width:this.cycleW};F.animOut={left:G.cycleW/2,width:0};A(G).css("zIndex",2)});B.onAddSlide=function(E){E.hide()};B.cssAfter={zIndex:1,display:"none"}};A.fn.cycle.transitions.curtainY=function(C,D,B){B.before.push(function(G,E,F){F.cssBefore={top:E.cycleH/2,height:0,zIndex:1,display:"block"};F.animIn={top:0,height:this.cycleH};F.animOut={top:G.cycleH/2,height:0};A(G).css("zIndex",2)});B.onAddSlide=function(E){E.hide()};B.cssAfter={zIndex:1,display:"none"}};A.fn.cycle.transitions.cover=function(E,F,D){var G=D.direction||"left";var B=E.css("overflow","hidden").width();var C=E.height();D.before.push(function(J,H,I){I.cssBefore=I.cssBefore||{};I.cssBefore.zIndex=2;I.cssBefore.display="block";if(G=="right"){I.cssBefore.left= -B}else{if(G=="up"){I.cssBefore.top=C}else{if(G=="down"){I.cssBefore.top= -C}else{I.cssBefore.left=B}}}A(J).css("zIndex",1)});if(!D.animIn){D.animIn={left:0,top:0}}if(!D.animOut){D.animOut={left:0,top:0}}D.cssAfter=D.cssAfter||{};D.cssAfter.zIndex=2;D.cssAfter.display="none"};A.fn.cycle.transitions.uncover=function(E,F,D){var G=D.direction||"left";var B=E.css("overflow","hidden").width();var C=E.height();D.before.push(function(J,H,I){I.cssBefore.display="block";if(G=="right"){I.animOut.left=B}else{if(G=="up"){I.animOut.top= -C}else{if(G=="down"){I.animOut.top=C}else{I.animOut.left= -B}}}A(J).css("zIndex",2);A(H).css("zIndex",1)});D.onAddSlide=function(H){H.hide()};if(!D.animIn){D.animIn={left:0,top:0}}D.cssBefore=D.cssBefore||{};D.cssBefore.top=0;D.cssBefore.left=0;D.cssAfter=D.cssAfter||{};D.cssAfter.zIndex=1;D.cssAfter.display="none"};A.fn.cycle.transitions.toss=function(E,F,D){var B=E.css("overflow","visible").width();var C=E.height();D.before.push(function(I,G,H){A(I).css("zIndex",2);H.cssBefore.display="block";if(!H.animOut.left&& !H.animOut.top){H.animOut={left:B*2,top: -C/2,opacity:0}}else{H.animOut.opacity=0}});D.onAddSlide=function(G){G.hide()};D.cssBefore={left:0,top:0,zIndex:1,opacity:1};D.animIn={left:0};D.cssAfter={zIndex:2,display:"none"}};A.fn.cycle.transitions.wipe=function(K,H,C){var J=K.css("overflow","hidden").width();var F=K.height();C.cssBefore=C.cssBefore||{};var D;if(C.clip){if(/l2r/.test(C.clip)){D="rect(0px 0px "+F+"px 0px)"}else{if(/r2l/.test(C.clip)){D="rect(0px "+J+"px "+F+"px "+J+"px)"}else{if(/t2b/.test(C.clip)){D="rect(0px "+J+"px 0px 0px)"}else{if(/b2t/.test(C.clip)){D="rect("+F+"px "+J+"px "+F+"px 0px)"}else{if(/zoom/.test(C.clip)){var L=parseInt(F/2);var E=parseInt(J/2);D="rect("+L+"px "+E+"px "+L+"px "+E+"px)"}}}}}}C.cssBefore.clip=C.cssBefore.clip||D||"rect(0px 0px 0px 0px)";var G=C.cssBefore.clip.match(/(\d+)/g);var L=parseInt(G[0]),B=parseInt(G[1]),I=parseInt(G[2]),E=parseInt(G[3]);C.before.push(function(T,O,R){if(T==O){return}var N=A(T).css("zIndex",2);var M=A(O).css({zIndex:3,display:"block"});var Q=1,P=parseInt((R.speedIn/13))-1;function S(){var V=L?L-parseInt(Q*(L/P)):0;var W=E?E-parseInt(Q*(E/P)):0;var X=I<F?I+parseInt(Q*((F-I)/P||1)):F;var U=B<J?B+parseInt(Q*((J-B)/P||1)):J;M.css({clip:"rect("+V+"px "+U+"px "+X+"px "+W+"px)"});(Q++ <=P)?setTimeout(S,13):N.css("display","none")}S()});C.cssAfter={};C.animIn={left:0};C.animOut={left:0}}})(jQuery);(function($){var height=$.fn.height,width=$.fn.width;$.fn.extend({height:function(){if(this[0]==window)return self.innerHeight||$.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)return Math.max(document.body.scrollHeight,document.body.offsetHeight);return height.apply(this,arguments);},width:function(){if(this[0]==window)return self.innerWidth||$.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)return Math.max(document.body.scrollWidth,document.body.offsetWidth);return width.apply(this,arguments);},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight-num(this,'borderTopWidth')-num(this,'borderBottomWidth'):this.height()+num(this,'paddingTop')+num(this,'paddingBottom');},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth-num(this,'borderLeftWidth')-num(this,'borderRightWidth'):this.width()+num(this,'paddingLeft')+num(this,'paddingRight');},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight:this.height()+num(this,'borderTopWidth')+num(this,'borderBottomWidth')+num(this,'paddingTop')+num(this,'paddingBottom');},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth:this.width()+num(this,'borderLeftWidth')+num(this,'borderRightWidth')+num(this,'paddingLeft')+num(this,'paddingRight');},scrollLeft:function(val){if(val!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo(val,$(window).scrollTop());else this.scrollLeft=val;});if(this[0]==window||this[0]==document)return self.pageXOffset||$.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft;},scrollTop:function(val){if(val!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo($(window).scrollLeft(),val);else this.scrollTop=val;});if(this[0]==window||this[0]==document)return self.pageYOffset||$.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop;},position:function(options,returnObject){var elem=this[0],parent=elem.parentNode,op=elem.offsetParent,options=$.extend({margin:false,border:false,padding:false,scroll:false},options||{}),x=elem.offsetLeft,y=elem.offsetTop,sl=elem.scrollLeft,st=elem.scrollTop;if($.browser.mozilla||$.browser.msie){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}if($.browser.mozilla){do{if($.browser.mozilla&&parent!=elem&&$.css(parent,'overflow')!='visible'){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}if(parent==op)break;}while((parent=parent.parentNode)&&(parent.tagName.toLowerCase()!='body'||parent.tagName.toLowerCase()!='html'));}var returnValue=handleOffsetReturn(elem,options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}else{return returnValue;}},offset:function(options,returnObject){var x=0,y=0,sl=0,st=0,elem=this[0],parent=this[0],op,parPos,elemPos=$.css(elem,'position'),mo=$.browser.mozilla,ie=$.browser.msie,sf=$.browser.safari,oa=$.browser.opera,absparent=false,relparent=false,options=$.extend({margin:true,border:false,padding:false,scroll:true,lite:false},options||{});if(options.lite)return this.offsetLite(options,returnObject);if(elem.tagName.toLowerCase()=='body'){x=elem.offsetLeft;y=elem.offsetTop;if(mo){x+=num(elem,'marginLeft')+(num(elem,'borderLeftWidth')*2);y+=num(elem,'marginTop')+(num(elem,'borderTopWidth')*2);}else if(oa){x+=num(elem,'marginLeft');y+=num(elem,'marginTop');}else if(ie&&jQuery.boxModel){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}}else{do{parPos=$.css(parent,'position');x+=parent.offsetLeft;y+=parent.offsetTop;if(mo||ie){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');if(mo&&parPos=='absolute')absparent=true;if(ie&&parPos=='relative')relparent=true;}op=parent.offsetParent;if(options.scroll||mo){do{if(options.scroll){sl+=parent.scrollLeft;st+=parent.scrollTop;}if(mo&&parent!=elem&&$.css(parent,'overflow')!='visible'){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}parent=parent.parentNode;}while(parent!=op);}parent=op;if(parent.tagName.toLowerCase()=='body'||parent.tagName.toLowerCase()=='html'){if((sf||(ie&&$.boxModel))&&elemPos!='absolute'&&elemPos!='fixed'){x+=num(parent,'marginLeft');y+=num(parent,'marginTop');}if((mo&& !absparent&&elemPos!='fixed')||(ie&&elemPos=='static'&& !relparent)){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}break;}}while(parent);}var returnValue=handleOffsetReturn(elem,options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}else{return returnValue;}},offsetLite:function(options,returnObject){var x=0,y=0,sl=0,st=0,parent=this[0],op,options=$.extend({margin:true,border:false,padding:false,scroll:true},options||{});do{x+=parent.offsetLeft;y+=parent.offsetTop;op=parent.offsetParent;if(options.scroll){do{sl+=parent.scrollLeft;st+=parent.scrollTop;parent=parent.parentNode;}while(parent!=op);}parent=op;}while(parent&&parent.tagName.toLowerCase()!='body'&&parent.tagName.toLowerCase()!='html');var returnValue=handleOffsetReturn(this[0],options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}else{return returnValue;}}});var num=function(el,prop){return parseInt($.css(el.jquery?el[0]:el,prop))||0;};var handleOffsetReturn=function(elem,options,x,y,sl,st){if(!options.margin){x-=num(elem,'marginLeft');y-=num(elem,'marginTop');}if(options.border&&($.browser.safari||$.browser.opera)){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}else if(!options.border&& !($.browser.safari||$.browser.opera)){x-=num(elem,'borderLeftWidth');y-=num(elem,'borderTopWidth');}if(options.padding){x+=num(elem,'paddingLeft');y+=num(elem,'paddingTop');}if(options.scroll){sl-=elem.scrollLeft;st-=elem.scrollTop;}return options.scroll?{top:y-st,left:x-sl,scrollTop:st,scrollLeft:sl}:{top:y,left:x};};})(jQuery);;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked= !$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else show();track= ! !settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&& !settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE|| !$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE|| !$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else helper.parent.stop().fadeOut(tsettings.fade,complete);}else complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);(function($){$.fn.swSelectAutoComplete=function(settings){var jQueryMatchedObj=this;var oAllDivs=new Object;function _initialize(){jQueryMatchedObj.each(function(){var oProperties=new Object();oProperties.__sDivAutoCompleteId='iDivAutoComplete_'+$(this).attr('id');oProperties.__sSearchTextId='iSearchText_'+$(this).attr('id');oProperties.__$divautocomplete=$('<div class="divAutoComplete" mysearchtext="'+oProperties.__sSearchTextId+'" id="'+oProperties.__sDivAutoCompleteId+'"></div>').hide().insertAfter($(this));oProperties.__$autocomplete=$('<ul class="autocomplete"></ul>').appendTo(oProperties.__$divautocomplete);oProperties.__$searchText=null;oProperties.__selectedItem=null;oProperties.__onEmptyValue='';if(this.onHit)oProperties.onHit=this.onHit;oProperties.set_selected_item=function(item){if(item===undefined)return;this.__selectedItem=item;if(this.__selectedItem===null||this.__selectedItem<0){this.hide_auto_complete();return;}this.__$autocomplete.find('li').removeClass('selected');var mySel=this.__$autocomplete.find('li#'+item).addClass('selected');this.show_auto_complete();return(mySel);};oProperties.set_select_index=function(idx){var ID=this.__$autocomplete.find('li.option[@idx='+idx+']').attr('id');return(this.set_selected_item(ID));};oProperties.set_prev_selected_item=function(){var curIdx=this.__$autocomplete.find('li#'+this.__selectedItem).attr('idx');if(curIdx<=0)return;var myNewSel=this.set_select_index(parseInt(curIdx)-1,true);if(myNewSel)myNewSel.focus().get(0).scrollIntoView(false);};oProperties.set_next_selected_item=function(){var curIdx=this.__$autocomplete.find('li#'+this.__selectedItem).attr('idx');var myNewSel=this.set_select_index(parseInt(curIdx)+1,true);if(myNewSel)myNewSel.focus().get(0).scrollIntoView(false);};oProperties.populate_search_field=function(texto,val){this.__$searchText.val(texto);this.set_selected_item(null);this.__$searchText.blur();if(this.onHit)this.onHit(texto,val);};oProperties.show_auto_complete=function(){var offset=this.__$searchText.offset();this.__$divautocomplete.get(0).style.left=(offset.left)+'px';this.__$divautocomplete.get(0).style.top=(offset.top+this.__$searchText.outerHeight())+'px';this.__$divautocomplete.slideDown(150);};oProperties.filter_results=function(){var i=0;sCurSearchTextVal=this.__$searchText.val().toUpperCase();this.__$autocomplete.find('li.optgroup').hide();this.__$autocomplete.find('li.option').each(function(){if($(this).text().toUpperCase().indexOf(sCurSearchTextVal)>=0){$(this).show();$(this).attr('idx',i);$(this).parent().parent().show();i++;}else{$(this).hide();$(this).attr('idx',-1);}});if(i>0){var foo=this.set_select_index(0);this.show_auto_complete();}else{this.set_selected_item(null);this.hide_auto_complete();}if(this.__$divautocomplete.get(0).scrollWidth>this.__$divautocomplete.get(0).clientWidth)this.__$divautocomplete.width(this.__$divautocomplete.get(0).scrollWidth+25);};oProperties.hide_auto_complete=function(){this.__$divautocomplete.hide();};oProperties.__$divautocomplete.bind("mouseenter",function(){this.isMouseOver=true;}).bind("mouseleave",function(){this.isMouseOver=false;});var i=0;$(this).children().each(function(){if(this.tagName=='OPTION'){if(oProperties.__onEmptyValue=='')oProperties.__onEmptyValue=$(this).html();}else if(this.tagName=='OPTGROUP'){var $optgrplabel=$('<li class="optgroup"></li>').text($(this).attr('label')).appendTo(oProperties.__$autocomplete);var $optgrp=$('<ul></ul>').appendTo($optgrplabel);$(this).children().each(function(index){$myLi=$('<li class="option" idx="'+i+'" id="iLI_'+$(this).attr('value')+'" val="'+$(this).attr('value')+'"></li>');$myLi.get(0).oMyProps=oProperties;$myLi.text($(this).text()).appendTo($optgrp).mouseover(function(){this.oMyProps.set_selected_item(this.id)}).click(function(){this.oMyProps.populate_search_field($(this).text(),$(this).attr('val'));hideAllAutoCompletes();});i++;});}});$(this).replaceWith('<input type="text" style="'+$(this).attr('style')+'" myautocomplete="'+$(this).attr('id')+'" name="'+$(this).attr('name')+'" id="'+oProperties.__sSearchTextId+'" value="'+oProperties.__onEmptyValue+'" onempty="'+oProperties.__onEmptyValue+'" />');oProperties.__$searchText=$('#'+oProperties.__sSearchTextId);oProperties.__$searchText.get(0).oMyProps=oProperties;oAllDivs[$(this).attr('id')]=oProperties;oProperties.__$searchText.attr('autocomplete','off').keyup(function(event){if(event.keyCode>40||event.keyCode==8){this.oMyProps.filter_results();}else if(event.keyCode==38&&this.oMyProps.__selectedItem!==null){this.oMyProps.set_prev_selected_item();event.preventDefault();}else if(event.keyCode==40&&this.oMyProps.__selectedItem!==null){this.oMyProps.set_next_selected_item();event.preventDefault();}else if(event.keyCode==27&&this.oMyProps.__selectedItem!==null){this.oMyProps.set_selected_item(null);}}).keypress(function(event){if(event.keyCode==13&&this.oMyProps.__selectedItem!==null){_$curSelItemLI=this.oMyProps.__$autocomplete.find('li#'+this.oMyProps.__selectedItem);this.oMyProps.populate_search_field(_$curSelItemLI.text(),_$curSelItemLI.attr('val'));this.oMyProps.set_selected_item(null);event.preventDefault();}}).blur(function(event){oMyAC=this.oMyProps;if($(this).val()=='')$(this).val($(this).attr('onempty'));setTimeout(function(){if(!oMyAC.__$divautocomplete.get(0).isMouseOver)oMyAC.set_selected_item(null);else oMyAC.__$searchText.get(0).focus();},250);}).focus(function(){if($(this).val()==$(this).attr('onempty')){$(this).val('');this.oMyProps.filter_results();}});});};function hideAllAutoCompletes(){for(i in oAllDivs){oAllDivs[i].hide_auto_complete();}};_initialize();hideAllAutoCompletes();}})(jQuery);function validateCompleteForm(objForm,strErrorClass){return _validateInternal(objForm,strErrorClass,0);};function validateStandard(objForm,strErrorClass){return _validateInternal(objForm,strErrorClass,1);};function _validateInternal(form,strErrorClass,nErrorThrowType){var strErrorMessage="";var objFirstError=null;if(nErrorThrowType==0){strErrorMessage=(form.err)?form.err:_getLanguageText("err_form");};var fields=_GenerateFormFields(form);for(var i=0;i<fields.length;++i){var field=fields[i];if(!field.IsValid(fields)){field.SetClass(strErrorClass);if(nErrorThrowType==1){_throwError(field);return false;}else{if(objFirstError==null){objFirstError=field;}strErrorMessage=_handleError(field,strErrorMessage);bError=true;}}else{field.ResetClass();}};if(objFirstError!=null){alert(strErrorMessage);objFirstError.element.focus();return false;};return true;};function _getLanguageText(id){objTextsInternal=new _jsVal_Language();objTexts=null;try{objTexts=new jsVal_Language();}catch(ignored){};switch(id){case "err_form":strResult=(!objTexts|| !objTexts.err_form)?objTextsInternal.err_form:objTexts.err_form;break;case "err_enter":strResult=(!objTexts|| !objTexts.err_enter)?objTextsInternal.err_enter:objTexts.err_enter;break;case "err_select":strResult=(!objTexts|| !objTexts.err_select)?objTextsInternal.err_select:objTexts.err_select;break;};return strResult;};function _GenerateFormFields(form){var arr=new Array();for(var i=0;i<form.length;++i){var element=form.elements[i];var index=_getElementIndex(arr,element);if(index== -1){arr[arr.length]=new Field(element,form);}else{arr[index].Merge(element)};};return arr;};function _getElementIndex(arr,element){if(element.name){var elementName=element.name.toLowerCase();for(var i=0;i<arr.length;++i){if(arr[i].element.name){if(arr[i].element.name.toLowerCase()==elementName){return i;}};};}return-1;};function _jsVal_Language(){this.err_form="Please enter/select values for the following fields:\n\n";this.err_select="Please select a valid \"%FIELDNAME%\"";this.err_enter="Please enter a valid \"%FIELDNAME%\"";};function Field(element,form){this.type=element.type;this.element=element;this.exclude=element.exclude||element.getAttribute('exclude');this.err=element.err||element.getAttribute('err');this.required=_parseBoolean(element.required||element.getAttribute('required'));this.realname=element.realname||element.getAttribute('realname');this.elements=new Array();switch(this.type){case "textarea":case "password":case "text":case "file":this.value=element.value;this.minLength=element.minlength||element.getAttribute('minlength');this.maxLength=element.maxlength||element.getAttribute('maxlength');this.regexp=this._getRegEx(element);this.minValue=element.minvalue||element.getAttribute('minvalue');this.maxValue=element.maxvalue||element.getAttribute('maxvalue');this.equals=element.equals||element.getAttribute('equals');this.callback=element.callback||element.getAttribute('callback');break;case "select-one":case "select-multiple":this.values=new Array();for(var i=0;i<element.options.length;++i){if(element.options[i].selected&&(!this.exclude||element.options[i].value!=this.exclude)){this.values[this.values.length]=element.options[i].value;}}this.min=element.min||element.getAttribute('min');this.max=element.max||element.getAttribute('max');this.equals=element.equals||element.getAttribute('equals');break;case "checkbox":this.min=element.min||element.getAttribute('min');this.max=element.max||element.getAttribute('max');case "radio":this.required=_parseBoolean(this.required||element.getAttribute('required'));this.values=new Array();if(element.checked){this.values[0]=element.value;}this.elements[0]=element;break;};};Field.prototype.Merge=function(element){var required=_parseBoolean(element.getAttribute('required'));if(required){this.required=true;};if(!this.err){this.err=element.getAttribute('err');};if(!this.equals){this.equals=element.getAttribute('equals');};if(!this.callback){this.callback=element.getAttribute('callback');};if(!this.realname){this.realname=element.getAttribute('realname');};if(!this.max){this.max=element.getAttribute('max');};if(!this.min){this.min=element.getAttribute('min');};if(!this.regexp){this.regexp=this._getRegEx(element);};if(element.checked){this.values[this.values.length]=element.value;};this.elements[this.elements.length]=element;};Field.prototype.IsValid=function(arrFields){switch(this.type){case "textarea":case "password":case "text":case "file":return this._ValidateText(arrFields);case "select-one":case "select-multiple":case "radio":case "checkbox":return this._ValidateGroup(arrFields);default:return true;};};Field.prototype.SetClass=function(newClassName){if((newClassName)&&(newClassName!="")){if((this.elements)&&(this.elements.length>0)){for(var i=0;i<this.elements.length;++i){if(this.elements[i].className!=newClassName){this.elements[i].oldClassName=this.elements[i].className;this.elements[i].className=newClassName;}}}else{if(this.element.className!=newClassName){this.element.oldClassName=this.element.className;this.element.className=newClassName;}};}};Field.prototype.ResetClass=function(){if((this.type!="button")&&(this.type!="submit")&&(this.type!="reset")){if((this.elements)&&(this.elements.length>0)){for(var i=0;i<this.elements.length;++i){if(this.elements[i].oldClassName){this.elements[i].className=this.elements[i].oldClassName;}else{this.element.className="";}}}else{if(this.elements.oldClassName){this.element.className=this.element.oldClassName;}else{this.element.className="";}};};};Field.prototype._getRegEx=function(element){regex=element.regexp||element.getAttribute('regexp');if(regex==null)return null;retype=typeof(regex);if(retype.toUpperCase()=="FUNCTION")return regex;else if((retype.toUpperCase()=="STRING")&& !(regex=="JSVAL_RX_EMAIL")&& !(regex=="JSVAL_RX_TEL")&& !(regex=="JSVAL_RX_PC")&& !(regex=="JSVAL_RX_ZIP")&& !(regex=="JSVAL_RX_MONEY")&& !(regex=="JSVAL_RX_CREDITCARD")&& !(regex=="JSVAL_RX_POSTALZIP")){nBegin=0;nEnd=0;if(regex.charAt(0)=="/")nBegin=1;if(regex.charAt(regex.length-1)=="/")nEnd= -1;return new RegExp(regex.slice(nBegin,nEnd));}else{return regex;};};Field.prototype._ValidateText=function(arrFields){if((this.required)&&(this.callback)){nCurId=this.element.id?this.element.id:"";nCurName=this.element.name?this.element.name:"";eval("bResult = "+this.callback+"('"+nCurId+"', '"+nCurName+"', '"+this.value+"');");if(bResult==false){return false;};}else{if(this.required&& !this.value){return false;};if(this.value&&(this.minLength&&this.value.length<this.minLength)){return false;};if(this.value&&(this.maxLength&&this.value.length>this.maxLength)){return false;};if(this.regexp){if(!_checkRegExp(this.regexp,this.value)){if(!this.required&&this.value){return false;}if(this.required){return false;}}else{return true;};};if(this.equals){for(var i=0;i<arrFields.length;++i){var field=arrFields[i];if((field.element.name==this.equals)||(field.element.id==this.equals)){if(field.element.value!=this.value){return false;};break;};};};if(this.required){var fValue=parseFloat(this.value);if((this.minValue||this.maxValue)&&isNaN(fValue)){return false;};if((this.minValue)&&(fValue<this.minValue)){return false;};if((this.maxValue)&&(fValue>this.maxValue)){return false};};}return true;};Field.prototype._ValidateGroup=function(arrFields){if(this.required&&this.values.length==0){return false;};if(this.required&&this.min&&this.min>this.values.length){return false;};if(this.required&&this.max&&this.max<this.values.length){return false;};return true;};function _handleError(field,strErrorMessage){var obj=field.element;strNewMessage=strErrorMessage+((field.realname)?field.realname:((obj.id)?obj.id:obj.name))+"\n";return strNewMessage;};function _throwError(field){var obj=field.element;switch(field.type){case "text":case "password":case "textarea":case "file":alert(_getError(field,"err_enter"));try{obj.focus();}catch(ignore){}break;case "select-one":case "select-multiple":case "radio":case "checkbox":alert(_getError(field,"err_select"));break;};};function _getError(field,str){var obj=field.element;strErrorTemp=(field.err)?field.err:_getLanguageText(str);idx=strErrorTemp.indexOf("\\n");while(idx> -1){strErrorTemp=strErrorTemp.replace("\\n","\n");idx=strErrorTemp.indexOf("\\n");};return strErrorTemp.replace("%FIELDNAME%",(field.realname)?field.realname:((obj.id)?obj.id:obj.name));};function _parseBoolean(value){return!(!value||value==0||value=="0"||value=="false");};function _checkRegExp(regx,value){switch(regx){case "JSVAL_RX_EMAIL":return((/^[a-zA-Z0-9]+([\.-_]?[a-zA-Z0-9]+)*@[a-zA-Z0-9]+([\.-]?[a-zA-Z0-9]+)*(\.\w{2,5})+$/).test(value));case "JSVAL_RX_TEL":return((/^1?[\-]?\(?\d{3}\)?[\-]?\d{3}[\-]?\d{4}$/).test(value));case "JSVAL_RX_PC":return((/^[a-z]\d[a-z]?\d[a-z]\d$/i).test(value));case "JSVAL_RX_ZIP":return((/^\d{5}$/).test(value));case "JSVAL_RX_MONEY":return((/^\d+([\.]\d\d)?$/).test(value));case "JSVAL_RX_CREDITCARD":return(!isNaN(value));case "JSVAL_RX_POSTALZIP":if(value.length==6||value.length==7)return((/^[a-zA-Z]\d[a-zA-Z] ?\d[a-zA-Z]\d$/).test(value));if(value.length==5||value.length==10)return((/^\d{5}(\-\d{4})?$/).test(value));break;default:return(regx.test(value));};};$(document).ready(function(){$('.PageTitle').flash({src:'/flash/swf/PageTitle.swf',wmode:'transparent',allowScriptAccess:'sameDomain',height:'100%',width:'100%',flashvars:{TXTALIGN:"left",TXTSIZE:17,TXTCOLOR:"0x333333"}},{version:8,update:false},function(htmlOptions){htmlOptions.flashvars.TXTVAL=this.innerHTML;htmlOptions.flashvars.TXTWIDTH=$(this).width();this.innerHTML='<span>'+this.innerHTML+'</span>';var $alt=$(this.firstChild);$alt.addClass('alt');$(this).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));});$('#FlashMainTitle').flash({src:'/flash/swf/PageTitle.swf',wmode:'transparent',allowScriptAccess:'sameDomain',height:'100%',width:'100%',flashvars:{TXTALIGN:"right",TXTWIDTH:"251",TXTSIZE:24,TXTCOLOR:"0x333333"}},{version:8,update:false},function(htmlOptions){htmlOptions.flashvars.TXTCOLOR=$(this).attr('color');htmlOptions.flashvars.TXTVAL=this.innerHTML;this.innerHTML='<span>'+this.innerHTML+'</span>';var $alt=$(this.firstChild);$alt.addClass('alt');$(this).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));});$('.HeadingTitle').flash({src:'/flash/swf/PageTitle.swf',wmode:'transparent',allowScriptAccess:'sameDomain',height:'100%',width:'100%',flashvars:{TXTALIGN:"left",TXTWIDTH:"280",TXTSIZE:14,TXTCOLOR:"0x333333"}},{version:8,update:false},function(htmlOptions){htmlOptions.flashvars.TXTVAL=this.innerHTML;this.innerHTML='<span>'+this.innerHTML+'</span>';var $alt=$(this.firstChild);$alt.addClass('alt');$(this).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));});$('.HeadingSubTitle').flash({src:'/flash/swf/PageTitle.swf',wmode:'transparent',allowScriptAccess:'sameDomain',height:'100%',width:'100%',flashvars:{TXTALIGN:"left",TXTWIDTH:"280",TXTSIZE:14,TXTCOLOR:"0x9E2714"}},{version:8,update:false},function(htmlOptions){htmlOptions.flashvars.TXTVAL=this.innerHTML;this.innerHTML='<span>'+this.innerHTML+'</span>';var $alt=$(this.firstChild);$alt.addClass('alt');$(this).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));});$('#flashPage').flash({src:'/flash/swf/home_v4.swf',wmode:'transparent',allowScriptAccess:'sameDomain',height:'176',width:'100%',flashvars:{baseDir:""}},{version:8,update:false});$('.FWHeader').css('visibility','visible');$('INPUT[@onempty]').focus(function(){var obj=$(this).get(0);if(obj.value==$(this).attr('onempty')){obj.value='';}});$('INPUT[@onempty]').blur(function(){var obj=$(this).get(0);if(obj.value==''){obj.value=$(this).attr('onempty');}});$('select#SELAC_adv').each(function(){this.onHit=function(texto,val){window.location='redirect_article.php?aID='+val;}});$('select#SELAC_area').each(function(){this.onHit=function(texto,val){window.location='redirect_article.php?aID='+val;}});function ActivateAutoComplete(){$('select.SELAUTOCOMPLETE').swSelectAutoComplete();};setTimeout(ActivateAutoComplete,1000);$('.Tooltip').tooltip({track:true,delay:0,fade:0,showURL:false,bodyHandler:function(){return('<span style="color:#333333">'+$(this).attr("ttip")+'</span>');}});$(".HelpTip").tooltip({track:true,delay:0,showURL:false,opacity:1,fixPNG:true,showBody:" - ",extraClass:"fancy",top: -15,left:5,bodyHandler:function(){tId=$(this).attr("tipid");return($('.HelpTipText#'+tId).html());}});$('.DivHomeMenuTabs A').click(function(){$('.DivHomeMenuTabs A').each(function(){$(this).removeClass('Sel');});$(this).addClass('Sel');$('.DivTabs').html('');$('.DivTabs').addClass('LoadingBkg');$.get("ajx.get_home_tab.php",{type:this.id},function(data){$('.DivTabs').removeClass('LoadingBkg');$('.DivTabs').html(data);});return(false);});DocumentReady(document);});function DocumentReady(obj){$(obj).find('.CycleContainer').cycle({fx:'scrollUp',timeout:6000,delay: -2000});$(obj).find('.CycleContainer').removeClass('Hidden');};function LoadPageTitleHome(obj){$(obj).find('.PageTitleHome').flash({src:'/flash/swf/PageTitle.swf',wmode:'transparent',allowScriptAccess:'sameDomain',height:'100%',width:'100%',flashvars:{TXTALIGN:"left",TXTSIZE:17,TXTCOLOR:"0x333333"}},{version:8,update:false},function(htmlOptions){htmlOptions.flashvars.TXTVAL=this.innerHTML;htmlOptions.flashvars.TXTWIDTH=$(this).width();this.innerHTML='<span>'+this.innerHTML+'</span>';var $alt=$(this.firstChild);$alt.addClass('alt');$(this).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));});};function SwitchSummaryDetail(iQuestion,sNamespace){var bHitOnSelected=false;if(!sNamespace){sNamespace='';}if($(sNamespace+' #Q'+iQuestion).hasClass('Sel')){bHitOnSelected=true;}$(sNamespace+' .Summary').removeClass('Sel');$(sNamespace+' .Detail').hide('fast');if(!bHitOnSelected){$(sNamespace+' #Q'+iQuestion).addClass('Sel');$(sNamespace+' #A'+iQuestion).show('fast');}};function onSubmitNewsletter(obj){objTexts=new jsVal_Language();if(!validateStandard(obj)){return(false);}var objEmail=$('input[@name="email"]').get(0);if(objEmail.value==''){alert(objTexts.err_enter.replace("%FIELDNAME%",$(objEmail).attr('realname')));return(false);}var objName=$('input[@name="nome"]').get(0);if((objName.value=='')||(objName.value=='Nome')||(objName.value=='Name')){alert(objTexts.err_enter.replace("%FIELDNAME%",$(objName).attr('realname')));return(false);}$.post("ajx.newsletter.php",{email:objEmail.value,nome:objName.value,dummy:new Date().getTime()},function(data){if(data!='FALSE'){$('.Newsletter').html($('.NewsletterOK').html());tb_show('','iframe_newsletter.php?mbrID='+data+'&nome='+escape(objName.value)+'&email='+escape(objEmail.value)+'&KeepThis=true&TB_iframe=true&height=490&width=550','');}});return(false);};function onSubmitFilterNoticias(){var filter_year=$('.FilterNoticias SELECT[@name=filter_year] option:selected').attr('value');var filter_month=$('.FilterNoticias SELECT[@name=filter_month] option:selected').attr('value');if(((filter_year=='')||(filter_year==undefined))&&((filter_month!='')&&(filter_month!=undefined))){alert(MESSAGE_AnoValido);return(false);}};function onChangeFilterNoticiasYear(iCategoryId){var filter_year=$('.FilterNoticias SELECT[@name=filter_year] option:selected').attr('value');$('.FilterNoticias SELECT[@name=filter_month]').attr('disabled','disabled');$.get("ajx.get_months.php",{filter_year:filter_year,iCatId:iCategoryId},function(data){$('.FilterNoticias SELECT[@name=filter_month]').html(data);$('.FilterNoticias SELECT[@name=filter_month]').removeAttr('disabled');});};function onSubmitAdvogadosSearchForm(){$.post('ajx.adv_pesquisa.php',$('#pesquisa_advogados').serialize(),function(data){$('.AdvogadosResults').html(data);try{window.location="#anchor_search_results";}catch(err){}});return(false);};function onClickAdvogadosLetter(obj,sChar){$('.LetterMenuSearch A').removeClass('Sel');if($('INPUT[@name=firstchar]').get(0).value==sChar){$('INPUT[@name=firstchar]').get(0).value='';}else{$(obj).addClass('Sel');$('INPUT[@name=firstchar]').get(0).value=sChar;}onSubmitAdvogadosSearchForm();return(false);};function onChangeAdvogadosCategory(obj){if($(obj).attr('checked')){if($(obj).attr('value')=='todos'){$('#pesquisa_advogados .InputAdvogadosType[@value=socios]').removeAttr('checked');$('#pesquisa_advogados .InputAdvogadosType[@value=associados_seniores]').removeAttr('checked');$('#pesquisa_advogados .InputAdvogadosType[@value=associados]').removeAttr('checked');$('#pesquisa_advogados .InputAdvogadosType[@value=consultores]').removeAttr('checked');$('#pesquisa_advogados .InputAdvogadosType[@value=estagiarios]').removeAttr('checked');}else{$('.InputAdvogadosType[@value=todos]').removeAttr('checked');}}return(true);};function onClickAdvogadosClean(){$('.LetterMenuSearch A').removeClass('Sel');$('#pesquisa_advogados INPUT[@name=firstchar]').each(function(){this.value='';});$('#pesquisa_advogados INPUT[@type=text]').each(function(){this.value='';});$('#pesquisa_advogados SELECT').selectOptions('');$('#pesquisa_advogados .InputAdvogadosType[@value=socios]').removeAttr('checked');$('#pesquisa_advogados .InputAdvogadosType[@value=associados_seniores]').removeAttr('checked');$('#pesquisa_advogados .InputAdvogadosType[@value=associados]').removeAttr('checked');$('#pesquisa_advogados .InputAdvogadosType[@value=consultores]').removeAttr('checked','checked');$('#pesquisa_advogados .InputAdvogadosType[@value=estagiarios]').removeAttr('checked','checked');$('#pesquisa_advogados .InputAdvogadosType[@value=todos]').attr('checked','checked');return(false);};var dropdownCustom_iTimeout=700;var dropdownCustom_bHover=false;var dropdownCustom_pTimeout;$(document).ready(function(){$('.CoberturaMap .Point A[@dropdown]').hover(function(){dropdownCustom_bHover=true;clearTimeout(dropdownCustom_pTimeout);var sIdDropdown='#'+$(this).attr('dropdown');try{$(sIdDropdown).show();$(sIdDropdown).hover(function(){clearTimeout(dropdownCustom_pTimeout);},function(){clearTimeout(dropdownCustom_pTimeout);dropdownCustom_pTimeout=setTimeout("dropdownCustom_mouseOut('"+sIdDropdown+"')",dropdownCustom_iTimeout);})}catch(err){}},function(){if($(this).attr("dropdown")==undefined){return(false);}dropdownCustom_bHover=false;var sIdDropdown='#'+$(this).attr("dropdown");clearTimeout(dropdownCustom_pTimeout);dropdownCustom_pTimeout=setTimeout("dropdownCustom_mouseOut('"+sIdDropdown+"')",dropdownCustom_iTimeout);})});function dropdownCustom_mouseOut(sIdDropdown){if(dropdownCustom_bHover==false){$(sIdDropdown).hide();}}function ShowParceria(id) {$('.DescritivoParcerias').hide();$('#parceria_' + id).show();}