var artSpecArtists="";
var artSpecMedium="";
var artSpecPublication="";
var artSpecSize="";
var artSpecTitle="";
var bookSpecISBN="";
var bookSpecPages="";
var bookSpecWidth="";
var bookSpecHeight="";
var bookSpecBinding="";
var bookSpecPublisher="";
var bookSpecAuthor="";
var bookSpecCoAuthor="";
var bookSpecIllustrator="";
var bookSpecLanguage="";
var bookSpecEdition="";
var critiqueArtist="";
var critiqueAuthor="";
var critiqueEmail="";
var critiqueTitle="";
var critiqueAgeGroup="";
var stopBotsAutoValue="";
var bookmarkNumber=0;

function highlightMenu(whichOne,flag,flag2)
{
var bg1="";
var bg2="";
var fc1="";
var fc2="";
if (flag2==0)
{
bg1="#B7C5BC";
fc1="#1E6638";
bg2="#1E6638";
fc2="#B7C5BC";
}
if (flag2==1)
{
fc1="#1E6638";
fc2="#000000";
}
if (flag2==3)
{
bg1="#000000";
fc1="#CFCFCF";
bg2="#e6dfd5";
fc2="#000000";
}
if (flag2!=2)
{
if (flag==0)
{
if (flag2!=1)
whichOne.style.backgroundColor=bg1;
whichOne.style.color=fc1;
}
if (flag==1)
{
if (flag2!=1)
whichOne.style.backgroundColor=bg2;
whichOne.style.color=fc2;
}
}
if (flag2==2)
{
if (flag==0)
whichOne.style.borderBottom="#000000 2px solid";
else
whichOne.style.borderBottom="#ffffff 0px solid";
}
}
function switchImage(whichOne,newSource)
{
document.images[whichOne].src=newSource;
}

function hideShowContent(whichOne)
{
if (document.getElementById(whichOne).style.display=="")
document.getElementById(whichOne).style.display="none";
else
document.getElementById(whichOne).style.display="";
}

function resetArtSpec()
{
artSpecArtist="";
artSpecMedium="";
artSpecPublication="";
artSpecSize="";
artSpecTitle="";
}

function resetBookSpec()
{
bookSpecISBN="";
bookSpecPages="";
bookSpecWidth="";
bookSpecHeight="";
bookSpecBinding="";
bookSpecPublisher="";
bookSpecAuthor="";
bookSpecCoAuthor="";
bookSpecIllustrator="";
bookSpecLanguage="";
bookSpecEdition="";
}

function changeSizeImage(whichOne,flag)
{
var imageName=whichOne+"Image";
var thumbSizeName=whichOne+"Thumb.jpg";
var largeSizeName=whichOne+"Large.jpg";
if (flag==0)
document.images[imageName].src = largeSizeName;
if (flag==1)
document.images[imageName].src = thumbSizeName;
}

function formSubmissionDisplay(firstPart,secondPart,secondPartB,thirdPart,thirdPartB)
{
var looper;
for (looper=0;looper<2;looper++)
{
stopBotsAutoValue+=Math.round(Math.random()*9)+"";
}
document.write("Please type <b>"+stopBotsAutoValue+"</b> into this box <input type=\"text\" name=\"stopBotsManualValue\" value=\"\" size=3>");
document.write("&nbsp;<a href=\"JavaScript:alert('Unfortunately, some programmers like to write auto-bots that spider the web looking for forms to automatically submit information and spam sites.  This is a way to stop those bots.')\">Why?</a>");
document.write("<br><INPUT TYPE=\"button\" VALUE=\"Send Information\" class=\"menuStyle\" onClick=\"submitMyForm('"+firstPart+"','"+secondPart+"','"+secondPartB+"','"+thirdPart+"','"+thirdPartB+"')\">");
}

function submitMyForm(firstPart,secondPart,secondPartB,thirdPart,thirdPartB)
{
if (document.myForm.stopBotsManualValue.value==stopBotsAutoValue)
{
if (firstPart!="" || secondPart!="" || secondPartB!="" || thirdPart!="" || thirdPartB!="")
document.myForm.recipient.value=firstPart+"@"+secondPart+secondPartB+"."+thirdPart+thirdPartB;
document.myForm.stopBotsManualValue.value="";
document.myForm.submit();
}
else
alert("Manual STOP BOTS value does not match displayed value, please retype.");
}

function displayMailto(firstPart,secondPart,secondPartB,thirdPart,thirdPartB,flag,subject,flag2)
{
document.write("<a href=\"");
document.write("ma");
document.write("il");
document.write("to:");
document.write(firstPart);
document.write("@");
document.write(secondPart);
document.write(secondPartB);
document.write(".");
document.write(thirdPart);
document.write(thirdPartB);
if (subject!="")
{
document.write("?subject=");
document.write(subject);
}
document.write("\"");
if (flag2==0)
{
document.write(" class=\"messageMenuStyle\"");
document.write(" onMouseover=\"highlightMenu(this,0,3)\"");
document.write(" onMouseout=\"highlightMenu(this,1,3)\"");
}
document.write(">");
if (flag==0)
{
document.write("E-");
document.write("Mail");
}
else
{
document.write(firstPart);
document.write("@");
document.write(secondPart);
document.write(secondPartB);
document.write(".");
document.write(thirdPart);
document.write(thirdPartB);
}
document.write("</");
document.write("a>");
}

function initAuthorCritiquePage()
{
document.getElementById("critiqueAuthorSpan").innerHTML=opener.critiqueAuthor;
document.getElementById("critiqueTitleSpan").innerHTML=opener.critiqueTitle;
document.getElementById("critiqueAgeGroupSpan").innerHTML=opener.critiqueAgeGroup;
document.myForm.bookAuthor.value=opener.critiqueAuthor;
document.myForm.bookTitle.value=opener.critiqueTitle;
document.myForm.recipient.value=opener.critiqueEmail;
document.myForm.subject.value="Author Critique - "+opener.critiqueTitle;
}

function initArtistCritiquePage()
{
document.getElementById("critiqueArtistSpan").innerHTML=opener.critiqueArtist;
document.getElementById("critiqueTitleSpan").innerHTML=opener.critiqueTitle;
document.getElementById("critiqueAgeGroupSpan").innerHTML=opener.critiqueAgeGroup;
document.myForm.artArtist.value=opener.critiqueArtist;
document.myForm.artTitle.value=opener.critiqueTitle;
document.myForm.recipient.value=opener.critiqueEmail;
document.myForm.subject.value="Artist Critique - "+opener.critiqueTitle;
}

function prepareAuthorCritique(theAuthor,emailFirst,emailSecond,emailThird,theTitle,theAgeGroup)
{
critiqueAuthor=theAuthor;
critiqueEmail=emailFirst+"@"+emailSecond+"."+emailThird;
critiqueTitle=theTitle;
critiqueAgeGroup=theAgeGroup;
window.open("/authorCritique.shtml","_blank");
}

function prepareArtistCritique(theArtist,emailFirst,emailSecond,emailThird,theTitle,theAgeGroup)
{
critiqueArtist=theArtist;
critiqueEmail=emailFirst+"@"+emailSecond+"."+emailThird;
critiqueTitle=theTitle;
critiqueAgeGroup=theAgeGroup;
window.open("/artistCritique.shtml","_blank");
}

function bookmarkDisplay()
{
bookmarkNumber++;
document.write("<a name=\"bookmark"+bookmarkNumber+"\">&nbsp;</a>");
}
