/*
	Created in June 1998 by and for Marc Antony Vose <suzerain@suzerain.com>
	They are considered copyrighted by Entropy8 Digital Arts and Marc Antony Vose.
	Feel free to use them in your projects, but don't be an asshole; at least credit us.	
	
	These functions are intended to work across "level 4" browsers, handling various things you might
	want to do with layers.  (To be more specific, they handle things I wanted to do with layers, and
	I add to them when I need to.)
	
	Unfortunately, Internet Exploder, like most Microsoft "technology" crashes intermittently with them.
	Although I followed Microsoft's spec, I have to say, use them at your own risk.  I haven't yet nailed
	down a specific cause; I think IE just bunks out every once in a while, which doesn't surprise me.
*/
	
	
/*  g e n e r i c   l a y e r   h a n d l i n g   f u n c t i o n s  */


/*  clips a layer...{{{ not yet abstracted }}}  */

function ClipLayer(l,t,r,b) {
	if( navigator.appName == "Netscape" ) {
		eval( layer_syntax + '["navigation"].' + layer_syntax + '["navmapon"]' + style_switch + '.clip.left=' + l );
		eval( layer_syntax + '["navigation"].' + layer_syntax + '["navmapon"]' + style_switch + '.clip.top=' + t );
		eval( layer_syntax + '["navigation"].' + layer_syntax + '["navmapon"]' + style_switch + '.clip.right=' + r );
		eval( layer_syntax + '["navigation"].' + layer_syntax + '["navmapon"]' + style_switch + '.clip.bottom=' + b );
	}
	else {
		eval( layer_syntax + '["navigation"].' + layer_syntax + '["navmapon"]' + style_switch + '.clip="rect(' + t + ' ' + r + ' ' + b + ' ' + l + ')"' );
	}
}


/*  shows a layer  */

function ShowLayer(layer_name) {
	eval( layer_syntax + '["' + layer_name + '"]' + style_switch + '.visibility="visible"' );
}


/*  hides a layer  */

function HideLayer(layer_name) {
	eval( layer_syntax + '["' + layer_name + '"]' + style_switch + '.visibility="hidden"' );
}


/*  hides a nested layer  */

function HideNestedLayer(parent_name,layer_name) {
	eval( layer_syntax+ '["' + parent_name + '"].' + layer_syntax + '["' + layer_name + '"]' + style_switch + '.visibility="hidden"' );
}


/*  shows a nested layer  */

function ShowNestedLayer(parent_name,layer_name) {
	eval( layer_syntax+ '["' + parent_name + '"].' + layer_syntax + '["' + layer_name + '"]' + style_switch + '.visibility="visible"' );
}


/*  move a layer to a specific spot  */

function MoveLayerTo(layer_name,left,top) {
	eval( layer_syntax + '["' + layer_name + '"]' + style_switch + '.top=' + top);
	eval( layer_syntax + '["' + layer_name + '"]' + style_switch + '.left=' + left);
}


/*  move a layer to a specific changes a layer's source  {{{  NS ONLY  }}}  */

function ChangeLayerSrc(layer_name,URL) {
	eval( layer_syntax + '["' + layer_name + '"]' + style_switch + '.src="' + URL + '"');
}

