	//
	// Build email address to avoid spam
	//
	var user;
	var domain;
	var suffix;
	function buildmail(user, domain, suffix){
		document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '?subject=I would like to get more information">' + user + '@' + domain + '.' + suffix + '</a>');
	}
	//
	// Set cookie value
	//
	function setCookie(name, value) {
		var expString = "; expires=" + expdate.toGMTString();
		document.cookie = name + "=" + escape(value) + expString;
	}
	//
	// Get cookie value
	//
	function getCookie(name) {
		var result = null;
		var myCookie = " " + document.cookie + ";";
		var searchName = " " + name + "=";
		var startOfCookie = myCookie.indexOf(searchName);
		var endOfCookie;
		if (startOfCookie != -1) {
			startOfCookie += searchName.length; // skip past name of cookie
			endOfCookie = myCookie.indexOf(";", startOfCookie);
			result = unescape(myCookie.substring(startOfCookie, endOfCookie));
		}
		return result;
	}
	//
	// Load chosen stylesheet
	//
	function loadStyle(styleName){
		_link=document.createElement("link");
		_link.href=styleName+".css";
		_link.rel="stylesheet";
		_link.type="text/css";
		//document.getElementById("document").appendChild(_link);
		setCookie("styleName", styleName);
	}
	//
	// Embed Flash Content
	// swf file, name, width, height
	//
	function flashEmbed(swf_name, flash_name, fw, fh) {
	document.body.style.backgroundcolor = '#000000';
	var s = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width='+fw+' height='+fh+' id='+flash_name+' align="middle">';
	s += '<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value='+swf_name+' /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" />';
	s += '<embed src='+swf_name+' quality="high" bgcolor="#cccccc" width='+fw+' height='+fh+' name='+flash_name+' align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	document.write(s);
	}	

	//
	// Moves popup box to center top
	//
	function move_box(boxname, box, width, height) {
		var cleft = ((screen.width - width) / 2) - 10;
		var ctop = (screen.height - height) / 2;
		box.style.left = cleft + 'px';
		box.style.top = '0' + 'px';
	}

	//
	// Shows popup box
	//
	function show_hide_box(boxname, width, height, borderStyle) {
		var href = boxname.href;
		var boxdiv = document.getElementById(href);
		if (boxdiv != null) {
			if (boxdiv.style.display=='none') {
				move_box(boxname, boxdiv);
				boxdiv.style.display='block';
			} else {
				boxdiv.style.display='none';
				return false;
			}
		}

		boxdiv = document.createElement('div');
		boxdiv.setAttribute('id', href);
		boxdiv.style.display = 'block';
		boxdiv.style.position = 'absolute';
		boxdiv.style.width = width + 'px';
		boxdiv.style.height = height + 'px';
		boxdiv.style.border = borderStyle;
		boxdiv.style.backgroundColor = '#ffffff';
	
		var contents = document.createElement('iframe');
		contents.scrolling = 'no';
		contents.frameBorder = '0';
		contents.style.width = width + 'px';
		contents.style.height = height + 'px';
		contents.src = href;
	
		boxdiv.appendChild(contents);
		document.body.appendChild(boxdiv);
		move_box(boxname, boxdiv, width, height);
	
		return false;
	}

	//
	// Onload function
	//
	function start(){
		styleName = getCookie("styleName");
		if (styleName==null) {
			loadStyle("gray2008");
		} else {
			loadStyle(styleName);
		}
	}

	//
	var expdate = new Date();
	expdate.setTime(expdate.getTime() +  (48 * 60 * 60 * 1000 * 365));
	var styleName="";
	start();
