var ltg = {
	resizeFlash : function(how_tall) {
		document.getElementById("GivingAndMe").style.height = how_tall+"px";
	},
	setHash : function(frame) {
		location.hash = frame;
	},
	writeFlash : function() {
		document.write('<embed type="application/x-shockwave-flash" src="GivingAndMe.swf" name="GivingAndMe" bgcolor="#FFFFFF" quality="high" salign="t"');
		if(location.hash!="") {
			document.write('flashvars="targetFrame='+location.hash.replace("#",""));
		}
		document.write('" height="100%" width="100%"></embed>');	
	},
	setMessage : function(msg) {
		document.getElementById("msg").innerHTML = msg;	
		document.getElementById("msg").style.display = "block";
	},
	goTo : function(frame) {
		if (navigator.appName=="Microsoft Internet Explorer") {
			location.hash = "#"+frame;
		} else {
			var theFlash = document.getElementsByTagName("embed")[0];
			if(!(theFlash)) {
				alert("no flash");
			} else {
				theFlash.goToFrame(frame);
			}
		}
	},
	addLoadEvent : function(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			}
		}
	}
}

ltg.addLoadEvent(function() {
	/* more code to run on page load */
	document.getElementsByTagName("embed")[0].focus();
	//setTimeout('window.onunload = null',3000);
});
