<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<?php $thisPage="fullPainting"; ?>
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
var paintingBack = 1;
var paintingNext = 1;
var caption = 1;
var pointback;
var backToDiv;
var pointnext;
var nextToDiv;
var captionsList = " ";
function processback() {
pointback();
backToDiv();
captionToDiv();
}
function pointback(){
if (paintingBack > 1) {
paintingBack = paintingBack-1;}
return;
}
function backToDiv(){
document.getElementById("paintingImage").innerHTML = "<img src=\"images/painting_"+paintingBack+".jpg\" />";
paintingNext = paintingBack;
caption = paintingBack;
return false;
}
function processnext() {
pointnext();
nextToDiv();
captionToDiv();
}
function pointnext(){
if (paintingNext < 49){
paintingNext++;}
return;
}
function nextToDiv(){
document.getElementById("paintingImage").innerHTML = "<img src=\"images/painting_"+paintingNext+".jpg\" />";
paintingBack = paintingNext;
caption = paintingBack;
return false;
}
function captionToDiv() {
document.getElementById("captionHere").innerHTML = captionsList[caption];
return false;
}
function captionsToCaptionsList() {
try{
txtFile = new XMLHttpRequest();
}
catch(e){
try{
txtFile = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e) {
try{
txtFile = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
alert("Ajax not supported by your browser!");
return false;
}
}
}
txtFile.open("GET", "paintinglist.txt", true);
txtFile.onreadystatechange = function() {
if (txtFile.readyState === 4) {// Makes sure the document is ready to parse.
if (txtFile.status === 200) {// Makes sure it's found the file.
captionsList = txtFile.responseText.split("\n");
}
}
}
txtFile.send(null);
}
captionsToCaptionsList();
//-->
</script>
<title>STEPHANIE PEEK</title>
</head>
<body>
<div id="center" align="center">
<div id="container">
<div id="main">
<?php $paintingNumber = $_REQUEST['paintingNumber']; ?>
<?php $descriptions = file("paintinglist2.txt"); ?>
<?php echo $descriptions[$paintingNumber]; ?>
<script type="text/javascript">
paintingBack = "<?php echo $paintingNumber; ?>";
paintingNext = "<?php echo $paintingNumber; ?>";
caption= "<?php echo $paintingNumber; ?>";
</script>
<script type="text/javascript">
function captionsToCaptionsList() {
try{
txtFile = new XMLHttpRequest();
}
catch(e){
try{
txtFile = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e) {
try{
txtFile = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
alert("Ajax not supported by your browser!");
return false;
}
}
}
txtFile.open("GET", "paintinglist.txt", true);
txtFile.onreadystatechange = function() {
if (txtFile.readyState === 4) {// Makes sure the document is ready to parse.
if (txtFile.status === 200) {// Makes sure it's found the file.
captionsList = txtFile.responseText.split("\n");
}
}
}
txtFile.send(null);
}
captionsToCaptionsList();
</script>
<script type="text/javascript">
</script>
<?php include ("includes/topNav.php"); ?>
<div class="clear"></div>
<div class="painting" id="paintingImage"><img src='images/painting_<?php echo $paintingNumber; ?>.jpg' /></div>
<div class="captionText" id="captionHere"<?php echo $descriptions[$paintingNumber;] ?></div>
<div class="clear"></div>
</div><!--end main -->
</div><!--end container -->
</div><!--end center -->
</body>
</html>