Array.prototype.inArray = function (value) {
    var i;
    for (i=0; i < this.length; i++) {
        // Matches identical (===), not just similar (==).
        if (this[i] === value) {
            return i;
        }
    }
    return -1;
};

function isArray(a) {
    return isObject(a) && a.constructor == Array;
}

function isObject(a) {
    return (a && typeof a == 'object') || isFunction(a);
}

function getStyle( layer ) {
	if( document.getElementById ) {
		return document.getElementById( layer ).style
	} else if( document.all ) {
		return document.all[layer].style
	} else {
		return document[layer]
	}
}

function gettingClass( layer ) {
	if( document.getElementById ) {
		return document.getElementById( layer )
	} else if( document.all ) {
		return document.all[layer]
	} else {
		return document[layer]
	}
}

function getElm( layer ) {
	return getElementByClass( layer ).style
}

function windowWidth() {
	var winW = 630;

	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			winW = window.innerWidth;
		} else  {
  		winW = document.body.offsetWidth;
		}
	}
	return winW;
}

function windowHeight() {
	var winH = 460;

	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			winH = window.innerHeight;
		} else  {
			winH = document.body.offsetHeight;
		}
	}
	return winH;
}
