<!--
//******************************************************************************
// Filename:	mcsslibrary.js
// Author:	Larry Clifton
// Date:	February 17, 2002
// Description:	Library of scripts used throughout the MultiChannelSound Shop
//		Web site.
// Modifications:
// 		6/2/2002 - Added function displayInReprintsFrame().
//******************************************************************************
//******************************************************************************
// Function:	displayInFrame
// Purpose:	If not displaying window in a frame and the browser supports
//		frames, then display the home page with frames.
// Parameters:	none
// Return:	True if switched to display home page in frames; otherwise, 
//		false.
//******************************************************************************
function displayInFrame() {
	var okay = false;
	var inFrame = window != window.parent;
	var isNN = window.navigator.appName.indexOf("Netscape") != -1;
	var isIE = window.navigator.appName.indexOf("Microsoft") != -1;
	var usesFrames = isNN || isIE;

	if (!inFrame && usesFrames) {
		//window.stop();
		window.location.replace("mcss.html");
		okay = true;
	}

	return okay;
}

//******************************************************************************
// Function:	displayInReprintsFrame
// Purpose:	If not displaying window in a frame and the browser supports
//		frames, then display the reprints page with frames.
// Parameters:	none
// Return:	True if switched to display reprints page in frames; otherwise, 
//		false.
//******************************************************************************
function displayInReprintsFrame() {
	var okay = false;
	var inFrame = window != window.parent;
	var isNN = window.navigator.appName.indexOf("Netscape") != -1;
	var isIE = window.navigator.appName.indexOf("Microsoft") != -1;
	var usesFrames = isNN || isIE;

	if (!inFrame && usesFrames) {
		//window.stop();
		window.location.replace("mcssreprints.html");
		okay = true;
	}

	return okay;
}

//******************************************************************************
// Function:	uniqueWindowName
// Purpose:	Assemble and return a browser window name guaranteed to be
//		unique.  Achieves this by appending the character "W" to the
//		time since 1970 in milliseconds.
// Parameters:	none
// Return:	String containing window name.
//******************************************************************************
function uniqueWindowName() {
	var datetime = new Date();
	var millisecs = datetime.getTime()

	return "W"+millisecs.toString();
}
//-->






