//	aupage.js//	root:Users:garylipo:aulit:parnassus:aupage.js//	routines to implement an "audio-page"(aka "frame-page"): calcIframe, makeSndCntrl, etc.	//	variables defined for each "audio"-window, each file that evokes "aupage.js":		var IframeHtinFull;	var myHeight;	var iframeHt;		var myLeft;	var myTop;	var myWidth;	var myHeight;	//-----------------------------------	//	alert("aupage.js; ");	//-----------------------------------		function selfload()	{			//	assumes window defines a "myWidth" & a "myHeight"	//	alert(	"aupage.js; selfload: \r myLeft: "+myLeft + "myHeight: "+myHeight	);		var nuWidth=myWidth;		resizeTo( nuWidth, myHeight	);		moveTo( myLeft, myTop );	}			function poemunload()	{		//	alert("aupage.js: poemunload();");				opener.defload();		opener.poemOpen=false;		opener.focus();	}		function calcPoemPosition(myWidth, myHeight)	{		//	called by: "macopen()".		var	verror=-34;		var	herror=39;				myLeft= ((27*(screen.width-myWidth))/32);//	+herror;		myTop=	((6*(screen.height-myHeight))/32);//	+verror;		return(	[myLeft, myTop]	);	}		//-----------------------------------	//	window & iframe sizing code:	//-----------------------------------	function	getFontHt(fontSize)	{		var	fontHt;	//	=19.375;		if(	getOs()=="Win"	) 			fontSize-=1;		fontHt=fontSize+2.375;				if(	getOs()=="Mac"	)		{ 		//	fontHt=19.375;				if ((verOffset=browser.indexOf("Safari"))!=-1) 				 fontHt+=1.8;	//	21.50;		}		return( fontHt );	}	//-----------------------------------	//-----------------------------------		//	generic constants; set for MacOS Ñ				var screenOverhead=114;	//	40		var	browser=getBrowserVersion();			//	if ((verOffset=browser.indexOf("Safari"))!=-1) 	//		screenOverhead-=50;					if(	getOs()=="Win"	) screenOverhead-=10;	//	was 0				var maxWindowHt=screen.height-screenOverhead;						//	iframe margins:				var overhead=170;	//	windowOverhead, i.e. overhead=(windowHt-iframeHt)				if(twolineheader) overhead+=20;	//					if ((verOffset=browser.indexOf("Safari"))!=-1) 			overhead+=32;					if(	getOs()=="Win"	) overhead+=65;	//	was: 75				var overwidth=60;	//	windowOverwidth					var maxIframeHt=maxWindowHt-overhead;				//	alert("maxIframeHt: "+maxIframeHt);				var	fontHt=getFontHt(17);		//-----------------------------------	//-----------------------------------			function	calcIFrameHt()	{		var	iframeHt;		if(	IframeHtinFull	<	maxIframeHt	)			iframeHt = IframeHtinFull;		else			iframeHt = maxIframeHt;			//			alert("iframeHt: "+iframeHt);					return(iframeHt);	}		function	calcWinHeight()	{	//	var	myHeight;				/*		alert("IframeHtinFull: "+IframeHtinFull);		alert("maxIframeHt: "+maxIframeHt);		alert("twolineheader: "+twolineheader);		*/		if(	IframeHtinFull	<	maxIframeHt	)		{			myHeight = IframeHtinFull+overhead;		//	alert("myHeight: "+myHeight);			if(twolineheader) myHeight+=20;			}		else	myHeight = maxWindowHt;			//	alert("myHeight: "+myHeight);		return(myHeight);	}			//---------------	//----------------------------------------------------	// initialize global variablesvar detectableWithVB = false;var pluginFound = false;	//	alert("aupage.js; before: goURL(daURL) ");function goURL(daURL) {    // if the browser can do it, use replace to preserve back button    if(javascriptVersion1_1) {	window.location.replace(daURL);    } else {	window.location = daURL;    }    return;}function redirectCheck(pluginFound, redirectURL, redirectIfFound) {    // check for redirection    if( redirectURL && ((pluginFound && redirectIfFound) || 	(!pluginFound && !redirectIfFound)) ) {	// go away	goURL(redirectURL);	return pluginFound;    } else {	// stay here and return result of plugin detection	return pluginFound;    }	}function canDetectPlugins() {    if( detectableWithVB || (navigator.plugins && navigator.plugins.length > 0) ) {	return true;    } else {	return false;    }}function detectFlash(redirectURL, redirectIfFound) {    pluginFound = detectPlugin('Shockwave','Flash');     // if not found, try to detect with VisualBasic    if(!pluginFound && detectableWithVB) {	pluginFound = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');    }    // check for redirection    return redirectCheck(pluginFound, redirectURL, redirectIfFound);}function detectDirector(redirectURL, redirectIfFound) {     pluginFound = detectPlugin('Shockwave','Director');     // if not found, try to detect with VisualBasic    if(!pluginFound && detectableWithVB) {	pluginFound = detectActiveXControl('SWCtl.SWCtl.1');    }    // check for redirection    return redirectCheck(pluginFound, redirectURL, redirectIfFound);}function detectQuickTime(redirectURL, redirectIfFound) {    pluginFound = detectPlugin('QuickTime');    // if not found, try to detect with VisualBasic    if(!pluginFound && detectableWithVB) {	pluginFound = detectQuickTimeActiveXControl();    }    return redirectCheck(pluginFound, redirectURL, redirectIfFound);}function detectReal(redirectURL, redirectIfFound) {    pluginFound = detectPlugin('RealPlayer');    // if not found, try to detect with VisualBasic    if(!pluginFound && detectableWithVB) {	pluginFound = (detectActiveXControl('rmocx.RealPlayer G2 Control') ||		       detectActiveXControl('RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)') ||		       detectActiveXControl('RealVideo.RealVideo(tm) ActiveX Control (32-bit)'));    }	    return redirectCheck(pluginFound, redirectURL, redirectIfFound);}function detectWindowsMedia(redirectURL, redirectIfFound) {    pluginFound = detectPlugin('Windows Media');    // if not found, try to detect with VisualBasic    if(!pluginFound && detectableWithVB) {	pluginFound = detectActiveXControl('MediaPlayer.MediaPlayer.1');    }    return redirectCheck(pluginFound, redirectURL, redirectIfFound);}function detectPlugin() {    // allow for multiple checks in a single pass    var daPlugins = detectPlugin.arguments;    // consider pluginFound to be false until proven true    var pluginFound = false;    // if plugins array is there and not fake    if (navigator.plugins && navigator.plugins.length > 0) {	var pluginsArrayLength = navigator.plugins.length;	// for each plugin...	for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ ) {	    // loop through all desired names and check each against the current plugin name	    var numFound = 0;	    for(namesCounter=0; namesCounter < daPlugins.length; namesCounter++) {		// if desired plugin name is found in either plugin name or description		if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) || 		    (navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) {		    // this name was found		    numFound++;		}   	    }	    // now that we have checked all the required names against this one plugin,	    // if the number we found matches the total number provided then we were successful	    if(numFound == daPlugins.length) {		pluginFound = true;		// if we've found the plugin, we can stop looking through at the rest of the plugins		break;	    }	}    }    return pluginFound;} // detectPlugin// Here we write out the VBScript block for MSIE Windowsif ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {    document.writeln('<script language="VBscript">');    document.writeln('\'do a one-time test for a version of VBScript that can handle this code');    document.writeln('detectableWithVB = False');    document.writeln('If ScriptEngineMajorVersion >= 2 then');    document.writeln('  detectableWithVB = True');    document.writeln('End If');    document.writeln('\'this next function will detect most plugins');    document.writeln('Function detectActiveXControl(activeXControlName)');    document.writeln('  on error resume next');    document.writeln('  detectActiveXControl = False');    document.writeln('  If detectableWithVB Then');    document.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');    document.writeln('  End If');    document.writeln('End Function');    document.writeln('\'and the following function handles QuickTime');    document.writeln('Function detectQuickTimeActiveXControl()');    document.writeln('  on error resume next');    document.writeln('  detectQuickTimeActiveXControl = False');    document.writeln('  If detectableWithVB Then');    document.writeln('    detectQuickTimeActiveXControl = False');    document.writeln('    hasQuickTimeChecker = false');    document.writeln('    Set hasQuickTimeChecker = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');    document.writeln('    If IsObject(hasQuickTimeChecker) Then');    document.writeln('      If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then ');    document.writeln('        detectQuickTimeActiveXControl = True');    document.writeln('      End If');    document.writeln('    End If');    document.writeln('  End If');    document.writeln('End Function');    document.writeln('</scr' + 'ipt>');}		//---------------			function	makemacsndcntrl(autostart)	{		var theType= typeof(autostart);		if( theType=="undefined" )			autostart=true;					var startCode='autostart='+autostart+' ';			//	alert("startCode: "+startCode);		//autostart=true		document.write('<center>');		var commando='<embed name="TheSecret" src="aud.mp3" height="16" width="200"  align="bottom" controller="true" ';		commando+=startCode+ '></embed>';					//	document.write('<embed name="TheSecret" src="aud.mp3" height="16" width="200"  align="bottom" controller="true"></embed>');		document.write(commando);		document.write('</center>');	}		function	makemacsndcntrl2(autostart, file)	{		var theType= typeof(autostart);		if( theType=="undefined" )			autostart=true;					var startCode='autostart='+autostart+' ';			//	alert("startCode: "+startCode);		//autostart=true		document.write('<center>');		var commando='<embed name="TheSecret" src="'+file+'" height="16" width="200"  align="bottom" controller="true" ';		commando+=startCode+ '></embed>';				document.write(commando);		document.write('</center>');	}				function	makemaciframe(heightInPx, widthInPx)	{		document.write('<div style="margin-left:20px;"><br>');			var command='<iframe style="border:0;" src="poem.html" height='+heightInPx;		command+=' width="'+widthInPx+'" align="left" frameborder="0" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" >';					//scrolling="true"  allowtransparency="true"		command+='</div>';		document.write(command);	}		function	makemaciframe2(heightInPx, widthInPx, textfile)	{		document.write('<div style="margin-left:20px;"><br>');			var command='<iframe style="border:0;" src="'+textfile+'" height='+heightInPx;		command+=' width="'+widthInPx+'" align="left" frameborder="0" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" >';					//scrolling="true"  allowtransparency="true"		command+='</div>';		document.write(command);	}		function	makemacHeader(theTitle, theAuthor, notePath )	{		var command='<br>';		command+='<div style="font-size:22px" align="center">';		if( notePath != "")			command+='<a href="'+notePath+'" target="_blank">';				//	intro.mp3	notes/gNote.html	 target="_blank"				command+='<b>'+theTitle+'</b> &nbsp;&nbsp;';				if(twolineheader) command+='<br>';				command+='<span style="font-size:17px">&mdash; '+theAuthor+'</span>';		if( notePath != "")			command+='</a>';				var debugging=false;		if(debugging)			command+='<a href="#dummy" onClick="showInfo();"> *</a>';				command+='</div><br>';				document.write(command);	}	function	makemacHeaderUr(theTitle, theAuthor)	{		var command='<br>';		command+='<div style="font-size:22px" align="center">';		command+='<a href="intro.mp3">';				//	intro.mp3	notes/gNote.html	 target="_blank"				command+='<b>'+theTitle+'</b> &nbsp;&nbsp;';				if(twolineheader) command+='<br>';				command+='<span style="font-size:17px">&mdash; '+theAuthor+'</span></a>';		command+='</div><br>';		document.write(command);	}	function	makemacBody(	theTitle, theAuthor, sndFlag, notePath, copywritedate	)	{		document.write('<div align="center">');		makemacHeader(	theTitle, theAuthor, notePath	);		if( sndFlag	)			makemacsndcntrl(false);	//	was false was blank.			//makeSndCntrl();					makecopynotice(copywritedate);		document.write('</div>');				var nuframeHt=iframeHt;//		if(twolineheader ) //			nuframeHt-=0;	//	26			//	alert("makemacBody(); nuframeHt: "+nuframeHt);						makemaciframe(	nuframeHt, myWidth-overwidth	);	}	//----------------------------------------------------		function makeWinMedSndCntrl(autostart, file)	{		document.write('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"/>');		document.write('<param name="FileName" value="'+file+'"/>');				var theType= typeof(autostart);		if( theType=="undefined" )			autostart=true;						if(autostart)			document.write('<param name="AutoStart" value="True" />');		else document.write('<param name="AutoStart" value="False" />');						document.write('</object>');	}		function makeWinSndCntrl(autostart)	{		//	4/8/05:	test this out for windows, uses activeX, whatever that is!!!!!!!!!!					//	alert("makeWinSndCntrl; before: detectQuickTime");		if(	detectQuickTime("", false)	)		{		//	alert("makeWinSndCntrl; before: makemacsndcntrl");			makemacsndcntrl(autostart)		return;		}		else 			makeWinMedSndCntrl(autostart, "aud.mp3");		/*	//	alert("makeWinSndCntrl; before: document.write");			document.write('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"/>');		document.write('<param name="FileName" value="aud.mp3"/>');				var theType= typeof(autostart);		if( theType=="undefined" )			autostart=true;						if(autostart)			document.write('<param name="AutoStart" value="True" />');		else document.write('<param name="AutoStart" value="False" />');				document.write('</object>');		*/	}	function makeWinSndCntrl2(autostart, file)	{		//	4/8/05:	test this out for windows, uses activeX, whatever that is!!!!!!!!!!					//	alert("makeWinSndCntrl; before: detectQuickTime");		if(	detectQuickTime("", false)	)		{		//	alert("makeWinSndCntrl; before: makemacsndcntrl");			makemacsndcntrl2(autostart, file);		return;		}		else 			makeWinMedSndCntrl(autostart, file);								/*		document.write('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"/>');		document.write('<param name="FileName" value="'+file+'"/>');				var theType= typeof(autostart);		if( theType=="undefined" )			autostart=true;						if(autostart)			document.write('<param name="AutoStart" value="True" />');		else document.write('<param name="AutoStart" value="False" />');						document.write('</object>');		*/	}	function	makeWInIframe(	heightInPx,	widthInPx	)	{		//	n.b. may be that we cannot set iframe's height with percent in ex4win!		var framecode='<div style="margin-left:5px;">'		framecode+='<iframe style="border:0;" src="poem.html" height="'+heightInPx+'" width="'+widthInPx+'" align="left">';		framecode+='</div>';		document.write(framecode);	}			function	makeWInIframe2(	heightInPx,	widthInPx, textfile	)	{		//	n.b. may be that we cannot set iframe's height with percent in ex4win!		var framecode='<div style="margin-left:5px;">'		framecode+='<iframe style="border:0;" src="'+textfile+'" height="'+heightInPx+'" width="'+widthInPx+'" align="left">';		framecode+='</div>';		document.write(framecode);	}				function	makewinHeader(theTitle, theAuthor, notePath )	{		var command='<br>';		command+='<div style="font-size:19px" align="center">';		if( notePath != "")			command+='<a href="'+notePath+'">';	//	command+='<a href="notes/gNote.html" target="_blank">';		command+='<b>'+theTitle+'</b> &nbsp;&nbsp;';				if(twolineheader) command+='<br>';				command+='<span style="font-size:16px">&mdash; '+theAuthor+'</span>';		if( notePath != "")			command+='</a>';		command+='</div><br>';		document.write(command);	}	function	makewinBody(theTitle, theAuthor, sndFlag, notePath, copywritedate )	{		document.write('<div align="center">');		makewinHeader(	theTitle, theAuthor, notePath )		makecopynotice(copywritedate);		document.write("<br>");		if( sndFlag	)			makeWinSndCntrl(false);	//	 was blank.		document.write("<br></div>");				var nuframeHt=iframeHt;//		if(twolineheader) //			nuframeHt-=26;		makeWInIframe(	nuframeHt, myWidth-overwidth	);	}		//---------------------------------------------------------------------		function	makeBody(	theTitle, theAuthor, sndFlag, notePath	)	{		var osname=getOs();		if(osname=="Mac")			{			makemacBody(	theTitle, theAuthor, sndFlag, notePath	);			return;		}				if(osname=="Win")			{			makewinBody(	theTitle, theAuthor, sndFlag, notePath );			return;		}	}	function	makeSndCntrl(autostart)	{		var osname=getOs();		if(osname=="Mac")			{			makemacsndcntrl(autostart);			return;		}				if(osname=="Win")			{			makemacsndcntrl(autostart);		//	makeWinSndCntrl(autostart);			return;		}	}	function	makeSndCntrl2(autostart, file)	{		var osname=getOs();		if(osname=="Mac")			{			makemacsndcntrl2(autostart, file);			return;		}				if(osname=="Win")			{			makemacsndcntrl2(autostart, file);		//	makeWinSndCntrl2(autostart, file);			return;		}	}//--------------------------------------------------------------------------------	var auPageWin;		function macopen(	poemID	)	//	, unframed	{		//	alert("macopen(); poemID: "+poemID);		var dim=getPoemStats(	poemID	);		var	lineCt=dim[	0	];			var fontSize=dim[	1	];		var myWidth=dim[	2	];		var twolineheader=dim[	3	];				var	fontHt=getFontHt(fontSize);		var nuHeight=calcWindowHt(	fontHt,	lineCt	);		var nuDim=calcPoemPosition(myWidth, nuHeight);		recede();				var path=poemID+"/frame.html";	//	if( unframed )	//		path=poemID+"/poem.html";		//	alert("macopen(); path: "+path);		//	alert("macopen(); nuHeight: "+nuHeight);				auPageWin=genWindowOpen(	auPageWin, path, "alpha", myWidth, nuHeight, nuDim[	0	], nuDim[	1	], "yes");		return;	}		function macopensonnet(	poemID	)	//	for "unframed" poems	{		//	alert("macopensonnet(); poemID: "+poemID);		self.recede();		var dim=getPoemStats(	poemID	);		var	lineCt=dim[	0	];			//	var	theWidth=dim[	0	];		//	alert("macopen(); theWidth: "+theWidth);		var fontSize=dim[	1	];		var myWidth=dim[	2	];		var twolineheader=dim[	3	];				var	fontHt=getFontHt(fontSize);	//	var nuHeight=dim[	0	];;		var nuHeight=calcWindowHt(	fontHt,	lineCt	);				//	special dimensions for "sonnet-windows"		//	thus macopen2 ought to be named: macopensonnet		myWidth=450;		nuHeight=418;				var nuDim=calcPoemPosition(myWidth, nuHeight);			//	var path=poemID+"/frame.html";	//	if( unframed )			path=poemID+"/poem.html";			//	alert("macopensonnet(); nuHeight: "+nuHeight +", lineCt: "+lineCt);				auPageWin=genWindowOpen(	auPageWin, path, "alpha", myWidth, nuHeight, nuDim[	0	], nuDim[	1	], "yes");		return;	}		//-------------------	function	calcWindowHt(	fontHt,	lineCt	)	{		//	called by: "macopen()".		//	alert(	"calcWindowHt()"	);			var	iframeHt;		var	theOs=getOs();		var	browser=getBrowserVersion();				var screenOverhead=78;	//	was:	78				//	iframe margins:			var overhead=170;	//	windowOverhead; was: 170						if ((verOffset=browser.indexOf("Safari"))!=-1) 				overhead+=32;			if(	theOs=="Win"	) overhead+=90;					var maxWindowHt=screen.height-screenOverhead;		var maxIframeHt=maxWindowHt-overhead;					var nufontHt=getFontHt(fontHt);		var	IframeHtinFull=nufontHt*lineCt;				if ((verOffset=browser.indexOf("Safari"))!=-1) 			IframeHtinFull+=0;	//	10;				//	alert("calcWindowHt(); maxIframeHt: "+maxIframeHt+" IframeHtinFull: "+IframeHtinFull);		if(	IframeHtinFull	<	maxIframeHt	)		{		//	alert(	"IframeHtinFull	<	maxIframeHt"	);						iframeHt = IframeHtinFull;			var	windowHeight=iframeHt+overhead;			return(	windowHeight	);		}		else		{		//	alert(	"IframeHtinFull	>	maxIframeHt"	);						iframeHt = maxIframeHt;		//	alert("calcWindowHt(); iframeHt: "+iframeHt);			var	windowHeight=iframeHt+overhead;		//	alert("calcWindowHt(); windowHeight: "+windowHeight);					windowHeight=690;									return(	windowHeight	);		}	}	//##############################################	function makeAuPageLink(fileID)	//	, unframed	{	//	alert("makeAuPageLink(); (fileID)= "+fileID);	//	return;		// opens a poem's frame file from index page, according to OS.		// actually output an html-link appropriate to os,		//	that links to a poem's frame page.		 		var theOs=getOs();		var command;		if(theOs=="Win")		{		//	if(	unframed )		//		command='<a href="'+fileID+'/poem.html" target="_blank">';		//	else 		command='<a href="'+fileID+'/frame.html" target="_blank">';		}		if(theOs=="Mac")		{			var substr="'"+fileID+"'";			command='<a href="#" onClick="macopen(	'+substr+'	);">';		}	//	alert(command);		document.write(command);	//	alert("makeAuPageLink(); command= "+command);	}	function makeSonnetPageLink(fileID)	//	for "unframed" poems	{	//	alert("makeSonnetPageLink(); (fileID)= "+fileID);		 		var theOs=getOs();		var command;		if(theOs=="Win")				command='<a href="'+fileID+'/poem.html" target="_blank">';						if(theOs=="Mac")		{			var substr="'"+fileID+"'";			command='<a href="#" onClick="macopensonnet(	'+substr+'	);">';		}	//	alert(command);		document.write(command);	//	alert("makeAuPageLink(); command= "+command);	}		//------------------------------------------------------------------------		function makePoemLink(fileID, defaults)	//	rename to : "makeAuPageLink"	{//	alert("poemopen(); (fileID)= "+fileID);		// opens a poem's frame file from index page, according to OS.		// actually output an html-link appropriate to os,		//	that links to a poem's frame page.		 		var theOs=getOs();		var command;		if(theOs=="Win")			command='<a href="'+fileID+'/frame.html" target="_blank">';		if(theOs=="Mac")		{			var substr="'"+fileID+"'";			command='<a href="#" onClick="customOpen(	'+substr+', '+defaults+'	);">';	//	, defaults		//	alert(command);		//	command='<a href="#" onClick="macopen(	'+substr+'	);">';		}	//	alert(command);		document.write(command);	}		function	defPoemLink(fileID)	{		var	path="nupoems/"+fileID;		makePoemLink(path, true);	}		function customOpen(	poemID, defaults	)	//	 - opens audioPage to a pre-determined size & position.	{		//	alert("fancyOpen(); poemID: "+poemID);	//	var theStats(some defaults, for testing);				var	lineCt;			var fontSize;		var myWidth;		var twolineheader;		//		Looking to 'pre-open' poem files according to lineCt, etc.				if(defaults)		{			lineCt=63				fontSize=17;			myWidth=440;			twolineheader=false;		}		else		{			var dim=getPoemStats(	poemID	);				lineCt=dim[	0	];				fontSize=dim[	1	];			myWidth=dim[	2	];			twolineheader=dim[	3	];			}		var	fontHt=getFontHt(fontSize);		var nuHeight=calcWindowHt(	fontHt,	lineCt	);		var nuDim=calcPoemPosition(myWidth, nuHeight);	//	alert("aupageopen(); before: recede(); opener: "+opener);		opener.focus();		opener.moveTo(	40,	screen.height-(opener.myHt+40)	);	//	opener.recede();		var path=poemID+"/frame.html";	//	alert("fancyOpen(); path: "+path);		auPageWin=genWindowOpen(	auPageWin, path, "alpha", myWidth, nuHeight, nuDim[	0	], nuDim[	1	], "yes");		return;	}		//------------------------------------------------------------------------		function	makeFancyLink(poemID)	{	//	alert("HI");	//	alert("makeFancyLink(); poemID: "+poemID);		poemID="'nupoems/"+poemID+"'";		command='<a href="#" onClick="customOpen(	'+poemID+', false 	);">';	//	alert(command);		document.write(command);		return;	}			var pageInfo;		function makeInfoMessage()	{		pageInfo="calcPageDim()\n";		pageInfo+="Os(): "+getOs()+"\n";		pageInfo+="maxWindowHt: "+maxWindowHt+" \n maxIframeHt: "+maxIframeHt;		pageInfo+=" lineCt: "+lineCt+" \n IframeHtinFull: "+IframeHtinFull;		pageInfo+=" iframeHt: "+iframeHt;		pageInfo+=" \n myHeight: "+myHeight;	//	alert(pageInfo);	}		function	calcPageDim()	{		//	called from poem frames, to calculate own size, iframe, placement.	//	outputs(as globals):		//		IframeHtinFull, myHeight, iframeHt, myLeft, myTop.	/*		alert("getOs(): "+getOs());		if(	getOs()=="Mac"	)				alert("Mac");	*/			IframeHtinFull=fontHt*lineCt;		if ((verOffset=browser.indexOf("Safari"))!=-1) 		{			IframeHtinFull+=0;	//	10;		}					myHeight=calcWinHeight();		iframeHt=calcIFrameHt();				myLeft= (29*(screen.width-myWidth))/32;				if ((verOffset=browser.indexOf("Safari"))!=-1) 		{			myTop= screenOverhead/2;	//	(13*(screen.height-myHeight))/32;		}			else myTop= screenOverhead/5;	//	myTop= (5*(screen.height-myHeight))/32;					makeInfoMessage();		/*		var debugging=false;		if(debugging)			alert(pageInfo);		*/	}		var	infoPageWin;		function showInfo()	{		var infoPageWin;		var	nuWidth=300;		var	nuHeight=300;		var	nuLeft=400;		var	nuTop=200;			infoPageWin=genWindowOpen(	infoPageWin, "../../pageInfo.html", "beta", nuWidth, nuHeight, nuLeft, nuTop, "yes");		return;	}		function auPageTest()	{		var mtest="mtest!";	//	alert("Hi, auPageTest!");		alert(mtest);	//	document.write("alert(pageInfo);");	//	return(pageInfo);		}