/* Basing code on this original? PLEASE PUT A LINK to wavesculptor.com somewhere crawlable - or even visible! - on your site, thanks - Trev Miller.
HELP/CHAT: via the contact link that this page generates = http://wavesculptor.com/cgi-bin/tmail.pl?section=index.js_author's_header
HISTORY:Penzance,2007.3.7[absoluteDiv,POP-UP menus,tidied],based on:wales,2006.7.22[oneJSpage,download speed detect for image animation],based on:head.js/body.js/index.html set called dolphinx.js
*/
//abreviations
VERSION="7.3"
d=document
v="visible"
h="hidden"
LS=17 //line spacing
sc="<span class='"
sd=sc+"md'>"
sB=sc+"mB'>"
bi=sc+"bi'>"
sm=sc+"sm'>"
sr=sc+"sr'>"
bg=sc+"mBi'>"
c="'>"
nA="</a>"
nD="</DIV>\n"
nS="</span>"
ab="</a><br>"
S=" &nbsp;"
sN=S+nS //stop some browsers clip last italic character
S2=S+S
S4=S2+S2
S8=S4+S4
bh="' style='border:none;height:"
b1=" style='border-style:solid;border-width:1px;height:"
pt="px;top:"
wi=";width:"
pw="px"+wi 
pc="px;color:"
pz="px;z-index:"
pV="px;visibility:hidden"
pA="px;vertical-align:"
cla="px' class='"
Da="<div align='left' style='position:absolute;left:"
aH="<a href='"
js="javascript:"
aJ=aH+js
aW=aJ+"fw(\""
om="' onmouseover='"
mt="' onmouseout='stx(); " 
//text colours
fCOL1="white'>"
fCOL2="#9999ff'>"
bCOL1="#666666'>"
bCOL2="#330000'>"
bCOL3="#333300'>"
zb="sizeWarnBG"
zw="sizeWarn"
animLoaded=0

//COMPRESSED DATA FOR MULTICOLOURED LINKS
AA=["line ",
" {color:#",
" a:link {color:#",
" a:visited {color:#",
" a:hover {color:#",
" a:active {color:#"]
CC=[
"bgColor,frontCol,visitedc,hov+act",//=CC[0] id maths simpler
"999999","ff0066","ff0066","2200ff",//0contents
"888888","e00066","cc0066","2200ee",//1
"667766","cc1155","bb0044","4400dd",//2
"556655","bb1144","991133","7700cc",//3
"335533","aa1144","882222","9900bb",//4
"116611","991122","773311","aa00aa",//5
"117711","882211","663311","bb0066",//6
"118811","773311","443311","bb0033",//7
"009900","663311","443311","cc1111",//8
"00aa00","553311","443311","dd1100",//9
"00bb00","443311","333311","ee1100",//10
"11cc00","333311","303011","ff0000",//11
"22cc00","223311","222211","ff1100",//12
"33cc00","113311","112211","ff2200",//13
"44cc00","003300","111111","ff3300",//14search
"444500","999999","999999","ffffff",//15copyright
"909090","ff3366","cc6699","0000ff" //16animate
]

//NAME WINDOW, UNCOMPRESS COLOUR STYLES. TEST BROWSER COMPLIANCE - GI() in dolphin_script.js
//N-O-T-H-I-N-G ON THIS PAGE RUNS UNLESS BROWSER PASSES GI TESTS HERE AND AT BOTTOM. INSTEAD DISPLAYS INDEX.HTML
if(GI()){window.name="window0";
d.write("<style type='text/css'>")
for(i=1;i<CC.length/4;i++){for(j=1;j<5;j++){id=i-1;d.write("\n.c"+id+AA[j]+CC[((4*i)-4)+j]+"}")};d.write("\n.c"+id+AA[5]+CC[4*i]+"}")}
//fixed bg colour for link shadows:
for(i=1;i<CC.length/4;i++){for(j=1;j<6;j++){id=i-1;d.write("\n.b"+id+AA[j]+CC[(4*i)-3]+"}")}}
d.write("\n<\/style>")
}

//VISIBILITY CONTROL
function VZ(viz){for(i=1;i<arguments.length;i++){a=arguments[i];if(GI()){d.getElementById(a).style.visibility=viz}}}
function VZsrch(vz){VZ(vz,14,"srchB","srchH")}
function VZself(id,vz){VZ(vz,id);VZ(vz,(id+100))}
function notLoadedWarn(){if(animLoaded==0){VZ(v,zw,zb)}}
function AnimateNow(){d.images["wheel"].src="images/waterwheel_animated.gif";animLoaded=1;VZ(h,911,912);VZ(v,901,902,"wheel")}
function StaticNow(){d.images["wheel"].src="images/1816w.gif"}
//DOWNLOAD-SPEED-DEPENDENT IMAGE LOAD - see also index.html header
function loadMsg(vy){VZ(vy,"Loading"); setTimeout('VZ(h,"Loading")',5000)}
function LoadTimeCheck(){Ctime==1&&Ltime==0?AnimateNow():VZ(v,912,911)}
function W(x){maxwidth=997-x-61;return maxwidth}//LIMIT DIV WIDTH TO PREVENT UNNECCESSARY SCROLLBARS
//ASSEMBLE MOUSEOVERS FOR GENERATED LINKS
function mo(i){moVal=om+"stw(); VZ(v,"+i+");VZ(v,"+(i+100)+")"+mt+"VZ(h,"+i+");VZ(h,"+(i+100)+")'>";return moVal}

A=[
[112,sd+"welcome to "+nS+bi+"wavesculptor.com"+nS+sd+" - &nbsp;the personal portfolio of Trev Miller - inspired by the idea of an organic sculpture "],
[102,sd+"built of the rigid components of computer languages and "],
[97 ,sd+"presenting other curiosities "],
[94 ,sd+"by its maker "],
[88 ,sd+"&amp; friends"],
[83 ,sd+"&nbsp;"],
[73 ,sd+"&nbsp;"],
[47 ,sd+"the "],
[34 ,sd+"site "],
[24 ,sd+"tries to "],
[19 ,sd+"reveal itself "],
[17 ,sd+"using up to five "],
[16 ,sd+"simultaneous tabs "],
[16 ,sd+"or windows. Return "],
[20 ,sd+"here by clicking "],
[24 ,sd+"the contents "],
[31 ,sd+"tab or any"],
[44 ,sd+"icon of"],
[62 ,sd+"this"],
[80 ,sd+"page "],
[111,sd+"&nbsp;"],
[188,sd+"&nbsp;"],
[219,sm+"page"],
[223,sm+"edition"],
[231,sm+VERSION],
[243,sm+"7th"],
[258,sm+"March"],
[284,sm+"2007"]
]

//LINKS hrefs - pop-up portrait window1 is fw(path)
k=[
'void(0)',
'pools()',
'sancreed()',
'p3d()',
'ephemera()',
'fw("2d/2d.htm")',
'fw("about/about.htm")',
'fw("engineer/eng.htm")',
'fw("projects/index.html")',
'guest()',
'fw("http://wavesculptor.com/cgi-bin/tmail.pl?section=index.js_links")',
'fw("http://wavesculptor.com/cgi-bin/v/vbook.cgi")',
'fw("personal/top.htm")',
'fw("about/site_map.htm")',
'fw("http://wavesculptor.com/cgi-bin/search/search.pl")',
'fw("copyR.htm")'
]
//LINKS DATA B: human-only index, link X, link text, pop-up X abs, pop-up Y offset - = up
ai=bi+"&lt;-animate"+sN
ao=bi+"&lt;-stop..."+sN
B=[
[ 0,462,bg+"contents</span>..."+S,546,0],
[ 1,468,".."+bi+"swimming pools"+sN,570,-25],
[ 2,488,".."+bi+"recent sculpture"+sN,580,-46],
[ 3,469,".."+bi+"early sculpture</span> gallery"+S,616,-17],
[ 4,450,"..work &amp; travel "+bi+"photos</span> archive"+S,634,-17],
[ 5,437,".."+bi+"arty drawings</span> &amp; "+bi+"photos </span>archive"+S,640,0],
[ 6,436,".."+bi+"site help, history &amp; philosophy "+sN,644,0],
[ 7,434,".."+bi+"alternative engineering</span>&nbsp; archive"+S,636,0],
[ 8,434,".."+bi+"get your wave-sculpture here"+sN,616,0],
[ 9,446,".."+bi+"guest contributor</span>&nbsp; archive"+S,610,-52],
[10,460,".."+bi+"instant message me"+sN,588,0],
[11,448,".."+bi+"visitor feedback"+sN,538,0],
[12,438,".."+bi+"personal</span> stuff"+S,530,0],
[13,420,".."+bi+"site map "+sN,482,0],
[14,390,".."+bi+"search"+sN,536,0],
[15,320,"<img style='background:black;border:none;height:100px;width:1px;color:black;margin:0px;padding:0px;background:black' alt='' src=''><br>"+sr+"please<br>"+
S4+S2+"read this before<br>"+
S8+S8+S4+"re-publishing from wavesculptor.com<br>"+sN,606,124]
]

//TEXT-LINK POP-UP-ON-MOUSEOVER DIVS: human-only index, content
popStuff=[
[0,sd+aJ+"void(0)'>mouse over the links below for more....</a>"],
[1,sd+aJ+"pools()'><span style='font-weight:bold;vertical-align:bottom'>-&gt; the introduction</span><img src='pools/images/centre/pool_icon.png"+bh+40+pw+63+pA+"bottom' alt='pool icon'>"+ab+
S4+aH+"pools/centre.htm' target='window1'>- 'centrefold' image montage"+ab+
S2+S+S4+aW+"pools/chlorine_diatribe.htm\")'>- pool sanitisation review"+ab+
S8+aW+"pools/El_Valero.htm\")'>- building El Valero story"+ab+
S+S8+aW+"pools/El_Valero_tech.htm\")'>&nbsp;- El Valero technical"+ab+
S2+S8+aW+"pools/El_Valero_living.htm\")'>&nbsp;- El Valero biology"+ab+
S2+S8+aW+"pools/Suzannes.htm\")'>- Suzannes Pool"+ab+
S+S8+aW+"pools/Peters.htm\")'>&nbsp;- Peters Pool</a>"],
[2,sd+aJ+"sancreed()'><span style='font-weight:bold;vertical-align:bottom'>- <img src='images/SancreedSamplerIconAnimated.gif"+bh+46+pw+24+pA+"bottom'  alt='terracotta animated icon'> burnished terracotta studies</span></a><br>"+
S2+aH+"2007/index.html' target='window1'><span style='vertical-align:top'> - Caravaca cross wood carving 2007</span><img src='images/adrian_cross_icon_animated.gif"+bh+24+pw+14+pA+"top' alt='Caravaca cross by Wavesculptor - animated icon'></a>"],
[3,sd+aJ+"p3d()'><span style='font-weight:bold;vertical-align:bottom'>- 30 items 1988-1995 </span><img src='images/3dSamplerIconAnimated.gif"+bh+32+pw+40+pA+"bottom' alt='1990s Wavesculptor - animated icon'></a>"],
[4,sd+aJ+"ephemera()'><span style='vertical-align:bottom'><b>-&gt; current page</b> (2004.08)</span></a><img src='images/ephemeraSamplerIconAnimated.gif"+bh+32+pw+40+pA+"bottom;position:relative;left:-44px;top:50px' alt='photos by Wavesculptor - tour icon'><br>"+
S+aJ+"ephemera/index.html' target='window1'>- 2006.06 (in progress)"+ab+
S2+aJ+"ephemera/ephemera_2004_08.htm' target='window1'>- 2004.08"+ab+
S+aJ+"ephemera/ephemera_2003_11.htm' target='window1'>- 2003.11"+ab+
S+aJ+"ephemera/ephemera_2002_11.htm' target='window1'>- 2002.11"+ab+
aJ+"ephemera/ephemera_2002_07.htm' target='window1'>- 2002.07"+ab+
aJ+"ephemera/ephemera_2002_02.htm' target='window1'>- 2002.02"+ab+
aJ+"ephemera/img2001.12/index.html' target='window1'>- 2001.12 (index only)"+ab+
"<img src='images/664abseiling_slug_icon.jpg"+bh+78+pw+"41px;position:relative;left:100px' alt='abseiling slug icon'>"],
[5,sd+aJ+k[5]+"'><b>- 20 items compiled 2003</b><br>"+
S+"needs expanding and updating but worth a look</a>"],
[6,sd+aJ+k[6]+"'><b>-</b> site history and structure (2003)"+ab+
aW+"about/philosophy.htm\")'>- wavesculptor philosophy (March 2007)</a>"],
[7,sd+aJ+k[7]+"'><b>-</b> quiet, at the moment, but interesting, here</a>"],
[8,S2+sd+aJ+k[8]+"'><b>-</b> clear 2006 overview of what I can do for you!<br>Phone, text, or do business with me on line from here.</a>"],
[9,sd+aH+"guest/China.htm' target='window1'><span style='vertical-align:bottom'>"+S2+S+"-Chris Stewart in China</span><img src='images/WindnRainBridgeIcon.jpg'"+b1+37+pw+43+pA+"bottom' alt='Wind and rain bridge, China. Photos by Chris Stewart on wavesculptor.com'>"+ab+
aH+"guest/Reiner.htm' target='window1'>"+S2+"- Reiner's eco house"+ab+
"<span style='vertical-align:top'>"+aH+"guest/Hana_Evans/index.html' target='window1'>&nbsp;-&gt; Hana Evans painting&gt;<img src='images/358IsisOsirisIconAnimated.gif'"+b1+24+pw+35+pA+"top' alt='Isis and Osiris, among other paintings by Hana Evans'></a>"+
aH+"huggamama/index.html' target='window1'><img src='images/blackmama96icon.jpg'"+b1+43+pw+38+pA+"top' alt='Soft sculptures by Hana Evans inspired by timeless spirituality'>&lt;sculpture</a></span>"],
[10,sd+aJ+k[10]+"'>- just do it. No fuss.</a>"],
[11,S2+S+sd+aJ+k[11]+"'><b>- read or add comment to list</b>"+ab+
aJ+"void(0)'>- 1 minute tickbox questionaire</a>"],
[12,sd+aJ+k[12]+"'>- line 12... says it all doesn't it.... one day, one day</a>"],
[13,sd+aJ+k[13]+"'>- if you prefer<span"+b1+"1px;background:#ccc;padding:2px'>boxes</span>to this more organic presentation</a>"],
[14,sd+""],//get this array to hold the search divs
[15,sr+aJ+k[15]+"'>thanks...</a>"]
]

//WRITE LINK LINES
function linktx(i,x,mouse,clk,cls,txt){d.write(Da+x+pt+(i*LS)+pw+W(x)+cla+cls+c+aJ+clk+mouse+txt+nA+nD)}
function writelinks(){for(i=0;i<k.length;i++){C="c"+i;linktx(i,B[i][1],mo(i),k[i],C,B[i][2])}}
function shadtx(i,x,cls,txt){d.write(Da+x+pt+(i*LS)+pw+W(x)+cla+cls+c+txt+nD)}
function writeshad(){for(i=0;i<k.length;i++){C="c"+i;shadtx(i,B[i][1],C,B[i][2])}}

//WRITE TEXT LINES
function Write(x,text,col,i){
	d.write(Da+x+pt+(i*LS)+pw+W(x+11)+pc+col+text+nS+nD)}
//background container and line-writer
function writeB(x,top){d.write(nD+Da+x+pt+top+pw+W(x+11)+pz+7+c+"\n")
	for(i=0;i<A.length;i++){i<7?bc=bCOL1:bc=bCOL2;if(i>20)bc=bCOL3
	Write(A[i][0],A[i][1],bc,i)}}

function ASSEMBLE(){
//FG text container then line-writer
d.write(Da+9+pt+2+pz+8+c+"\n")
for(i=0;i<20;i++){Write(A[i][0],A[i][1],fCOL1,i)}
for(i=20;i<A.length;i++){Write(A[i][0],A[i][1],fCOL2,i)}
//BG text
writeB(9,1)
writeB(10,1)
writeB(11,2)
writeB(10,3)
writeB(11,3)
//BG links
d.write(nD+Da+1+pt+116+pz+9+c+"\n")
writeshad()
//MISC POP-UPS
d.write(
nD+Da+150+pt+112+pz+14+wi+200+pV+";color:orange;text-align:center' id='sizeWarn'>Water lifting wheel built by wavesculptor - see the swimming pools section. The time taken to get this page indicated that getting this 1.9MB video might take some minutes, so it was left. Click to get it anyway. Free your internet connection for other tasks with the browser STOP (X) button if loading takes too long."+
nD+Da+140+pt+160+pz+12+wi+120+pV+";color:orange;text-align:center;background-image:URL(images/50bg.png)' id='Loading'>loading video..."+
nD+Da+150+pt+112+pz+13+wi+200+pV+"' id='sizeWarnBG'><img src='images/50bg.png' style='width:200px;height:200px;border:none' alt=''>"+
nD+Da+431+pt+101+pz+12+wi+120+pV+"' id=911 class='c16"+c+aJ+"AnimateNow();loadMsg(v);VZ(h,zw,zb)"+om+"notLoadedWarn()"+mt+"VZ(h,zw,zb)'>"+ai+nA+
nD+Da+432+pt+102+pz+11+wi+120+pV+"' id=912 class='c16'>"+ai+
nD+Da+431+pt+101+pz+12+wi+120+pV+"' id=901 class='c16"+c+aJ+"StaticNow();VZ(h,902,901);VZ(v,911,912)'>"+ao+nA+
nD+Da+432+pt+102+pz+11+wi+120+pV+"' id=902 class='c16'>"+ao+
nD+Da+ 70+pt+ 86+pz+ 4+wi+384+"px'><img id='wheel' src='images/1816w.gif' onLoad=loadMsg(h) alt='El Valero waterwheel by Trev Miller - Wavesculptor'>"+
nD+Da+0+pt+115+pz+10+c//main links container
)
writelinks()
//SEARCH BOX FLOURISH
//write a series of divs following curve of links; put input box in each ... small->larger; dark-> light?

//SEARCH FORM
d.write(
nD+Da+424+pt+360+pz+12+wi+220+pV+";height:90px' id=14 onmouseover='VZsrch(v);d.srch.ip.focus()' onmouseout='VZsrch(h);d.srch.ip.blur()'>"+
"<form method=get action='http://wavesculptor.com/cgi-bin/search/search.pl' name='srch'>"+
S4+S+"<input name='ip' maxlength=160 value='' style='border:none;background-color:#d9c6ff;width:180px' class='but'>"+
"<p style='margin-top:0px'><input type=submit value='search wavesculptor.com' style='width:170px;height:19px;padding-top:0px;margin-top:4px;background-color:#cbfe9f' class='but'></p></form>"+

nD+Da+407+pt+412+pz+12+wi+120+pV+"' id='srchH'><p class='c14' style='margin-top:0px' onmouseover='VZsrch(v); d.srch.ip.focus()'>"+
aH+"http://wavesculptor.com/cgi-bin/search/search.pl' target='window1'>..<span class='bi'>help</span></a></p>"+

nD+Da+408+pt+413+pz+1+wi+120+pV+"' id='srchB' class='c14'><p class='c14' style='margin-top:0px'>"+
"..<span class='bi'>help</span></p>"+nD)
 
//POP-UP-ON-MOUSEOVER WRITER !! "stuff" must now include the div tag closing brace, the style-closing single quote, or any extras and these
function WritePop(x,y,stuff){
d.write(
Da+x+pt+y+pz+12+wi+W(x)+pV+";padding:4px' class='c"+i+"' id='"+i+om+"VZ(v,"+i+","+iC+")"+mt+"VZ(h,"+i+","+iC+")'>"+stuff+sN+nD+
Da+(x+1)+pt+(y+1)+pz+11+wi+W(x)+pV+";padding:4px' class='b"+i+"' id='"+iC+c+stuff+sN+nD
)}
for(i=0;i<16;i++){iC=i+100;WritePop(B[i][3],110+(i*17)+B[i][4],popStuff[i][1])}

d.close()
}
function DOMtest(){if(GI()){VZ(h,'nonStd'); ASSEMBLE()}}
