﻿//all.js in hqweb2
d=document;l=(d.layers)?1:0;op=navigator.userAgent.toLowerCase().indexOf('opera')!=-1; msie=(d.all)?1:0;
dom=(document.getElementById)?1:0;

//  "file:///C|/Documents and Settings/Peter/Desktop/Documents/HQWeb2/HTML/"
// 

basehref = "file:///C|/Documents and Settings/Peter/Desktop/Documents/HQWeb2/HTML/" ;
//basehref="http://quince.netpublish.net/";

if (!msie && !dom) 
{
//fallbackloc = basehref + "fallback.html"; window.location=fallbackloc;
}

function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;
if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}

//show element
function sE(e){if(l)e.visibility='show';else e.style.visibility='visible';}

//hide element
function hE(e){if(l)e.visibility='hide';else e.style.visibility='hidden';}

//get left posn
function gX(e){if(l) return e.left;else if(d.all)return e.style.pixelLeft;else return e.style.left}

//get top posn
function gY(e){if(l) return e.top;else if (d.all)return e.style.pixelTop;else return e.style.top}

//get width
function gW(e){if(l) return e.width;else return e.style.width}

//get dynamic height
function gH(myid)
{ 
divob = gE(myid);
if (divob.offsetHeight) { eheight = divob.offsetHeight }
else if (d.getElementById) {eheight = d.defaultView.getComputedStyle(test, "").getPropertyValue("height")}
return eheight;
}

//get z-index
function gZ(e){if(l) return e.zIndex;else return e.style.zIndex} 

function sZ(e,z){if(l)e.zIndex=z;else e.style.zIndex=z;} //set z-index
function sX(e,x){if(l)e.left=x;else if(op)e.style.pixelLeft=x;else e.style.left=x+"px";}//set left
function sY(e,y){if(l)e.top=y;else if(op)e.style.pixelTop=y;else e.style.top=y+"px";}//set top
function sW(e,w){if(l)e.clip.width=w;else if(op)e.style.pixelWidth=w;else e.style.width=w;}
function sH(e,h){if(l)e.clip.height=h;else if(op)e.style.pixelHeight=h;else e.style.height=h;}
function sC(e,t,r,b,x){if(l){X=e.clip;X.top=t;X.right=r;X.bottom=b;X.left=x;}else e.style.clip='rect('+t+' '+r+' '+b+' '+x+')';}

function wH(e,h)
{
if(l) {e.document.write(h);e.document.close();return true};
	//Y=e.document;Y.write(h);Y.close()
if(e.innerHTML)
	{
	e.innerHTML=h
	}
}


function getWindowHeight ()
{
  if (window.innerHeight)
  {
	theHeight = window.innerHeight
  }
  else if (d.documentElement && document.documentElement.clientHeight)
  {
  	theHeight = d.documentElement.clientHeight
  }
  else if (d.body)
  {
 	theHeight = d.body.clientHeight
  }
return theHeight
}


function getWindowWidth()
{
  if (window.innerWidth)
  {
	theWidth = window.innerWidth
  }
  else if (d.documentElement && document.documentElement.clientWidth)
  {
  	theWidth = d.documentElement.clientWidth
  }
  else if (d.body)
  {
 	theWidth = d.body.clientWidth
  }
return theWidth
}



function showExp(section)
{
sectobj=gE(section); 
if  (sectobj.style.display=="none") //currently closed
	{
	sectobj.style.display="block"; //open this temporarily
	msov=true;
	}
} 

function hideExp(section)
{
sectobj=gE(section); 
if (msov) //mousover section not clicked open
	{
	sectobj.style.display="none"; //close
	msov=false;
	}
}

function expandCollapse(section) //expand or collapse the menu heading;
{
if (!msov)
 {
sectobj=gE(section); 
if  (sectobj.style.display=="none") //currently closed
  { 
      if (menumode=="A" && section_open !="none") //auto mode, close any open section first
        {
         openobj=gE(section_open); openobj.style.display="none"; //close it
        } 
       sectobj.style.display="block"; //open this 
       section_open=section;    //record it as open
   }
 else //currently open
   {
     sectobj.style.display="none"; if (menumode=="A") section_open="none"; 
   }
 }//end if !msov
} 

function closeAll()
{

for(i=1;i<=10;i++) 
	{
	    if (menuhead[i] == " ") break;
	  openobj=gE(menuhead[i]); openobj.style.display="none"; 
	 }
section_open="none";
}


function nowt()
{
}

function showPopup(evt,txt,wwidth) 
{
tooltip=gE("tipdiv");shadow = gE("tipdiv_s");
	sW(tooltip,wwidth); sW(shadow,wwidth); //set width
	content='<div class="eetooltip">' + txt +'</div>';
	//alert("content is " + content);
	tooltip.innerHTML=content;
	wheight=gH("tipdiv");getOffsetX();getOffsetY(); // 
	sH(shadow,wheight);
	
	if (window.event) 
	{
	evt=window.event;
	if (evt.clientX > (wwidth+15)) tipleft = eval(evt.clientX + xoffset - (wwidth + 15)); //fit left
	else tipleft = eval(evt.clientX + xoffset + 10);//center laterally
	//
	if (evt.clientY > (wheight+15)) tiptop = eval(evt.clientY  + yoffset - (wheight + 15));//fit above
	else tiptop = eval(evt.clientY + yoffset +15);
	}
	
	else if (evt.pageX) 
	{
	if (evt.pageX > (wwidth+15)) tipleft = eval(evt.pageX  - (wwidth + 15)); //fit left
	else tipleft = eval(evt.pageX + 10);//center laterally
	//
	if (evt.pageY > (wheight+15)) tiptop = eval(evt.pageY  - (wheight + 15));//fit above
	else tiptop = eval(evt.pageY +15);
	}
	sX(tooltip,tipleft);sX(shadow, eval(tipleft+4)); 
	sY(tooltip,tiptop);sY(shadow, eval (tiptop+3));
	 sE(tooltip);sE(shadow);
	 popup_shown=1;
 }


function movePopup(evt,txt,wwidth,wheight)
{
if (popup_shown==1) showPopup(evt,txt,wwidth)
}

function getOffsetY()
{
if (window.pageYOffset)
 {
	  yoffset = window.pageYOffset
 }
	else if (document.documentElement && document.documentElement.scrollTop)
	{
		yoffset = document.documentElement.scrollTop
	}
		else if (document.body)
		{
			  yoffset = document.body.scrollTop
		}
//alert("yoffset is " +yoffset);		
return yoffset
}	
//
function getOffsetX()
{
if (window.pageXOffset)
 {
	  xoffset = window.pageXOffset
 }
	else if (document.documentElement && document.documentElement.scrollLeft)
	{
		xoffset = document.documentElement.scrollLeft
	}
		else if (document.body)
		{
			  xoffset = document.body.scrollLeft
		}
return xoffset
}	


function hideIt()
{
hE(tooltip);hE(shadow);popup_shown=0;wheight=0
//hE(shadow)
}


// Make  generic menu 
// CD preprocessing of this JS file creates the var(s) for the menu text   

function makeMenu(thisheadline)
{
//fixChars(thisheadline);

mstring= '<table width="634" border="0" cellspacing="0" cellpadding="0" align="center" style="text-align:center"><tr>';
mstring += '<td valign="top" width="111"><h6 id="s1"><A HREF="javascript:nowt()" onmouseover ="openMenu(\'Love\')" onmouseout = "setCloseTimer()">LOVE &amp; LUST</a></h6>';
mstring+='<div id="Love" class="menublock" onmouseover="cancelCloseTimer()" onmouseout = "setCloseTimer()" style="display:none"> ';

// 
 // 
	audioimg="";
	//
fdate = "Thursday, December 16, 2004"; headl = "Parting"; 
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Monday, December 12, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Parting") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LoveAndLust/Parting.html" title="I left you, suddenly, because at last..." onmouseover="cancelCloseTimer()">Parting'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Parting' + audioimg + add2 +'</h3>';
// 
// 
 // 
	audioimg="";
	//
fdate = "Wednesday, March 24, 2004"; headl = "Lebensraum"; 
add1=""; add2=""; if ("Wednesday, March 24, 2004" == "Monday, December 12, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Lebensraum") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LoveAndLust/Lebensraum.html" title="We’d be together always, you say..." onmouseover="cancelCloseTimer()">Lebensraum'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Lebensraum' + audioimg + add2 +'</h3>';
// 
// 
 // 
	audioimg="";
	//
fdate = "Thursday, December 16, 2004"; headl = "Typology"; 
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Monday, December 12, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Typology") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LoveAndLust/Typology.html" title="Deeper than nation or race or creed..." onmouseover="cancelCloseTimer()">Typology'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Typology' + audioimg + add2 +'</h3>';
// 
// 
 // 
	audioimg="";
	//
fdate = "Thursday, December 16, 2004"; headl = "Memento"; 
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Monday, December 12, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Memento") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LoveAndLust/Memento.html" title="Months on, the couch yields up this find..." onmouseover="cancelCloseTimer()">Memento'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Memento' + audioimg + add2 +'</h3>';
// 
// 
 // 
	audioimg="";
	//
fdate = "Thursday, March 18, 2004"; headl = "Luna Maris"; 
add1=""; add2=""; if ("Thursday, March 18, 2004" == "Monday, December 12, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Luna Maris") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LoveAndLust/LunaMaris.html" title="Over the sea a full moon rides..." onmouseover="cancelCloseTimer()">Luna Maris'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Luna Maris' + audioimg + add2 +'</h3>';
// 
// 
mstring+='</div></td>'; 
//
mstring += '<td valign="top" width="123"><h6 id="s2"><A HREF="javascript:nowt()" onmouseover ="openMenu(\'Mind\')" onmouseout="setCloseTimer()">MIND &amp; MATTER</a></h6>';

mstring+='<div id="Mind" class="menublock" onmouseover="cancelCloseTimer()" onmouseout="setCloseTimer()" style="display:none">';  

//
    //
	audioimg="";
	//
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "À La Belle Étoile") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/MindAndMatter/ALaBelleEtoile.html" title="I think of a summer night when we..." onmouseover="cancelCloseTimer()">À La Belle Étoile'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'À La Belle Étoile' + audioimg + add2 +'</h3>';
//
//
    //
	audioimg="";
	//
	audioimg='&nbsp;<img src="http://quince.netpublish.net/Images/sound_sm.gif" alt="Audio available">'; 
//
add1=""; add2=""; if ("Tuesday, November 30, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Time Out of Mind") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/MindAndMatter/TimeOutofMind.html" title="So often I have tried to capture how..." onmouseover="cancelCloseTimer()">Time Out of Mind'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Time Out of Mind' + audioimg + add2 +'</h3>';
//
//
    //
	audioimg="";
	//
add1=""; add2=""; if ("Tuesday, November 30, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Linga Sharira") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/MindAndMatter/LingaSharira.html" title="Again the brush-strokes on the canvas fail..." onmouseover="cancelCloseTimer()">Linga Sharira'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Linga Sharira' + audioimg + add2 +'</h3>';
//
//
    //
	audioimg="";
	//
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Tat Tvam Asi") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/MindAndMatter/TatTvamAsi.html" title="A life ago, tucking me in each night..." onmouseover="cancelCloseTimer()">Tat Tvam Asi'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Tat Tvam Asi' + audioimg + add2 +'</h3>';
//
//
mstring+='</div></td>'; 
//
mstring += '<td valign="top" width="127"><h6 id="s3"><A HREF="javascript:nowt()" onmouseover ="openMenu(\'Light\')" onmouseout="setCloseTimer()">LIGHT &amp; SHADE</a></h6>';

mstring+='<div id="Light" class="menublock" onmouseover="cancelCloseTimer()" onmouseout="setCloseTimer()" style="display:none">';  

//
  //
	audioimg="";
	//
add1=""; add2=""; if ("Tuesday, November 30, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Notes from the Past") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LightAndShade/NotesfromthePast.html" title="This battered book with faded ink..." onmouseover="cancelCloseTimer()">Notes from the Past'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Notes from the Past' + audioimg + add2 +'</h3>';
//
//
  //
	audioimg="";
	//
	audioimg='&nbsp;<img src="http://quince.netpublish.net/Images/sound_sm.gif" alt="Audio available">'; 
//
add1=""; add2=""; if ("Tuesday, November 30, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "The Legendary Ghan") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LightAndShade/TheLegendaryGhan.html" title="It runs from Adelaide north to the Alice..." onmouseover="cancelCloseTimer()">The Legendary Ghan'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'The Legendary Ghan' + audioimg + add2 +'</h3>';
//
//
  //
	audioimg="";
	//
add1=""; add2=""; if ("Tuesday, November 30, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Green and Blue") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LightAndShade/GreenandBlue.html" title="I may profess a keen artistic eye..." onmouseover="cancelCloseTimer()">Green and Blue'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Green and Blue' + audioimg + add2 +'</h3>';
//
//
  //
	audioimg="";
	//
add1=""; add2=""; if ("Tuesday, November 30, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Cityscape") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LightAndShade/Cityscape.html" title="Hollow midnight, and cacophonies of neon..." onmouseover="cancelCloseTimer()">Cityscape'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Cityscape' + audioimg + add2 +'</h3>';
//
//
  //
	audioimg="";
	//
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "A Cautious Friend") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LightAndShade/ACautiousFriend.html" title="For one in trouble he would go through hell..." onmouseover="cancelCloseTimer()">A Cautious Friend'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'A Cautious Friend' + audioimg + add2 +'</h3>';
//
//
  //
	audioimg="";
	//
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Palinode") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LightAndShade/Palinode.html" title="Love is no footstep-fated confluence..." onmouseover="cancelCloseTimer()">Palinode'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Palinode' + audioimg + add2 +'</h3>';
//
//
  //
	audioimg="";
	//
add1=""; add2=""; if ("Wednesday, May 05, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Shadow Play") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/LightAndShade/ShadowPlay.html" title="One more barred valley in the setting sun..." onmouseover="cancelCloseTimer()">Shadow Play'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Shadow Play' + audioimg + add2 +'</h3>';
//
//
mstring+='</div></td>'; 

mstring += '<td valign="top" width="145"><h6 id="s4" style="border-right:1px solid #666"><A HREF="javascript:nowt()" onmouseover ="openMenu(\'Cloaks\')" onmouseout="setCloseTimer()">CLOAKS &amp; CAPERS</a></h6>';

mstring+='<div id="Cloaks" class="menublock" onmouseover="cancelCloseTimer()" onmouseout="setCloseTimer()" style="display:none">';  

//
   //
	audioimg="";
	//
add1=""; add2=""; if ("Tuesday, November 30, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Chronophage") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/CloaksAndCapers/Chronophage.html" title="He’ll buttonhole you on the train, to natter..." onmouseover="cancelCloseTimer()">Chronophage'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Chronophage' + audioimg + add2 +'</h3>';
//
//
   //
//
   //
	audioimg="";
	//
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Djibouti Jazzband") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/CloaksAndCapers/DjiboutiJazzband.html" title="When the jazzmen from Djibouti went on tour, a joyful duty..." onmouseover="cancelCloseTimer()">Djibouti Jazzband'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Djibouti Jazzband' + audioimg + add2 +'</h3>';
//
//
   //
	audioimg="";
	//
add1=""; add2=""; if ("Friday, May 28, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Celebrity  Impersonators’ Convention") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/CloaksAndCapers/CelebrityImpersonators_Co.html" title="A white face and a gash of scarlet mouth..." onmouseover="cancelCloseTimer()">Celebrity  Impersonators’ Convention'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Celebrity  Impersonators’ Convention' + audioimg + add2 +'</h3>';
//
//
   //
	audioimg="";
	//
	audioimg='&nbsp;<img src="http://quince.netpublish.net/Images/sound_sm.gif" alt="Audio available">'; 
//
add1=""; add2=""; if ("Thursday, September 23, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Spam Diptych") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/CloaksAndCapers/SpamDiptych.html" title="Authenticating an Audubon..." onmouseover="cancelCloseTimer()">Spam Diptych'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Spam Diptych' + audioimg + add2 +'</h3>';
//
//

mstring+='</div></td>';

mstring += '<td valign="top"><h6 id="s5" style="border-left:none; border-right: 1px solid black"><A HREF="javascript:nowt()" onmouseover ="openMenu(\'Froth\')" onmouseout="setCloseTimer()">FROTH &amp; FRIVOLITY</a></h6>';
mstring+='<div id="Froth" class="menublock" onmouseover="cancelCloseTimer()" onmouseout="setCloseTimer()" style="display:none">';
//
   //
	audioimg="";
	//
add1=""; add2=""; if ("Wednesday, April 14, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "How Pleasant to Tipple with Quince") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/FrothAndFancies/HowPleasanttoTipplewithQu.html" title="A Light Self-Portrait" onmouseover="cancelCloseTimer()">How Pleasant to Tipple with Quince'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'How Pleasant to Tipple with Quince' + audioimg + add2 +'</h3>';
//
//
   //
	audioimg="";
	//
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Pronunciation Puzzles") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/FrothAndFancies/PronunciationPuzzles.html" title="The few in the know pronounce it rolmondeley..." onmouseover="cancelCloseTimer()">Pronunciation Puzzles'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Pronunciation Puzzles' + audioimg + add2 +'</h3>';
//
//
   //
	audioimg="";
	//
	audioimg='&nbsp;<img src="http://quince.netpublish.net/Images/sound_sm.gif" alt="Audio available">'; 
//
add1=""; add2=""; if ("Friday, April 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Bourbon or Whisky?") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/FrothAndFancies/BourbonorWhisky.html" title="I’ve pity for the fish that died..." onmouseover="cancelCloseTimer()">Bourbon or Whisky?'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Bourbon or Whisky?' + audioimg + add2 +'</h3>';
//
//
   //
	audioimg="";
	//
add1=""; add2=""; if ("Thursday, December 16, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Raw") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/FrothAndFancies/Raw.html" title="The Hunt Ball at Lord Badminton’s was where they met..." onmouseover="cancelCloseTimer()">Raw'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Raw' + audioimg + add2 +'</h3>';
//
//
   //
	audioimg="";
	//
	audioimg='&nbsp;<img src="http://quince.netpublish.net/Images/sound_sm.gif" alt="Audio available">'; 
//
add1=""; add2=""; if ("Thursday, April 15, 2004" == "Thursday, May 16, 2005") {add1="<b>";add2="</b>"};
if (thisheadline != "Tiger Snake") 
mstring += '<h3>'+add1+'<a href="http://quince.netpublish.net/FrothAndFancies/TigerSnake.html" title="Rough Bruce and Bill, an Ocker pair..." onmouseover="cancelCloseTimer()">Tiger Snake'+ audioimg +'</a>'+ add2 + '</h3>';
else mstring += '<h3 class="selected">' + add1 + 'Tiger Snake' + audioimg + add2 +'</h3>';
//
//
mstring+='</div></td>';


mstring+='</tr></table>';
d.write(mstring);
}

function makeMenu2(thisheadline)
{
//PREV/NEXT controls, and Audio page
//Read out stored vars for this page
plinkobj = gE("prev_link"); 
nlinkobj = gE("next_link");
plink = plinkobj.innerHTML;
nlink = nlinkobj.innerHTML;
if (plink=="") plink = " "; if (nlink=="") nlink=" "; 

mstring= '<table width="619" border="0" cellspacing="0" cellpadding="0" align="center" style="text-align:center">';
mstring+= '<tr><td align="left" valign="top" class="controls" width="89">';
if (plink!=" ") mstring+= '<b>' +plink +'</b>';
else mstring += '&nbsp;';
mstring += '</td>';

mstring += '<td valign="top" width="391"><div style="padding-top:5px">Recent additions are shown in <b>bold</b> in the menus</div></td>';//mid col
mstring += '<td align="right" valign="top" class="controls">';
if (nlink!=" ") mstring+= '<b>' +nlink +'</b>';
else mstring += '';
//
if ("Welcome" !="fallback")
{
	if (thisheadline != "Welcome") 
	mstring+='<br /><a href="http://quince.netpublish.net/index.html" title="Back to the Welcome page">Welcome</a>';
	else mstring += '<br />Welcome';
}
//
if ("Audio readings" !="fallback")
{
	if (thisheadline != "Audio readings") 
	mstring+='<br /><a href="http://quince.netpublish.net/Audioreadings.html" title="Sound files of some poems: Henry Quince reads">Audio readings</a>';
	else mstring += '<br />Audio readings';
}
//
mstring += '</td></tr></table>';

d.write(mstring);
}

timeoutrunning = 0;
opened = "none";

function openMenu(divid)
{
if (timeoutrunning) cancelCloseTimer(); //for this or other block
if (opened!=divid && opened !="none") {closeMenu(); opened="none"}//close other open block
if (opened!=divid)
	{ menuobj=gE(divid); //Open this block
	menuobj.style.display="block"; 
	opened=divid;  //record as open
	}
}

function closeMenu()
{
menuobj=gE(opened); menuobj.style.display="none"; //  OR	openobj.style.visibility="hidden"; 
opened="none";
}

function setCloseTimer()
{
if (!timeoutrunning)
	{
	timer1 = setTimeout("closeMenu()", 800);
	timeoutrunning=1;
	}
}

function cancelCloseTimer()
{
if (timeoutrunning)
	{
	clearTimeout(timer1);
	timeoutrunning=0;
	}
}


function writeMenuLine(chead,thead,clink,chover,csect)
{
if (chead != thead)
d.write('<h3><a href="'+clink+'" title="' + chover + '">' + chead+ '</a></h3>');
 else {d.write('<h3 class="selected">' + chead + '</h3>'); curr_section=csect}
}


function showInfo(txt) 
{
if (!DomYes) {return}
infotip=gE("infodiv");
infotip.innerHTML = '<div class="info">' + txt +'</div>'; 
sE(infotip);
}


window.onload=init;
var front = ""; var tail = "";
var entry_found=0;
var counter=0;

function init()
{
menuobj=gE("menu"); menu2obj=gE("menu2");
sX(menuobj,0); sY(menuobj,89)
sX(menu2obj,0); sY(menu2obj,105);
}


function search (mainStr,searchStr)
{
foundOffset = mainStr.indexOf(searchStr);
//alert("In search function; foundOffset is " + foundOffset);
if (foundOffset == -1) {return 0}
return 1
}

//Extract characters after the first occurrence of the search string
function getEnd(mainStr,searchStr)
{
//alert ("in getEnd; mainStr is " +mainStr + "; searchStr is " + searchStr +"; i is " +i); 
foundOffset = mainStr.indexOf(searchStr);
if (foundOffset == -1) return null;
return mainStr.substring(foundOffset+searchStr.length,mainStr.length)
}

//Extract characters up to but not including the first occurrence of the search string
function getFront(mainStr,searchStr)
{
foundOffset = mainStr.indexOf(searchStr);
if (foundOffset == -1) return null;
return mainStr.substring(0,foundOffset)
}

//Extract characters up to but not including the last occurrence of the search string

function getFront2(mainStr,searchStr)
{
foundOffset = mainStr.lastIndexOf(searchStr);
if (foundOffset == -1) return null; //not found
return mainStr.substring(0,foundOffset)
}

var frontstr = "";
var tailstr = "";

function searchReplace(mainStr,searchStr,replaceStr)
{
front = getFront(mainStr,searchStr);
tail = getEnd (mainStr,searchStr)
if (front!=null && tail!=null) {
return front + replaceStr + tail
}
return null
}

function getFirst(str)
{
strfirst = str.substring(0,1)
return strfirst
 }

 function getLast(str)
{
strlast = str.substring(str.length-1,str.length)
return strlast
 }
 
 
 

function loadAudio(url)
{
audiolink='<br><embed src="' +url +'" width="200" height="55" type="audio/mpeg" loop="false" autostart="false" />';
audobj=gE('audiodiv'); audobj.innerHTML=audiolink; 
buttondiv=gE("audiobutton"); 
buttondiv.innerHTML= '<p><img height="19" alt="Embedded audio loaded: use controls below" src="http://quince.netpublish.net/Images/sound2.gif" width="20" border="0"></p>';
}

 
 
function fixChars(fstring)
{
//eacute="";

//modstring=searchReplace(fstring,"","&mdash;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&lsquo;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&rsquo;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&ldquo;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&rdquo;"); fstring=modstring;
//modstring=searchReplace(fstring,eacute,"&#233;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&egrave;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&agrave;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&ouml;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&auml;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&uuml;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&Ouml;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&Auml;"); fstring=modstring;
//modstring=searchReplace(fstring,"","&Uuml;"); fstring=modstring;
}

