document.write("<div id='scroller_13'>");

var timerID = 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;
if (!isMinIE4) isMinIE4 = (document.getElementById) ? 1 : 0;
function hideLayer(layer) {
  if (!layer.style) return;
  if (isMinIE4)
    layer.style.visibility = "hidden";
}

function showLayer(layer) {
  if (!layer.style) return;
  if (isMinIE4)
    layer.style.visibility = "visible";
}

function moveLayerTo(layer, x, y) {
  if (!layer.style) return;
  if (isMinIE4) {
	if (document.all){
	    layer.style.pixelLeft = x;
		layer.style.pixelTop  = y;
	}
	else {
	    layer.style.left = x + 'px';
		layer.style.top  = y + 'px';
	}
  }
}

function moveLayerBy(layer, dx, dy) {
  if (!layer.style) return;
  if (isMinIE4) {
	if (document.all){
	    layer.style.pixelLeft += dx;
		layer.style.pixelTop  += dy;
	}
	else {
	    layer.style.left = (parseInt(layer.style.left) + dx) + 'px';
		layer.style.top  = (parseInt(layer.style.top) + dy) + 'px';
	}
  }
}

function getWidth(layer) {
  if (!layer.style) return;
  if (isMinIE4) {
    if (layer.style.pixelWidth)
      return layer.style.pixelWidth;
    else
      return layer.clientWidth;
  }
  return -1;
}

function getHeight(layer) {
  if (!layer.style) return;
  if (isMinIE4) {
    if (layer.style.pixelHeight)
      return layer.style.pixelHeight;
    else
      return layer.clientHeight;
  }
  return -1;
}

function getzIndex(layer) {
  if (!layer.style) return;
  if (isMinIE4)
    return layer.style.zIndex;

  return -1;
}

function setzIndex(layer, z) {
  if (!layer.style) return;
  if (isMinIE4)
    layer.style.zIndex = z;
}

function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {
  if (!layer.style) return;
  if (isMinIE4)
    layer.style.clip = 'rect(' + cliptop + 'px ' +  clipright + 'px ' + clipbottom + 'px ' + clipleft +'px)';
}

function getClipLeft(layer) {
  if (!layer.style) return;
  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str)
      return 0;
    var clip = getIEClipValues(layer.style.clip);
    return(clip[3]);
  }
  return -1;
}

function getClipTop(layer) {
  if (!layer.style) return;
  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str)
      return 0;
    var clip = getIEClipValues(layer.style.clip);
    return clip[0];
  }
  return -1;
}

function getClipRight(layer) {
  if (!layer.style) return;
  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str)
      return layer.style.pixelWidth;
    var clip = getIEClipValues(layer.style.clip);
    return clip[1];
  }
  return -1;
}

function getClipBottom(layer) {
  if (!layer.style) return;
  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str)
      return layer.style.pixelHeight;
    var clip = getIEClipValues(layer.style.clip);
    return clip[2];
  }
  return -1;
}

function getIEClipValues(str) {

  var clip = new Array();
  var i;

  i = str.indexOf("(");
  clip[0] = parseInt(str.substring(i + 1, str.length), 10);
  i = str.indexOf(" ", i + 1);
  clip[1] = parseInt(str.substring(i + 1, str.length), 10);
  i = str.indexOf(" ", i + 1);
  clip[2] = parseInt(str.substring(i + 1, str.length), 10);
  i = str.indexOf(" ", i + 1);
  clip[3] = parseInt(str.substring(i + 1, str.length), 10);
  return clip;
}

function scrollLayerTo(layer, x, y, bound) {

  var dx = getClipLeft(layer) - x;
  var dy = getClipTop(layer) - y;
  scrollLayerBy(layer, -dx, -dy, bound);
}

function scrollLayerBy(layer, dx, dy, bound) {

  var cl = getClipLeft(layer);
  var ct = getClipTop(layer);
  var cr = getClipRight(layer);
  var cb = getClipBottom(layer);

  if (bound) {
    if (cl + dx < 0)
      dx = -cl;
    else if (cr + dx > getWidth(layer))
      dx = getWidth(layer) - cr;
    if (ct + dy < 0)
      dy = -ct;
    else if (cb + dy > getHeight(layer))
      dy = getHeight(layer) - cb;
  }
  clipLayer(layer, cl + dx, ct + dy, cr + dx, cb + dy);
  moveLayerBy(layer, -dx, -dy);

}

function setBgColor(layer, color) {
  if (!layer.style) return;
  if (isMinIE4)
    layer.style.backgroundColor = color;
}

function getLayer(name) {
  if (isMinIE4){
    if (document.all)
	    return eval('document.all.' + name);
	else if (document.getElementById)
		return 	document.getElementById(name);
  }
  return null;
}

function getImage(name) {

  if (isMinIE4){
    if (document.all)
	    return eval('document.all.' + name);
	else if (document.getElementById)
		return 	document.getElementById(name);
  }
  return null;
}

function getImagePageLeft(img) {

  var x, obj;

  if (isMinIE4 && img) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  return -1;
}

function getImagePageTop(img) {

  var y, obj;
 
  if (isMinIE4 && img) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}

function getPageWidth() {

  if (isMinIE4){
    if (document.body.scrollWidth)
	    return document.body.scrollWidth;
	else if (window.innerWidth)
		return window.innerWidth;
  }
  return -1;
}

function getPageHeight() {

  if (isMinIE4){
	if (document.body.scrollHeight)
	    return document.body.scrollHeight;
	else if (window.innerHeight)
		return window.innerHeight;
  }
  return -1;

}

function getPageScrollX() {

  if (isMinIE4){
	if (document.body.scrollLeft)
	    return document.body.scrollLeft;
	else if (window.pageXOffset)
	    return window.pageXOffset;
  }
  return -1;
}

function getPageScrollY() {

  if (isMinIE4){
	if (document.body.scrollTop)
	    return document.body.scrollTop;
	else if (window.pageYOffset)
	    return window.pageYOffset;
  }
  return -1;
}

function Scroller(x, y, width, height, border, padding, container) {
  this.container = container;
  this.position = scrollerSetPosition;
  this.x = x;
  this.y = y;
  this.width = width;
  this.height = height;
  this.border = border;
  this.padding = padding;

  this.items = new Array();
  this.created = false;
  this.setColors = scrollerSetColors;
  this.setSpeed = scrollerSetSpeed;
  this.setPause = scrollersetPause;
  this.addItem = scrollerAddItem;
  this.create = scrollerCreate;
  this.show = scrollerShow;
  this.hide = scrollerHide;
  this.moveTo = scrollerMoveTo;
  this.moveBy = scrollerMoveBy;
  this.getzIndex = scrollerGetzIndex;
  this.setzIndex = scrollerSetzIndex;
  this.stop = scrollerStop;
  this.start = scrollerStart;
}

function scrollerSetColors(fgcolor, bgcolor, bdcolor) {

  if (!this.created) {
    this.fgColor = fgcolor;
    this.bgColor = bgcolor;
    this.bdColor = bdcolor;
  }
}

function scrollerSetSpeed(pps) {

  if (!this.created)
    this.speed = pps;
}

function scrollersetPause(ms) {

  if (!this.created)
    this.pauseTime = ms;
}

function scrollerAddItem(str) {

  if (!this.created)
    this.items[this.items.length] = str;
}

function scrollerCreate() {

  var start, end;
  var str;
  var i, j;
  var x, y;

  if (!isMinIE4)
    return;

  if (this.created)
    return;

  this.created = true;

  this.items[this.items.length] = this.items[0];

  start = '<table border=0 '
        + ' cellpadding=' + (this.padding + this.border) + ' cellspacing=0'
        + ' width=' + this.width + ' height=' + this.height + '>'
        + '<tr><td style="line-height:1.0">'
        + '<font color="' + this.fgColor + '">';
  end   = '</font></td></tr></table>';

  if (isMinIE4) {
    i = scrollerList.length;
    str = '<div id="scroller' + i + '_baseLayer"'
        + ' style="position:absolute;'
        + 'left:0px; top:0px;'
        + 'background-color:' + this.bgColor + ';'
        + 'width:' + this.width + 'px;'
        + 'height:' + this.height + 'px;'
       + 'overflow:hidden;'
        + 'visibility:hidden;">\n'
        + '<div id="scroller' + i + '_scrollLayer"'
        + ' style="position:absolute;'
        + 'background-color: ' + this.bgColor + ';'
        + 'width:' + this.width + 'px;'
        + 'height:' + (this.height * this.items.length) + 'px;'
        + 'visibility:inherit;">\n';
    for (j = 0; j < this.items.length; j++) {
      str += '<div id="scroller' + i + '_itemLayer' + j + '"'
          +  ' style="position:absolute;'
          +  'width:' + this.width + 'px;'
          +  'height:' + this.height + 'px;'
          +  'visibility:inherit;">\n'
          +  start + this.items[j] + end
          +  '</div>\n';
    }
    str += '</div>\n'
        +  '</div>\n';

    if (!isMinIE5) {
      x = getPageScrollX();
      y = getPageScrollY();
      window.scrollTo(getPageWidth(), getPageHeight());
    }
	
	document.write(str);
	
    if (!isMinIE5)
      window.scrollTo(x, y);


    this.baseLayer = getLayer("scroller" + i + "_baseLayer");
    this.scrollLayer = getLayer("scroller" + i + "_scrollLayer");
    this.itemLayers = new Array();
    for (j = 0; j < this.items.length; j++)
      this.itemLayers[j] = getLayer("scroller" + i + "_itemLayer" + j);
  }

  moveLayerTo(this.baseLayer, this.x, this.y);
  clipLayer(this.baseLayer, 0, 0, this.width, this.height);
  moveLayerTo(this.scrollLayer, this.border, this.border);
  clipLayer(this.scrollLayer, 0, 0,
            this.width - 2 * this.border, this.height - 2 * this.border);

  x = 0;
  y = 0;
  for (i = 0; i < this.items.length; i++) {
    moveLayerTo(this.itemLayers[i], x, y);
    clipLayer(this.itemLayers[i], 0, 0, this.width, this.height);
    y += this.height;
  }

  this.stopped = false;
  this.currentY = 0;
  this.stepY = this.speed / (1000 / scrollerInterval);
  this.stepY = Math.min(this.height, this.stepY);
  this.nextY = this.height;
  this.maxY = this.height * (this.items.length - 1);
  this.paused = true;
  this.counter = 0;

  scrollerList[scrollerList.length] = this;

  // Display it.

  showLayer(this.baseLayer);
}

function scrollerShow() {

  if (this.created)
    showLayer(this.baseLayer);
}

function scrollerHide() {

  if (this.created)
    hideLayer(this.baseLayer);
}

function scrollerMoveTo(x, y) {

  if (this.created)
    moveLayerTo(this.baseLayer, x, y);
}

function scrollerMoveBy(dx, dy) {

  if (this.created)
    moveLayerBy(this.baseLayer, dx, dy);
}

function scrollerGetzIndex() {

  if (this.created)
    return(getzIndex(this.baseLayer));
  else
    return(0);
}

function scrollerSetzIndex(z) {

  if (this.created)
    setzIndex(this.baseLayer, z);
}

function scrollerStart() {

  this.stopped = false;
}

function scrollerStop() {

  this.stopped = true;
}

if (!window.scrollerList)
	var scrollerList = new Array();
var scrollerInterval = 20;

function scrollerGo() {
  var i;
  for (i = 0; i < scrollerList.length; i++) {

    if (scrollerList[i].stopped);

    else if (scrollerList[i].paused) {
      scrollerList[i].counter += scrollerInterval;
      if (scrollerList[i].counter > scrollerList[i].pauseTime)
        scrollerList[i].paused = false;
    }

    else {
	  scrollerList[i].position();
      scrollerList[i].currentY += scrollerList[i].stepY;
      if (scrollerList[i].currentY >= scrollerList[i].nextY) {
        scrollerList[i].paused = true;
        scrollerList[i].counter = 0;
        scrollerList[i].currentY = scrollerList[i].nextY;
        scrollerList[i].nextY += scrollerList[i].height;
      }

      // When we reach the end, start over.

      if (scrollerList[i].currentY >= scrollerList[i].maxY) {
        scrollerList[i].currentY -= scrollerList[i].maxY;
        scrollerList[i].nextY = scrollerList[i].height;
      }
      scrollLayerTo(scrollerList[i].scrollLayer,
                    0, Math.round(scrollerList[i].currentY),
                    false);
    }
  }
}


function scrollerSetPosition() {
var img;
var x, y;
	img = getImage(this.container);
	x = getImagePageLeft(img);
	y = getImagePageTop(img);
	if (x != this.containerX || y != this.containerY){
		this.containerX = x;
		this.containerY = y;
		this.moveTo(x, y);
	}
}
function debug(sText)
{
var dummy = document.getElementById('DEBUG_TAG');
	if (!dummy){
		dummy = document.createElement('SPAN');
		dummy.id = "DEBUG_TAG";
		document.body.appendChild(dummy);
	}
	dummy.innerHTML = '<font color=red>' + sText + '</font>';
}

function ticker() {
var i = 0;
	for (i = 0; i < scrollerList.length; i++){
		scrollerList[i].position();
		scrollerList[i].setzIndex(100);
		scrollerList[i].show();
	}
	if (scrollerList.length > 0 && !timerID)
		timerID = setInterval('scrollerGo()', scrollerInterval);
}

function unticker(){
	if (timerID) clearInterval(timerID);
}

document.write('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="120">');
document.write('<TR><TD BGCOLOR="#FFFFFF">&nbsp;</TD><TD WIDTH="120">');
document.write('<IMG border=0 src="Assets/SPACER.gif" id="container13" name="container13" WIDTH="114" HEIGHT="150">');
document.write('</TD><TD BGCOLOR="#FFFFFF">&nbsp;</TD></TR>');
document.write('<TR><TD colspan="3" align="center" BGCOLOR="#FFFFFF">');
document.write('</TD></TR>');
document.write('</TABLE>');

var myScroller13 = new Scroller(0, 0,114,150, 0, 0, 'container13');
myScroller13.setColors("#FFFFFF","#FFFFFF","#FFFFFF");
myScroller13.setSpeed(100);
myScroller13.setPause(2000);


	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF153')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2F3D%2DSpherical%2Dpuzzle%2Dantique%2Dglobe%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - 3D Spherical - Antique Globe - 530 Pieces <strike>$19.99</strike> <font color=\"red\">$18.65</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF311')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Fdisney%2Dpuzzle%2Dsketchbook%2Dmickey%2Dmouse%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - Disney Sketchbook - Mickey Mouse - 529 Pieces <strike>$9.99</strike> <font color=\"red\">$9.50</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF1126')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Fjudy%2Dlarson%2Dpuzzle%2Dfreedom%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - Judy Larson - With Freedom for All - 1026 Pieces <strike>$14.99</strike> <font color=\"red\">$14.35</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF313')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Fdisney%2Dpuzzle%2Dsketchbook%2Dsnow%2Dwhite%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - Disney Sketchbook - Snow White - 529 Pieces <strike>$9.99</strike> <font color=\"red\">$9.50</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF314')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Fdisney%2Dpuzzle%2Dsketchbook%2Dwinnie%2Dthe%2Dpooh%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - Disney Sketchbook - Winnie the Pooh - 529 Pieces <strike>$9.99</strike> <font color=\"red\">$9.50</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF1121')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Fjudy%2Dlarson%2Dpuzzle%2Dspring%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - Judy Larson - Silent Spring - 1026 Pieces <strike>$14.99</strike> <font color=\"red\">$14.35</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('USA1100')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Fsanta%2Dclaus%2Dpuzzle%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Puzzle : Santa Clause is Coming to Town - 550 Pieces <strike>$12.95</strike> <font color=\"red\">$11.95</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('USA1101')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Ffamily%2Dguy%2Dpuzzle%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Puzzle : Family Guy - 500 Pieces <strike>$12.95</strike> <font color=\"red\">$11.95</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF526')\">" + 

	"<img  border='0' src=\"http://www.simplypuzzles.com/include/thumb.aspx?img=%2Fimages%2Fphotomosaic%2Delvis%2D1%2Ejpg&w=100&h=100\"><br>" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - Photomosaic - Elvis - 1026 Pieces <strike>$15.99</strike> <font color=\"red\">$15.25</font></font></font>" + 

	"</a>");

	myScroller13.addItem("<a style='text-decoration:none' href=\"JavaScript:showdetail('BUF1312')\">" + 

	"<font class='bodyblue'><font color='#000000'>" + 
	"Buffalo Games: Jigsaw Puzzles - Photomosaic - Classic Mickey Mouse - 1026 Pieces <strike>$15.99</strike> <font color=\"red\">$15.25</font></font></font>" + 

	"</a>");

myScroller13.create();
myScroller13.hide();



if (!window.onload) 
	window.onload = ticker;
else
	setTimeout('ticker()', 500);
if (!window.onunload) window.onunload = unticker;

document.write("</DIV>");
