/* ___________________________________________________

             general.js ~ revised 2012.02.05
     XGB Web and Software Design ~ www.xgbdesign.com
   ___________________________________________________
*/


// Functions to implement image-based navigation: _______________________________________

function LoadNavigation(size) {
	if (document.images) {
		// Declare and initialize global array variables used throughout:
		navSet = new Array(size);
		idNames = new Array("vg-button", "ar-button", "vg-image", "ar-image", "videos");
		// Preload the images:
		var i, suffix, extension;
		for (i = 0; i < size; ++i) {
			suffix = (i % 2 == 0) ? "-over" : "-out";
			extension = (i < 4) ? ".gif" : ".jpg";
			navSet[i] = new Image();
			navSet[i].src = "grfx/navigation/" + idNames[Math.floor(i / 2)] + suffix + extension;
		}
	}
}

function Flip(index) {
	if (document.images)
		document.getElementById(idNames[Math.floor(index / 2)]).src = navSet[index].src;
}


// Functions to implement flyout menu: __________________________________________________

// Copyright 2006-2007 JavaScript Array ~ www.javascript-array.com

// global variables
var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id) {	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';
}

// close showed layer
function mclose() {
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime() {
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime() {
	if(closetimer) {
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 


// Function for menu pages: _____________________________________________________________

function Show(index) {
	var i = 0;
	// If index == 0, only the menu is displayed:
	while (document.getElementById("a" + (++i)))
		document.getElementById("a" + i).style.display = (i == index) ? "block" : "none" ;
}


// Functions for "Quote of the Day": ____________________________________________________

function WriteQuoteoftheDay() {
	var seed = Math.floor(Math.random() * 80);
	document.write("<p>&quot;" + Quotation(seed) + "&quot;<br /><strong>" + Author(seed) + "</strong></p>");
}

function Quotation(index) {
	// 80 items:
	var quotes = new Array(
		"The hottest places in hell are reserved for those who in times of great moral crises maintain their neutrality.",
		"The victim feels the suffering in his own mind and body, whereas the victimizer...can be quite unaware of that suffering. The sword does not feel the pain that it inflicts.",
		"Animals are my friends. And I don't eat my friends.",
		"People ask me how I look so young; I tell them I look my age. It is other people who look older; what do you expect from people who eat corpses?",
		"Great spirits have always encountered violent opposition from mediocre minds.",


		"You may torture my body, break my bones and even kill me. And then you can have my dead body. But not my obedience.",
		"It ill becomes us to invoke in our daily prayers the blessings of God, the compassionate, if we in turn will not practice elementary compassion towards our fellow creatures.",
		"I do not regard flesh food as necessary for us. I hold flesh food to be unsuited to our species. To my mind, the life of a lamb is no less precious than that of a human being. I should be unwilling to take the life of a lamb for the sake of the human body. The more helpless the creature, the more it is entitled to protection from humans from the cruelty of humans.",
		"Pacifism is ultimately nothing more than a willingness to die, and to let others die, at the pleasure of the world's thugs. A single sociopath, armed with nothing more than a knife, could exterminate a city full of pacifists. ...Here we come upon a terrible facet of ethically asymmetric warfare: when your enemy has no scruples, your own scruples become another weapon in his hand.",
		"All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident.",


		"Cowardice asks the question, 'Is it safe?' Expediency asks the question, 'Is it polite?' Vanity asks the question, 'Is it popular?' But conscience asks the question, 'Is it <em>right?</em>'. And there comes a point when one must take a position that is neither safe, nor polite, nor popular, but one must take it because his conscience tells him that it is right.",
		"I abhor vivisection with my whole soul. All the scientific discoveries stained with innocent blood I count as of no consequence.",
		"The cruel experimenter cannot, in the same breath, defend the scientific validity of vivisection on the grounds of the physical similarities between man and the other animals, and then defend the morality of vivisection on the grounds that men and animals are physically different. The only logical alternatives for him are to admit he is either pre-Darwinian or immoral.",
		"As long as there are slaughterhouses, there will be battlefields.",
		"A man can live and be healthy without killing animals for food; therefore, if he eats meat, he participates in taking animal life for the sake of his appetite. And to act so is immoral.",


		"If a man aspires towards a righteous life, his first act of abstinence is from injury to animals.",
		"Until he extends the circle of compassion to all living things, man will not himself find peace.",
		"As long as humans continue to be the ruthless destroyer of other beings, we will never know health or peace. For as long as people massacre animals, they will kill each other. Indeed, those who sow the seed of murder and pain will never reap joy or love.",
		"Men dig their graves with their own teeth, and die more by those instruments than by all weapons of their enemies.",
		"My doctrine is this, that if we see cruelty or wrong that we have the power to stop, and do nothing, we make ourselves sharers in the guilt.",


		"Truly man is the king of beasts, for his brutality exceeds theirs. We live by the death of others: we are burial places! I have from an early age abjured the use of meat, and the time will come when men such as I will look upon the murder of animals as they now look upon the murder of men.",
		"You have just dined, and however scrupulously the slaughterhouse is concealed in the graceful distance of miles, there is complicity.",
		"Wherefore I say to all those who desire to be disciples, keep your hands from bloodshed and let no flesh meat enter your mouths, for the Lord is just and bountiful; who ordains that man shall live by the fruits and seeds of the earth alone.",
		"If you had to kill your own calf before you ate him, most likely you would not be able to do it. To hear the calf scream, to see the blood spill, to see the baby being taken away from his momma, and to see the look of death in the animal's eye would turn your stomach. So you get the man at the packing house to do the killing for you.",
		"Can you really ask for what reason Pythagoras had for abstaining from flesh? I, for my part, marvel at which man was possessed, who was the first to pollute his mouth with gore, and to allow his lips to touch the flesh of murdered beings.",


		"It was the saying of Bion, that though the boys throw stones at frogs in sport, yet the frogs do not die in sport but in earnest.",
		"Hunting is not a sport; in a sport, the contestants must know they're in the game.",
		"But for the sake of some little mouthful of flesh, we deprive a soul of the sun, and light, and of that proportion of life and time they had been born into the world to enjoy.",
		"People often say that humans have always eaten animals, as if this is a justification for continuing the practice. According to this logic, we should not try to prevent people from murdering other people, since this has also been done since the earliest of times.",
		"As long as people will shed the blood of innocent creatures, there can be no peace, no liberty, no harmony between people. Slaughter and justice cannot dwell together.",


		"What do they know&mdash;all these scholars, all these philosophers, all the leaders of the world? They have convinced themselves that man, the worst transgressor of all the species, is the crown of creation.  All other creatures were created merely to provide him with food, pelts, to be tormented, exterminated.  In relation to them, all people are Nazis; for the animals it is an eternal Treblinka.",
		"Nothing will benefit human health and increase chances for survival of life on Earth as much as the evolution to a vegetarian diet.",
		"I am not interested to know whether vivisection produces results that are profitable to the human race. The pain which it inflicts upon unconsenting animals is the basis of my enmity toward it, and it is to me sufficient justification of the enmity without looking further.",
		"It is just like man's vanity and impertinence to call an animal dumb because it is dumb to his dull perceptions.",
		"Damn these human beings. If I had invented them, I would go hide my head in a bag.",


		"Housing animals in more comfortable, larger cages is not enough. Whether we exploit animals to eat, to wear, to entertain us, or to learn, the truth of animal rights requires empty cages, not larger cages.",
		"But if you will contend that you were born to an inclination to such food as you have now a mind to eat, do you then yourself kill what you would eat. But do it yourself, without the help of a chopping-knife, mallet or axe, as wolves, bears, and lions do, who kill and eat at once. Rend an ox with thy teeth, worry a hog with thy mouth, tear a lamb or a hare in pieces, and fall on and eat it alive as they do.",
		"It seems to me of great importance to teach children respect for life. Towards this end, experiments on living animals in classrooms should be stopped. To encourage cruelty in the name of science can only destroy the finer emotions of affection and sympathy, and breed an unfeeling callousness in the young towards suffering in all living creatures.",
		"Who ever heard of angry revolutionists all harmonizing 'We Shall Overcome Some Day' while tripping and swaying along arm-in-arm with the very people they were supposed to be angrily revolting against? Who ever heard of angry revolutionists swinging their bare feet together with their oppressor in lily pad park pools, with gospels and guitars and 'I Have a Dream' speeches?",
		"I am aware that many object to the severity of my language; but is there not cause for severity? I will be as harsh as the truth and as uncompromising as justice. On this subject, I do not wish to think or speak or write with moderation. ...I am in earnest. I will not equivocate. I will not excuse. I will not retreat a single inch. And I will be heard.",


		"I submit that an individual who breaks a law that conscience tells him is unjust and who willingly accepts the penalty of imprisonment in order to rouse the conscience of the community over its injustice is in reality expressing the highest respect for the law.",
		"We cannot in all good conscience obey your unjust laws and abide by the unjust system, because noncooperation with evil is as much a moral obligation as is cooperation with good.",
		"To disturb is my function. The public prefers to be reassured. There are some whose job this is. There are only too many.",
		"The greatness of a nation and its moral progress can be judged by the way its animals are treated.",
		"One day, I reached out to eat something and he ran away. Obviously, he didn't want to be eaten.",


		"Animals have done us no harm and they have no power of resistance. Cruelty to animals is as if man did not love God. There is something so very dreadful, so Satanic, in tormenting those who have never harmed us, who cannot defend themselves, who are utterly in our power.",
		"I would not want to promote research on animals. Fortunately, only my back is twisted, not my mind.",
		"The reason why I am against animal research is because it doesn't work. It has no scientific value. One cannot extrapolate the results of animal research to human beings, and every good scientist knows that.",
		"It is difficult to entertain a warm feeling for a 'medical man' who straps dogs to a table, cuts their vocal cords, and spends an interesting day or week slowly vivisecting or dismembering them.",
		"Atrocities are no less atrocities when they occur in laboratories and are called 'medical research'.",


		"Custom will reconcile people to any atrocity.",
		"A full-grown horse or dog is beyond comparison a more rational, as well as a more conversable animal, than an infant of a day, or a week, or even a month, old. But suppose the case were otherwise, what would it avail? The question is not, 'Can they reason?' nor, 'Can they talk?' but, 'Can they <em>suffer?</em>'",
		"It is not an act of kindness to treat animals respectfully. It is an act of justice. It is not 'the sentimental interests' of moral agents that grounds our duties of justice to children, the retarded, the senile, or other moral patients, including animals. It is respect for their inherent value. The myth of the privileged moral status of moral agents has no clothes.",
		"When I look at animals held captive by circuses, I think of slavery. Animals in circuses represent the domination and oppression we have fought against for so long. They wear the same chains and shackles.",
		"Those who won't hesitate to vivisect, won't hesitate to lie about it as well.",


		"If a group of beings from another planet were to land on Earth&mdash;beings who considered themselves as superior to you as you feel yourself to be to other animals&mdash;would you concede them the rights over you that you assume over other animals?",
		"If we are trespassing, then so were the American soldiers who broke down the gates of Hitler's death camps. If we are thieves, then so were the members of The Underground Railroad who freed the slaves from the South. And if we are vandals, then so were those who destroyed forever the gas chambers of Buchenwald and Auschwitz.",
		"We have enslaved the rest of animal creation, and have treated our distant cousins in fur and feathers so badly that beyond doubt, if they were to formulate a religion, they would depict the Devil in human form.",
		"Auschwitz begins wherever someone looks at a slaughterhouse and thinks: they're only animals.",
		"Animals and humans suffer and die alike. Violence causes the same pain, the same spilling of blood, the same stench of death, the same arrogant, cruel and brutal taking of life. We don't have to be a part of it.",


		"Kindness and compassion towards all living beings is a mark of a civilized society. Racism, economic deprival, dog fighting and cock fighting, bullfighting and rodeos are all cut from the same defective fabric: violence. Only when we have become nonviolent towards all life will we have learned to live well ourselves.",
		"There is not an animal that lives on the earth, nor a being that flies on its wings, that does not form communities like you. They all shall be gathered to their Rabb (Lord) in the end.",
		"Cow-killers and cow-eaters are condemned to rot in hell for as many thousands of years as there are for each hair on the body of every cow they eat from.",	
		"Non-violence leads to the highest ethics which is the goal of all evolution. Until we stop harming all other living beings, we are all still savages.", 
		"What an amount of suffering and cruel punishment the poor creatures have to endure in order to give pleasure to men devoid of thought.",


		"Think occasionally of the suffering of which you spare yourself the sight.",
		"[T]he very fact that an animal is going to be eaten seems to remove it from the category of intelligent beings, and causes it to be regarded as mere animated 'meat.'",
		"Take sides. Neutrality helps the oppressor, never the victim. Silence encourages the tormentor, never the tormented.",
		"When the Nazis came for the communists, I remained silent; I was not a commu- nist. When they locked up the social democrats, I remained silent; I was not a social democrat. When they came for the trade unionists, I did not speak out; I was not a trade unionist. When they came for the Jews, I remained silent; I wasn't a Jew. When they came for me, there was no one left to speak out.",
		"A missionary was walking in Africa when he heard the ominous padding of a lion behind him. 'Oh Lord' prayed the missionary, 'Grant in Thy goodness that the lion walking behind me is a good Christian lion.' And then in the silence that followed, the missionary heard the lion praying too: 'Oh Lord,' he prayed. 'We thank thee for the food which we are about to receive.' ",


		"To a man whose mind is free there is something even more intolerable in the sufferings of animals than in the sufferings of man. For with the latter it is at least admitted that suffering is evil and that the man who causes it is a criminal. But thousands of animals are uselessly butchered every day without a shadow of remorse. If any man were to refer to it, he would be thought ridiculous. And that is the unpardonable crime.",
		"Because the heart beats under a covering of hair, of fur, feathers, or wings, it is, for that reason, to be of no account?",
		"The wild, cruel beast is not behind the bars of the cage. He is in front of it.",
		"If there is no struggle, there is no progress. Those who profess to favor freedom, and deprecate agitation, are men who want crops without plowing up the ground, they want rain without thunder and lightning. ... Power concedes nothing without a demand. It never did and it never will.",
		"I prefer to be true to myself, even at the hazard of incurring the ridicule of others, rather than to be false, and to incur my own abhorrence.",


		"Revolutions are never fought by turning the other cheek. Revolutions are never based upon loving your enemy and praying for those who spitefully use you. Revolutions are never waged singing, 'We Shall Overcome.' Revolutions are never compromising. Revolutions are never based upon negotiations. Revolutions are based upon bloodshed. ...",
		"I, John Brown, am now quite certain that the crimes of this guilty land will never be purged away but with blood. I had&mdash;as I now think&mdash;vainly flattered myself that without very much bloodshed it might be done.",
		"Our grandchildren will ask us one day: 'Where were you during the Holocaust of the animals? What did you do against these horrifying crimes? ' We won't be able to offer the same excuse for the second time: that we didn't know.",
		"Those who make peaceful revolution impossible will make violent revolution inevitable.",
		"Whenever people say 'we mustn't be sentimental,' you can take it they are about to do something cruel. And if they add, 'we must be realistic,' they mean they are going to make money out of it."

		);
		
	return quotes[index];   
}

function Author(index) {
	// 80 items:
	var authors = new Array(
		"Dante Alighieri, Italian author and poet (1265-1321)",
		"Philip Hallie, <em>From Cruelty to Goodness</em>",
		"George Bernard Shaw",
		"George Bernard Shaw",
		"Albert Einstein",

		"Mohandas K. Gandhi",
		"Mohandas K. Gandhi",
		"Mohandas K. Gandhi",
		"Sam Harris, <em>The End of Faith</em>",
		"Arthur Schopenhauer, German philosopher (1788-1860)",

		"Martin Luther King, Jr.",
		"Mohandas K. Gandhi",
		"Richard Ryder, former vivisectionist",
		"Leo Tolstoy (1828-1910)",
		"Leo Tolstoy (1828-1910)",

		"Albert Einstein",
		"Albert Schweitzer",
		"Pythagoras of Samos (<em>ca.</em> 530 B.C.)",
		"Pythagoras of Samos (<em>ca.</em> 530 B.C.)",
		"Anna Sewell, author of <em>Black Beauty</em> (1820-1878)",

		"Leonardo da Vinci (1452-1519)",
		"Ralph Waldo Emerson (1803-1882)",
		"Jesus, Gospel of the Nazirenes, Chapter 38, Verse 4",
		"Dick Gregory, <em>The Shadow That Scares Me</em>",
		"Plutarch of Chaeronea (<em>ca.</em> 100 C.E.)",

		"Plutarch of Chaeronea (<em>ca.</em> 100 C.E.)",
		"Paul Rodriguez, comedian",
		"Plutarch of Chaeronea (<em>ca.</em> 100 C.E.)",
		"Isaac Bashevis Singer (1904-1991)",
		"Isaac Bashevis Singer (1904-1991)",

		"Isaac Bashevis Singer, <em>The Letter Writer</em>",
		"Albert Einstein",
		"Mark Twain (1835-1910)",
		"Mark Twain (1835-1910)",
		"Mark Twain, in an 1899 letter to W. D. Howells",

		"Tom Regan, <em>Empty Cages</em>",
		"Plutarch of Chaeronea (<em>ca.</em> 100 C.E.)",
		"Eleanor Roosevelt, writer, diplomat, former First Lady (1884-1962)",
		"Malcolm X (1925-1965)",
		"William Lloyd Garrison, slave abolitionist and orator (1805-1879)",

		"Martin Luther King, Jr.",
		"Martin Luther King, Jr.",
		"Andr&#0233; Gide (1869-1951), <em>The Counterfeiters</em>",
		"Mohandas K. Gandhi",
		"Dave Allen, musician",

		"Cardinal John Henry Newman (1801-1890)",
		"Linn Pulis, polio victim",
		"Robert Mendelsohn, M.D., Late Professor of Pediatrics, U. of Illinois College of Medicine",
		"Clare Booth Luce, author, publisher, former Ambassador to Italy (1902-1987)",
		"George Bernard Shaw",

		"George Bernard Shaw",
		"Jeremy Bentham, British philosopher (1748-1832)",
		"Tom Regan, <em>The Case for Animal Rights</em>",
		"Dick Gregory, comedian, civil rights activist, humanitarian, vegan",
		"George Bernard Shaw",

		"George Bernard Shaw",
		"Animal Liberation Front",
		"William Ralph Inge, Deacon and Professor of Divinity, Cambridge (1860-1954)",
		"Theodor Adorno, German philosopher (1903-1969)",
		"Dick Gregory",

		"Cesar Chavez",
		"<em>Qur'an,</em> Sura 6:38",
		"<em>Srimad Bhagavad-Gita,</em> Sri Caitanya Caritamrita adi lila, Chapter 17, Verse 166",
		"Thomas Alva Edison, inventor",
		"Albert Schweitzer, on the training and exhibition of animals in circus acts",

		"Albert Schweitzer, on meat-eating",
		"Henry S. Salt, British social reformer, animal rights activist (1851-1939)",
		"Elie Wiesel, concentration camp survivor",
		"Pastor Martin Niem&#0246;ller (1892-1984)",
		"Cleveland Amory",

		"Romain Rolland",
		"Jean Paul Richter, German Romantic writer (1763-1825)",
		"Axel Munthe (1857-1949)",
		"Frederick Douglass, American abolitionist (1818-1895)",
		"Frederick Douglass, American abolitionist (1818-1895)",

		"Malcolm X (1925-1965)",
		"John Brown's statement before his Dec. 2, 1859 hanging",
		"Dr. Helmut Kaplan (b. 1952)",
		"John F. Kennedy, in a speech at the White House, 1962",
		"Brigid Brophy"
		 
		);
		
	return authors[index];
}


