function startUpload(){document.getElementById('upload_process').style.visibility='visible';return true;}
function stopUpload(message){document.getElementById('result').innerHTML=message;document.getElementById('upload_process').style.visibility='hidden';return true;}
function deleteEvent(currentEvent){loadUrl('/nena/modules/profile/ajax/calendar/deleteEvent.php?language='+getLanguage()+'&event='+encodeURIComponent(currentEvent),null,'deleted');}
function deleted(){window.location=afterDeletedUrl;}
var clickSave=false;function publishEvent(event){if(event==-1){if(!clickSave){document.forms['edit-event'].submit();clickSave=true;}
setTimeout('publishEvent(\''+currentEvent+'\');',250);return;}
loadUrl('/nena/modules/profile/ajax/calendar/publishEvent.php?language='+getLanguage()+'&event='+encodeURIComponent(event),'published','deleted');}
function searchGoogleMap(event){newWindow(null,null,-1,550,380);loadUrl('/nena/modules/profile/ajax/calendar/searchGoogleMap.php?language='+getLanguage()+'&event='+encodeURIComponent(event),'window-content',null);}
function newWindow(title,call,position_y,width,height){var window=new Window({className:'nena',width:width,height:height,title:title});window.setDestroyOnClose(true);if(position_y==-1){window.showCenter();}else{window.show();window.setLocation(position_y,(document.body.offsetWidth-width)/2);}
window.getContent().innerHTML='<div id="window-content"></div>';callFunction(call);}
function Countdown(t,element_id,mess,dw,object){this.time_left=t;this.output_element_id=element_id;this.no_time_left_message=mess;this.day_word=dw;this.objectVar=object;this.keep_counting=1;this.countdown=function(){if(this.time_left<2){this.keep_counting=0;}
this.time_left=this.time_left-1;}
this.add_leading_zero=function(n){if(n.toString().length<2){return'0'+n;}else{return n;}}
this.format_output=function(){var hours,minutes,seconds,days;seconds=this.time_left%60;minutes=Math.floor(this.time_left/60)%60;hours=Math.floor(this.time_left/3600)%24;days=Math.floor(this.time_left/86400);seconds=this.add_leading_zero(seconds);minutes=this.add_leading_zero(minutes);hours=this.add_leading_zero(hours);return days+' '+this.day_word+' '+hours+':'+minutes+':'+seconds;}
this.show_time_left=function(){document.getElementById(this.output_element_id).innerHTML=this.format_output();}
this.no_time_left=function(){document.getElementById(this.output_element_id).innerHTML=this.no_time_left_message;}
this.count=function(){this.countdown();this.show_time_left();}
this.timer=function(){this.count();if(this.keep_counting){setTimeout(this.objectVar+".timer();",1000);}else{this.no_time_left();}}
this.setTimeLeft=function(t){this.time_left=t;if(this.keep_counting==0){this.timer();}}
this.init=function(){this.timer();}}
function calendarExtendedBox(){document.getElementById('calendar-basic-view').style.display='none';document.getElementById('calendar-extended-view').style.display='block';}
function calendarBasicBox(){document.getElementById('calendar-extended-view').style.display='none';document.getElementById('calendar-basic-view').style.display='block';}
