
function StyleManager(lw){	
	this._isNN4 = (document.layers)?1:0;
	this._isIE4 = (document.all)?1:0;
	this._isDOM = (document.getElementById)?1:0;
	//alert(this._isNN4 + ' :: ' + this._isIE4 + ' :: ' + this._isDOM);
	//	return the style object for an element, using its id
	this.getStyle = function(objectId) {
		//	if it's DOM-compliant...
		if(this._isDOM && document.getElementById(objectId)) {
			return document.getElementById(objectId).style;
		//	else if it's IE 4
		} else if (this._isIE4 && document.all(objectId)) {
			return document.all(objectId).style;

		//	else if it's NN 4
		} else if (this._isNN4 && document.layers[objectId]) {
			return document.layers[objectId];

		} else {
			return false;
		}
	} 

	this.setVisOfObj = function(objectId, vis) {
		//	vis should be a bool when passed in. then we override it.
		var bool = vis;
		if(this._isNN4){
			vis = (vis==1)?'show':'hide';
		}else{
			vis = (vis==1)?'visible':'hidden';
		}



		//	get the style object if possible
		var style = this.getStyle(objectId);
		//	if we got a style object, change visibility
		if(style) {
			style.visibility = vis;
			
			var winW = document.body.clientWidth  - 752 ;
			var leftwinW = parseInt(winW/2);			
			//style.left = leftwinW;
			//style.top = 310;			
			return true;

		//	else, return false since DHTML doesn't work here
		} else {
			return false;
		}

	}

	this.setXLocOfObj = function(objectId, x) {

		//	get the style object if possible
		var style = this.getStyle(objectId);
		//	if we got a style object, change visibility
		if(style) {
			style.left = x;
			return true;

		//	else, return false since DHTML doesn't work here
		} else {
			return false;
		}
	}

	this.setYLocOfObj = function(objectId, y) {

		//	get the style object if possible
		var style = this.getStyle(objectId);
		//	if we got a style object, change visibility
		alert(y);
		if(style) {
			return true;

		//	else, return false since DHTML doesn't work here
		} else {		
			return false;
		}
	}

	this.setLocOfObj = function(objectId, x, y) {

		//	get the style object if possible
		var style = this.getStyle(objectId);
		//	if we got a style object, change visibility
			alert(y);		
		if(style) {
			style.left = x;
			return true;

		//	else, return false since DHTML doesn't work here
		} else {
			return false;
		}
	}
}


