/*
 Webmail 4
 Vincent Fiduccia, David Koopman, Anoakie Turner, Amy Tencza
 Copyright (c) 2003-2007 Starfield Technologies

 Generated: 2009-11-21 05:57:03
 On: 
*/

function Popup()
{}
Popup.composeWindows=[];Popup.composeWindow=function(url)
{Session.setTimeout();try{if(screen.width<=800)
var win=window.open(url,'_blank','resizable=yes,width=720,height=500,toolbar=no,scrollbars=yes');else
{if(url.indexOf('view_print_multi.php')>-1&&!Env.is_gecko)
{var winSizeArray=new Array();winSizeArray['width']=810;winSizeArray['height']=600;}
else
var winSizeArray=Zoom.newWindowSize(810,600);Debug.write(' winSizeArray[width]='+winSizeArray['width']);if(winSizeArray['width']<700)
winSizeArray['width']=720;var win=window.open(url,'_blank','resizable=yes,width='+winSizeArray['width']+',height='+winSizeArray['height']+',toolbar=no,scrollbars=yes');}
if(!win)
PopupTest("Compose");}catch(e){PopupTest("Compose");}
setTimeout(function(){try{if(win.location.href.indexOf('maintenance.php')>-1&&Globals&&Globals.WEBMAIL_OR_SEARCH){win.close();document.location.href="maintenance.php";}}
catch(e){}},500);Popup.composeWindows[Popup.composeWindows.length]=win;}
Popup.composeWindowCount=function()
{var qty=0;for(i=0;i<Popup.composeWindows.length;i++)
{if(Popup.composeWindows[i]&&Popup.composeWindows[i].open&&!Popup.composeWindows[i].closed)
{qty++;}}
return qty;}
Popup.calendar_window=false;Popup.calendar=function(url)
{try{if(Popup.calendar_window&&Popup.calendar_window.open&&!Popup.calendar_window.closed)
{if(url!=null&&url.length>0)
Popup.calendar_window.location.href=url;}
else
{if(url==null||url.length<1)
url='calendar.php';if(screen.width<=800)
Popup.calendar_window=window.open(url,'stCalendar','resizable=yes,width=670,height=500,toolbar=no,scrollbars=yes');else
Popup.calendar_window=window.open(url,'stCalendar','resizable=yes,width=670,height=600,toolbar=no,scrollbars=yes');}
Popup.calendar_window.focus();if(!Popup.calendar_window)
PopupTest("Calendar");}catch(e){PopupTest("Calendar");}}
Popup.gcalendar=function()
{try{var win=window.open('gcalTransfer.php',"__gCalWindow");win.focus();if(!win)
PopupTest("Online Group Calendar");}catch(e){PopupTest("Online Group Calendar");}}
Popup.online_file_folder=function()
{try{var win=window.open('/vsdbTransfer.php','_offWindow');win.focus();if(!win)
PopupTest("Online File Folder");}catch(e){PopupTest("Online File Folder");}}
Popup.fax_thru_email=function(url)
{if(url==null)
url='/fteTransfer.php';try{var win=window.open(url,'_fteWindow');win.focus();if(!win)
PopupTest("Fax Thru Email");}catch(e){PopupTest("Fax Thru Email");}}
Popup.newmail=function(folder,count)
{try{var winSizeArray=new Array();winSizeArray['width']=250;winSizeArray['height']=50;if(Env.is_gecko&&Zoom.canZoom()&&Globals.ZOOM_LEVEL>1)
{winSizeArray['width']=winSizeArray['width']*Globals.ZOOM_LEVEL;winSizeArray['height']=(winSizeArray['height']+50)*Globals.ZOOM_LEVEL;}
else if(Env.is_gecko)
winSizeArray['height']+50;var win=window.open('newmail2.php?wav='+Globals.NEWMAIL_WAV,'__wbe_newmail','resizable=no,width='+winSizeArray['width']+',height='+winSizeArray['height']+',toolbar=no,scrollbars=no');win.focus();if(!win)
PopupTest("New Mail Notification");}catch(e){PopupTest("New Mail Notification");}}
Popup.vsdbAttachPopup=function(url)
{try{vdmpop=window.open(url,'vsdb_attach_popup','height=315,resizable=yes,width=550,scrollbars=yes');vdmpop.focus();if(!vdmpop)
PopupTest("Online File Folder Attachment");}catch(e){PopupTest("Online File File Attachment");}
return false;}
Popup.vsdbAttachPopup2=function()
{var outString='';var form=document.frm_sendoff;for(var i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"){if(form.elements[i].checked==true){outString+=encodeURIComponent(form.elements[i].name);outString=outString.replace(/%5B/g,'[');outString=outString.replace(/%5D/g,']');outString=outString.replace(/%3D/g,'=');outString=outString.replace(/%26/g,'&');outString+='&';}}}
if(outString.length==0)
{GDError.quickError('Please select the attachments you want to add to your Online File Folder.');return;}
Popup.vsdbAttachPopup('/vsdbSendAttachments.php?'+outString);return;}
Popup.image=function(folder,uid,part,tnef_part,emlpart)
{try{var win=window.open('popupimage.php?rand='+Utils.randomHexString()+'&folder='+Form.escape(folder)+'&uid='+uid+'&part='+part+'&tnef_part='+tnef_part+'&aEmlPart='+emlpart+'&inline=1','_blank','resizable=yes,toolbar=no,scrollbars=yes');if(!win)
PopupTest("Inline Image");}catch(e){PopupTest("Inline Image");}}
Popup.quickview=function(folder,uid,part,tnef_part,emlpart)
{try{var win=window.open('vdownload.php?rand='+Utils.randomHexString()+'&folder='+Form.escape(folder)+'&uid='+uid+'&part='+part+'&tnef_part='+tnef_part+'&aEmlPart='+emlpart+'&inline=1','_blank');if(!win)
PopupTest("Quick Email Part View");}catch(e){PopupTest("Quick Email Part View");}}
Popup.abookQuickAdd=function(address_id,focus_sms)
{try{var win=window.open('addressBookQuickAdd.php?'+(focus_sms?'sms=1&':'')+'address_id='+address_id,'_blank','resizable=yes,width=580,height=550,toolbar=no,scrollbars=yes');if(!win)
PopupTest(focus_sms?"SMS Edit":"Address Book Add");}catch(e){PopupTest(focus_sms?"SMS Edit":"Address Book Add");}}
Popup.tzChange=function()
{try{var winSizeArray=Zoom.newWindowSize(450,125);var win=window.open('tzChangePopUp.php?session_user='+escape(Compose.session_user),'__wbeTzChange','resizable=yes,width='+winSizeArray['width']+',height='+winSizeArray['height']+',toolbar=no,scrollbars=yes');win.focus();if(!win)
PopupTest("Timezone Changer");}catch(e){PopupTest("Timezone Changer");}}
Popup.remote_window=null;Popup.remoteMail=function(num)
{if(Popup.remote_window&&Popup.remote_window.open&&!Popup.remote_window.closed)
Popup.remote_window.focus();else{try{var winSizeArray=Zoom.newWindowSize(550,300);Popup.remote_window=window.open('optionsRemoteMailPopUp.php?focus=1&collect=1&identity_num='+num,'_blank','resizable=yes,width='+winSizeArray['width']+',height='+winSizeArray['height']+',toolbar=no,scrollbars=yes');Popup.remote_window.focus();if(!Popup.remote_window)
PopupTest("Remote Mail");}catch(e){PopupTest("Remote Mail");}}}
Popup.remote_window_left=null;Popup.remoteMailAll=function()
{if(Popup.remote_window_left&&Popup.remote_window_left.open&&!Popup.remote_window_left.closed)
Popup.remote_window_left.focus();else{try{var winSizeArray=Zoom.newWindowSize(550,300);Popup.remote_window_left=window.open('optionsRemoteMailPopUp.php?focus=1&collect=1&fetchall=1','_blank','resizable=yes,width='+winSizeArray['width']+',height='+winSizeArray['height']+',toolbar=no,scrollbars=yes');Popup.remote_window_left.focus();if(!Popup.remote_window_left)
PopupTest("Remote Mail");}catch(e){PopupTest("Remote Mail");}}
return false;}
Popup.article=function(params)
{try{var base=Globals.BASE_SALES_URL;base=base.replace(/www/gi,'help');base=base.replace(/https/gi,'http');var url=base+'/article.php?isc=appemail40';if(params)
url+='&'+params;if(Globals.PLID!=1&&Globals.PLID!=2)
url+='&pl_id='+Globals.PLID;var win=window.open(url,'help');win.focus();if(!win)
PopupTest("Help");}catch(e){PopupTest("Help");}}
Popup.help=function(article_id,topic_id,help_type)
{if(!article_id)article_id="";if(!topic_id)topic_id="";if(!help_type)help_type="";var help_url="help.php?a="+article_id+"&t="+topic_id+"&h="+help_type;try
{var win=window.open(help_url,'_blank','resizable=yes,menubar=yes,status=yes,address=yes,scrollbars=yes,status=yes,toolbar=yes,width=1000,height=800');win.focus();if(!win)
{PopupTest("Help");}}
catch(e)
{PopupTest("Help");}}
Popup.addressBook_window=null
Popup.addressBook=function(toccbcc)
{if(Popup.addressBook_window&&Popup.addressBook_window.open&&!Popup.addressBook_window.closed)
{Popup.addressBook_window.focus();Popup.addressBook_window.Addressbook_compose.toccbcc=toccbcc;}
else
{try{var winSizeArray=Zoom.newWindowSize(600,500);Popup.addressBook_window=window.open('addressBookPopUp.php?newbook=1&toccbcc='+toccbcc+'&session_user='+escape(Compose.session_user),'__wbeAddrBook','resizable=yes,width='+winSizeArray['width']+',height='+winSizeArray['height']+',toolbar=no,scrollbars=yes');Popup.addressBook_window.focus();if(!Popup.addressBook_window)
PopupTest("Address");}catch(e){PopupTest("Address");}}}
Popup.buyMoreSpace=function()
{try{var url=Globals.BASE_SALES_URL+'/gdshop/sh_email_account.asp?isc=appemail40';if(Globals.PLID!=1&&Globals.PLID!=2)
url+='&pl_id='+Globals.PLID;var win=window.open(url,'st_morespace');win.focus();if(!win)
PopupTest("Upgrade");}catch(e){PopupTest("Upgrade");}}
Popup.whatsnew=function()
{try{var win=window.open('whatsnew.php','wbe4_whatsnew','resizable=yes, statusbar=no, address=no, width=600, height=500, scrollbars=yes');win.focus();if(!win)
PopupTest("What's New");}catch(e){PopupTest("What's New");}}
Popup.whatsnewflash=function()
{try{var win=window.open('/help/wn_wbe/index.htm','wbe4_whatsnewflash','resizable=yes, statusbar=no, address=no, width=821, height=623, scrollbars=no');win.focus();if(!win)
PopupTest("What's New");}catch(e){PopupTest("What's New");}}
function PopupGeneric(url,wname,wopts,replace,focus,wdesc,width,height)
{if(Zoom.canZoom()&&width!=null&&height!=null)
{var newSize=Zoom.newWindowSize(width,height);if(wopts!='')
wopts+=',';wopts+='width='+newSize['width']+',height='+newSize['height']+',scrollbars=auto';}
try{if(wname)wname=wname.replace(/[^a-zA-Z0-9_]*/g,'_');if(wopts===null)wopts='';if(replace===null)replace=false;var win=window.open(url,wname,wopts,replace);try{if(focus)
win.focus();}catch(e){}
if(!win&&!Globals.LIGHT){PopupTest(wdesc);}else return win;}catch(e){PopupTest(wdesc);}}
function popUpHelp(article_id,topic_id,help_type)
{Popup.help(article_id,topic_id,help_type);}
Popup.findPosY=function(obj)
{var curtop=0;if(obj.offsetParent)
while(1)
{curtop+=obj.offsetTop;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.y)
curtop+=obj.y;return curtop;}
Popup.findPosX=function(obj)
{var curleft=0;if(obj.offsetParent)
while(1)
{curleft+=obj.offsetLeft;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.x)
curleft+=obj.x;return curleft;}
Popup.textOnWhatsNewFeature=function(e,key,text)
{if(Homepage)
{Homepage.closeAllSelects();}
var theme=Globals.THEME_LIGHT;if(Globals.THEME=="retro"||Globals.THEME=="steel")
theme=Globals.THEME_DARK;var row=document.getElementById(key);row.style.backgroundColor=theme;document.getElementById("wnHoverContent").innerHTML=text;var hover=document.getElementById("wnHoverWrapper");hover.style.display="block";var y=this.findPosY(row);var x=this.findPosX(row)-hover.offsetWidth-3;hover.style.top=y+"px";hover.style.left=x+"px";}
Popup.textOffWhatsNewFeature=function(key)
{document.getElementById(key).style.backgroundColor="white";document.getElementById("wnHoverWrapper").style.display="none";}
Popup.toggleWhatsNewFeature=function(event,fromGDEvent)
{if(Layer.fadeTimer||(Env.is_ie?document.readyState!='complete':0))
return;var target=GDEvent.target(event);var wn=Layer.get('whatsNew');if(wn.style.display!='none')do
{if(target.id=='whatsNew')break;if(target.id=='featurette_blurb'&&fromGDEvent)return;}
while(target=target.offsetParent);if(event&&wn.style.display=='none')
{Layer.fadeIn('whatsNew',.1,100);wn.style.display='block';Layer.hideElement(wn);GDEvent.add('mouseup','Utils.clickySound(); Popup.toggleWhatsNewFeature(f1, 1);');}
else if(event.offsetX>=215&&event.offsetX<=260&&event.offsetY>=25&&event.offsetY<=40)
{Layer.showElement();wn.style.display='none';GDEvent.remove('mouseup','Utils.clickySound(); Popup.toggleWhatsNewFeature(f1, 1);');}}

if ( typeof(loaded) == 'undefined' ) var loaded = {};
loaded['/js.js?file=Popup&r=5.1.24&gzip=0'] = 1;
