includes/clientside/static/functions.js
changeset 906 c949e82b8f49
parent 869 58bc29c14a4d
child 1007 2b77ebbf8701
equal deleted inserted replaced
905:1e40b33f2e3e 906:c949e82b8f49
   463  */
   463  */
   464 
   464 
   465 function gen_sprite(path, width, height, xpos, ypos)
   465 function gen_sprite(path, width, height, xpos, ypos)
   466 {
   466 {
   467   var image = document.createElement('img');
   467   var image = document.createElement('img');
   468   image.src = scriptPath + '/images/spacer.gif';
   468   image.src = cdnPath + '/images/spacer.gif';
   469   image.width = String(width);
   469   image.width = String(width);
   470   image.height = String(height);
   470   image.height = String(height);
   471   image.style.backgroundImage = 'url(' + path + ')';
   471   image.style.backgroundImage = 'url(' + path + ')';
   472   image.style.backgroundRepeat = 'no-repeat';
   472   image.style.backgroundRepeat = 'no-repeat';
   473   xpos = ( xpos == 0 ) ? '0' : '-' + String(xpos);
   473   xpos = ( xpos == 0 ) ? '0' : '-' + String(xpos);