var d=document
if(d.domain&&d.domain!="localhost")d.domain="wavesculptor.com"
function DA(){if(d.all)return true}
function GI(){if(d.getElementById)return true}
function nx(){if(navigator.appName=="Netscape")return true}
function stw(){self.status='..clicking downloads or re-displays a document in an ALTERNATIVE WINDOW'}
function str(){self.status='..clicking REPLACES this page with a document (browser back button brings you back here)'}
function sts(){self.status='..sorry, that document is NOT YET ON-LINE'}
function sta(){self.status='..click for the pop-up window with that IMAGE ENLARGED'}
function stb(){self.status='..click to open or bring the WELCOME AND SITE NAVIGATION window to the front'}
function dc(ddi,di,ttx,tx){ddi.className=di;if(ttx!=""){ttx.className=tx}}
function stc(){self.status='..click to SCROLL to that place or reference (it will position itself at the top of the window)'}
function std(){self.status='..click for the pop-up window with MORE SMALL IMAGES of that work'}
function stt(){self.status='..click for the pop-up window with the RELEVANT TEXT'}
function stg(){self.status='..click for a small pop-up window that EXPANDS UPON THIS'}
function stm(){self.status='..click for an ALREADY DOWNLOADED pop-up giving more information'}
function stn(){self.status='..click for that OFF-SITE link opened into a NEW WINDOW'}
function st4(){self.status='..click to pop-up the common LARGER ORIGINAL of all the images'}
function sTa(){self.status='..goodbye from this page, hope it was of interest'}
function stx(what){self.status='';if(what!=null){if(what.style){what.style.visibility="hidden"}else{if(d.getElementById){
	d.getElementById(what).style.visibility="hidden"}}}}
function stp(){self.status='..click to change the BEHAVIOUR of this page as described in the link'}
function bk(){if(window.opener){window.opener.focus()}else{window.blur()}}
function dia(what){if(what.style){what.style.visibility="visible"}else{if(d.getElementById){
	d.getElementById(what).style.visibility="visible"}}}

function cs(){d.write('<a href="javascript:copystate()" onmouseover="stm();if((nx))return true" onmouseout="stx()">re-publishing from this page?</a>')
d.close()
}

function ml(subject){d.write('<a href="javascript:mailert(&#39;'+subject+'&#39;)" onmouseover="stm();if(nx())return true" onmouseout="stx()">email me</a>')
d.close()
}
blurb="back<br>to&nbsp;wave<br>sculptor's<br>whole&nbsp;site<br>contents<br>page"
function db(arg){
if(arg==2){a0=2;Idir="http://wavesculptor.com"}else{a0="";Idir=".."}
d.write('<a class="sm5g" href="javascript:dw('+a0+')" onmouseover="stb();if(nx())return true" onmouseout="stx()">'+
'<img src="'+Idir+'/images/backdolphin.jpg" alt="TO CONTENTS PAGE" class="dolImg" style="float:right">'+blurb+'</a>')
}
var rhs
var side
function cf(rhs){if(rhs=="R"){side="right"}else{side="left"}
d.write('<a href="javascript:showCentrefold(&#39;withFocus&#39;)" onmouseover="stw();if(nx())return true" onmouseout="stx()"><img src="images/centre/CentrefoldBackLink.jpg" alt="Centrefold Back Link" height="85" width="121" border=1 style="margin-left:2px; margin-right:2px; vertical-align:top; float:'+side+'">(back)<br>to<br>the<br>wave<br>sculptor<br>pools<br>page</a>')
}

var dok,hash,Ltx
function txL(dok,dir,hash,Ltx){if(Ltx==null)Ltx=hash;d.write("<a href='javascript:"+dok+"(&#34;"+hash+"&#34;,&#34;"+dir+"&#34;)' onmouseover='stg(); if(nx())return true' onmouseout='stx()'>"+Ltx+"</a>");d.close()
}

function clo() {d.write(" <a href='javascript:self.close()' onmouseover='sTa()' onmouseout='stx()'>close page</a>");d.close()}

function dw(arg2) {if(arg2==2){a2=2}else{a2=""}
	if(opener && opener.name){
		if(opener.name=="window0"){var w0xy=opener; opener.focus()}else{
			if(opener.opener && opener.opener.name){if(opener.opener.name=="window0"){var w0xy=opener.opener; w0xy.focus()}else{
		DolphinWelcome(a2)}}else{DolphinWelcome(a2)}}}else{DolphinWelcome(a2)}
	}

w0xy = {location:"default"} 
//var w0xy
var w1xy
function WinMan(dir,loc,wNxy,SCR){
	LOCstr=String(dir+""+loc)
	LOCsub=LOCstr.substr((LOCstr.length-13),5)
	if(wNxy==0){
		if(w0xy!=null && typeof w0xy.focus=="function"){
			wstr=String(w0xy.location)
			wsub=wstr.substr((wstr.length-13),5)
			if(LOCsub==wsub){w0xy.focus()
			}else{w0xy.location=dir+""+loc; w0xy.focus()}
		}else{w0xy=window.open(dir+""+loc, target="window0", "left=0,top=0,status=1,scrollbars="+SCR+",resizable=1,menubar=1,toolbar=1,directories=0,screenX=0,screenY=0")
		if(screen.availWidth>997){w0xy.resizeTo(997,760)}else{w0xy.resizeTo(screen.availWidth,screen.availHeight)}; w0xy.focus(); 
	}}
	if(wNxy==1){
		if(w1xy!=null && typeof w1xy.focus=="function"){
			wstr=String(w1xy.location)
			wsub=wstr.substr((wstr.length-13),5)
			if(LOCsub==wsub){w1xy.focus()}else{w1xy.location=dir+""+loc; w1xy.focus()}
		}else{w1xy=window.open(dir+""+loc, target="window1", "left=0,top=0,status=1,scrollbars="+SCR+",resizable=1,menubar=1,toolbar=1,directories=0,screenX=0,screenY=0"); w1xy.focus()
	}}	
}
function DolphinWelcome(wpath){
	if(!wpath){w0path="../"}
	if(wpath==1){w0path=""}	
	if(wpath==2){w0path="http://wavesculptor.com/"}	
	WinMan(w0path,"index.html",0,0)
}

//alert("Win2spec(args) are: arg4(directory)=\'"+drctry+"\'; arg6(location) =\'"+loc+"\'"); 

function Win2spec(w,h,unused,drctry,unused,loc,unused,unused){
	if(window.name && window.name=="window2"){location= drctry+""+loc; focus()
		if(screen.availHeight && w<screen.availWidth){window.resizeTo(w,screen.availHeight); if(h<screen.availHeight){w2xy=window.resizeTo(w,h)}}
			}else{
			w2xy=window.open(drctry+""+loc, target="window2", "left=0,top=0,screenX=0,screenY=0,scrollbars=1,resizable=1,status=1,toolbar=1,directories=0,menubar=1");
			if(nx() && (navigator.appVersion.indexOf('5')!= -1) && (w2xy.name=="window2")){var ns="dontTryNN6window.blur()ing";}
			if(screen.availHeight && w<screen.availWidth){w2xy.resizeTo(w,screen.availHeight); if(h<screen.availHeight){w2xy.resizeTo(w,h)}}
w2xy.focus()
}}







reo="this link can only work if the page you selected this image from is open; reopen the page and then the image"
var w3xy
function win3s(w,h,b,drctry,col,title,capn,referTo,outsideDir){
//alert(w+"=width; height="+h+", border ="+b+", directory ="+drctry+", title ="+title+", about ="+referTo+ ", outsideDir ="+outsideDir)
	x=0, y=0, loc=0, v=520, w1=480, w2=600, w3=720
	ti=title.slice(0,3)
	if(ti=='03_')x=w2, y=v,   loc='03_Asymmetry_dx.htm'
	if(ti=='04_' && screen.availWidth>=850)x=990,y=700, loc='04_Tucked_games_wide.htm'
	if(ti=='04_' && screen.availWidth<850)x=990,y=700, loc='04_Tucked_games_narrow.htm'
	if(ti=='10_')x=w2, y=v,   loc='10_Legs_dx.htm'
	if(ti=='13_')x=w1, y=v,   loc='13_Hornstraps_dx.htm'
	if(ti=='16_')x=w2, y=v,   loc='16_ArmourViscera_dx.htm'
	if(ti=='18_')x=w1, y=v,   loc='18_22_Tube_Aminals_dx.htm'
	if(ti=='19_')x=w1, y=v,   loc='19_Wader_dx.htm'
	if(ti=='24_')x=w2, y=v,   loc='24_Nurcha_dx.htm'
	if(ti=='26_')x=w3, y=v,   loc='26_Leafy_dx.htm'
	if(ti.slice(0,2)=='30')x=990,y=690, loc='300_Siege_dx.htm'
	if(ti=='33_')x=w2, y=v,   loc='33_Nixe_dx.htm'
	if(ti=='42_')x=w3, y=v,   loc='42_TarmacAngel_dx.htm'
	if(ti=='34_')x=w1, y=v,   loc='34_StoneNeurones_dx.htm'
	if(ti=='35_')x=w1, y=v,   loc='35_LipService_dx.htm'
	if(ti=='37_')x=w1, y=v,   loc='37_LeopardTable_dx.htm'
	if(ti=='38_')x=w1, y=v,   loc='38_Leaf_portrait_dx.htm'
	if(ti=='40_')x=w1, y=v,   loc='40_Lucy_dx.htm'	
	if(ti=='car')x=w2, y=v,   loc='carrot_dx.htm'	
// TEXT REFERENCES
	wo="<a href='javascript:if(!(window.opener))alert(reo);if(window.opener)window.opener."
	if(referTo=='noblurb'||referTo==''){blb=''; abouthandler=''; blu=''}
	if(referTo!='noblurb'){blu="show info"; 
		if(drctry=='d'){abouthandler= wo+"cata(\""+referTo+"\")'>"+blu+"</a>"; }
//line below was as this, with errors	if(drctry=='xp'){abouthandler= wo+"expa(\""+referTo+"\",\""+outsideDir+"\")'>"+blu+"</a>"; }
		if(drctry=='xp'){abouthandler= wo+"expa(\""+referTo+"\")'>"+blu+"</a>"}
		if(drctry=='p'){abouthandler= wo+"asides(\""+referTo+"\")'>"+blu+"</a>"}
		if(drctry=='2'){abouthandler= wo+"d2(\""+referTo+"\")'>"+blu+"</a>"}
//		if(referTo==''){abouthandler=''; blu=''}
	}
// code for calling GROUPED IMAGES dx window, window2, w2xy from window3
	var dx=1
	if(drctry=="p"){dir = "images/Peter/!LARGE/"; dx=0}
	if(drctry=="z"){dir = "images/Suzanne/!LARGE/"; dx=0}
	if(drctry=="e"){dir = "images/El_Valero/!LARGE/"; dx=0}
	if(drctry=="d" || drctry=="xp"){dir = "../3d!LARGE/"; dx=0}
	if(drctry=="i"){dir = "images/!LARGE/"; dx=0}
	if(drctry=="2"){dir = "images/!LARGE/"; dx=0}
	if(drctry==""){alert("give the image window function a dir path from where you're calling it, or the .js file"); dx=0}
	if(dx==1){dir = drctry}
//dx==1 means the image directory is chosen by the calling function, not the lines above
	if(x==0){blb=''; reldImgsHandlr=''}
	if(x!=0){blb="show all images of this item together"
		w2args="Win2spec("+x+","+y+",\"\",\""+outsideDir+"\",\"\",\""+loc+"\")'>"+blb+"</a>"
		if(nx()){reldImgsHandlr=  wo+w2args}
		else{reldImgsHandlr= "<a href='javascript:"+w2args}
			}
//bug here:if called from image window, related images window may fail to re-appear, due to directory confusion?
	
	if(x==w1){if(opener && opener.name){if(opener.name=="window3" || opener.name=="window1"){blb=''; reldImgsHandlr=''}}}
	if(x==w1){if(!(opener && opener.name)){blb=''; reldImgsHandlr=''}}
	if(capn=='noCaption') caption=''
	if(capn!='noCaption') caption=capn



// IMAGES PAGE LAYOUT
	function writepic(){
		if(b<20){ly=b+6}else{ly=((b/2)-4)}
		st = "style='position:absolute; left:"
		wo = ((b+b+w)/20)
		pt = "px; top:"
		capnd = "px; z-index:3; color:black'>"+caption+"</div>"
		lnknd = "px; z-index:3; color:black'>close image window &nbsp; "+blu+" &nbsp; "+blb+" </div>"
		entirew3 = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/strict.dtd'>"+
		"<html><head><title>"+title+"</title><link rel='stylesheet' type='text/css' href='http://wavesculptor.com/dolphincyan.css'>"+
		"<script type='text/javascript' language='JAVASCRIPT' SRC='http://wavesculptor.com/dolphin_script.js'></script>" +
		"<script type='text/javascript' language='JAVASCRIPT'>opener</script>" +
		"</head><body bgcolor='"+col+"' link='#33ffff' text='#ffffff'>" +
		"<div id='cnshad1' "+st+(b+4)+pt+((h+b+b)-(ly+13))+capnd +
		"<div id='cnshad2' "+st+(b+3)+pt+((h+b+b)-(ly+12))+capnd +
		"<div id='cnshad3' "+st+(b+4)+pt+((h+b+b)-(ly+12))+capnd +
		"<div id='caption' "+st+(b+3)+pt+((h+b+b)-(ly+13))+"px; z-index:3'>"+caption+"</div>" +
		"<div id='lkshad1' "+st+wo   +pt+(ly+1)+lnknd +
		"<div id='lkshad2' "+st+(wo+1)+ pt+(ly+1)+lnknd +
		"<div id='lkshad3' "+st+(wo+1)+ pt+ly    +lnknd +
		"<div id='linksdv' "+st+wo+pt+ly+"px;z-index:3'>" +
		"<a href='javascript:window.close();'>close image window</a> &nbsp; "+abouthandler+" &nbsp; "+reldImgsHandlr+"</div>" +
		"<div id='imgdivn' "+st+b +		pt+b+ "px;z-index:2'><img src='" +dir+ title+"' alt='"+dir+title+"' border=0 height='"+h+"' width='"+w+"'></div>" +
		"</body></html>";
		function writew3(){
			w3xy.document.write(entirew3); w3xy.document.close(); w3xy.focus();} 
		writew3();
	}
	
	function w3scrols(){if(nx()){
	w3xy=window.open("", target="window3", "screenX=0,screenY=0,scrollbars=1,menubar=0,toolbar=0,directories=0,resizable=1"); 
	}else{w3xy=window.open("", target="window3", "left=0,top=0,scrollbars=1,menubar=0,toolbar=0,directories=0,resizable=1")}
	}
	function w3noscrols(){if(nx()){
	w3xy=window.open("", target="window3", "screenX=0,screenY=0,scrollbars=0,menubar=0,toolbar=0,directories=0,resizable=1"); 
	}else{w3xy=window.open("", target="window3", "left=0,top=0,scrollbars=0,menubar=0,toolbar=0,directories=0,resizable=1")}
	}
	function w3rsizey(){
		if((w+b+b)<screen.availWidth){ww=(w+b+b); sc=0}else{(ww=screen.availWidth-20); sc=1}
		if((h+b+b)<screen.availHeight){hh=(h+b+b)}else{(hh=screen.availHeight-40); sc++}
		if(sc==0){w3noscrols()}else{w3scrols()}
		if(nx()){hh=hh+1}
		w3xy.resizeTo(ww,hh);
		writepic();
	}	
w3rsizey();
}










var w4xy
function resize(){
w=screen.availWidth-310
w4xy.resizeTo(300,270); w4xy.moveTo(w,0); w4xy.focus();
}

function win4(){
	function nnw4(){if(w4xy.history.length<1)resize()
	}
	function notnnw4(){if(w4xy.history.length<3)resize()
	}
if(w4xy==null || (((typeof w4xy.focus)!="function")||w4xy.location=="")){w4xy=window.open("",target="window4","scrollbars=1,resizable=1,menubar=0,directory=0,status=0,toolbar=0"); w4xy.blur();
		if(nx()){nnw4()}
		else{notnnw4()}
}}
//the "function" test is for v4 browsers; the "location" for v6

function blurb(placeholder,path){if (path!=null)pth=path
else pth=""
win4(); w4xy.location=pth+"00_ways_to_view.htm#"; w4xy.focus(); 
}
function cata(catno){CAT=catno.substring(0,2)
if(catno.length>2)pth=catno.substring(2)
else pth=""
win4(); w4xy.location=pth+"00_catalogue.htm#"+CAT; w4xy.focus(); 
}
function expa(catno,path){if(path!=null)pth=path
else pth=""
win4(); w4xy.location=pth+"00_catexpansions.htm#"+catno; w4xy.focus(); 
}
function asides(anchr,path){if(path!=null)pth=path
else pth=""
win4(); w4xy.location=pth+"PoolsAsides.htm#"+anchr; w4xy.focus(); 
}
function persides(anchr,path){if(path!=null)pth=path
else pth=""
win4(); w4xy.location=pth+"p_asides.htm#"+anchr; w4xy.focus();
}
function abouts(anchr,path){if(path!=null)pth=path
else pth=""
win4(); w4xy.location=pth+"about_details.htm#"+anchr; w4xy.focus();
}
function d2(anchr,path){if(path!=null)pth=path
else pth=""
win4(); w4xy.location=pth+"2d_cat.htm#"+anchr; w4xy.focus();
}
function sanCat(anchr,path){if(path!=null)pth=path
else pth=""
win4(); w4xy.location=pth+"sancreed_catalogue.htm#"+anchr; w4xy.focus();
}

/////////////////////////////////////////
//WELCOME PAGE STUFF (some used by other pages too):
/////////////////////////////////////////
function BigPage(){if(navigator.appName=="Microsoft Internet Explorer"){if(screen.availHeight>720){w1xy.resizeTo(997,720)}
	}else{if(screen.availHeight>700){w1xy.resizeTo(982,662)}
}}
function ephemera(){WinMan("ephemera/","ephemera_2004_08.htm",1,1);BigPage()
}
function guest(){WinMan("guest/","Reiner.htm",1,1);BigPage()
}
function sancreed(){WinMan("sancreed/","index.html",1,1);BigPage()
}
function fw(loc){if(screen.availWidth>1000){
	WinMan("",loc,1,1); setTimeout('w1xy.resizeTo(800,662)',10)
		}else{WinMan("",loc,1,1)}
}
var locd
var locdx
function p3d(locd,hash){if(!hash)hash=""
	if(locd==null){locdx="3d/"}else{locdx=locd}
	WinMan(locdx,"00_3d5w.htm"+hash,1,1) 
	if(screen.availWidth){
		if(screen.availWidth>997){w1xy.resizeTo(997,screen.availHeight)
			if(screen.availHeight && screen.availHeight>720){w1xy.resizeTo(997,720)}
			}else{w1xy.resizeTo(screen.availWidth,screen.availHeight)}
}}

function pools(samedirectory){
	var samedirectory
	var dir
	if(samedirectory=="yes"){dir=""}else{dir="pools/"} 
	Win2spec(790,720,"",dir,"","intro.htm")
}
function showCentrefold(focusORnot){
	function fs(){if(focusORnot && focusORnot=="withFocus") w1xy.focus()
	}
	if(screen.availHeight>720){WinMan("","centre.htm",1,1); w1xy.resizeTo(997,720); fs()
	} else {WinMan("","centre.htm",1,1); fs()}
}
function IntroFromCentrefold(){
	if(window.opener){
		w2Loc=String(window.opener.location)
		w2Lstr=w2Loc.substr((w2Loc.length-9),9)
		if(w2Lstr=="intro.htm"){window.opener.focus()
		}else{pools("yes")}
	}else{pools("yes")}
}
var subj
HED=
"\<script type='text/javascript' language='JAVASCRIPT'\>"+
"if(navigator.appName=='Netscape')window.captureEvents(Event.CLICK);"+
"function handler(){location='http://wavesculptor.com/cgi-bin/tmail.pl?section=copystate_pop-up'; if(navigator.appName=='Netscape')return routeEvent()}; window.onClick=handler\<\/script\>"+
"<body bgcolor='#dddddd' text='#180018' onBlur='window.close();' onclick='handler();'>"+
"<p align=center>"
COPYBLURB=
"-&nbsp; valued &nbsp;-<br>-&nbsp; Visitor to wavesculptor.com! &nbsp;-" +
"<br><strong>Before re-publishing anything from this site in" +
"<br>any context that might generate income, please get my " +
"<br>signed assent</strong>.&nbsp; For personal purposes not involving any likelihood of " +
"<br>payment, feel free to copy a few images, paragraphs or bits of code but <strong>please</strong> " +
"<br>add links to <i>wavesculptor.com</i> with the text \"source: wavesculptor.com\" next to each " +
"<br>chunk you re-publish on a web server and email me links to every location of what you are" +
"<br>re-publishing. Your site may get a few more visits as a result. If you want more visits," +
"<br>write an entry in my&nbsp; <a href='http://wavesculptor.com/cgi-bin/v/vbook.cgi' target='window1'>visitors book!</a>&nbsp; I request that you only copy&nbsp; \"as is\". <strong>If you " +
"<br>want to modify anything, please OK it with me <i>before</i> publishing it.</strong>"
FOOT=
"<br>click <strong>anywhere</strong> on this pop-up window to contact me;"+
"<br>clicking anywhere else should close it."+
"<br><strong>- Trev -</strong><br><br><br><br><br></p>"+
"</body></html>"
//the string of breaks at the end of the doc.write are because iex only onclicks window with 'something' on the line....

function copystate(difDir){
	var getcss
	if (difDir=='SameDir'){getcss=""} else {getcss="../"}
	copywin=window.open("",target="windowm","left=100,top=100,resizable=0,scrollbars=0,screenX=100,screenY=100,width=580,height=330");
	copywin.document.write("<html><head><title>wavesculptor copyright statement</title><link rel='stylesheet' type='text/css' href='"+getcss+"dolphinblue.css'>" +
		HED+COPYBLURB+FOOT);
		copywin.document.close();
}