equal
deleted
inserted
replaced
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); |