
//ANALYZE
//gets os, browser, dom compliance
		
	function thisAnalyze() {
		var os, browser, dom;
		var agent = navigator.userAgent.toLowerCase();
		
		//determine os
		if (agent.indexOf('win') > 0) {
			this.os = 'win';
		} else if (agent.indexOf('mac') > 0) {
			this.os = 'mac';
		}
		
		//determine msie
		if (agent.indexOf('msie') > 0) {
			this.browser = 'msie';
		}
		
		//determine DOM compliance
		if (document.getElementById) {
			this.dom = true;
		}
		
		return this;
	}

//INIT

	var system = new thisAnalyze();
	var preloadFlag = false;
	
//CREATE IMAGE OBJECTS
	
	function newImage(path) {
		if (document.images) {
			result = new Image();
			result.src = path;
			return result;
		}
	}

//HANDLE IMAGE ROLLOVERS

	function changeImage(targ, obj) {
		if (system.dom) {
			document.getElementById(targ).src = eval(obj + '.src');
		}
	}
	
//CHANGE CLASS

	function changeClass(targ, name) {
		if (system.dom) {
			document.getElementById(targ).className = name;
		}
	}

//CHANGE CURSOR

	function changeCursor(targ) {
		targ.style.cursor = "pointer";
	}

//CHANGE CONTENTS

	function changeContents(targ, html) {
		if (system.dom) {
			obj = document.getElementById(targ);
			obj.innerHTML = '';
			obj.innerHTML = html;
		} else if (document.all) {
			obj = document.all[targ];
			obj.innerHTML = html;
		}
	}

//CHANGE STYLE

	function changeStyle(targ, style, state) {
		if (system.dom) {
			obj = document.getElementById(targ);
			eval('obj.style.' + style + ' = \'' + state + '\'');
		}
	}

//LINKS
	
	function getLink(value) {
		window.location.href = value;
	}
	
//POP WINDOW
function popWindow(src, width, height) {
	var w = 800, h = 600;
	if (screen.width || screen.height) {
		w = screen.width;
		h = screen.height;
	}
	var leftPos = (w-width)/2;
	var topPos = (h-height)/2;
	window.open(''+src+'','','width='+width+',height='+height+',toolbar=no,status=no,menubar=no,scrollbars=no,resizeable=no,top=' + topPos + ',left=' + leftPos);
	void(0);
}