//File: scripts2.js
//Author: Jason Tablante
//URL: http://library.advanced.org/15816
//Purpose: Navigation and real media interface

//navigation menu
function jumpmenu(){
selected = document.navigationbar.mainmenu.options[document.navigationbar.mainmenu.selectedIndex].value;
location = selected;
}

//real media lyrics window and other popup windows
function popup(filename, thewindow, thewidth, theheight, thescrollbar){
var attributes = "width=" + thewidth + ",height=" + theheight + ",scrollbars=" + thescrollbar + ",resizable=0";
window.open(filename, thewindow, attributes);
}

//ninoy scrapbook automated biography
function caption(){
var entries = new Array();
var finalcaption
var counter = Math.round(Math.random() * 30);
entries[0] = "<b>November 27, 1932:</b> Born in Concepcion, Tarlac, the second child of Benigno Aquino, Sr., and Aurora Aquino.";
entries[1] = "<b>1935-1941:</b> Begins elementary education at St. Joseph's College and eventually finishes at the Ateneo de Manila in Intramuros.";
entries[2] = "<b>1945-48:</b> Finishes high school in San Beda College.";
entries[3] = "<b>1947-49:</b> Enrolls at the Ateneo de Manila for Liberal Arts course. Works as a copy boy for the Manila Times under Joaquin Roces. Eventually becomes regular reporter.";
entries[4] = "<b>1950:</b> As a 17-year-old, covers the Korean War as a foreign correspondent of the Manila Times. Becomes the baby of the press corps. Awarded the Philippine Legion of Honor, Officer Degree, by President Elpidio Quirino for his meritorious service to the country in covering the Philippine Expeditionary Force to Korea.";
entries[5] = "<b>1951-53:</b> Becomes foreign correspondent of the Manila Times for Southeast Asia; named foreign editor until 1955. Enrolls at the University of the Philippines, College of Law.";
entries[6] = "<b>May 1954:</b> Negotiates the surrender of Huk leader, Luis Taruc, for which he is awarded the Philippine Legion of Honor, Commander Degree, for exemplary meritorious service to the Filipino people by President Ramon Magsaysay. Serves special assistant to the President.";
entries[7] = "<b>October 1954:</b> Marries Corazon Cojuangco, also of Tarlac, at the Our Lady of Sorrows Parish Church, Pasay. President Ramon Magsaysay serves as principal sponsor. Does not finish his fourth year of law at U.P. Never took the bar.";
entries[8] = "<b>1955:</b> At 22, elected the youngest mayor of his hometown, Concepcion, Tarlac. His opponents protest that he has not yet fulfilled the age requirement, which is 23 years old.";
entries[9] = "<b>1956:</b> Serves as press officer, Philippine-American military bases agreement negotiations.";
entries[10] = "<b>1957:</b> Becomes special assistant to President Carlos Garcia after Magsaysay's death. The Supreme Court unseats him as the mayor of Concepcion, upholding the decision of the Court of the First Instance in Tarlac that his election was unlawful and illegal, as he is still 19 days short of the required age.";
entries[12] = "<b>1958:</b> Becomes administrator of Hacienda Luisita and Tarlac Development Corporation.";
entries[13] = "<b>1959:</b> At 25, elected youngest Vice Governor of Tarlac province.";
entries[14] = "<b>1960:</b> Voted one of the Ten Outstanding Young Men of the Philippines (TOYM) in the field of public service.";
entries[15] = "<b>1963:</b> At 30, elected provincial governor of Tarlac, winning all 17 towns and posting the highest majority ever garnered by a gubernatorial candidate in the province.";
entries[16] = "<b>1964:</b> Becomes special counsel to President Diosdado Macapagal, whom he accompanies on state visits to Cambodia and Indonesia.";
entries[17] = "<b>1966:</b> Becomes project director of the Tarlac Project Spread, a joint undertaking of the National Economic Council and the United States Agency for International Development (AID), designed to increase rural income.";
entries[18] = "<b>1967:</b> At 35, elected youngest senator, the lone opposition Liberal Party candidate to survive the election sweep by Marcos' Nacionalista Party. Again, his opponents protest that he is underaged, since he is a few days short of 35 upon his election. This time, the protest is not upheld. Elected secretary-general of the Liberal Party.";
entries[19] = "<b>1968-71:</b> Does unrelenting and incisive fiscalization work in the Philippine Senate.";
entries[20] = "<b>1971:</b> The Liberal Party wins six of the eight senatorial seats, bolstering Ninoy's hopes of being the Liberal Party presidential contender. Becomes the arch-critic and nemesis of President Marcos, who continually accuses him of Huk-coddling and fraternizing with the Communists.";
entries[21] = "<b>September 1972:</b> Denounces and exposes President Marcos' Oplan Saggitarius -- a plan to declare martial law in Metro Manila and surrounding areas.";
entries[22] = "<b>September 22, 1972:</b> Arrested and detained hours before President Marcos makes the declaration of martial law public. Would become the longest held prisoner among Marcos' political opponents and critics.";
entries[23] = "<b>April 1975:</b> Trial of Ninoy before military commission begins. Refuses to take part in what he believes are sham proceedings. Stages a 40-day hunger strike to protest the military order forcing him to attend the military court sessions.";
entries[24] = "<b>November 1977:</b> Found guilty of subversion, illegal possession of firearms, and murder, and sentenced to die by firing squad -- by a decision of the military tribunal.";
entries[25] = "<b>April 1978:</b> Heads the Lakas ng Bayan (LABAN) ticket which challenges the ruling party for seats in the Interim National Assembly. Campaigns from his prison cell and is allowed a brief television appearance. The night before Election Day, April 6, citizens of Manila hold a noise barrage as a show of support for his candidacy and to make Ninoy 'hear' that they are behind him. Eventually, loses to Imelda Marcos, held of the Kilusang Bagong Lipunan, which sweeps the 21 seats for Manila.";
entries[26] = "<b>December 1979:</b> Granted a three-week furlough to be with his family for his 25th wedding anniversary, the first time he is ever released from detention.";
entries[27] = "<b>May 1980:</b> Allowed by President Marcos to go to the United States for heart surgery.";
entries[28] = "<b>1980-83:</b> Becomes research fellow and lecturer at Harvard University and also a research fellow at the Massachusetts Institute of Technology, 1982-83.";
entries[29] = "<b>August 21, 1983:</b> Shot at the Manila International Airport upon descending from a China Airlines Plane.";
entries[30] = "<b>August 31, 1983:</b> Buried at the Manila Memorial Park after an 11-hour funeral march from Sto. Domingo Church through 30 kilometers of Manila's streets. Nearly two million people participate in or line the route of the cortege, making it one of the most memorable in Philippine history.";
finalcaption = "<p class=smalltext><font color=black>" + entries[counter] + "</font></p>";
document.write(finalcaption);
}

//sets of functions for the image gallery

var counter = 0;

function previous(){
counter = counter - 1;
var iszero = (counter < 0);
counter = (iszero) ? 0 : counter;
document.theimage.src = eval('image' + counter + '.src');
document.theimage.alt = eval('caption' + counter);
}

function next(){
counter = counter + 1;
var isten = (counter > 10);
counter = (isten) ? 0 : counter;
document.theimage.src = eval('image' + counter + '.src');
document.theimage.alt = eval('caption' + counter);
}