// dhtml.js

var hideName = (NN ? 'hide' : 'hidden');
var showName = (NN ? 'show' : 'visible');
var zIdx 	 = -1;

function genLayer(sName, sLeft, sTop, sWdh, sHgt, sVis, copy) {
	if (NN) {
		document.writeln('<LAYER NAME="' + sName + '" LEFT=' + sLeft + ' TOP=' + sTop + 
		' WIDTH=' + sWdh + ' HEIGHT=' + sHgt + ' VISIBILITY="' + sVis + '"' + 
		' z-Index=' + zIdx + '>' + copy + '</LAYER>');
	} else {
		document.writeln('<DIV ID="' + sName + '" STYLE="position:absolute; overflow:none; left:' + 
			sLeft + 'px; top:' + sTop + 'px; width:' + sWdh + 'px; height:' + sHgt + 'px;' + 
			' visibility:' + sVis + '; z-Index=' + (++zIdx) + '">' + 
			copy + '</DIV>');
	}
}

// Define a function to hide layers
function hideSlide(name) {
	refSlide(name).visibility = hideName;
}

// Define a function to reveal layers
function showSlide(name) {
	refSlide(name).visibility = showName;
}

// Define a central function to reference layers
function refSlide(name) {
	if (NN) { return document.layers[name]; }
	else { return eval('document.all.' + name + '.style'); }
}

// Define a function to write data into layer
function writeintoSlide(name, message) {
    if (NN) {
        document.layers[name].document.close();
        document.layers[name].document.write(message);
        document.layers[name].document.close();
    } else {
        if (document.all) {
			//alert("document.all." + name + ".innerHTML='" + message + "'");
            eval("document.all." + name + ".innerHTML='" + message + "'");
        } else {
            document.getElementById(name).innerHTML = message;
        }
    }
}

function getCenterX(){
	
}

function getCenterY(){

}
