﻿try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

var destPage; // !

function leavingPopup( page ) {
  destPage = page;
  win = window.open( '../misc/off-ramp.aspx', 'win','height=180,width=420');
  win.focus();
}
		window.onload = function()
		{
			changeTitles("h2",30,"0x333333",500,78);
}

function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') { 
        window.onload = func; 
    } else { 
        window.onload = function() { 
            oldonload(); func(); 
        } 
    } 
}

/*function doOffSiteLinks() {
   if( !document.getElementsByTagName ) { return false; }
   
   var siteLoc = document.getElementById("ctl00_requestedUrl").value.toLowerCase();
   var tmp = new Array();
       tmp = siteLoc.split('/');   
   var siteHost = document.getElementById("ctl00_unsecureUrl").value.toLowerCase();
   var siteHostSecure = document.getElementById("ctl00_secureUrl").value.toLowerCase();

   var links = document.getElementsByTagName("a");
   if(siteLoc.indexOf('redirect.aspx') < 0) {
       for( var i=0; i < links.length; i++ ) {
          var href = links[i].href.toLowerCase();
          if( (href.indexOf( siteHost ) < 0) && (href.indexOf( siteHostSecure ) < 0) && (href.indexOf( 'javascript:' ) < 0) ) {
             // alert( "OFFRAMP\n\n" + siteHost + "\n" + links[i].href );
             // link not part of jjdi.us need to open in an new window
             // EXCEPT lifescan and Animas which need to open in an new window but do not need the buffer
             if( href.indexOf( 'www.lifescan.com' ) > -1 ) {
                links[i].onclick = function() {
                    window.open(this.href,'popper');
                    return false;
                }
                links[i].title = "(opens in a new window)";
             } else if( href.indexOf( 'www.animascorp.com' ) > -1 ) {
                links[i].onclick = function() {
                    window.open(this.href,'popper');
                    return false;
                }
                links[i].title = "(opens in a new window)";
             } else {
                links[i].onclick = function() {
                    window.open('../misc/redirect.aspx?url=' + escape(this.href),'popper');
                    return false;
                }
                links[i].title = "(non-JJDI site or file)";
             }
          } else if( href.indexOf( '.pdf' ) != -1 ) {
             // alert( "PDF\n\n" + href );
             links[i].onclick = function() {
                 window.open(this.href,'popper');
                 return false;
             }
             links[i].title = "(PDF file opens in a new window)";
          }
          else
          {
            if (href.indexOf( 'contact' ) >= 0)
            {
                links[i].href = href.replace(siteHost, siteHostSecure);
            }
            else
            {
                links[i].href = href.replace(siteHostSecure, siteHost);
            }
          }
       }
   }
}
 

addLoadEvent( doOffSiteLinks );*/

