
   // Make AJAX connection to a PHP script and pass
      // demographic - ('home','business','generic')
      // product_group - ('internet access','network services','security','voice','generic')
      // sub_product_group - ('adsl','dial','sdsl','load balenced','leased line','ethernet','boundary networking','e-mail solutions','domains','highlight','hosting','centralised firewall','remote backup','deskdefender','mcafee security','e-mail scan','officetalk','hometalk','generic')
   // Other available fields are 'quote' and 'quote_by'
   
   function getQuote (callbackFunction, demographic, product_group, sub_product_group, max_length, page ) {
      
      // Build query strings
      var sQueryString = '';
      
      if (demographic != '' && demographic) {
         sQueryString = sQueryString + 'demographic=' + escape(demographic);
      }
      
      if (product_group != '' && product_group) {
         sQueryString = sQueryString + '&product_group=' + escape(product_group);
      }
      
      if (sub_product_group != '' && sub_product_group) {
         sQueryString = sQueryString + '&sub_product_group=' + escape(sub_product_group);
      }
      
      var aPs = document.getElementsByTagName('blockquote');
      var sQuoteID = '';
      
      for ( var i=0; i < aPs.length; i++) {
         
         paragraph = aPs[i];
         
         if (paragraph.getAttribute("id")) {
            
            if (paragraph.getAttribute("id").indexOf('QuoteID_') > 0) {
               sQueryString = sQueryString + '&notID=' + escape(paragraph.getAttribute("id").replace('sQuoteID_',''));
            }
         }
      }

      
      if (max_length != '' && max_length) {
         sQueryString = sQueryString + '&max_length=' + escape(max_length);
      }
      
      if (page != '' && page) {
         sQueryString = sQueryString + '&page=' + escape(page);
      }

      
      // ajax callback object
      oCallback = {
         success : window[callbackFunction],
         failure : null,
         argument : null
      };
      
      // Run ajax request
      var oConnect = YAHOO.util.Connect.asyncRequest('GET', '/includes/quotes.php?' + sQueryString, oCallback);
      
   }
   
   
   function buildHomeuserQuote(oConnect) {
      
      // Build the quote
      var sResult = oConnect.responseText;
      
      // Get div and insert random quote
      var eQdiv = document.getElementById('huQuotes');
      eQdiv.innerHTML = sResult;
      
      // Do some nice fading in/out
      var anim = new YAHOO.util.Anim(eQdiv, {opacity: {from: 0, to: 1}}, 3);
      anim.animate();
   }

   
   
   function buildBusinessuserQuote(oConnect) {
      
      // Build the quote
      var sResult = oConnect.responseText;
      
      // Get div and insert random quote
      var eQdiv = document.getElementById('buQuotes');
      eQdiv.innerHTML = sResult;
      
      // Do some nice fading in/out
      var anim = new YAHOO.util.Anim(eQdiv, {opacity: {from: 0, to: 1}}, 3);
      anim.animate();
   }

   
   
   function buildHomepageQuote(oConnect) {
      
      // Build the quote
      var sResult = oConnect.responseText;
      
      // Get div and insert random quote
      var eQdiv = document.getElementById('main-offers-quotes');
      eQdiv.innerHTML = sResult;
      
      // Do some nice fading in/out
      var anim = new YAHOO.util.Anim(eQdiv, {opacity: {from: 0, to: 1}}, 3);
      anim.animate();
   }
   
   
   
   
   
   
   
 
function swapHomeInfo(infoID) {
   
   var content = '';
   var homeInfo = document.getElementById('homeInfo');
   homeInfo.className = '';
   
   // Grab the right content
   switch (infoID) {
      
      
      // Internet Access
      
      case 'infoInet' : content = "<h2>Internet Access</h2><p>Reliable, award-winning Internet access makes a valuable addition to your performance levels, whether you're running a business from home or simply surfing for leisure.</p>";
         break;
      
      case 'adsl' : content = "<h2>Internet Access - ADSL Broadband</h2><p>Great offers on Broadband for home users that include FREE Voice calls. Over 60,000 UK customers are already enjoying secure, high performance Broadband with Nildram - as well as FREE setup on selected services.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><p>upto 8Mb Broadband from &pound;13.99</p><a class=\"choose\" href=\"http://broadband.nildram.net\">Choose</a></div>";
         break;
         
      case 'dial' : content = "<h2>Internet Access - Dial<\/h2><p>You don't need Broadband to benefit from Internet access. With Nildram Dial you simply dial in to a high quality and reliable Internet connection when you need it. Nildram Dial is cost effective and comes with 24-hour support as standard.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/dialup/\">Choose</a></div>";
         break;
         
         
         
         // Security
         
      case 'infoSecurity' : content = "<h2>Security</h2><p>Nildram's focus on security and compliance gives you the peace of mind to shop online, surf the net and send or receive e-mails without the fear of spam or computer viruses affecting the performance of your PC or laptop.</p>";
         break;
         
      case 'security-suites' : content = "<h2>Security - Security Suites</h2><p>Nildram offers a wide choice of cost-effective Security Suites from some of the industry's best known Internet security companies. They give you differing levels of security and functionality so that you can select the product best suited to your needs.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/security/\">Choose</a></div>";
         break;
         
      case 'email-scan' : content = "<h2>Security - E-mail Scan</h2><p>We've got the perfect solution if you're running your own e-mail server. E-mail Scan gives you a wide range of security options including anti-virus protection, virus scanning of outbound mail, anti-spam protection, blacklist and whitelist capability, as well as notification control and much more.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/email/scan.php\">Choose</a></div>";
         break;
         
      case 'firewall' : content = "<h2>Security - Centralised Firewall</h2><p>Add extra security to your standard Nildram Broadband services whenever you want with our Centralised Firewall. This puts your Internet connection securely behind a Cisco PIX firewall within our own network, giving you security and peace of mind.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/centralised_firewall/\">Choose</a></div>";
         break;
         
      case 'backup' : content = "<h2>Security - Remote Back Up</h2><p>Safeguarding important documents and data has never been easier. With offsite back up solutions there are no tapes to buy and you can protect critical information simply and cost effectively.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/online-backup/\">Choose</a></div>";
         break;
         
      case 'store' : content = "<h2>Security - Share &amp; Store</h2><p>Nildram Share & Store is a brand new FREE service from Nildram.</p><p>It's a FREE service that offers you unlimited storage space online to store photos, music & video. You can access your files from anywhere in the world and can even access them on your mobile phone!</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/online-storage/\">Choose</a></div>";
         break;
         
         
         
         // IP Networks
         
      case 'infoIP' : content = "<h2>Network Services</h2><p>Our award-winning secure Network Services are designed to give you optimum levels of performance as well as in-built security and mobility.</p>";
         break;
         
      case 'hosting' : content = "<h2>Network Services - Hosting</h2><p>Make your presence known by giving visitors fast, uncomplicated access to your own website. Nildram's high performance Internet capability makes us the ideal host for your website, whether you're using it to run a home business or as a family tool.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/hosting/\">Choose</a></div>";
         break;
         
      case 'domains' : content = "<h2>Network Services - Domain Names<\/h2><p>Make your mark on the web. Register your own unique name and stand out from the crowd. Nildram have been removing the headache of registering, setting up and maintaining customers' domain names on the Internet for over 10 years.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/domains/\">Choose</a></div>";
         break;
         
      case 'email-solutions' : content = "<h2>Network Services - E-mail Solutions</h2><p>In today's world, with the amount of viruses and spam in circulation we all need a secure e-mail platform. Nildram's E-mail Solutions remove the worry with anti-virus and anti-spam filters as standard.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/email/\">Choose</a></div>";
         break;
         
      case 'highlight' : content = "<h2>Network Services - Network Management (Highlight)</h2><p>If you want to keep up-to-speed with your network performance, there's no better tool than Highlight for Home Users. You can give your ADSL connection a healthcheck by monitoring daily use and checking modem availability, quickly and easily.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/network_management/\">Choose</a></div>";
         break;
         
      case 'fax' : content = "<h2>Network Services - Fax Services</h2><p>Our FaxtoMail service provides a unique non-geographic 0870 fax number and links it to the subscriber's electronic mailbox. When a fax is sent to that number, the service automatically converts the message to an image.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/fax_services/\">Choose</a></div>";
         break;
         
         
         
         // Voice from Nildram
         
      case 'infoVoice' : content = "<h2>Voice</h2><p>If you're already using Nildram Broadband you can save up to &pound;60 a year on our Voice packages. You won't have to worry about switching from BT because we'll do that for you without any interruption to your service.</p>";
         break;
                  
      case 'ht500' : content = "<h2>Voice - HomeTalk500</h2><p>500 minutes of FREE talk time in the UK every month with Nildram Broadband.  That's over 8 hours, so we're sure you'll find it easy to save money.</p><ul><li>FREE with Nildram Broadband</li><li>500 minutes of FREE national and local rate calls</li><li>Competitive international rates</li></ul><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://hometalk.nildram.net/\">Choose</a></div>";
         break;
         
      case 'ht3000' : content = "<h2>Voice - HomeTalk3000</h2><p>Once again you gain a reliable Voice service, but this time it's with up to 50 hours of calls. If you run a business from home or have a talkative teenager, this is a great deal.</p><ul><li>&pound;4.99 per month with Nildram Broadband (or &pound;9.99 without Nildram Broadband)<li>3000 minutes of FREE national and local rate calls <li>Competitive international rates</li></ul><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://hometalk.nildram.net/\">Choose</a></div>";
         break;
              
   }
   
   if (infoID == 'infoInet' || infoID == 'infoSecurity' || infoID == 'infoIP' || infoID == 'infoVoice') {
      colorHex = '#efaa22';
   } else {
      colorHex = '#afc8e4';
   }
   
   
   // Insert the content and animate the box to show a change.
   var attributes = {
      backgroundColor: { from: colorHex, to: '#ffffff' }
   };
   
   homeInfo.innerHTML = content;
   
   var anim = new YAHOO.util.ColorAnim('homeInfo', attributes);
   anim.animate();
}




function swapBusinessInfo(infoID) {
   
   var content = '';
   var bizInfo = document.getElementById('businessInfo');
   bizInfo.className = '';
   
   
   // Grab the right content
   switch (infoID) {
      
      
      // Internet Access
      
      case 'infoInet' : content = "<h2>Internet Access</h2><p>Reliable and secure Internet access has never been more important as businesses seek both to enhance the performance and security of their communications and to improve mobility. Nildram's flexible, cost effective services are the ideal solution - whatever the size or nature of your business!</p>";
         break;
      
      case 'adsl' : content = "<h2>Internet Access - ADSL Broadband</h2><p>Nildram's Broadband services offer the flexibility and reliability to ensure the maximum performance from your Internet access. It's FREE, quick and simple to move from your current provider and benefit from a range of business friendly features including e-mail anti-virus and anti-spam.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><p>upto 8Mb Business Broadband from &pound;32.00</p><a class=\"choose\" href=\"http://broadband.nildram.net/products/business-broadband/\">Choose</a></div>";
         break;
         
      case 'sdsl' : content = "<h2>Internet Access - SDSL Broadband</h2><p>Nildram's SDSL services give you equal upload and download speeds, perfect if you regularly upload large files, run an office or even an e-mail server. SDSL is available in both wires only and fully managed versions enhancing the performance of all types of business.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://sdsl.nildram.net/\">Choose</a></div>";
         break;

      case 'load-balanced' : content = "<h2>Internet Access - Load Balanced</h2><p>Nildram's Load Balanced Service optimises business performance by enabling you to combine and share two or more Broadband lines as a single connection.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/load_balanced/\">Choose</a></div>";
         break;
         
      case 'leased-line' : content = "<h2>Internet Access - Leased Line</h2><p>Fast, reliable, private Internet connectivity dedicated solely to your organisation</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/dedicated_access/\">Choose</a></div>";
         break;
         
      case 'ethernet' : content = "<h2>Internet Access - Ethernet</h2><p>Ethernet connectivity is provided by Nildram's partner - Pipex Business Services. Reliable and robust dedicated access for all your mission-critical data applications.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/business-users/ethernet/\">Choose</a></div>";
         break;
         
      case 'dial' : content = "<h2>Internet Access - Dial</h2><p>Not all businesses want or have access to Broadband, which is why Nildram offers an alternative high quality dial-up Internet connection. Nildram Dial is cost effective and comes with 24-hour support as standard.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/dialup/\">Choose</a></div>";
         break;

         
         
         
         // Security
         
      case 'infoSecurity' : content = "<h2>Security</h2><p>Downtime costs money. Nildram's focus on security and compliance ensures round-the-clock, secure connectivity keeping you in business day-in, day-out.</p>";
         break;
         
      case 'firewall' : content = "<h2>Security - Centralised Firewall</h2><p>Safeguard confidential customer information and business-critical assets with an extra layer of security by adding our Centralised Firewall to your standard Nildram Broadband. We'll put your Internet connection securely behind a Cisco PIX firewall within our own network.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/centralised_firewall/\">Choose</a></div>";
         break;
         
      case 'backup' : content = "<h2>Security - Remote Back up</h2><p>Remote back up should be an essential part of any business security strategy. Opt for off-site back up solutions accessed via Broadband. There are no tapes to buy - critical information is protected simply and cost effectively.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/online-backup/\">Choose</a></div>";
         break;
         
      case 'suites' : content = "<h2>Security - Security Suites</h2><p>Choose from a wide range of cost-effective Security Suites from some of the industry's best known Internet security companies. Simply opt for the suite that meets your business needs and budget, ensuring peace of mind and security.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/security/\">Choose</a></div>";
         break;
         
      case 'email-scan' : content = "<h2>Security - E-mail Scan</h2><p>Running your own e-mail server? Benefit from a wide range of security options with Nildram's E-mail Scan service - anti-virus protection, virus scanning of outbound mail, anti-spam protection, blacklist and whitelist capability, as well as notification control.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/email/scan.php\">Choose</a></div>";
         break;
         
         
         
         // IP Networks
         
      case 'infoIP' : content = "<h2>Network Services</h2><p>Improve your business performance with robust and reliable Network Services from Nildram. Built-in security and mobility tools keep you connected with internal systems, customers, colleagues and suppliers around-the-clock.</p>";
      break;
      
      case 'boundary-net' : content = "<h2>Network Services - Boundary Networking</h2><p>Security and compliance has become an increasingly important strategic business issue. Nildram's partner - Pipex Business Services - has launched an innovative new solution, Boundary Networking, that extends your security perimeter right to the edge of your network to include tele-workers and remote users.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/business-users/boundary-networks/\">Choose</a></div>";
         break;
      
      case 'email' : content = "<h2>Network Services - E-mail Solutions</h2><p>A Secure business e-mail platform that solves compliance and mobility issues is essential. Nildram's E-mail Solutions go much further, incorporating security, virus scanning and additional mailboxes providing the functionality you need, when you need it.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/email/\">Choose</a></div>";
         break;
      
      case 'domains' : content = "<h2>Network Services - Domain Names</h2><p>The right domain name can add considerable value to your online communications strategy. Nildram has been registering, setting up and maintaining customers' domain names on the Internet for over 10 years.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/domains/\">Choose</a></div>";
         break;
      
      case 'highlight' : content = "<h2>Network Services - Network Management (Highlight)</h2><p>Understand your network's performance and make informed decisions on planning, budgets and potential problems now and in the future with Highlight for business.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://broadband.nildram.net/network_management/\">Choose</a></div>";
         break;
      
      case 'hosting' : content = "<h2>Network Services - Hosting</h2><p>Nildram has been improving the business performance of its customers for many years by providing secure, reliable, high-performance hosting. Choose from either Web Hosting or Enterprise Hosting and get the Web working for you!</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/hosting/\">Choose</a></div>";
         break;
      
      case 'alert' : content = "<h2>Network Services - Pipex Alert!</h2><p>Powered by our partner E-Secure-IT, <strong>Pipex Alert!</strong> aims to keep you informed of potential threats and risks to your organisation, forewarning you when any part of your IT infrastructure is potentially at risk, helping you to plan and allocate resources more effectively.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://www.nildram.net/business-users/pipex-alert/\">Choose</a></div>";
         break;
         
      case 'fax' : content = "<h2>Network Services - Fax Services</h2><p>Our FaxtoMail service provides a unique non-geographic 0870 fax number and links it to the subscriber's electronic mailbox. When a fax is sent to that number, the service automatically converts the message to an image.</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"/fax_services/\">Choose</a></div>";
         break;
         
         
         
         // Voice from Nildram
         
      case 'infoVoice' : content = "<h2>Voice</h2><p>Nildram's Voice packages for business provide incredible value for money as well as reliable, flexible Voice communications. It's easy to switch from BT - Nildram do all the work for you.</p>";
         break;
         
      case 'ot' : content = "<h2>Voice - OfficeTalk</h2><p>Only &pound;10 with Nildram Broadband (&pound;20 without Nildram Broadband) - get 1,500 minutes of FREE national and local rate calls, as well as competitive international rates. And that's just for starters...</p><p class=\"caseStudies\"><a href=\"/case_studies/\">View case studies</a></p><div class=\"furtherInfo\"><a class=\"choose\" href=\"http://officetalk.nildram.net/\">Choose</a></div>";
         break;
   }
   
   
   if (infoID == 'infoInet' || infoID == 'infoSecurity' || infoID == 'infoIP' || infoID == 'infoVoice') {
      colorHex = '#efaa22';
   } else {
      colorHex = '#afc8e4';
   }
   
   
   // Insert the content and animate the box to show a change.
   var attributes = {
      backgroundColor: { from: colorHex, to: '#ffffff' }
   };
   
   bizInfo.innerHTML = content;
   
   var anim = new YAHOO.util.ColorAnim('businessInfo', attributes);
   anim.animate();
}