if(VZT === undefined)
	var VZT = {};

if(VZT.Util === undefined) {
	VZT.Util =(function(){
			/**
			 * _gettag
			 * access: private
			 * description: gets a element with a given tag, from the objects parent nodes
			 * wants: 	object - the dom object to look in
			 * 			tag - the tag to look for
			 *
			 * returns: the first element matching that tag, or null
			 */

			function hasclass(ele,cls) {
				return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
			}

			function addclass(ele,cls) {
				if (!hasclass(ele,cls)) ele.className += " "+cls;
			}

			function removeclass(ele,cls) {
				if (hasclass(ele,cls)) {
					var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
					ele.className=ele.className.replace(reg,' ');
				}
			}
			function _gettag(object, tag) {
					return object.getElementsByTagName(tag)[0];
			}

			/**
			 * _getscreen
			 * access: private
			 * description: returns the screen dimensions
			 * wants: nothing
			 * returns: object = {width, height}
			 */
			function _getscreen(){

				var screen_width = window.innerWidth;
				var screen_height = window.innerHeight;

				if(screen_width == undefined || screen_width == 0) {
					screen_width = document.documentElement.clientWidth;
					screen_height = document.documentElement.clientHeight;
					
					//alert(document.body.offsetHeight);
				}
				if(screen_width == undefined || screen_width == 0) {
				//alert(document.body.clientWidth);
					screen_width = document.body.clientWidth;
					screen_height = document.body.clientHeight;
					
					//alert(document.body.offsetHeight);
				}
			   	
    			var D = document;
    			screen_height = Math.max(
        			Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        			Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        			Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    			);

				return {width: screen_width, height: screen_height};
			}

			return {
				getTag: _gettag,
				getScreen: _getscreen,
				addClass: addclass,
				removeClass: removeclass,
				hasClass: hasclass
			};
	})();
}
