Public paste
Weird
By: Xmoo | Date: Apr 14 2009 08:22 | Format: None | Expires: never | Size: 6.23 KB | Hits: 889

  1. imgout=new Image(9,9);
  2. imgin=new Image(9,9);
  3.  
  4.         imgout.src="http://www.thesunnymelon.com/img/ico_maximise.gif";
  5.         imgin.src="http://www.thesunnymelon.com/img/ico_minimise.gif";
  6.  
  7.  
  8. //this switches expand collapse icons
  9. function filter(imagename,objectsrc){
  10.         if (document.images){
  11.                 document.images[imagename].src=eval(objectsrc+".src");
  12.         }
  13. }
  14.  
  15. //show OR hide funtion depends on if element is shown or hidden
  16. function shoh(id) {
  17.        
  18.         if (document.getElementById) { // DOM3 = IE5, NS6
  19.                 if (document.getElementById(id).style.display == "none"){
  20.                         document.getElementById(id).style.display = 'block';
  21.                         filter(("img"+id),'imgin');                    
  22.                 } else {
  23.                         filter(("img"+id),'imgout');
  24.                         document.getElementById(id).style.display = 'none';                    
  25.                 }      
  26.         } else {
  27.                 if (document.layers) { 
  28.                         if (document.id.display == "none"){
  29.                                 document.id.display = 'block';
  30.                                 filter(("img"+id),'imgin');
  31.                         } else {
  32.                                 filter(("img"+id),'imgout');   
  33.                                 document.id.display = 'none';
  34.                         }
  35.                 } else {
  36.                         if (document.all.id.style.visibility == "none"){
  37.                                 document.all.id.style.display = 'block';
  38.                         } else {
  39.                                 filter(("img"+id),'imgout');
  40.                                 document.all.id.style.display = 'none';
  41.                         }
  42.                 }
  43.         }
  44. }
  45.  
  46.  
  47. <script type="text/javascript" src="http://www.thesunnymelon.com/inc/collapse_expand.js"></script>
  48.           <div class="clear">
  49.             <div id="Prices">
  50.               <div class="PriceList" id="July">
  51.                 <div class="PriceListHeader">
  52.                                 <a href="#july" onClick="shoh('july');" ><img src="http://www.thesunnymelon.com/img/ico_maximise.gif" name="imgjuly" border="0" alt="" /></a><strong> July 2009</strong></div>
  53.                                 <div style="display: none;" id="july" >
  54.                 <div class="PriceListBodyExpand">
  55.                   <table width="100%" border="0" cellspacing="0" cellpadding="4">
  56.                     <tr>
  57.                       <th>&nbsp;</th>
  58.                       <td align="center"><strong>18th - 24st</strong></td>
  59.                       <td align="center" nowrap="nowrap"><strong>25th - 31st</strong></td>
  60.                     </tr>
  61.                     <tr>
  62.                       <th>Bed in Triple</th>
  63.                       <td width="20%" align="center">€869,-</td>
  64.                       <td width="20%" align="center" nowrap="nowrap" class="PriceAvailable">Still Available</td>
  65.                     </tr>
  66.                     <tr>
  67.                       <th bgcolor="#FFFFCC">Bed in Twin</th>
  68.                       <td align="center" bgcolor="#FFFFCC">€899,-</td>
  69.                       <td align="center" bgcolor="#FFFFCC" class="PriceBooked">Fully Booked</td>
  70.                     </tr>
  71.                     <tr>
  72.                       <th bgcolor="#FFFFCC">Bed in Double</th>
  73.                       <td align="center" bgcolor="#FFFFCC">€899,-</td>
  74.                       <td align="center" bgcolor="#FFFFCC" class="PriceBooked">Fully Booked</td>
  75.                     </tr>
  76.                   </table>
  77.                 </div>
  78.               </div>
  79.             </div>
  80.                   <div class="PriceList" id="August">
  81.                 <div class="PriceListHeader">
  82.                                 <a href="#august" onClick="shoh('august');" ><img src="http://www.thesunnymelon.com/img/ico_maximise.gif" name="imgaugust" border="0" alt="" /></a> <strong>August 2009</strong></div>
  83.                                 <div style="display: none;" id="august" >
  84.                     <div class="PriceListBodyCollapse">
  85.                   <table width="100%" border="0" cellspacing="0" cellpadding="4">
  86.                     <tr>
  87.                       <th>&nbsp;</th>
  88.                       <td align="center"><strong>18th - 24st</strong></td>
  89.                       <td align="center" nowrap="nowrap"><strong>25th - 31st</strong></td>
  90.                     </tr>
  91.                     <tr>
  92.                       <th>Bed in Triple</th>
  93.                       <td width="20%" align="center">€879</td>
  94.                       <td width="20%" align="center" nowrap="nowrap" class="PriceAvailable">Still Available</td>
  95.                     </tr>
  96.                     <tr>
  97.                       <th bgcolor="#FFFFCC">Bed in Twin</th>
  98.                       <td align="center" bgcolor="#FFFFCC">€879</td>
  99.                       <td align="center" bgcolor="#FFFFCC" class="PriceBooked">Fully Booked</td>
  100.                     </tr>
  101.                     <tr>
  102.                       <th>Bed in Double</th>
  103.                       <td align="center">€879</td>
  104.                       <td align="center" class="PriceBooked">Fully Booked</td>
  105.                     </tr>
  106.                   </table>
  107.                 </div>
  108.               </div>
  109.             </div>
  110.               <div class="PriceList" id="September">
  111.                 <div class="PriceListHeader">
  112.                                 <a href="#september" onClick="shoh('september');" ><img src="http://www.thesunnymelon.com/img/ico_maximise.gif" name="imgseptember" border="0" alt="" /></a><strong>September 2009</strong></div>
  113.                                 <div style="display: none;" id="september" >
  114.                 <div class="PriceListBodyCollapse">
  115.                   <table width="100%" border="0" cellspacing="0" cellpadding="4">
  116.                     <tr>
  117.                       <th>&nbsp;</th>
  118.                       <td align="center"><strong>29th - 4th</strong></td>
  119.                       <td align="center" nowrap="nowrap"><strong>5th - 11th</strong></td>
  120.                     </tr>
  121.                     <tr>
  122.                       <th>Bed in Triple</th>
  123.                       <td width="20%" align="center">€849,-</td>
  124.                       <td width="20%" align="center" nowrap="nowrap" class="PriceAvailable">Still Available</td>
  125.                     </tr>
  126.                     <tr>
  127.                       <th bgcolor="#FFFFCC">Bed in Twin</th>
  128.                       <td align="center" bgcolor="#FFFFCC">€879,-</td>
  129.                       <td align="center" bgcolor="#FFFFCC" class="PriceBooked">Fully Booked</td>
  130.                     </tr>
  131.                     <tr>
  132.                       <th bgcolor="#FFFFCC">Bed in Double</th>
  133.                       <td align="center" bgcolor="#FFFFCC">€879,-</td>
  134.                       <td align="center" bgcolor="#FFFFCC" class="PriceBooked">Fully Booked</td>
  135.                     </tr>
  136.                   </table>
  137.                   </div>
  138.                 </div>
  139.             </div>
  140.             </div>
  141.                             <p>&nbsp;</p>
  142.               </div>