<!--
/******************************************************************************************************************/
// "within-page" navigation; one DIV (of id "objid") is displayed while making previous book invisible.
var objDiv = null;										// old (or previous) book
function doShow(objid) {
	if (objDiv) objDiv.style.display="none";	// blank any book that is displayed
	objDiv=getObject(objid);							// get referenced object
	objDiv.style.display = "block";					// display it
}

// returns the "name" Object
function getObject(name) {
	return (document.getElementById?document.getElementById(name):document.all?document.all[name]:document.layers?eval("document.layers[\"" + name + "\"]"):null);
}

// doCopy places the copyright on the page
function doCopy(full,col) {
	var msg='<div class="copy '+col+'">';
	msg+='<div class="copylink"><a href="index.html">home</a> | <a href="guiding.html">guiding principles</a> | <a href="philosophy.html">(almost) anything but an editor</a> | <a href="biography.html">biography</a> | <a href="contact.html">contact</a> | <a href="links.html">links</a></div>';
//	msg+='Copyright &copy; <a href="mailto:jonpeirce@hotmail.com">Jon Peirce</a> 2007';
	msg+='Copyright &copy; <a href="mailto:jon@jonpeirce.ca">Jon Peirce</a> 2008';
	if (full) msg+= ';  web by <a target="_blank" href="http://woodsgood.ca/fwebdesign.htm">woodsgood.ca</a>';
	msg+='</div>';
	document.write(msg);
}

var timer;
function scrolltop() {
	var tt=getObject("toTop");
	tt.style.top=document.body.scrollTop;
	timer=setTimeout("scrolltop()",1000);
}
function stoptimer() {clearTimeout(timer);}

////////////////////////////// Sliding Menus ////////////////////////////////////////////

var hp=26;
function doMenus() {
//     ypSlideOutMenu(   id      dir    left  top   width   items)  //
 	new ypSlideOutMenu("menu0", "right",    0, 150,    300,     8);		// Home
 	new ypSlideOutMenu("menu1", "right",    0, 150,    300,     8);		// Editing
 	new ypSlideOutMenu("menu2", "right",    0, 150,    300,    10);		// Manuscript Evaluation
 	new ypSlideOutMenu("menu3", "right",    0, 150,    300,     9);		// Writing
 	new ypSlideOutMenu("menu4", "right",    0, 150,    300,    15);		// Special
 	new ypSlideOutMenu("menu5", "right",    0, 150,    300,    11);		// All others
}

// Home Menu
function doMenu0() {
	var msg = "";
	msg += '<div id="menu0Container"><div id="menu0Content">';
   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu0\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu0\')" href="writing.html">Writing Process Courses</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu0\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu0\')" href="evaluation.html">Manuscript and Project Evaluation</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu0\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu0\')" href="special.html">Specialized Writing Courses</a>';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu0\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu0\')" href="editing.html">Editing Courses and Services</a>';
	msg += '</div></div>';
	document.write (msg);
}

// Editing Services Menu
function doMenu1() {
	var msg = "";
	msg += '<div id="menu1Container"><div id="menu1Content">';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="javascript:doShow(\'e1\')">&raquo;&nbsp;Introduction to Editing</a>';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="javascript:doShow(\'e2\')">&raquo;&nbsp;Advanced Editing</a>';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="javascript:doShow(\'e3\')">&raquo;&nbsp;Mini-Edit Boot Camp</a>';

   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="writing.html">Writing Process Courses</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="evaluation.html">Manuscript and Project Evaluation</a>';
//   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="editing.html">Editing Courses and Services</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="special.html">Specialized Writing Courses</a>';
   msg += '<a class="rollmenu c0m" onmouseover="ypSlideOutMenu.showMenu(\'menu1\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu1\')" href="index.html">HOME</a>';
	msg += '</div></div>';
	document.write (msg);
}

// Manuscript Evaluation Menu
function doMenu2() {
	var msg = "";
	msg += '<div id="menu2Container"><div id="menu2Content">';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="javascript:doShow(\'m1\')">&raquo;&nbsp;Big Picture Manuscript Evaluation</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="javascript:doShow(\'m2\')">&raquo;&nbsp;Initial Project Evaluation</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="javascript:doShow(\'m3\')">&raquo;&nbsp;Conceptualizing the Book-Length Project</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="javascript:doShow(\'m4\')">&raquo;&nbsp;Quick Query Service</a>';

   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="writing.html">Writing Process Courses</a>';
//   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="evaluation.html">Manuscript and Project Evaluation</a>';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="editing.html">Editing Courses and Services</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="special.html">Specialized Writing Courses</a>';
   msg += '<a class="rollmenu c0m" onmouseover="ypSlideOutMenu.showMenu(\'menu2\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu2\')" href="index.html">HOME</a>';
	msg += '</div></div>';
	document.write (msg);
}

// Writing Menu
function doMenu3() {
	var msg = "";
	msg += '<div id="menu3Container"><div id="menu3Content">';
   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="javascript:doShow(\'w1\')">&raquo;&nbsp;Your Writing Process...</a>';
   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="javascript:doShow(\'w2\')">&raquo;&nbsp;Maintaining the Momentum...</a>';
   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="javascript:doShow(\'w3\')">&raquo;&nbsp;Writing and Time Management</a>';
   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="javascript:doShow(\'w4\')">&raquo;&nbsp;The Writer\'s Resources...</a>';

//   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="writing.html">Writing Process Courses</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="evaluation.html">Manuscript and Project Evaluation</a>';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="editing.html">Editing Courses and Services</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="special.html">Specialized Writing Courses</a>';
   msg += '<a class="rollmenu c0m" onmouseover="ypSlideOutMenu.showMenu(\'menu3\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu3\')" href="index.html">HOME</a>';

	msg += '</div></div>';
	document.write (msg);
}

// Special Menu
function doMenu4() {
	var msg = "";
	msg += '<div id="menu4Container"><div id="menu4Content">';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s1\')">&raquo;&nbsp;Simple Numbers...</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s2\')">&raquo;&nbsp;Freeing Your Inner Writer...</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s3\')">&raquo;&nbsp;Lampoon Writing</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s4\')">&raquo;&nbsp;Pseudo-Scientific Writing...</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s9\')">&raquo;&nbsp;Writing in Self-Defense...</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s5\')">&raquo;&nbsp;The Joys of Grammar</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s6\')">&raquo;&nbsp;Contemporary Language Issues</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s7\')">&raquo;&nbsp;Design Your Own Writing Course</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s8\')">&raquo;&nbsp;Write &amp; Ride</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="javascript:doShow(\'s10\')">&raquo;&nbsp;Writing with Partners</a>';

   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="writing.html">Writing Process Courses</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="evaluation.html">Manuscript and Project Evaluation</a>';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="editing.html">Editing Courses and Services</a>';
//   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="special.html">Specialized Writing Courses</a>';
   msg += '<a class="rollmenu c0m" onmouseover="ypSlideOutMenu.showMenu(\'menu4\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu4\')" href="index.html">HOME</a>';

	msg += '</div></div>';
	document.write (msg);
}

// Other pages Menu
function doMenu5() {
	var msg = "";
	msg += '<div id="menu5Container"><div id="menu5Content">';
   msg += '<a class="rollmenu c3m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="writing.html">Writing Process Courses</a>';
   msg += '<a class="rollmenu c2m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="evaluation.html">Manuscript and Project Evaluation</a>';
   msg += '<a class="rollmenu c4m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="special.html">Specialized Writing Courses</a>';
   msg += '<a class="rollmenu c1m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="editing.html">Editing Courses and Services</a>';
   msg += '<a class="rollmenu c5m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="guiding.html">Guiding Principles</a>';
   msg += '<a class="rollmenu c5m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="philosophy.html">(Almost) Anything But an Editor</a>';
   msg += '<a class="rollmenu c5m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="biography.html">Biography</a>';
   msg += '<a class="rollmenu c5m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="contact.html">Contact Information</a>';
   msg += '<a class="rollmenu c5m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="links.html">Interesting Links</a>';
   msg += '<a class="rollmenu c0m" onmouseover="ypSlideOutMenu.showMenu(\'menu5\')" onmouseout="ypSlideOutMenu.hideMenu(\'menu5\')" href="index.html">HOME</a>';

	msg += '</div></div>';
	document.write (msg);
}

////////////////////////////// Slide Out Menus //////////////////////////////////

ypSlideOutMenu.Registry = []
ypSlideOutMenu.aniLen = 650
ypSlideOutMenu.hideDelay = 325
ypSlideOutMenu.minCPUResolution = 10

// constructor
function ypSlideOutMenu(id, dir, left, top, width, h) {
	this.ie  = document.all ? 1 : 0
	this.ns4 = document.layers ? 1 : 0
	this.dom = document.getElementById ? 1 : 0

	var height=parseInt(h,10)*hp;
	if (this.ie || this.ns4 || this.dom) {
		this.id			 = id
		this.dir		 = dir
		this.orientation = dir == "left" || dir == "right" ? "h" : "v"
		this.dirType	 = dir == "right" || dir == "down" ? "-" : "+"
		this.dim		 = this.orientation == "h" ? width : height
		this.hideTimer	 = false
		this.aniTimer	 = false
		this.open		 = false
		this.over		 = false
		this.startTime	 = 0

		// global reference to this object
		this.gRef = "ypSlideOutMenu_"+id
		eval(this.gRef+"=this")

		// add this menu object to an internal list of all menus
		ypSlideOutMenu.Registry[id] = this

		var d = document
		d.write('<style type="text/css">')
		d.write('#' + this.id + 'Container { visibility:hidden; ')
		d.write('left:' + left + 'px; ')
		d.write('top:' + top + 'px; ')
		d.write('overflow:hidden; }')
		d.write('#' + this.id + 'Container, #' + this.id + 'Content { position:absolute;z-index:1000; ')
		d.write('width:' + width + 'px; ')
		d.write('height:' + height + 'px; ')
		d.write('clip:rect(0px, ' + width + 'px, ' + height + 'px, 0px); ');		// AJ: added "px" to declaration	
		d.write('}')
		d.write('</style>')

		this.load()
	}
}

ypSlideOutMenu.prototype.load = function() {
	var d = document
	var lyrId1 = this.id + "Container"
	var lyrId2 = this.id + "Content"
	var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1]
	if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
	var temp

	if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100)
	else {
		this.container	= obj1
		this.menu		= obj2
		this.style		= this.ns4 ? this.menu : this.menu.style
		this.homePos	= eval("0" + this.dirType + this.dim)
		this.outPos		= 0
		this.accelConst	= (this.outPos - this.homePos) / ypSlideOutMenu.aniLen / ypSlideOutMenu.aniLen

		// set event handlers.
		if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
//		this.menu.onmouseover = new Function("ypSlideOutMenu.showMenu('" + this.id + "')")
//		this.menu.onmouseout = new Function("ypSlideOutMenu.hideMenu('" + this.id + "')")

		//set initial state
		this.endSlide()
	}
}

ypSlideOutMenu.showMenu = function(id)
{
	var reg = ypSlideOutMenu.Registry
	var obj = ypSlideOutMenu.Registry[id]

	if (obj.container) {
		obj.over = true

		// if this menu is scheduled to close, cancel it.
		if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }

		// if this menu is closed, open it.
		if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
	}
}

ypSlideOutMenu.hideMenu = function(id)
{
	// schedules the menu to close after <hideDelay> ms, which
	// gives the user time to cancel the action if they accidentally moused out
	var obj = ypSlideOutMenu.Registry[id]
	   if (obj.container) {
		   if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
		   obj.hideTimer = window.setTimeout("ypSlideOutMenu.hide('" + id + "')", ypSlideOutMenu.hideDelay);
	   }
}

ypSlideOutMenu.hide = function(id)
{
	var obj = ypSlideOutMenu.Registry[id]
	obj.over = false

	if (obj.hideTimer) window.clearTimeout(obj.hideTimer)

	// flag that this scheduled event has occured.
	obj.hideTimer = 0

	// if this menu is open, close it.
	if (obj.open && !obj.aniTimer) obj.startSlide(false)
}

ypSlideOutMenu.prototype.startSlide = function(open) {
	this[open ? "onactivate" : "ondeactivate"]()
	this.open = open
	if (open) this.setVisibility(true)
	this.startTime = (new Date()).getTime()
	this.aniTimer = window.setInterval(this.gRef + ".slide()", ypSlideOutMenu.minCPUResolution)
}

ypSlideOutMenu.prototype.slide = function() {
	var elapsed = (new Date()).getTime() - this.startTime
	if (elapsed > ypSlideOutMenu.aniLen) this.endSlide()
	else {
		var d = Math.round(Math.pow(ypSlideOutMenu.aniLen-elapsed, 2) * this.accelConst)
		if (this.open && this.dirType == "-")		d = -d
		else if (this.open && this.dirType == "+")	d = -d
		else if (!this.open && this.dirType == "-")	d = -this.dim + d
		else										d = this.dim + d

		this.moveTo(d)
	}
}

ypSlideOutMenu.prototype.endSlide = function() {
	this.aniTimer = window.clearTimeout(this.aniTimer)
	this.moveTo(this.open ? this.outPos : this.homePos)
	if (!this.open) this.setVisibility(false)
	if ((this.open && !this.over) || (!this.open && this.over)) {
		this.startSlide(this.over)
	}
}

ypSlideOutMenu.prototype.setVisibility = function(bShow) {
	var s = this.ns4 ? this.container : this.container.style
	s.visibility = bShow ? "visible" : "hidden"
}
ypSlideOutMenu.prototype.moveTo = function(p) {
	this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : (p) + "px"
}
ypSlideOutMenu.prototype.getPos = function(c) {
	return parseInt(this.style[c])
}

// events
ypSlideOutMenu.prototype.onactivate		= function() { }
ypSlideOutMenu.prototype.ondeactivate	= function() { }

/* The following is called like this
 		<a href="javascript:mailpage()">
		<img src="icon-email_page.gif" align="absmiddle" border="0" height="16" width="15">
		</a>Email Page
		
*/

function mailpage() {
	var DocTitle = document.title;
	rExp = new RegExp("&", "g");
	DocTitle = DocTitle.replace(rExp, "%26");
	mail_str = "mailto:?subject=Check out the " + DocTitle;
	mail_str += "&body=I thought you might be interested in the " + DocTitle;
	mail_str += ". You can view it at, " + location.href; 
	location.href = mail_str;
}


<!--photo popup window ------------------------------------------------------------------------------------>
var win=null;
function NewWindow_photo(mypage,myname,w,h,pos,infocus){
	if(pos=="random"){
		myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=="center"){
		myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!='center' && pos!="random") || pos==null){
		myleft=0;mytop=20
	}
	settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";
	win=window.open(mypage,myname,settings);
	win.focus();
}
// -->
-->


