//STRIP PX TO INT
//take out "px" from a string and return the result as an int
//for use with getStyle/setStyle
	function stripPxToInt(incomingString){
		return(incomingString.replaceAll("px", "").toInt());
	}

//SIMULATE LINK ROLLOVER
	function linkOverSim(thisID){
		$(thisID).addClass('hoverSim');
	}
	function linkOutSim(thisID){
		$(thisID).removeClass('hoverSim');
	}

//JSON Functions
//wrappers for mootools functions - so that can change how these conversions are handled globally, if desired
	function convertJsonStringToJSObj(req){
		return (Json.evaluate(req)); //uses MooTools evaluate method to convert a json string to an javascript Object.
	}
	function convertJSObjToString(thisObj){
		return (Json.toString(thisObj)); //uses MooTools evaluate method to convert a javascript Object to Json String - for server storage
	}


//move div that contains bg graphic to align with bottom 
//minTop is the limit for this div -it can't go above minTop
	function adjust_bg(divName,minTop,offset,thisType){
		var myBgCoords=$(divName).getCoordinates();
		if (thisType=="scroll"){
			var windHeight=window.getScrollHeight(); //get height of entire scroll window in the case of a scroll
		}else{
			var windHeight=window.getHeight();
		}//note: this only works on scroll down. on scroll up, need to do some kind of eval that looks at if scroll was up or down - and use window height if scroll up. but not that big of a deal
		//console.log('windHeight:',windHeight);
		var topLoc=(windHeight-(myBgCoords.height));
		if (offset){
			topLoc=topLoc+offset;
		}
		if (topLoc<minTop){
			$(divName).setStyle('top', minTop+"px"); 
		}else{
			$(divName).setStyle('top', topLoc+"px"); 
		}
	}
	