
if(location.protocol.toLowerCase() =='http:' && 
       ( location.href.toLowerCase().indexOf('naftnetmembers') > -1 || 
         location.href.toLowerCase().indexOf('registration') > -1  ))  
             location.href = location.href.replace('http:','https:');

   if(location.protocol.toLowerCase() =='https:' && 
         location.href.toLowerCase().indexOf('naftnetmembers') == -1 && 
         location.href.toLowerCase().indexOf('registration') == -1)
             location.href = location.href.replace('https:','http:');