﻿
var FCKeditor=function(instanceName,width,height,toolbarSet,value)
{this.InstanceName=instanceName;this.Width=width||'100%';this.Height=height||'200';this.ToolbarSet=toolbarSet||'Default';this.Value=value||'';this.BasePath=FCKeditor.BasePath;this.CheckBrowser=true;this.DisplayErrors=true;this.Config=new Object();this.OnError=null;}
FCKeditor.BasePath='/fckeditor/';FCKeditor.MinHeight=200;FCKeditor.MinWidth=750;FCKeditor.prototype.Version='2.6.4';FCKeditor.prototype.VersionBuild='21629';FCKeditor.prototype.Create=function()
{document.write(this.CreateHtml());}
FCKeditor.prototype.CreateHtml=function()
{if(!this.InstanceName||this.InstanceName.length==0)
{this._ThrowError(701,'You must specify an instance name.');return'';}
var sHtml='';if(!this.CheckBrowser||this._IsCompatibleBrowser())
{sHtml+='<input type="hidden" id="'+this.InstanceName+'" name="'+this.InstanceName+'" value="'+this._HTMLEncode(this.Value)+'" style="display:none" />';sHtml+=this._GetConfigHtml();sHtml+=this._GetIFrameHtml();}
else
{var sWidth=this.Width.toString().indexOf('%')>0?this.Width:this.Width+'px';var sHeight=this.Height.toString().indexOf('%')>0?this.Height:this.Height+'px';sHtml+='<textarea name="'+this.InstanceName+'" rows="4" cols="40" style="width:'+sWidth+';height:'+sHeight;if(this.TabIndex)
sHtml+='" tabindex="'+this.TabIndex;sHtml+='">'+
this._HTMLEncode(this.Value)+'<\/textarea>';}
return sHtml;}
FCKeditor.prototype.ReplaceTextarea=function()
{if(document.getElementById(this.InstanceName+'___Frame'))
return;if(!this.CheckBrowser||this._IsCompatibleBrowser())
{var oTextarea=document.getElementById(this.InstanceName);var colElementsByName=document.getElementsByName(this.InstanceName);var i=0;while(oTextarea||i==0)
{if(oTextarea&&oTextarea.tagName.toLowerCase()=='textarea')
break;oTextarea=colElementsByName[i++];}
if(!oTextarea)
{alert('Error: The TEXTAREA with id or name set to "'+this.InstanceName+'" was not found');return;}
oTextarea.style.display='none';if(oTextarea.tabIndex)
this.TabIndex=oTextarea.tabIndex;this._InsertHtmlBefore(this._GetConfigHtml(),oTextarea);this._InsertHtmlBefore(this._GetIFrameHtml(),oTextarea);}}
FCKeditor.prototype._InsertHtmlBefore=function(html,element)
{if(element.insertAdjacentHTML)
element.insertAdjacentHTML('beforeBegin',html);else
{var oRange=document.createRange();oRange.setStartBefore(element);var oFragment=oRange.createContextualFragment(html);element.parentNode.insertBefore(oFragment,element);}}
FCKeditor.prototype._GetConfigHtml=function()
{var sConfig='';for(var o in this.Config)
{if(sConfig.length>0)sConfig+='&amp;';sConfig+=encodeURIComponent(o)+'='+encodeURIComponent(this.Config[o]);}
return'<input type="hidden" id="'+this.InstanceName+'___Config" value="'+sConfig+'" style="display:none" />';}
FCKeditor.prototype._GetIFrameHtml=function()
{var sFile='fckeditor.html';try
{if((/fcksource=true/i).test(window.top.location.search))
sFile='fckeditor.original.html';}
catch(e){}
var sLink=this.BasePath+'editor/'+sFile+'?InstanceName='+encodeURIComponent(this.InstanceName);if(this.ToolbarSet)
sLink+='&amp;Toolbar='+this.ToolbarSet;var html='<iframe id="'+this.InstanceName+'___Frame" src="'+sLink+'" width="'+this.Width+'" height="'+this.Height;if(this.TabIndex)
html+='" tabindex="'+this.TabIndex;html+='" frameborder="0" scrolling="no"></iframe>';return html;}
FCKeditor.prototype._IsCompatibleBrowser=function()
{return FCKeditor_IsCompatibleBrowser();}
FCKeditor.prototype._ThrowError=function(errorNumber,errorDescription)
{this.ErrorNumber=errorNumber;this.ErrorDescription=errorDescription;if(this.DisplayErrors)
{document.write('<div style="COLOR: #ff0000">');document.write('[ FCKeditor Error '+this.ErrorNumber+': '+this.ErrorDescription+' ]');document.write('</div>');}
if(typeof(this.OnError)=='function')
this.OnError(this,errorNumber,errorDescription);}
FCKeditor.prototype._HTMLEncode=function(text)
{if(typeof(text)!="string")
text=text.toString();text=text.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return text;};(function()
{var textareaToEditor=function(textarea)
{var editor=new FCKeditor(textarea.name);editor.Width=Math.max(textarea.offsetWidth,FCKeditor.MinWidth);editor.Height=Math.max(textarea.offsetHeight,FCKeditor.MinHeight);return editor;}
FCKeditor.ReplaceAllTextareas=function()
{var textareas=document.getElementsByTagName('textarea');for(var i=0;i<textareas.length;i++)
{var editor=null;var textarea=textareas[i];var name=textarea.name;if(!name||name.length==0)
continue;if(typeof arguments[0]=='string')
{var classRegex=new RegExp('(?:^| )'+arguments[0]+'(?:$| )');if(!classRegex.test(textarea.className))
continue;}
else if(typeof arguments[0]=='function')
{editor=textareaToEditor(textarea);if(arguments[0](textarea,editor)===false)
continue;}
if(!editor)
editor=textareaToEditor(textarea);editor.ReplaceTextarea();}}})();function FCKeditor_IsCompatibleBrowser()
{var sAgent=navigator.userAgent.toLowerCase();if(false&&sAgent.indexOf("mac")==-1)
{var sBrowserVersion=navigator.appVersion.match(/MSIE (.\..)/)[1];return(sBrowserVersion>=5.5);}
if(navigator.product=="Gecko"&&navigator.productSub>=20030210&&!(typeof(opera)=='object'&&opera.postError))
return true;if(window.opera&&window.opera.version&&parseFloat(window.opera.version())>=9.5)
return true;if(sAgent.indexOf(' adobeair/')!=-1)
return(sAgent.match(/ adobeair\/(\d+)/)[1]>=1);if(sAgent.indexOf(' applewebkit/')!=-1)
return(sAgent.match(/ applewebkit\/(\d+)/)[1]>=522);return false;}
var displayWaitMessage=true;var activeImage=false;var imageGalleryLeftPos=false;var imageGalleryWidth=false;var imageGalleryObj=false;var maxGalleryXPos=false;var slideSpeed=0;var imageGalleryCaptions=new Array();function startSlide(e)
{if(document.all)e=event;var id=this.id;this.getElementsByTagName('IMG')[0].src='/images/master/'+this.id+'.png';if(this.id=='arrow_right'){slideSpeedMultiply=Math.floor((e.clientX-this.offsetLeft)/5);slideSpeed=-1*slideSpeedMultiply;slideSpeed=Math.max(-10,slideSpeed);}else{slideSpeedMultiply=10-Math.floor((e.clientX-this.offsetLeft)/5);slideSpeed=1*slideSpeedMultiply;slideSpeed=Math.min(10,slideSpeed);if(slideSpeed<0)slideSpeed=10;}}
function releaseSlide()
{var id=this.id;this.getElementsByTagName('IMG')[0].src='/images/master/'+this.id+'.png';slideSpeed=0;}
function gallerySlide()
{if(slideSpeed!=0){var leftPos=imageGalleryObj.offsetLeft;leftPos=leftPos/1+slideSpeed;if(leftPos>maxGalleryXPos){leftPos=maxGalleryXPos;slideSpeed=0;}
if(leftPos<minGalleryXPos){leftPos=minGalleryXPos;slideSpeed=0;}
imageGalleryObj.style.left=leftPos+'px';}
setTimeout('gallerySlide()',20);}
function showImage(){if(activeImage){activeImage.style.filter='alpha(opacity=50)';activeImage.style.opacity=0.5;}
this.style.filter='alpha(opacity=100)';this.style.opacity=1;activeImage=this;}
function initSlideShow(){document.getElementById('arrow_left').onmousemove=startSlide;document.getElementById('arrow_left').onmouseout=releaseSlide;document.getElementById('arrow_right').onmousemove=startSlide;document.getElementById('arrow_right').onmouseout=releaseSlide;imageGalleryObj=document.getElementById('theImages');imageGalleryLeftPos=imageGalleryObj.offsetLeft;imageGalleryWidth=document.getElementById('galleryContainer').offsetWidth-80;maxGalleryXPos=imageGalleryObj.offsetLeft;minGalleryXPos=imageGalleryWidth-document.getElementById('slideEnd').offsetLeft;var slideshowImages=imageGalleryObj.getElementsByTagName('IMG');for(var no=0;no<slideshowImages.length;no++){slideshowImages[no].onmouseover=showImage;}
var spans=imageGalleryObj.getElementsByTagName('span');for(var no=0;no<spans.length;no++){if(spans[no].className=='imageCaption')imageGalleryCaptions[imageGalleryCaptions.length]=spans[no].innerHTML;}
gallerySlide();}
function showPreview(imagePath,imageIndex,imgthum){var subImages=document.getElementById('previewPane').getElementsByTagName('IMG');var aview=document.getElementById('previewPane').getElementsByTagName('A');if(subImages.length==0){var img=document.createElement('IMG');document.getElementById('previewPane').appendChild(img);}
else img=subImages[0];if(aview.length==0){var alink=document.createElement('A');document.getElementById('previewPane').appendChild(alink);}
else alink=aview[0];if(displayWaitMessage){document.getElementById('waitMessage').style.display='inline';}
document.getElementById('largeImageCaption').style.display='none';img.onload=function(){hideWaitMessageAndShowCaption(imageIndex-1);};img.src=imagePath;alink.href=imgthum;}
function hideWaitMessageAndShowCaption(imageIndex){debugger;document.getElementById('waitMessage').style.display='none';document.getElementById('largeImageCaption').innerHTML=imageGalleryCaptions[imageIndex];document.getElementById('largeImageCaption').style.display='block';}
function move_box(an,box,width){var cright=0;var cleft=0;var cwidth=0;var ctop=0;var obj=an;while(obj.offsetParent){cleft+=obj.offsetLeft;ctop+=obj.offsetTop;cwidth+=obj.offsetWidth;obj=obj.offsetParent;}
cright=cleft;box.style.left=cright+'px';ctop+=an.offsetHeight+8;if(document.body.currentStyle&&document.body.currentStyle['marginTop']){ctop+=parseInt(document.body.currentStyle['marginTop']);}
box.style.top=ctop+'px';}
function move_boxInTheCentral(box,w,h){box.style.position='fixed';var left=(screen.width/2)-(w/2);var top=(screen.height/2)-(h/2);top=top-100;box.style.left=left+'px';box.style.top=top+'px';}
function show_hide_box(an,divElement){var boxdiv=document.getElementById(divElement);if(boxdiv!=null)
{if(boxdiv.style.display=='none'){move_box(an,boxdiv);boxdiv.style.display='block';}else{boxdiv.style.display='none';return false;}}
boxdiv.style.display='block';boxdiv.style.position='absolute';move_boxInTheCentral(boxdiv,boxdiv.style.width.replace("px",""),boxdiv.style.height.replace("px",""));return false;}
function show_hide_Element(divElement){var boxdiv=document.getElementById(divElement);if(boxdiv!=null){if(boxdiv.style.display=='none'){boxdiv.style.display='block';}else{boxdiv.style.display='none';}}
return false;}
function move_box(an,box){var cleft=0;var ctop=0;var obj=an;while(obj.offsetParent){cleft+=obj.offsetLeft;ctop+=obj.offsetTop;obj=obj.offsetParent;}
box.style.left=cleft+'px';if(document.body.currentStyle&&document.body.currentStyle['marginTop']){ctop+=parseInt(document.body.currentStyle['marginTop']);}
box.style.top=ctop+'px';}
function move_boxInTheCentral(box,w,h){box.style.position='fixed';var left=(screen.width/2)-(w/2);var top=(screen.height/2)-(h/2);top=top-200;box.style.left=left+'px';box.style.top=top+'px';}
function show_hide_box(an,divElement){var boxdiv=document.getElementById(divElement);if(boxdiv!=null)
{if(boxdiv.style.display=='none'){move_box(an,boxdiv);boxdiv.style.display='block';}else{boxdiv.style.display='none';return false;}}
boxdiv.style.display='block';boxdiv.style.position='absolute';move_boxInTheCentral(boxdiv,boxdiv.style.width.replace("px",""),boxdiv.style.height.replace("px",""));return false;}
function show_hide_Element(divElement){var boxdiv=document.getElementById(divElement);if(boxdiv!=null){if(boxdiv.style.display=='none'){boxdiv.style.display='block';}else{boxdiv.style.display='none';}}
return false;}
var A_TCALDEF={'months':['January','February','March','April','May','June','July','August','September','October','November','December'],'weekdays':['Su','Mo','Tu','We','Th','Fr','Sa'],'yearscroll':true,'weekstart':0,'centyear':70,'imgpath':'/javascript/Calender/img/'}
function f_tcalParseDate(s_date){var re_date=/^\s*(\d{1,2})\/(\d{1,2})\/(\d{2,4})\s*$/;if(!re_date.exec(s_date))
return alert("Invalid date: '"+s_date+"'.\nAccepted format is dd/mm/yyyy.")
var n_day=Number(RegExp.$2),n_month=Number(RegExp.$1),n_year=Number(RegExp.$3);if(n_year<100)
n_year+=(n_year<this.a_tpl.centyear?2000:1900);if(n_month<1||n_month>12)
return alert("Invalid month value: '"+n_month+"'.\nAllowed range is 01-12.");var d_numdays=new Date(n_year,n_month,0);if(n_day>d_numdays.getDate())
return alert("Invalid day of month value: '"+n_day+"'.\nAllowed range for selected month is 01 - "+d_numdays.getDate()+".");return new Date(n_year,n_month-1,n_day);}
function f_tcalGenerDate(d_date){return((d_date.getMonth()<9?'0':'')+(d_date.getMonth()+1)+"/"
+(d_date.getDate()<10?'0':'')+d_date.getDate()+"/"
+d_date.getFullYear());}
function tcal(a_cfg,a_tpl){if(!a_tpl)
a_tpl=A_TCALDEF;if(!window.A_TCALS)
window.A_TCALS=[];if(!window.A_TCALSIDX)
window.A_TCALSIDX=[];this.s_id=a_cfg.id?a_cfg.id:A_TCALS.length;window.A_TCALS[this.s_id]=this;window.A_TCALSIDX[window.A_TCALSIDX.length]=this;this.f_show=f_tcalShow;this.f_hide=f_tcalHide;this.f_toggle=f_tcalToggle;this.f_update=f_tcalUpdate;this.f_relDate=f_tcalRelDate;this.f_parseDate=f_tcalParseDate;this.f_generDate=f_tcalGenerDate;this.s_iconId='tcalico_'+this.s_id;this.e_icon=f_getElement(this.s_iconId);if(!this.e_icon){document.write('<img src="'+a_tpl.imgpath+'cal.gif" id="'+this.s_iconId+'" onclick="A_TCALS[\''+this.s_id+'\'].f_toggle()" class="tcalIcon" alt="Open Calendar" />');this.e_icon=f_getElement(this.s_iconId);}
this.a_cfg=a_cfg;this.a_tpl=a_tpl;}
function f_tcalShow(d_date){if(!this.a_cfg.controlname)
throw("TC: control name is not specified");if(this.a_cfg.formname){var e_form=document.forms[this.a_cfg.formname];if(!e_form)
throw("TC: form '"+this.a_cfg.formname+"' can not be found");this.e_input=e_form.elements[this.a_cfg.controlname];}
else
this.e_input=f_getElement(this.a_cfg.controlname);if(!this.e_input||!this.e_input.tagName||this.e_input.tagName!='INPUT')
throw("TC: element '"+this.a_cfg.controlname+"' does not exist in "
+(this.a_cfg.formname?"form '"+this.a_cfg.controlname+"'":'this document'));this.e_div=f_getElement('tcal');if(!this.e_div){this.e_div=document.createElement("DIV");this.e_div.id='tcal';document.body.appendChild(this.e_div);}
this.e_shade=f_getElement('tcalShade');if(!this.e_shade){this.e_shade=document.createElement("DIV");this.e_shade.id='tcalShade';document.body.appendChild(this.e_shade);}
this.e_iframe=f_getElement('tcalIF')
if(b_ieFix&&!this.e_iframe){this.e_iframe=document.createElement("IFRAME");this.e_iframe.style.filter='alpha(opacity=0)';this.e_iframe.id='tcalIF';this.e_iframe.src=this.a_tpl.imgpath+'pixel.gif';document.body.appendChild(this.e_iframe);}
f_tcalHideAll();this.e_icon=f_getElement(this.s_iconId);if(!this.f_update())
return;this.e_div.style.visibility='visible';this.e_shade.style.visibility='visible';if(this.e_iframe)
this.e_iframe.style.visibility='visible';this.e_icon.src=this.a_tpl.imgpath+'no_cal.gif';this.e_icon.title='Close Calendar';this.b_visible=true;}
function f_tcalHide(n_date){if(n_date)
this.e_input.value=this.f_generDate(new Date(n_date));if(!this.b_visible)
return;if(this.e_iframe)
this.e_iframe.style.visibility='hidden';if(this.e_shade)
this.e_shade.style.visibility='hidden';this.e_div.style.visibility='hidden';this.e_icon=f_getElement(this.s_iconId);this.e_icon.src=this.a_tpl.imgpath+'cal.gif';this.e_icon.title='Open Calendar';this.b_visible=false;}
function f_tcalToggle(){return this.b_visible?this.f_hide():this.f_show();}
function f_tcalUpdate(d_date){var d_client=new Date();d_client.setHours(0);d_client.setMinutes(0);d_client.setSeconds(0);d_client.setMilliseconds(0);var d_today=this.a_cfg.today?this.f_parseDate(this.a_cfg.today):d_client;var d_selected=this.e_input.value==''?(this.a_cfg.selected?this.f_parseDate(this.a_cfg.selected):d_today):this.f_parseDate(this.e_input.value);if(!d_date)
d_date=d_selected;else if(typeof(d_date)=='number')
d_date=new Date(d_date);else if(typeof(d_date)=='string')
this.f_parseDate(d_date);if(!d_date)return false;var d_firstday=new Date(d_date);d_firstday.setDate(1);d_firstday.setDate(1-(7+d_firstday.getDay()-this.a_tpl.weekstart)%7);var a_class,s_html='<table class="ctrl"><tbody><tr>'
+(this.a_tpl.yearscroll?'<td'+this.f_relDate(d_date,-1,'y')+' title="Previous Year"><img src="'+this.a_tpl.imgpath+'prev_year.gif" /></td>':'')
+'<td'+this.f_relDate(d_date,-1)+' title="Previous Month"><img src="'+this.a_tpl.imgpath+'prev_mon.gif" /></td><th>'
+this.a_tpl.months[d_date.getMonth()]+' '+d_date.getFullYear()
+'</th><td'+this.f_relDate(d_date,1)+' title="Next Month"><img src="'+this.a_tpl.imgpath+'next_mon.gif" /></td>'
+(this.a_tpl.yearscroll?'<td'+this.f_relDate(d_date,1,'y')+' title="Next Year"><img src="'+this.a_tpl.imgpath+'next_year.gif" /></td></td>':'')
+'</tr></tbody></table><table><tbody><tr class="wd">';for(var i=0;i<7;i++)
s_html+='<th>'+this.a_tpl.weekdays[(this.a_tpl.weekstart+i)%7]+'</th>';s_html+='</tr>';var d_current=new Date(d_firstday);while(d_current.getMonth()==d_date.getMonth()||d_current.getMonth()==d_firstday.getMonth()){s_html+='<tr>';for(var n_wday=0;n_wday<7;n_wday++){a_class=[];if(d_current.getMonth()!=d_date.getMonth())
a_class[a_class.length]='othermonth';if(d_current.getDay()==0||d_current.getDay()==6)
a_class[a_class.length]='weekend';if(d_current.valueOf()==d_today.valueOf())
a_class[a_class.length]='today';if(d_current.valueOf()==d_selected.valueOf())
a_class[a_class.length]='selected';s_html+='<td onclick="A_TCALS[\''+this.s_id+'\'].f_hide('+d_current.valueOf()+')"'+(a_class.length?' class="'+a_class.join(' ')+'">':'>')+d_current.getDate()+'</td>'
d_current.setDate(d_current.getDate()+1);}
s_html+='</tr>';}
s_html+='</tbody></table>';this.e_div.innerHTML=s_html;var n_width=this.e_div.offsetWidth;var n_height=this.e_div.offsetHeight;var n_top=f_getPosition(this.e_icon,'Top')+this.e_icon.offsetHeight;var n_left=f_getPosition(this.e_icon,'Left')-n_width+this.e_icon.offsetWidth;if(n_left<0)n_left=0;this.e_div.style.left=n_left+'px';this.e_div.style.top=n_top+'px';this.e_shade.style.width=(n_width+8)+'px';this.e_shade.style.left=(n_left-1)+'px';this.e_shade.style.top=(n_top-1)+'px';this.e_shade.innerHTML=b_ieFix?'<table><tbody><tr><td rowspan="2" colspan="2" width="6"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td><td width="7" height="7" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+this.a_tpl.imgpath+'shade_tr.png\', sizingMethod=\'scale\');"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td></tr><tr><td height="'+(n_height-7)+'" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+this.a_tpl.imgpath+'shade_mr.png\', sizingMethod=\'scale\');"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td></tr><tr><td width="7" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+this.a_tpl.imgpath+'shade_bl.png\', sizingMethod=\'scale\');"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td><td style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+this.a_tpl.imgpath+'shade_bm.png\', sizingMethod=\'scale\');" height="7" align="left"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td><td style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+this.a_tpl.imgpath+'shade_br.png\', sizingMethod=\'scale\');"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td></tr><tbody></table>':'<table><tbody><tr><td rowspan="2" width="6"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td><td rowspan="2"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td><td width="7" height="7"><img src="'+this.a_tpl.imgpath+'shade_tr.png"></td></tr><tr><td background="'+this.a_tpl.imgpath+'shade_mr.png" height="'+(n_height-7)+'"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td></tr><tr><td><img src="'+this.a_tpl.imgpath+'shade_bl.png"></td><td background="'+this.a_tpl.imgpath+'shade_bm.png" height="7" align="left"><img src="'+this.a_tpl.imgpath+'pixel.gif"></td><td><img src="'+this.a_tpl.imgpath+'shade_br.png"></td></tr><tbody></table>';if(this.e_iframe){this.e_iframe.style.left=n_left+'px';this.e_iframe.style.top=n_top+'px';this.e_iframe.style.width=(n_width+6)+'px';this.e_iframe.style.height=(n_height+6)+'px';}
return true;}
function f_getPosition(e_elemRef,s_coord){var n_pos=0,n_offset,e_elem=e_elemRef;while(e_elem){n_offset=e_elem["offset"+s_coord];n_pos+=n_offset;e_elem=e_elem.offsetParent;}
if(b_ieMac)
n_pos+=parseInt(document.body[s_coord.toLowerCase()+'Margin']);else if(b_safari)
n_pos-=n_offset;e_elem=e_elemRef;while(e_elem!=document.body){n_offset=e_elem["scroll"+s_coord];if(n_offset&&e_elem.style.overflow=='scroll')
n_pos-=n_offset;e_elem=e_elem.parentNode;}
return n_pos;}
function f_tcalRelDate(d_date,d_diff,s_units){var s_units=(s_units=='y'?'FullYear':'Month');var d_result=new Date(d_date);d_result['set'+s_units](d_date['get'+s_units]()+d_diff);if(d_result.getDate()!=d_date.getDate())
d_result.setDate(0);return' onclick="A_TCALS[\''+this.s_id+'\'].f_update('+d_result.valueOf()+')"';}
function f_tcalHideAll(){if(window.A_TCALSIDX)
for(var i=0;i<window.A_TCALSIDX.length;i++)
window.A_TCALSIDX[i].f_hide();}
f_getElement=document.all?function(s_id){return document.all[s_id]}:function(s_id){return document.getElementById(s_id)};if(document.addEventListener)
window.addEventListener('scroll',f_tcalHideAll,false);if(window.attachEvent)
window.attachEvent('onscroll',f_tcalHideAll);var s_userAgent=navigator.userAgent.toLowerCase(),re_webkit=/WebKit\/(\d+)/i;var b_mac=s_userAgent.indexOf('mac')!=-1,b_ie5=s_userAgent.indexOf('msie 5')!=-1,b_ie6=s_userAgent.indexOf('msie 6')!=-1&&s_userAgent.indexOf('opera')==-1;var b_ieFix=b_ie5||b_ie6,b_ieMac=b_mac&&b_ie5,b_safari=b_mac&&re_webkit.exec(s_userAgent)&&Number(RegExp.$1)<500;