var isNS = (document.layers) ? 1 : 0;
var isIE = (document.all) ? 1 : 0;
var isMZ = (!isIE && document.getElementById) ? 1 : 0;

var isMac = (navigator.appVersion.indexOf("Macintosh") > -1);

function getLayer(name) {
	if (isMZ)
		return document.getElementById(name);
	else if (isIE)
		return eval('document.all.' + name);
    else {
		var layer;
		for (var i = 0; i < document.layers.length; i++) {
			layer = document.layers[i];
			if (layer.name == name)
				return layer;
		}
	}
}

function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {
	if (isNS) {
		layer.clip.left   = clipleft;
		layer.clip.top    = cliptop;
		layer.clip.right  = clipright;
		layer.clip.bottom = clipbottom;
		//layer.style.width = width + 'px';
	}
	else{
		layer.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';
		//layer.style.width = width + 'px';
	}
}

function dolittle() {
	var l = getLayer('fl');
	//clipLayer(l, 540, 0, 740, 200, 220);
	clipLayer(l, 0, 0, 740, 200);
}

function doexpand() {
	var l = getLayer('fl');
	//clipLayer(l, 0, 0, 740, 200, 740);
	clipLayer(l, 0, 0, 740, 200);
}
