﻿        window.addEvent('load', function() {
            
		    Sexy = new SexyAlertBox();

           	//if($('Wrapper').getSize().y<550){$('MainContent').setStyle('padding-bottom', 550-$('Wrapper').getSize().y);}
            //$('LeftNav').setStyle('height', $('Wrapper').getSize().y-2);

		    
            if (navigator.userAgent.toLowerCase().indexOf('msie 6') != -1){
                $('Search').setStyle('left', '13px');
                $('Header').setStyle('left', '182px');
            }
            //var myMenu = new MenuMatic({ id:'ctl00_MainMenu', orientation:'vertical' });	
            
        });
        
        window.addEvent('domready', function() {
            trimMenuBorder();
        });
        
        function trimMenuBorder(){
            //var Items = $$('.TopMenu .AspNet-Menu li');
            //Items.getLast().setStyle('border', 'none');
            
            
            if ($chk($('ctl00_Menu2'))){
                var Items = $$('.SubMenu .AspNet-Menu li');
                Items.getLast().setStyle('border', 'none');
            }
        }
            
			function sexyalert(alertName) {
			    var header="<h1>Leaving TIB Trust website</h1><em></em><br/>";
			    var intro="<p>You are now leaving TIB Trust\'s Web site. You will be accessing the ";
			    var name="";
			    var namePossesive="";
			    var url="";
			    
				switch(alertName)
				{                       
					case "expnaples":
					    name="Explore Naples";
					    namePossesive="ExploreNaples\'s";
					    url="http://www.explorenaples.com";
                        Sexy.alert(header + intro + name + ' website.</p><p>All content found on ' + namePossesive + ' Website is controlled by ' + name + '.</p><p>We encourage you to read both the ' + name + ' User Agreement and Privacy Statement.</p><p>Thank you for visiting TIB Bank.</p><p><a href="' + url + '" target="_blank" onClick="$(\'BoxAlertBtnOk\').fireEvent(\'click\');" />Click Here to Proceed to Website</a></p>', {});
                        break;
					case "wealthmng":
					    name="TIB Bank";
					    namePossesive="TIB Bank\'s";
					    url="http://www.tibbank.com/wealthmanagement";
                        Sexy.alert(header + intro + name + ' website.</p><p>All content found on ' + namePossesive + ' Website is controlled by ' + name + '.</p><p>We encourage you to read both the ' + name + ' User Agreement and Privacy Statement.</p><p>Thank you for visiting TIB Bank.</p><p><a href="' + url + '" target="_blank" onClick="$(\'BoxAlertBtnOk\').fireEvent(\'click\');" />Click Here to Proceed to Website</a></p>', {});
                        break;                                                                                                                																						        
				}
			}
			
			function weblink(url, type){
			    var header="<h1>Leaving TIB Trust website</h1><em></em><br/>";
			    switch(type){
                    case "External":
                        Sexy.alert(header + '<p>You are now leaving TIB Trust\'s Web site.</p><p>TIB Bank does not provide, and is not responsible for, the product, service, or overall website content available at this site. TIB Bank’s privacy policies do not apply to linked websites.  You should refer to the privacy disclosures available on the site you are about to enter for further information.</p><p>Thank you for visiting TIB Bank.</p><p><a href="' + url + '" target="_blank" onClick="$(\'BoxAlertBtnOk\').fireEvent(\'click\');" />Click Here to Proceed to Website</p>', {});				        				        				                                			            
			        case "PDF":
			            Sexy.alert(header + '<p>The file which you are about to view may have links to external websites.</p><p>TIB Bank does not provide, and is not responsible for, the product, service, or overall website content available at this site. TIB Bank’s privacy policies do not apply to linked websites.  You should refer to the privacy disclosures available on the site you are about to enter for further information.</p><p>Thank you for visiting TIB Bank.</p><p><a href="' + url + '" target="_blank" onClick="$(\'BoxAlertBtnOk\').fireEvent(\'click\');" />Click Here to Proceed to Website</p>', {});
			    }
			}
			
			function showDisclaimer(url)
			{
			    window.open(url, "Disclaimer", 'width=640, height=480, location=no, menubar=no, status=no, toolbar=yes, scrollbars=yes, resizable=yes');
			}