var preloadFlag = false;
var movieName = "soundPlay";
var msgWindow = null;
var currentImageName = "";

moviesToReplace = new Array();

function thisMovie(movieName) {
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  }	else {
    return document[movieName]
  }
}

function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}

function clickSound(soundName) {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).TGotoLabel("_level0/"+soundName,"stopSound");
    thisMovie(movieName).TGotoLabel("_level0/"+soundName,"playSound");
  }
}

placeHolderFile = "/movies/placeholder2.swf";
placeHolderFileHD = "/movies/placeholderhd.swf";
swfBGcolor = "#f9f9f9";

function displayMyMovieHD(moviePath, movieName) {
	var obHTML =
		"<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http:\/\/fpdownload.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=8,0,0,0\""+
			"id=\"" + movieName + 
			"\" width=\"340\" height=\"244\" align=\"middle\">" +
			"<param name=\"allowScriptAccess\" value=\"always\" \/>" +
			"<param name=\"swliveconnect\" value=\"true\" \/>" +
			"<param name=\"movie\" value=\"" + placeHolderFileHD + "\" \/>" +
			"<param name=\"quality\" value=\"high\" \/>" +
			"<param name=\"bgcolor\" value=\"" + swfBGcolor + "\" \/>" +
				"<embed src=\"" + placeHolderFileHD + "\" quality=\"high\" bgcolor=\"" + swfBGcolor + "\" width=\"340\" height=\"244\" swLiveConnect=true " + 
				"id=\"" + movieName + "\" " + 
				"name=\"" + movieName + "\" align=\"middle\" allowScriptAccess=\"always\" type=\"application\/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" \/>" +
		"<\/object>";
	document.write(obHTML);
	moviesToReplace[moviesToReplace.length] = new Array (moviePath,movieName);
}

function displayMyMovie(moviePath, movieName) {
	var obHTML =
		"<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http:\/\/fpdownload.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=8,0,0,0\""+
			"id=\"" + movieName + 
			"\" width=\"340\" height=\"304\" align=\"middle\">" +
			"<param name=\"allowScriptAccess\" value=\"always\" \/>" +
			"<param name=\"swliveconnect\" value=\"true\" \/>" +
			"<param name=\"movie\" value=\"" + placeHolderFile + "\" \/>" +
			"<param name=\"quality\" value=\"high\" \/>" +
			"<param name=\"bgcolor\" value=\"" + swfBGcolor + "\" \/>" +
				"<embed src=\"" + placeHolderFile + "\" quality=\"high\" bgcolor=\"" + swfBGcolor + "\" width=\"340\" height=\"304\" swLiveConnect=true " + 
				"id=\"" + movieName + "\" " + 
				"name=\"" + movieName + "\" align=\"middle\" allowScriptAccess=\"always\" type=\"application\/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" \/>" +
		"<\/object>";
	document.write(obHTML);
	moviesToReplace[moviesToReplace.length] = new Array (moviePath,movieName);
}

function changeMovies() {
	for (i = 0; i < moviesToReplace.length; i++) {
		movieName = moviesToReplace[i][1];
		fullMovieName = moviesToReplace[i][0] + "/" + moviesToReplace[i][1] + ".flv";
		getFlashMovieObject(movieName).SetVariable("myCurrentMovie.contentPath",fullMovieName);
	}
}

function getFlashMovieObject(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName]
	} else {
		return document[movieName]
	}
}

function fullQuote(quotation, author) {
  this.quotation = quotation;
  this.author = author;
}

myQuotes = new Array();
qCounter = 0;
myQuotes[qCounter]   = new fullQuote ( "In theory there is no difference between theory and practice, but in practice there is.","Rico Cozzio");
myQuotes[++qCounter] = new fullQuote ( "Your saying <span style='font-size: 14px;'>&#8216;</span>I do not understand you<span style='font-size: 14px;'>&#8217;</span> is praise beyond my worth, and an insult you do not deserve.","Kahlil Gibran");
myQuotes[++qCounter] = new fullQuote ( "If you're not outraged, you're not paying attention!","Katherine Doyle");
myQuotes[++qCounter] = new fullQuote ( "If a person can't communicate, the very least he can do is to shut up.","Tom Lehrer");
myQuotes[++qCounter] = new fullQuote ( "It is better to keep your mouth closed and be thought a fool than to open it and remove all doubt.","Mark Twain");
myQuotes[++qCounter] = new fullQuote ( "How many legs does a dog have if you call the tail a leg? Four. Calling a tail a leg doesn't make it a leg.","Abraham Lincoln");
myQuotes[++qCounter] = new fullQuote ( "I used to think I was poor. Then they told me I wasn't poor, I was needy. Then they told me it was self-defeating to think of myself as needy. I was deprived. (Oh not deprived but rather underprivileged.) Then they told me that underprivileged was overused. I was disadvantaged. I still don't have a dime. But I have a great vocabulary.","Jules Feiffer");
myQuotes[++qCounter] = new fullQuote ( "The problem is not that we have too many fools, it's that the lightning isn't distributed right.","Mark Twain");
myQuotes[++qCounter] = new fullQuote ( "I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.","Mark Twain");
myQuotes[++qCounter] = new fullQuote ( "Blessed is the man, who having nothing to say, abstains from giving wordy evidence of the fact.","George Eliot");
myQuotes[++qCounter] = new fullQuote ( "Never express yourself more clearly than you are able to think.","Niels Bohr");
myQuotes[++qCounter] = new fullQuote ( "I've always been crazy but it's kept me from going insane.","Waylon Jennings");
myQuotes[++qCounter] = new fullQuote ( "There is much to be said in favor of modern journalism. By giving us the opinions of the uneducated, it keeps us in touch with the ignorance of the community.","Oscar Wilde");
myQuotes[++qCounter] = new fullQuote ( "Never let your sense of morals get in the way of doing what's right.","Isaac Asimov");
myQuotes[++qCounter] = new fullQuote ( "Never attribute to malice that which is more easily explained by stupidity.","Anonymous");
myQuotes[++qCounter] = new fullQuote ( "Black holes are where God divided by zero.","Anonymous");
myQuotes[++qCounter] = new fullQuote ( "Sincerity is the most important thing in all relationships. Once you can fake that, you've got it made.","Oscar Wilde");
myQuotes[++qCounter] = new fullQuote ( "The Principle of the Dangerous Precedent is that you should not now do an admittedly right action for fear you, or your equally timid successors, should not have the courage to do right in some future case, which, ex hypothesi, is essentially different, but superficially resembles the present one. Every public action which is not customary, either is wrong, or, if it is right, is a dangerous precedent. It follows that nothing should ever be done for the first time.","Francis Mcdonald Cornford");
myQuotes[++qCounter] = new fullQuote ( "Man is not logical and his intellectual history is a record of mental reserves and compromises. He hangs on to what he can in his old beliefs even when he is compelled to surrender their logical basis.","John Dewey");
myQuotes[++qCounter] = new fullQuote ( "I shall take it that you are in the first flush of ambition and just beginning to make yourself disagreeable. You think (do you not?) that you have only to state a reasonable case, and people must listen to reason and act upon it at once. It is just this conviction that makes you so unpleasant. There is little hope of dissuading you; but has it occurred to you that nothing is ever done until every one is convinced that it ought to be done, and has been convinced for so long that it is now time to do something else? And are you not aware that conviction has never been produced by an appeal to reason which only makes people uncomfortable? If you want to move them, you must address your arguments to prejudice and the political motive, which I will presently describe.","Francis Mcdonald Cornford");
myQuotes[++qCounter] = new fullQuote ( "The academic area is one of the most difficult areas to change in our society.  We continue to use the same methods of instruction, particularly lectures, that have been used for hundreds of years.  Little scientific research is done to test new approaches, and little systematic attention is given to the development of new methods. Universities that study many aspects of the world ignore the educational function in which  they are engaging and from which a large part of their revenues are earned.","Richard M. Cyert (1980)");
myQuotes[++qCounter] = new fullQuote ( "Few faculty members have any awareness of the expanding knowledge about learning from psychology and cognitive science. Almost no one in the academy has mastered or used this knowledge base. One of my colleagues observed that if doctors used science the way college teachers do, they would still be trying to heal with leeches.","James Duderstadt");
myQuotes[++qCounter] = new fullQuote ( "And it ought to be remembered that there is nothing more difficult to take in hand, more perilous to conduct, or more uncertain of success, than to take the lead in the introduction of a new order of things. Because the innovator has for enemies all those who have done well under the old conditions, and lukewarm defenders in those who may do well under the new. This coolness arises partly from fear of the opponents, who have the laws on their side, and partly from the incredulity of men, who do not readily believe in new things until they have had a long experience with them. Thus it happens that whenever those who are hostile have the opportunity to attack they do it like partisans, whilst the others defend lukewarmly.","Niccolo Machiavelli (1513)");
myQuotes[++qCounter] = new fullQuote ( "An important scientific innovation rarely makes its way by gradually winning over and converting its opponents: it rarely happens that Saul becomes Paul.  What does happen is that its opponents gradually die out and that the growing generation is familiarized with the idea from the beginning: another instance of the fact that the future lies with the young.","Max Planck (1936)");
myQuotes[++qCounter] = new fullQuote ( "Everything that can be counted doesn't necessarily count; everything that counts can't necessarily be counted.","Albert Einstein");
myQuotes[++qCounter] = new fullQuote ( "The difference between stupidity and genius is that genius has its limits.","Albert Einstein");
myQuotes[++qCounter] = new fullQuote ( "The world is a dangerous place to live; not because of the people who are evil, but because of the people who don't do anything about it.","Albert Einstein");
myQuotes[++qCounter] = new fullQuote ( "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.","Albert Einstein");
myQuotes[++qCounter] = new fullQuote ( "Try not to become a man of success, but rather try to become a man of value.","Albert Einstein");
myQuotes[++qCounter] = new fullQuote ( "Perfection of means and confusion of ends seem to characterize our age.","Albert Einstein");
myQuotes[++qCounter] = new fullQuote ( "I stand before this faceless crowd; and I wonder why I bother; so much controlled by so few; stumbling from one disaster to another.","Blue Rodeo<br>(from the song Lost Together)");
myQuotes[++qCounter] = new fullQuote ( "Men of limited ideas take for law what the words expressly say. Intelligent men take for law whatever impartial utility dictates in each case.","Giambattista Vico (1725)");
myQuotes[++qCounter] = new fullQuote ( "Not of the letter, but of the spirit, for the letter killeth, but the spirit giveth life.","St. Paul<br>(Second Corinthians III 6)");
myQuotes[++qCounter] = new fullQuote ( "Every morning in Africa, a gazelle wakes up. It knows it must run faster than the fastest lion or it will be killed&nbsp;&#8230; every morning a lion wakes up. It knows it must outrun the slowest gazelle or it will starve to death. It doesn't matter whether you're a lion or a gazelle&nbsp;&#8230; when the sun comes up, you'd better be running.","Anonymous");
myQuotes[++qCounter] = new fullQuote ( "It's our attitude in life that determines life's attitude toward us.","Earl Nightingale");
myQuotes[++qCounter] = new fullQuote ( "Things that matter most must never be at the mercy of things that matter least.","Van Goethe");
myQuotes[++qCounter] = new fullQuote ( "The only thing that stands between a person and what they want from life is often the will to try it and the faith to believe it's possible.","Rich Devos");
myQuotes[++qCounter] = new fullQuote ( "Kites rise highest against the wind&nbsp;&#8230; not with it.","Winston Churchill");
myQuotes[++qCounter] = new fullQuote ( "The man on top of the mountain didn't fall there.","Anonymous");
myQuotes[++qCounter] = new fullQuote ( "Courage is the door that can only be opened from the inside.","Terry Neil");
myQuotes[++qCounter] = new fullQuote ( "To get what we've never had, we must do what we've never done.","Anonymous");
myQuotes[++qCounter] = new fullQuote ( "It is a funny thing about life: if you refuse to accept anything but the best, you very often get it.","Somerset Maugham");
myQuotes[++qCounter] = new fullQuote ( "Failures are divided into two classes&nbsp;&ndash; those who thought and never did and those who did and never thought.","John Charles Sak");
myQuotes[++qCounter] = new fullQuote ( "We are what we repeatedly do. Excellence, then is not an act, but a habit.","Aristotle");
myQuotes[++qCounter] = new fullQuote ( "Wisdom is knowing the right path to take&nbsp;&#8230; integrity is taking it.","M. H. McKee");
myQuotes[++qCounter] = new fullQuote ( "Knowledge is like climbing a mountain; the higher you reach, the more you can see and appreciate.","Anonymous");
myQuotes[++qCounter] = new fullQuote ( "Many things will catch your eye in life, but only a few will catch your heart&nbsp;&#8230; Pursue those.","Anonymous");
myQuotes[++qCounter] = new fullQuote ( "In the confrontation between the stream and the rock, the stream always wins&nbsp;&#8230; not through strength but by perseverance.","H. Jackson Brown");
myQuotes[++qCounter] = new fullQuote ( "Excuses are the nails used to build a house of failure.","Don Wilder");
myQuotes[++qCounter] = new fullQuote ( "You will always miss 100% of the shots you don't take.","Wayne Gretzky");
myQuotes[++qCounter] = new fullQuote ( "It is one of the greatest compensations in life that no one can help another without helping themselves.","Ralph Waldo Emerson");

function writeQuotes() {
    for (var i=0; i<myQuotes.length; i+=1) {
      document.writeln("<li class=\"liquote\"><span class=\"squotel\">&#8220;</span>"+myQuotes[i].quotation+"<span class=\"squoter\">&#8221;</span><br><span class=\"authorcite\">"+myQuotes[i].author+"<br></span>");
    }
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document.getElementById(changeImages.arguments[i]).src = changeImages.arguments[i+1];
		}
	}
}

function mapCtrl(imgNum, overState) {
	if (document.images && (preloadFlag == true)) {
		imgSrc = "n" + imgNum;
		if (overState == "on"){
			document.getElementById(imgSrc).src = eval('pre_n'+imgNum).src;
		} else {
			document.getElementById(imgSrc).src = "images/controls/n" + imgNum + ".gif";
		}
	}
}

function frameImage(blockType, imgName, imgWidth, imgHeight, tM, bM, lM, rM, alignLCR, figCap, frameType, iLink){
  var tWidth=imgWidth+20;
  var tHeight=imgHeight+20;
  if (blockType == "div") {tailBreak="<br clear=all>"} else {tailBreak=""};
  if (frameType == "noborder") {fT="photos"} else {fT="images"};
  if (iLink != "") {linkStart="<A href=\""+iLink+"\">"; linkEnd="</A>"} else {linkStart=""; linkEnd=""};
  document.writeln("<"+blockType+"><table align=\""+alignLCR+"\"width="+tWidth+" height="+tHeight+" border=0 cellpadding=0 cellspacing=0 style=\"margin: 0px; margin-right:"+rM+"px; margin-left:"+lM+"px; margin-top:"+tM+"px; margin-bottom:"+bM+"px;\">");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t11.gif');\"><img src=\"images/"+fT+"/t11.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t12.gif');\"><img src=\"images/"+fT+"/t12.gif\" width=\"1\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t13.gif');\"><img src=\"images/"+fT+"/t13.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t21.gif');\"><img src=\"images/"+fT+"/t21.gif\" width=\"10\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\">"+linkStart+"<img src=\"images/images/"+imgName+"\" width="+imgWidth+" height="+imgHeight+" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\">"+linkEnd+"</td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t23.gif');\"><img src=\"images/"+fT+"/t23.gif\" width=\"10\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t31.gif');\"><img src=\"images/"+fT+"/t31.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t32.gif');\"><img src=\"images/"+fT+"/t32.gif\" width=\"1\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t33.gif');\"><img src=\"images/"+fT+"/t33.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td colspan=3 style=\"padding: 8px; padding-top: 0px; padding-bottom: 10px;\"><span class=\"figcaption\">"+figCap+"</span></td>");
  document.writeln("	</tr>");
  document.writeln("</table></"+blockType+">"+tailBreak);
};

function framePhoto(blockType, imgName, imgWidth, imgHeight, tM, bM, lM, rM, alignLCR, figCap, frameType, iLink){
  var tWidth=imgWidth+20;
  var tHeight=imgHeight+20;
  if (blockType == "div") {tailBreak="<br clear=all>"} else {tailBreak=""};
  if (frameType == "noborder") {fT="photos"} else {fT="images"};
  if (iLink != "") {linkStart="<A href=\""+iLink+"\">"; linkEnd="</A>"} else {linkStart=""; linkEnd=""};
  document.writeln("<"+blockType+"><table align=\""+alignLCR+"\"width="+tWidth+" height="+tHeight+" border=0 cellpadding=0 cellspacing=0 style=\"margin: 0px; margin-right:"+rM+"px; margin-left:"+lM+"px; margin-top:"+tM+"px; margin-bottom:"+bM+"px;\">");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t11.gif');\"><img src=\"images/"+fT+"/t11.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t12.gif');\"><img src=\"images/"+fT+"/t12.gif\" width=\"1\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t13.gif');\"><img src=\"images/"+fT+"/t13.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t21.gif');\"><img src=\"images/"+fT+"/t21.gif\" width=\"10\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\">"+linkStart+"<img src=\""+imgName+"\" width="+imgWidth+" height="+imgHeight+" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\">"+linkEnd+"</td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t23.gif');\"><img src=\"images/"+fT+"/t23.gif\" width=\"10\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t31.gif');\"><img src=\"images/"+fT+"/t31.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t32.gif');\"><img src=\"images/"+fT+"/t32.gif\" width=\"1\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t33.gif');\"><img src=\"images/"+fT+"/t33.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td colspan=3 style=\"padding: 8px; padding-top: 0px; padding-bottom: 10px;\"><span class=\"figcaption\">"+figCap+"</span></td>");
  document.writeln("	</tr>");
  document.writeln("</table></"+blockType+">"+tailBreak);
};



if (document.images) {
	spacerLoad = newImage("images/spacer.gif");
}

function windowOpener(currentPage, currentImage) {
	currentImageName = 'pics/pic'+currentImage+'.jpg'
	if (msgWindow) {
		if (msgWindow.closed) {
			makeIt(currentPage, currentImage, currentImageName)
		} else {
			msgWindow.frames[0].document['photo'].src=currentImageName
			msgWindow.focus()
		}
	} else {
		makeIt(currentPage, currentImage, currentImageName)
	}
	msgWindow.currentImageName = currentImageName
}

function makeIt(currentPage, currentImage, currentImageName) {
	myWidth=790;
	myHeight=540;
	myPosX=(screen.width-myWidth)/2;
	myPosY=(screen.height-myHeight)/2;
	myProps='toolbar=no, status=no,scrollbars=no,resizable=no,left='+myPosX+',top='+myPosY+',width='+myWidth+',height='+myHeight;
	msgWindow=window.open('/album.asp?pageID=' + currentPage + '&photoID=' + currentImage, 'photos',myProps);
}


function preloadImages() {
	pre_n1 = newImage("images/controls/n1on.gif");
	pre_n2 = newImage("images/controls/n2on.gif");
	pre_n3 = newImage("images/controls/n3on.gif");
	pre_n4 = newImage("images/controls/n4on.gif");
	pre_n5 = newImage("images/controls/n5on.gif");
	pre_n6 = newImage("images/controls/n6on.gif");
	pre_n7 = newImage("images/controls/n7on.gif");
	pre_n8 = newImage("images/controls/n8on.gif");
	pre_n9 = newImage("images/controls/n9on.gif");
	pre_n10 = newImage("images/controls/n10on.gif");
	pre_n11 = newImage("images/controls/n11on.gif");
	pre_n12 = newImage("images/controls/n12on.gif");
	pre_n13 = newImage("images/controls/n13on.gif");
	pre_n14 = newImage("images/controls/n14on.gif");
	pageLockOn = newImage("images/l1.gif")
	pageLockOff = newImage("images/l0.gif")
	pre_t1 = newImage("images/images/t11.gif");
	pre_t2 = newImage("images/images/t12.gif");
	pre_t3 = newImage("images/images/t13.gif");
	pre_t4 = newImage("images/images/t21.gif");
	pre_t5 = newImage("images/images/t23.gif");
	pre_t6 = newImage("images/images/t31.gif");
	pre_t7 = newImage("images/images/t32.gif");
	pre_t8 = newImage("images/images/t33.gif");
  	preloadFlag = true;
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function dummyF() {
}

function goBackClear() {
  history.back();
}

wwwCookieName = "";

function getCookie(name){
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0) {
    begin = dc.indexOf(cname);
    if (begin != -1) {
      begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    }
  }
  return null;
}

function setCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString();
}

