/*      click-to-reveal.js

      These are the javascript functions that are used for the click to
    reveal functionality.

        Author      : 17-09-2009  Martin Thorne
        Updated     : 00-00-0000  YOUR NAME

   =========================================================================== */

   


    // this function will perform a show/hide

    function show_hide ( code, show_div, hide_div )
    {
      
      // copy code to clipboard
      copy_code_to_clipboard ( code );

      // show the div
      show_discount_div ( show_div );

      // hide the div
      hide_discount_div ( hide_div );

    }




    // this function will perform a show on one div and replace contents of another
    
    function show_replace ( code, show_div, replace_div )
    {
      
      // copy code to clipboard
      copy_code_to_clipboard ( code );
      
      // show the div
      show_discount_div ( show_div );
      
      // replace the contents
      replace_discount_content ( code, replace_div );
      
    }
    
    
    
    
    // this function will perform a hide on one div and replace contents of another  
    
    function hide_replace ( code, hide_div, replace_div )
    {
      
      // copy code to clipboard
      copy_code_to_clipboard ( code );
      
      // hide the div
      hide_discount_div ( hide_div );
      
      // replace teh contents
      replace_discount_content ( code, replace_div );
      
    }
    
    
    
    
    // this function will perform a show/hide and replace contents of another div
    
    function show_hide_replace ( code, show_div, hide_div, replace_div )
    {
      
      // copy code to clipboard
      copy_code_to_clipboard ( code );

      // show the div
      show_discount_div ( show_div );

      // hide the div
      hide_discount_div ( hide_div );
      
      // replace teh contents
      replace_discount_content ( code, replace_div );

    }
    
    
    
    
    // this function will show a div

    function show_discount_div ( show_div )
    {
      if ( document.getElementById(show_div) )
        document.getElementById(show_div).style.display='block';
    }
    
    
    
    
    // this function will hide a div

    function hide_discount_div ( hide_div )
    {
      if ( document.getElementById(hide_div) )
        document.getElementById(hide_div).style.display='none';
    }
    
    
    
    
    // this function will show a div

    function replace_discount_content ( code, replace_div )
    {
      if ( document.getElementById(replace_div) )
        document.getElementById(replace_div).innerHTML = code;
    }
    
    
    
    
    // this function will copy the code to the users clipboard
    
    function copy_code_to_clipboard ( code )
    {
    }
