/*
*	Package
*	layer.class.js		2000.08.05
*	Victor A.Spirin,	victor_aspirin@mail.ru
*/



function layer( Container, Width, Height )
	{
	var Element;

		if( window.document.layers != null )
		{
		Element = new Layer( Width, Container );
		Element.resizeTo( Width, Height );
		}
		else if( document.all != null )
		{
			if( window._js_layer_counter == null ) window._js_layer_counter = 0;
		var Id = '_js_layer_' + window._js_layer_counter;
		window._js_layer_counter++;
		(Container == window || Container == document ? document.body : Container).insertAdjacentHTML( 'BeforeEnd', '<div id="' + Id + '" style="position:absolute;width:' + Width + 'px;height:' + Height + 'px;clip:rect(0px,' + Width +'px,' + Height + 'px,0px);"><span style="font-size: 1px;"></span></div>' );
		Element = document.all[Id];
		}
		else return null;

	return Element;
	}


