function google_ads_adjust(){var b=rcmail.env.task,a=rcmail.env.action;a&&(a=rcmail.env.action.replace(".","_"));if(self.location!=parent.location&&!1==parent.roundcube_wrapper||1024>$(document).width())$("#google_ads_"+b+"_"+a+"_0").attr("style","display:none;"),$("#google_ads_"+b+"_"+a+"_1").attr("style","display:none;");else switch(b){case "login":case "logout":"plugin_nabble"==a?($("#google_ads_"+b+"_"+a+"_0").attr("style","display:none;"),$("#google_ads_"+b+"_"+a+"_1").attr("style","display:none;")):
($("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:85px;left:40px"),$("#google_ads_"+b+"_"+a+"_1").attr("style","position:absolute;top:85px;right:40px"),$("#logo").css("right","150px"));break;case "mail":"plugin_summary"==a?($("#summary").css("margin-left","-372px"),$("#summary").css("width","744px"),$("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:65px;left:10px"),$("#google_ads_"+b+"_"+a+"_1").attr("style","position:absolute;top:65px;right:10px")):"compose"==a?
($("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:55px;left:10px"),$("#google_ads_"+b+"_"+a+"_1").attr("style","position:absolute;top:55px;right:10px"),$("#mainscreen").css("right","140px"),1024<$(document).width()?($("#mainscreen").css("left","140px"),$("#messagetoolbar").css("left","315px")):$("#google_ads_"+b+"_"+a+"_0").attr("style","display:none;")):($("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:70px;left:10px"),$("#google_ads_"+b+"_"+a+"_1").attr("style",
"position:absolute;top:70px;right:10px"),1300<=$(document).width()?($("#mainscreen").css("left","140px"),$("#messagetoolbar").css("left","315px"),$("#accounts").css("left","140px"),$("#calendaroverlay").css("left","141px"),$("#upcoming-content").css("left","140px"),$("#quicksearchbar").css("right","140px"),$("#rss").css("left","175px")):($("#google_ads_"+b+"_"+a+"_0").attr("style","display:none;"),$("#quicksearchbar").css("right","140px")),$("#mainscreen").css("right","140px"),$("#showusername").css("left",
"140px"));break;case "addressbook":$("#directorylistbox").css("left","140px");$("#addressscreen").css("left","320px");$("#addressscreen").css("right","140px");$("#quicksearchbar").css("right","140px");$("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:105px;left:10px");$("#google_ads_"+b+"_"+a+"_1").attr("style","position:absolute;top:105px;right:10px");break;case "settings":$("#mainscreen").css("left","140px");$("#mainscreen").css("right","140px");$("#google_ads_"+b+"_"+a+"_0").attr("style",
"position:absolute;top:110px;left:10px");$("#google_ads_"+b+"_"+a+"_1").attr("style","position:absolute;top:110px;right:10px");break;case "dummy":"plugin_sticky_notes"==a?($("#notes").css("margin-left","140px"),$("#notes").css("margin-right","140px"),sticky_notes.resizetimer&&window.clearTimeout(sticky_notes.resizetimer),sticky_notes.resizetimer=window.setTimeout("sticky_notes.startup();",100),$("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:65px;left:10px"),$("#google_ads_"+b+"_"+
a+"_1").attr("style","position:absolute;top:65px;right:10px")):"plugin_calendar"==a||"plugin_calendar_tests"==a?"plugin.calendar_tests"!=a&&($("#todaybutton").css("left","140px"),$("#calsearchset").css("right","165px"),$("#mainscreen").css("right","140px"),$("#mainscreen").css("left","140px"),$("#calendaroverlay").css("left","140px"),$("#calendaroverlay").css("right","140px"),$("#messagetoolbar").css("left","380px"),$("#calquicksearchbar").css("right","145px"),$("#calsearchdialog").dialog({autoOpen:!1,
modal:!1,resizable:!1,width:285,height:250,position:[$("#calquicksearchbar").position().left-17,$("#calquicksearchbar").position().top+27]}),$("#calendar-header").css("right","146px"),$("#calendar-header").css("left","362px"),$("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:110px;left:10px"),$("#google_ads_"+b+"_"+a+"_1").attr("style","position:absolute;top:110px;right:10px")):"plugin_nabble"==a?($("#google_ads_"+b+"_"+a+"_0").attr("style","display:none;"),$("#google_ads_"+b+"_"+
a+"_1").attr("style","display:none;")):($("#google_ads_"+b+"_"+a+"_0").attr("style","position:absolute;top:65px;left:10px"),$("#google_ads_"+b+"_"+a+"_1").attr("style","position:absolute;top:65px;right:10px"),$("#google_ads_login_"+a+"_0").attr("style","position:absolute;top:85px;left:10px"),$("#google_ads_login_"+a+"_1").attr("style","position:absolute;top:85px;right:10px"));break;default:$("#google_ads_"+b+"_"+a+"_0").attr("style","display:none;"),$("#google_ads_"+b+"_"+a+"_1").attr("style","display:none;")}}
$(document).ready(function(){window.rcmail?rcmail.addEventListener("init",function(){google_ads_adjust()}):($("#google_ads_"+task+"_"+action+"_0").attr("style","display:none;"),$("#google_ads_"+task+"_"+action+"_1").attr("style","display:none;"))});