
if (document.layers) {
	visible = 'show';
	hidden = 'hide';
}
else if (document.all) {
	visible = 'visible';
	hidden = 'hidden';
}
else if (document.getElementById) {
	visible = 'visible';
	hidden = 'hidden';
}
function dummy(){
}

//CREATE LAYER
function createLayer(name, inleft, intop, imgWidth, imgHeight, visible, content) {
	if (document.layers) {
			document.writeln('<layer id="' + name + '" left=' + inleft + ' top=' + intop + ' width=' + imgWidth + ' height=' + imgHeight +  ' visibility=' + (visible ? '"show"' : '"hide"') +  '>');
			document.writeln(content);
			document.writeln('</layer>');
	}
	else {
			document.writeln('<DIV id="' + name + '" style="position:absolute; overflow:hidden; left:' + inleft + 'px; top:' + intop + 'px; width:' + imgWidth + 'px; height:' + imgHeight + 'px; visibility:' + (visible ? 'visible' : 'hidden') + '">');
			document.writeln(content);
			document.writeln('</DIV>');
	}
}		

//GET LAYER OBJECT
function getLayer(name) {
	if (document.layers) {
		return(document.layers[name]);
	} else if (document.all) {
		return eval('document.all.' + name);
	} else if (document.getElementById) {
		return document.getElementById(name);
	}
}
				

//CHECK IF LAYER IS VISIBLE
function isVisible(name) {
	layer = getLayer(name);
	if (layer == null) return false; 
	if (layer.style.visibility == visible) return true;
	return false;
}
		
		
//MOVE LAYER TO A POSITION
function moveLayer(name, x, y) {		
	layer = getLayer(name);		
	if (layer == null) return; 
	if (document.layers) {
		layer.style.moveTo(x, y);
	} else {
		layer.style.left = x + "px";
		layer.style.top  = y + "px";
	}
}
		
//SET LAYER HIDDEN
function hideLayer(name) {	
	layer = getLayer(name);
	if (layer == null) return; 
	layer.style.visibility = hidden;
}
		
//SET LAYER VISIBLE
function showLayer(name) {		
	layer = getLayer(name);
	if (layer == null) return; 
	layer.style.visibility = visible;
}