var clipLeft = 0;
var clipHeight = 75;
var clipRight = 410;

var topper2 = 0;
var lyrheight2 = 0;
var time2,amount2,theTime2,theHeight2,DHTML2;

function getObj(name){
		if (document.getElementById)
  		{
                this.obj = document.getElementById(name);
                this.style = document.getElementById(name).style;
		}
		else if (document.all)
  		{
                this.obj = document.all[name];
                this.style = document.all[name].style;
		}
  		else if (document.layers)
  		{
                this.obj = document.layers[name];
                this.style = document.layers[name];
		}
}

function initscroll2(){
DHTML2 = (document.getElementById || document.all || document.layers)
                if (!DHTML2) return;
               // if($("pics-snippets")) var x = new getObj('pics-snippets');
                if($("pics-snippets3")) var x = new getObj('pics-snippets3');
                if (document.layers)
                {
                                lyrheight2 = x.style.clip.right;
                                lyrheight2 += 20;
                                x.style.clip.top = 0;
                                x.style.clip.left = clipLeft;
				x.style.clip.right = clipRight;
				x.style.clip.bottom = clipHeight;
                }
                else if (document.getElementById || document.all)
                {
                                lyrheight2 = x.obj.offsetWidth;
                                x.style.clip ='rect(0,'+clipRight+'px,'+clipHeight+'px,'+clipLeft+'px)';
		}
}

function scrollayer2(layername,amt,tim){
                if (!DHTML2) return;
                thelayer = new getObj(layername);
                if (!thelayer) return;
                amount2 = amt;
                theTime2 = tim;
                realscroll2();
}

function realscroll2(){
                if (!DHTML2) return;
                clipLeft += amount2;
                clipRight += amount2;
                topper2 -= amount2;
                if (clipLeft < 0 || clipRight > lyrheight2)
                {
                                clipLeft -= amount2;
                                clipRight -= amount2;
                                topper2 += amount2;
                                return;
                }
                if (document.getElementById || document.all)
                {

                                clipstring ='rect(0,'+clipRight+'px,'+clipHeight+'px,'+clipLeft+'px)';
                                thelayer.style.clip = clipstring;
                                thelayer.style.left = topper2 + 'px';
                }
                else if (document.layers)
                {
                                thelayer.style.clip.left = clipLeft;
                                thelayer.style.clip.right = clipRight;
                                thelayer.style.left = topper2;
                }
                time2 = setTimeout('realscroll2()',theTime2);
}

function stopScroll()
{
// if (time) clearTimeout(time);
	if (time2) clearTimeout(time2);
}
