window.onload = function() {
	//Create Menu Settings: (Menu ID, Is Vertical, Show Timer, Hide Timer, On Click ('all', 'main' or 'lev2'), Right to Left, Horizontal Subs, Flush Left, Flush Top)
	eep();
	qm_create(0,false,0,0,false,false,false,false,false);
	initSpotLight();	
}

function eep() {
	var flashvars = {};
	flashvars.selTileIndex = "none";
	flashvars.animateIntro = "true";
	flashvars.url1 = "http://ww5.komen.org/IWasDiagnosed/IveBeenDiagnosedwithBreastCancer.html";
	flashvars.url2 = "http://ww5.komen.org/SomeoneIKnow/SomeoneIKnowWasDiagnosed.html";
	flashvars.url3 = "http://ww5.komen.org/MakeADifference/ImHeretoMakeaDifference.html";
	flashvars.url4 = "http://ww5.komen.org/ShareStory.aspx";
	flashvars.urlLogo = "http://www.komen.org";
	var params = {};
	params.menu = "false";
	params.wmode = "transparent";
	var attributes = {};
	swfobject.embedSWF("flash/eep.swf", "sgk_emotional_entry_container", "358", "165", "9.0.0", "../js/expressInstall.swf", flashvars, params, attributes);
}

function getPageScroll() {
    var xScroll, yScroll;
    if (self.pageYOffset) {
        yScroll = self.pageYOffset;
        xScroll = self.pageXOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {
        yScroll = document.documentElement.scrollTop;
        xScroll = document.documentElement.scrollLeft;
    } else if (document.body) {
        yScroll = document.body.scrollTop;
        xScroll = document.body.scrollLeft;
    }
    arrayPageScroll = new Array(xScroll, yScroll);
    return arrayPageScroll;
}

function initSpotLight() {
	$("a.spotlight").bind("click", function() {
		spotLight(this);
		return false;
		});	
}

function spotLight(ele) {
	var target = $(ele).attr("href");
	var targetId = ele.id;
	var targetFlash = $(target).attr("id")+"_flash";
	var overlay = $("#overlay");
	var documentHeight = $(document).height();
	var documentWidth = $(document).width();	
	var arrayPageScroll = getPageScroll();
	var topPosition = arrayPageScroll[1] + 50;
	swfobject.embedSWF("http://eyemaginations.com/3deyeonline/3deonlinev20.swf", targetFlash, "402", "400", "8.0.0", "../js/expressInstall.swf", {aID:targetId}, {wmode:"transparent"}, "false");
	
	$(target).css({"display":"block","position":"absolute","top":topPosition,"left":"268px"});
	
	$(overlay).css({height:documentHeight, width:documentWidth, "display":"block"});
	$("div.spotlight a, #overlay").bind("click", function() {
		$(overlay).css("display","none");
		$("#"+targetFlash).replaceWith("<div id="+targetFlash+"></div>");
		$(target).css("display","none");
		return false;
		});
}