Pre-Loading Images

Pre-loading images (and in some cases HTML files) speeds up their display by using your browser’s cache. This means quick loading when the files are required.
 
  var preloadImages = function ()
  {     
   for( var i = 0; i < arguments.length; i++ )
   {
       this[ i ] = new Image();
       this[ i ].src = arguments[ i ];      
   }
   return this;
  }
  
  document.body.onload = function()
  {
   preloadImages(‘path2Image’, ‘path2NextImage’);  
  }

Get previous & next node

<Articles PageNumber="1" PageSize="0" Count="4" PagesCount="1">
+ <Object Id="7c952b4d-aeda-4c40-939e-a4321e9b3112" Name="Новость 4" ParentId="0883b301-7543-4292-b94f-7331ef520c5b" CreateDate="12.08.2008 15:15:02" ModifyDate="12.08.2008 15:20:01" CreatorId="e0831735-40b1-40be-bea7-31caba62ac1b" ModifierId="e0831735-40b1-40be-bea7-31caba62ac1b" Type="NEWS" TypeCaption="Новость">
    </Object>
+ <Object Id="64bed80f-8b93-427f-abf7-0beedc3b5d50" Name="Новость 2" ParentId="0883b301-7543-4292-b94f-7331ef520c5b" CreateDate="12.08.2008 10:47:48" ModifyDate="12.08.2008 10:48:11" CreatorId="e0831735-40b1-40be-bea7-31caba62ac1b" ModifierId="e0831735-40b1-40be-bea7-31caba62ac1b" Type="NEWS" TypeCaption="Новость">
  </Object>
+ <Object Id="a309404a-3cc6-4ef0-ad5b-07f81ea59914" Name="Тест 1" ParentId="0883b301-7543-4292-b94f-7331ef520c5b" CreateDate="05.08.2008 14:09:57" ModifyDate="05.08.2008 14:10:18" CreatorId="e0831735-40b1-40be-bea7-31caba62ac1b" ModifierId="e0831735-40b1-40be-bea7-31caba62ac1b" Type="NEWS" TypeCaption="Новость">
  </Object>
+ <Object Id="006283db-1d52-41ee-b35a-687466fe40cb" Name="Новость 3" ParentId="0883b301-7543-4292-b94f-7331ef520c5b" CreateDate="12.08.2008 10:49:49" ModifyDate="12.08.2008 10:50:00" CreatorId="e0831735-40b1-40be-bea7-31caba62ac1b" ModifierId="e0831735-40b1-40be-bea7-31caba62ac1b" Type="NEWS" TypeCaption="Новость">
    </Object>
</Articles>
 
xslt code:

 <xsl:variable name="article" select="$elements[@name=’news’]/data/Articles/Object[@Id = $id]"/>

 <!–Getting previous node except first node–>
 <xsl:if test="$article/preceding-sibling::Object[1]/@Id">
  <a href="?id={$article/preceding-sibling::Object[1]/@Id}" class="news">Ранее</a>
   |<xsl:value-of select="$article/preceding-sibling::Object[1]/@Name"/>
 </xsl:if>

 <!–Getting next node except last node–>
 <xsl:if test="$article/following-sibling::Object[1]/@Id">
  <a href="?id={$article/following-sibling::Object[1]/@Id}" class="news">Позднее</a>
   |<xsl:value-of  select="$article/following-sibling::Object[1]/@Name"/>
 </xsl:if>