var url = "/tellacolleague_flash.aspx";
var url2 = "/contactus_flash.aspx";
var briefcaseXML = "";

/*function restyleiFrame() {
	var oIframe = document.getElementById("iframe");
    var oDoc = oIframe.contentWindow || oIframe.contentDocument;
    if (oDoc.document) {
        oDoc = oDoc.document;
    }
    oDoc.getElementById("contentHolder").style.width = "600px";
    oDoc.getElementById("contentHolder").style.height = "655px";
    oDoc.getElementById("contentHolder").style.backgroundColor = "red";
}

function fadeEleIn(ele) {
	$(ele).setStyle("opacity: 0;").show();
	Effect.Fade(ele, {
		from: 0.0,
		to: 1.0,
		duration: 1.0
	});
}

function fadeEleOut(ele) {
	Effect.Fade(ele, {
		from: 1.0,
		to: 0.0,
		duration: 1.0
	});
	setTimeout("$('" + ele +"').hide();", 1000);
}*/

function Show_Privacy() {
    var theURL = 'privacy.aspx';
	$$("body")[0].insert("<div id='screen'> </div><div id='lightbox'><div id='iframeWrap'><iframe id='iframe' src='" + theURL + "' width='640' height='650' frameborder='0' scrolling='yes'></iframe></div><a href='javascript:closeLightbox();' title='Close' class='close'><span>Close X</span></a></div>");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();
	var pageSize = getPageSize();
	$("screen").setStyle({
		height: pageSize[1] + "px",
		opacity: 0.5
	}).show();
	/*Effect.Fade("screen", {
		from: 0.0,
		to: 0.5,
		duration: 1.0
	});
	fadeEleIn("lightbox");
	fadeEleIn("iframe");*/
	$("lightbox").show();
	$("iframe").show();
	// setTimeout("restyleiFrame();", 3000);
}
function Show_Legal() {
    var theURL = 'legal.aspx';
	$$("body")[0].insert("<div id='screen'> </div><div id='lightbox'><div id='iframeWrap'><iframe id='iframe' src='" + theURL + "' width='640' height='650' frameborder='0' scrolling='yes'></iframe></div><a href='javascript:closeLightbox();' title='Close' class='close'><span>Close X</span></a></div>");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();
	var pageSize = getPageSize();
	$("screen").setStyle({
		height: pageSize[1] + "px",
		opacity: 0.5
	}).show();
	/*Effect.Fade("screen", {
		from: 0.0,
		to: 0.5,
		duration: 1.0
	});
	fadeEleIn("lightbox");
	fadeEleIn("iframe");*/
	$("lightbox").show();
	$("iframe").show();
	// setTimeout("restyleiFrame();", 3000);
}
function Show_ContactUs() {
    var theURL = 'contactus.aspx';
	$$("body")[0].insert("<div id='screen'> </div><div id='lightbox'><div id='iframeWrap'><iframe id='iframe' src='" + theURL + "' width='640' height='650' frameborder='0' scrolling='yes'></iframe></div><a href='javascript:closeLightbox();' title='Close' class='close'><span>Close X</span></a></div>");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();
	var pageSize = getPageSize();
	$("screen").setStyle({
		height: pageSize[1] + "px",
		opacity: 0.5
	}).show();
	/*Effect.Fade("screen", {
		from: 0.0,
		to: 0.5,
		duration: 1.0
	});
	fadeEleIn("lightbox");
	fadeEleIn("iframe");*/
	$("lightbox").show();
	$("iframe").show();
	// setTimeout("restyleiFrame();", 3000);
}
function Show_Tellafriend() {
    var theURL = 'tellafriend.aspx';
	$$("body")[0].insert("<div id='screen'> </div><div id='lightbox'><div id='iframeWrap'><iframe id='iframe' src='" + theURL + "' width='640' height='650' frameborder='0' scrolling='yes'></iframe></div><a href='javascript:closeLightbox();' title='Close' class='close'><span>Close X</span></a></div>");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();
	var pageSize = getPageSize();
	$("screen").setStyle({
		height: pageSize[1] + "px",
		opacity: 0.5
	}).show();
	/*Effect.Fade("screen", {
		from: 0.0,
		to: 0.5,
		duration: 1.0
	});
	fadeEleIn("lightbox");
	fadeEleIn("iframe");*/
	$("lightbox").show();
	$("iframe").show();
	// setTimeout("restyleiFrame();", 3000);
}

function Show_Tellafriend_Article(title, filename) {
    var theURL = 'tellafriend_article.aspx?title=' + encodeURI(title) + '&filename=' + encodeURI(filename);
	$$("body")[0].insert("<div id='screen'> </div><div id='lightbox'><div id='iframeWrap'><iframe id='iframe' src='" + theURL + "' width='640' height='650' frameborder='0' scrolling='yes'></iframe></div><a href='javascript:closeLightbox();' title='Close' class='close'><span>Close X</span></a></div>");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();
	var pageSize = getPageSize();
	$("screen").setStyle({
		height: pageSize[1] + "px",
		opacity: 0.5
	}).show();
	/*Effect.Fade("screen", {
		from: 0.0,
		to: 0.5,
		duration: 1.0
	});
	fadeEleIn("lightbox");
	fadeEleIn("iframe");*/
	$("lightbox").show();
	$("iframe").show();
	// setTimeout("restyleiFrame();", 3000);
}

function Show_SendBriefcase(strXML) {
    briefcaseXML = strXML;
    var theURL = 'send_briefcase.aspx';
	$$("body")[0].insert("<div id='screen'> </div><div id='lightbox'><div id='iframeWrap'><iframe id='iframe' src='" + theURL + "' width='640' height='650' frameborder='0' scrolling='yes'></iframe></div><a href='javascript:closeLightbox();' title='Close' class='close'><span>Close X</span></a></div>");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();
	var pageSize = getPageSize();
	$("screen").setStyle({
		height: pageSize[1] + "px",
		opacity: 0.5
	}).show();
	/*Effect.Fade("screen", {
		from: 0.0,
		to: 0.5,
		duration: 1.0
	});
	fadeEleIn("lightbox");
	fadeEleIn("iframe");*/
	$("lightbox").show();
	$("iframe").show();
	// setTimeout("restyleiFrame();", 3000);
}

function invesco_contact() {
	$$("body")[0].insert("<div id='screen'> </div><div id='lightbox'><div id='iframeWrap'><iframe id='iframe' src='" + url2 + "' width='980' height='660' frameborder='0' scrolling='no'></iframe></div><a href='javascript:closeLightbox();' title='Close' class='close'><span>Close X</span></a></div>");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();
	var pageSize = getPageSize();
	$("screen").setStyle({
		height: pageSize[1] + "px",
		opacity: 0.5
	}).show();
	/*Effect.Fade("screen", {
		from: 0.0,
		to: 0.5,
		duration: 1.0
	});
	fadeEleIn("lightbox");
	fadeEleIn("iframe");*/
	$("lightbox").show();
	$("iframe").show();
	// setTimeout("restyleiFrame();", 3000);
}

function closeLightbox() {
	/*Effect.Fade("screen", {
		from: 0.5,
		to: 0.0,
		duration: 1.0
	});
	setTimeout("$('screen').hide()", 1000);
	fadeEleOut("lightbox");
	fadeEleOut("iframe");
	$("screen").hide();
	$("lightbox").hide();
	$("iframe").hide();*/
	$("screen").remove();
	$("lightbox").remove();
}

function triggerPPLightbox() {
	$$("a.spawn").each(function(s) {
		s.observe("click", function(s) {
			ppLightbox();
			s.stop();
		});
	});
}
