/** JSpacked on 26.01.12 10:59 */ function show_ajax_background(id){$(id).addClassName('ajax_background');}
function hide_ajax_background(id){$(id).removeClassName('ajax_background');}
function show_help(id){new Effect.Appear(id);}
function hide_help(id){new Effect.Fade(id);}
function findPosX(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(obj.x){curleft+=obj.x;}
return curleft;}
function findPosY(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;}
return curtop;}
function displayModalBox(attach_to,offset_x,offset_y){var modal=$('modal_box');var modal_content=$('modal_content');var modal_back=$('modal_back');var width=document.body.offsetWidth||window.innerWidth||document.documentElement.clientWidth||0;var height=document.body.offsetHeight||window.innerHeight||document.documentElement.clientHeight||0;var scrollOffset=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;modal_back.style.height=height+'px';if(attach_to!=0){modal.style.left=(findPosX($(attach_to))+offset_x)+"px";modal.style.top=(findPosY($(attach_to))+offset_y)+"px";}else{modal.style.left=(width/2-modal.getWidth()/2)+'px';modal.style.top=(scrollOffset+screen.availHeight/5)+'px';}
new Effect.Appear(modal,{duration:0.5});new Effect.Appear(modal_back,{duration:0.7,from:0.0,to:0.5});}
function showModalBox(element_id,attach_to,offset_x,offset_y){var item=$(element_id);var modal_content=$('modal_content');modal_content.innerHTML=item.innerHTML;displayModalBox(attach_to,offset_x,offset_y);}
function showModalPopup(element_id){showModalBox(element_id,0,0,0);}
function showModalPopupRemote(url){var modal=$('popup_box');modal.innerHTML='';this.displayPopup(0,0,0,true,width);new Ajax.Updater('popup_box',remote_url,{asynchronous:true,evalScripts:true,onLoading:function(){showPopupLoader('modal_box_inner')},onComplete:function(){hidePopupLoader('modal_box_inner')}});}
function hideModalPopup(){var modal=$('modal_box');var modal_back=$('modal_back');new Effect.Fade(modal,{duration:0.5});new Effect.Fade(modal_back,{duration:0.7,from:0.5,to:0.0});}
function redirectTo(where){document.location.href=where;}
function showThrobber(element_id){$(element_id).innerHTML="<div class='throbber'></div>";}
