/* for dom related stuff */
var isNav4, isNav6Plus, isIE4;

if (! window.Node) {
	var Node = {
		ELEMENT_NODE: 1,
		ATTRIBUTE_NODE:	2,
		TEXT_NODE: 3,
		COMMENT_NODE: 8,
		DOCUMENT_NODE: 9,
		DOCUMENT_FRAGMENT_NODE: 11
	}
}





/* Returns Browser Versions */
function setBrowser(){
	if (navigator.appVersion.charAt(0) == "4"){
		if (navigator.appName.indexOf("Explorer") >= 0){
			isIE4 = true;
		} else {
			isNav4 = true;
		}
	} else if (navigator.appVersion.charAt(0) > "4"){
		isNav6Plus = true;
	}
}

/*	SET PROPERTY BY ID
	When given an ID and property (as strings), 
	sets the given property to the value provided 
*/
function setIdProperty (id, property, value) {
	if (isNav6Plus) {
		var styleObject = document.getElementById(id);
		if(styleObject != null){
			styleObject = styleObject.style;
			styleObject[property] = value;
		}
	}else if (isNav4){
		document[id][property] = value;
	}else if (isIE4){
		document.all[id].style[property] = value;
	}
}

function getIDProperty( id, property ){
    if (isNav6Plus){
        var styleObject = document.getElementById(id);
        if (styleObject != null){
            styleObject = styleObject.style;
            if (styleObject[property]){
                return styleObject[ property ];
            }
        }
        styleObject = getStyleBySelector( "#" + id );
        return (styleObject != null) ? styleObject[property] : null;
    }else if (isNav4){
        return document[id][property];
    }else{
        return document.all[id].style[property];
    }
}