var axMilestone; var aMilestone; var bMilestoneReady = false; var aArrIntWidth; var aArrIntHeight; var windowWidth, windowHeight; var aPosition = getScrollXY(); function showInstruction() { opacity("trInstruction", 0, 100, 200); } function prepareInstruction(){ var trInstruction = document.getElementById("trInstruction"); trInstruction.style.MozOpacity = 0; trInstruction.style.filter = "alpha(opacity=0)"; trInstruction.style.display = ''; } function openContent(iCurrIdx){ var sOut = "loading ... "; var oItem = new Object(); if (bMilestoneReady) { for(var i=0;i'; //sOut += '    '; sOut += ' '; sOut += ''+oItem.title+'

'+oItem.desc+' '; sOut += '    '; document.getElementById('milestone_detail').innerHTML = sOut; setContentPos(); var syear = oItem.id.split("_")[0].split("content")[1]; track('milestone>'+syear+'>'+replace(oItem.title,' ','_')); }else{ openContent(iCurrIdx); } } function thisMovie(movieName) { if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName]; } else { return document[movieName]; } } function closeContent(){ document.getElementById('milestone').style.display = 'none'; document.getElementById('milestone_bg').style.display = 'none'; thisMovie("citi50").enableFlashMouseDetection(); } function setContentPos(){ var milestone_bg = document.getElementById("milestone_bg"); var milestone = document.getElementById("milestone"); if (self.innerHeight) { windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } if( typeof( window.pageYOffset ) == 'number' ) { milestone_bg.style.width = (document.body.scrollWidth)+'px'; milestone_bg.style.height = (document.body.scrollHeight)+'px'; }else{ milestone_bg.style.width = document.body.offsetWidth; milestone_bg.style.height = document.body.offsetHeight; } milestone_bg.style.MozOpacity = 0; milestone_bg.style.filter = "alpha(opacity=0)"; milestone_bg.style.display = ''; milestone.style.MozOpacity = 0; milestone.style.filter = "alpha(opacity=0)"; milestone.style.display = ''; milestone.style.height="auto"; if (document.all) milestone.style.height=milestone.offsetHeight+"px"; else milestone.style.height=(milestone.offsetHeight+10)+"px"; milestone.style.top = aPosition[1] + ((parseInt(windowHeight)/2)-(parseInt(milestone.style.height))/2)+'px'; milestone.style.left = aPosition[0] + ((parseInt(windowWidth)/2)-(parseInt(milestone.style.width))/2)+'px'; opacity("milestone_bg", 0, 70, 50); opacity("milestone", 0, 100, 75); setTimeout("showContent()", 100); } function showContent(){ var obj_detail = document.getElementById("milestone_detail"); obj_detail.style.display = ''; //opacity("milestone_detail_container", 0, 100, 100); } function chDimensionH(id, iStart, iEnd, millisec){ var speed = Math.round(millisec / 100); var timer = 0; var iInt = 0; aArrIntHeight = new Array(); if(iStart > iEnd) { for(i = iStart; i >= iEnd; i--){ iInt = setTimeout("changeDimension('height'," + i + ",'" + id + "')",(timer * speed)); aArrIntHeight.push(iInt); timer++; } } else if(iStart < iEnd) { for(i = iStart; i <= iEnd; i++){ iInt = setTimeout("changeDimension('height'," + i + ",'" + id + "')",(timer * speed)); aArrIntHeight.push(iInt); timer++; } } } function chDimensionW(id, iStart, iEnd, millisec){ var speed = Math.round(millisec / 100); var timer = 0; var iInt = 0; aArrIntWidth = new Array(); if(iStart > iEnd) { for(i = iStart; i >= iEnd; i--){ iInt = setTimeout("changeDimension('width'," + i + ",'" + id + "')",(timer * speed)); aArrIntWidth.push(iInt); timer++; } } else if(iStart < iEnd) { for(i = iStart; i <= iEnd; i++){ iInt = setTimeout("changeDimension('width'," + i + ",'" + id + "')",(timer * speed)); aArrIntWidth.push(iInt); timer++; } } } function changeDimension(dir, size, id){ var object = document.getElementById(id).style; if (dir == "width") object.width = size+'px'; else if (dir == "height") object.height = size+'px'; object.top = aPosition[1] + ((parseInt(windowHeight)/2)-(parseInt(object.height))/2)+'px'; object.left = aPosition[0] + ((parseInt(windowWidth)/2)-(parseInt(object.width))/2)+'px'; } function opacity(id, opacStart, opacEnd, millisec) { //speed for each frame var speed = Math.round(millisec / 100); var timer = 0; var iIntOpacity = 0; aArrIntOpacity = new Array(); //determine the direction for the blending, if start and end are the same nothing happens if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--){ iIntOpacity = setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); aArrIntOpacity.push(iIntOpacity); timer++; } } else if(opacStart < opacEnd) { for(i = opacStart; i <= opacEnd; i++){ iIntOpacity = setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); aArrIntOpacity.push(iIntOpacity); timer++; } } } function changeOpac(opacity, id) { var object = document.getElementById(id).style; if (object.opacity != opacity){ object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } } function getScrollXY() { var scrOfX = 0, scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } return [ scrOfX, scrOfY ]; } function getMilestone() { if (window.XMLHttpRequest) { axMilestone = new XMLHttpRequest(); } else if (window.ActiveXObject) { axMilestone = new ActiveXObject("Microsoft.XMLHTTP"); } var url = "xml/milestone.xml"; axMilestone.open("GET", url, true); axMilestone.onreadystatechange = parseMilestone; axMilestone.send(null); } function parseMilestone() { if (axMilestone.readyState == 4) { if (axMilestone.status == 200) { var xmldoc = axMilestone.responseXML; var root = xmldoc.getElementsByTagName("list")[0]; aMilestone = new Array(); for (var i=0; i