

var this_parentLocation = '';
try{this_parentLocation = LCase(parent.location.href);}
catch(e){}

if (parent.location.href != window.location.href)
{
	if (inStr(this_parentLocation, 'http://www.eksendia.com/') == -1 && inStr(this_parentLocation, 'http://www.eturabian.com/') == -1 && inStr(this_parentLocation, 'http://localhost/') ==  -1)
	{
		parent.location.href = window.location.href;
	}
}

document.onmousemove = mouse_pos;
document.onmousedown = whichButtonClicked;
function unChooseDiv_rightClickHandler(){}
function unChooseDiv_onMouseUpHandler(){}


var frmCollect_Title = '';
function need2LogIn()
{
	alert("You need to log in to use this feature");
	return false;	
}



function prepLibForm()
{
	var i = 0;
	var val = '';

	try
	{
		for (i = 0; i < window.document.pasteLibFrm.elements.length; i++)
		{
			val = window.document.pasteLibFrm.elements[i].value
			val = replace(val, "<", "{:");
			val = replace(val, ">", ":}");
			window.document.pasteLibFrm.elements[i].value = replace(val, "script:", "script");
			
		}
		window.document.pasteLibFrm.title.value = setQuotes(window.document.pasteLibFrm.title.value);
		
		if (inStr(LCase(navigator.userAgent), "gecko") == -1)
		{
			window.document.pasteLibFrm.libBookInfo.value = replace(window.document.pasteLibFrm.libBookInfo.value, "\n", ":~:");
		}
		else
		{
			if (inStr(LCase(navigator.userAgent), "safari") != -1)
			{
				window.document.pasteLibFrm.libBookInfo.value = replace(window.document.pasteLibFrm.libBookInfo.value, "\n", ":~:");
				window.document.pasteLibFrm.libBookInfo.value = replace(window.document.pasteLibFrm.libBookInfo.value, chr(9), "::~~::");
				window.document.pasteLibFrm.libBookInfo.value = replace(window.document.pasteLibFrm.libBookInfo.value, "::~~::", " " + chr(9));
			}
		}
		/*
		if (window.document.pasteLibFrm.checkCaps.checked)
			setSubCookie("Turabian", "checkCaps", "yes", '&');
		else
			setSubCookie("Turabian", "checkCaps", "no", '&');
		*/
	}
	catch(e)
	{
		val = "Sorry. Something went wrong and we cannot process this entry.\n\n\n";
		val += "Please contact us by clicking the 'Contact us' ";
		val += "at the bottom of this page and we will make it work for you.";
		val += "\n\n\nMake sure to let us know the following error msg:\n\n";
		alert(val + "\"" + e.message + "\"");
	}
}

function setLib(str)
{
	setSubCookie("Turabian", "Lib", str, '&');
}



function tur_PlayMusic()
{
	var attr = "width=360,height=350";
	var turMusicWindow = window.open("music.html", "turMusicWindow", attr);
	turMusicWindow.focus();
}








//////////////////////////

function turabian7()	
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//
	//base class for turabian 7 ed.

this.fontsize = '';
this.linkFontcolor = '';
this.name = "t7";	//default name
this.widget = false;
this.widgetReady = false;
this.citationStyle = "";	// for widget - make sure it cooperates with this.citationType
this.noErrors = false;
this.arrChkIDs = new Array();
this.msg = '';
this.msgWidth = 300;
this.tStamp = null;
this.dStamp = null;
	// how many authors are (opened)
this.authorNameCounter = 1;		
	// how many authors are allowed to be generated + 1 (usually from 1 to 21 for 20 authors, 1 to 11 for 10 others)
this.authorNameNumber = 0;		
this.editorNameCounter = 1;
this.editorNameNumber = 0;
this.translatorNameCounter = 1;
this.translatorNameNumber = 0;
this.lastauthor = 0;
this.lasteditor = 0;

this.lasttranslator = 0;
this.volAuthorNameCounter = 1;
this.volAuthorNameNumber = 0;
this.volEditorNameCounter = 1;
this.volEditorNameNumber = 0;

this.arrConveys = new Array();		// help window coordinator
this.keepMsgsOpen = false;		// to be used for multiwindow help if needed (not used now)
this.specialAuthorCases = true;

this.Turabian_Adr = "None";
this.MLA_Adr = "None";
this.APA_Adr = "None";

this.citationType = '';			// for live pages - make sure it cooperates with this.citationStyle
this.citationTypeReadOnly = false;	// for index page
this.frmAction = '';
this.more = null;



this.init = function()		// turabian7()
{
	this.dataHelperDispl();
	this.writeConveyMsgSpan();
}



this.genEditionOptions = function(upTo)
{
	dw('<option value = "2nd" />2nd');
	dw('<option value = "3rd" />3rd');

	for (var i = 4; i < upTo; i++)
	{
		if (i < 21)
		{
			dw("<option value = " + i + "th />" + i + "th");
		}
		else
		{
			var pm_opVal = charArray(i + "");
			var pm_lastDigit = pm_opVal[pm_opVal.length - 1];
			var pm_2lastDigits = pm_opVal[pm_opVal.length - 2] + "" + pm_opVal[pm_opVal.length - 1] + "";
			if (pm_lastDigit > 3)
			{
				dw("<option value = " + i + "th />" + i + "th");
			}
			else
			{
				if (pm_2lastDigits > 13)
				{
					if (pm_lastDigit == 0)
					{
						dw("<option value = " + i + "th />" + i + "th");
					}
					else
					{
						if (pm_lastDigit ==  1)
						{
							dw("<option value = " + i + "th />" + i + "st");
						}
						else
						{
							if (pm_lastDigit ==  2)
							{
								dw("<option value = " + i + "th />" + i + "nd");
							}
							else
							{
								if (pm_lastDigit ==  3)
								{
									dw("<option value = " + i + "th />" + i + "rd");
								}
							}
						}
					}
				}
				else
				{
					if (pm_2lastDigits > 3)
					{
						dw("<option value = " + i + "th />" + i + "th");
					}
					else
					{
						if (pm_2lastDigits == 3)
							dw("<option value = " + i + "th />" + i + "rd");
						if (pm_2lastDigits == 2)
							dw("<option value = " + i + "th />" + i + "nd");
						if (pm_2lastDigits == 1)
							dw("<option value = " + i + "th />" + i + "st");
						if (pm_2lastDigits == 0)
							dw("<option value = " + i + "th />" + i + "th");
					}
				}
			}
		}
	}
}



this.crit4more = function(a, b)
{
	var tmpA = split(a, ">")[1];
	var tmpB = split(b, ">")[1]
	tmpA = replace(LCase(tmpA), "</a", "");
	tmpB = replace(LCase(tmpB), "</a", "");
	if (tmpA > tmpB)
		return 1;
	return -1;
}


this.displMore = function(arrMore)
{
	var i = 0;
	this.more = arrMore;
	this.more.sort(this.crit4more);
	for (i = 0; i < this.more.length; i++)
	{
		dw(this.more[i] + "<br>");
	}
}


this.adjustVertTutorial = function ()
{
	var binput = document.getElementById("pmBookGetFormInput").innerHTML;
	binput = replace(binput, "<br><br>", "<br>");
	document.getElementById("pmBookGetFormInput").innerHTML = binput;
}


this.amzWidget = function(amz_wdgt, wType, sIndex, bNode, wTitle)
{
	amz_wdgt.tag = 'eturabian-20';
	amz_wdgt.widgetType=wType;
	amz_wdgt.searchIndex=sIndex;
	amz_wdgt.browseNode=bNode;
	amz_wdgt.title=wTitle;
	amz_wdgt.width='400';
	amz_wdgt.height='150';
	amz_wdgt.marketPlace='US';
}




this.setCSS = function()		//turabian7()
{
	this.linkFontcolor = '#089494';
	var custFontSize = getSubCookie('JSUtilities', 'fontSize', '&');
	if (custFontSize == '') custFontSize = 12;
	dw("<style  type='text/css'>");
	dw("form {margin-top: 0px; margin-bottom: 0px}");
	dw("body {font-family:arial;font-size:" + custFontSize + "px}");
	dw("A:link {color: #089494; text-decoration: none}");
	dw("A:visited {color: " + this.linkFontcolor + "; text-decoration: none}");
	dw("A:active {color: brown; text-decoration: none}");
	dw("A:hover {color: red; text-decoration: underline}");
	dw("td {font-family:arial;font-size:" + custFontSize + "px}");
	dw("</style>");
	this.fontsize = custFontSize;
}


this.didYou = function(spanID, showAll)
{
	var max = 2;
	var rand = randomNr(max);
	var i = 0;
	var tmp = new Array();
	for(i = 0; i < max;  i++)
	{
		hideObject(spanID + i);
	}
	if (showAll == "all")
	{
		hideObject(spanID);
		for(i = max - 1; i >= 0; i--)
		{
			tmp[i] = document.getElementById(spanID + i).innerHTML;
		}
		for(i = 0; i < max;  i++)
		{
			document.getElementById(spanID + i).innerHTML = tmp[(max - i) - 1];
			showObject(spanID + i);
		}
	}
	else
	{
		showObject(spanID + rand);
	}
}


this.isSupportedBrowser = function()	// turabian7()
{
	var v = 0;
	
	if (animato.isVB)
	{
		v = parseFloat(trim(LCase(navigator.appVersion).split(" msie ")[1]));
		if (v < 6)
			return false;
		return true;
	}
	if(inStr(LCase(navigator.userAgent), "safari") != -1)
	{
		v = parseFloat(trim(LCase(navigator.appVersion).split("version/")[1]));
		if (v < 3.2)
		{
			return false;
		}
		else
		{
			if (v == 3.2)
			{
				try
				{
					v = trim(LCase(navigator.appVersion).split("version/")[1]).split(" ")[0];
					v = v.split(".")[2];
					if (v < 2)
					{
						return false;
					}
				}
				catch(e){}
			}
		}
		return true;
	}
	if (inStr(LCase(navigator.userAgent), "firefox") == -1)
		return false;
	return true;
}



this.generate1stAuthorInfo = function()
{
	var msg2displ = false;
	var doc_URL = LCase(document.URL);
	var str = '';
	var msg = '';
	var tmp = getSubCookie("Turabian7", "citationType", "&");
	if (tmp == '')
		tmp = 'Turabian';
	if (inStr(doc_URL, "_website") == -1 && inStr(doc_URL, "_blog") == -1)
	{
		if (inStr(doc_URL, "_book_") != -1 || inStr(doc_URL, "_musicscore_") != -1)
		{
			msg = "When editor or translator is listed on the book title page instead of author, use their names as author names.<br>";
			msg += "You can do this by clicking on <b>Advanced</b> interface at the top of the form. That will open more options in the form.<br>";
			msg += "You will then see:<br><b> Editor(s) Listed Instead of Author(s)</b><br>or:<br>";
			msg += " <b>Translator(s) Listed Instead of Author(s)</b>.<br>You should check appriopriate option.<br><br>";
			msg += "For other name cases, read the rest of the options in the advanced menu.<br>";
			msg2displ = true;
		}
	}	
	else
	{
		msg = "";
		if (inStr(doc_URL, "_website") != -1)
		{
			msg += "Enter author or owner of the website if known.";
			msg2displ = true;
		}
		else
		{
			if (inStr(doc_URL, "_blog") != -1)
			{
				msg += " If the author is not listed, enter website owner name instead";
				msg2displ = true;
			}	
		}
	}
	if (msg2displ)
	{
		str += "<a href = '#' title = 'See your citation manual about author name' ";
		str += "onClick = 'return " + this.name + ".conveyMsg(\"" + msg + "\");'";
		str += "><img src = 'images/q_mark_05.gif' border = '0'></a>";
		document.getElementById('generate1stAuthorSpan').innerHTML = str;
	}
}



this.getCitationType = function()
{
	if (this.citationType != '')
		return;
	this.citationType = getSubCookie("Turabian7", "citationType", "&");
	if (this.citationType == '')
	{
		this.citationType = 'Turabian';
	}
	this.setCitationType(this.citationType, '');
}



this.alphaLink = function(kolor, project)
{
	setSubCookie("Turabian7", "alphaLinkColor", kolor, "&");
	location.href = "alphaResults.html?projectName=" + project
}



this.setCitationType = function(citationType, isSubm)
{
	var active = "<font color = 'black'><b><u>";
	var endTagActive = "</u></b></font>";
	var passive = "<font color = '" + this.linkFontcolor + "'><b>";
	var endTagPassive = "</b></font>";
	this.citationType = citationType;
	setSubCookie("Turabian7", "citationType", citationType, "&");
	document.getElementById('citTypeTurabian').innerHTML = "";
	document.getElementById('citTypeMLA').innerHTML = "";
	document.getElementById('citTypeAPA').innerHTML = "";
	try
	{	
		document.getElementById('displ_Turabian_Link').innerHTML = passive + "Turabian" + endTagPassive;
		document.getElementById('displ_MLA_Link').innerHTML = passive + "MLA" + endTagPassive;
		document.getElementById('displ_APA_Link').innerHTML = passive + "APA" + endTagPassive;
		document.getElementById('displ_' + this.citationType + '_Link').innerHTML = active + citationType + endTagActive;
		//document.getElementById('citType' + citationType).innerHTML = "<font color = 'red'><b>#</b></font>";
	}
	catch(e)
	{
		alert('Javascript error: ' + e.message + '\n\nlinkSpanID = ' + 'displ_' + this.citationType + '_Link');
	}	
	
	if (!this.citationTypeReadOnly)
	{
		this.setFrmAction();
		this.generate1stAuthorInfo();
		if (isSubm != '')
		{
			this.processFrmOnSubmit();
			window.document.frmCollect.submit();
		}
		
	}	
}


this.isReady = function()
{
	if (getSubCookie("Turabian7", "pSession", "&") == "")
	{
		alert("No Flash found. Cannot process entry.");
		return false;
	}
	return true;
}


this.setFrmAction = function()
{
	if (isVisible('CitationStyleSpan'))
	{
		if (this.citationType == 'Turabian')
		{
			window.document.frmCollect.action = this.Turabian_Adr;
		}
		if (this.citationType == 'MLA')
		{
			if (this.MLA_Adr != "None")
				window.document.frmCollect.action = this.MLA_Adr;
		}
		if (this.citationType == 'APA')
		{
			if (this.APA_Adr != "None")
				window.document.frmCollect.action = this.APA_Adr;
		}
	}
}



this.chooseInterface = function()		//turabian7()
{
	var interface = getSubCookie("Turabian", "interface", '&');
	if (interface != "adv")
	{
		this.hideAdvanced();
	}
	else
	{
		this.showAdvanced();
	}
}



this.forIE = function()
{
	if (!this.widget)
	{
		if(animato.isVB)
		{
				//ie only
			location.reload();
		}
	}
	else
	{
			//this goes for all browsers
		this.widgetReady = true;
	}
}



this.toggleEls = function(els, crit, showHide)
{
	var i;
	var isTurabian = false;
	for(i = 0; i < els.length; i++)
	{
		if (this.arrChkIDs[els[i].id] == undefined || this.arrChkIDs[els[i].id] == 'undefined' || this.arrChkIDs[els[i].id] == null)
		{
			this.arrChkIDs[els[i].id] = 0;		
		}
		else
		{
			//alert("Error: repeating id = " + els[i].id);
		}
		if (inStr(els[i].id, crit) != -1)
		{
			if (showHide ==  null)
			{
				toggle(els[i].id);
			}
			else
			{
				if (showHide == "show")
				{
					showObject(els[i].id);
				}
				else
				{
					hideObject(els[i].id);
				}
			}
		}
	}
}



this.announceAdvanced = function()
{
	alert("the advanced option has been set");
}



this.showAdvanced = function()
{
	this.showHideType('_adv_', 'show');
	showObject('_adv_basmenu');
	hideObject('_adv_basmenu');
	setSubCookie("Turabian", "interface", "adv", '&');
}


this.hideAdvanced = function()
{
	this.showHideType('_adv_', 'hide');
	hideObject('_adv_basmenu');
	showObject('_adv_basmenu');
	deleteCookie("Turabian");
}



this.showHideType = function (crit, showHide)		//turabian7()
{
	this.arrChkIDs = new Array();
	var arrEls = document.body.getElementsByTagName('span');
	this.toggleEls(arrEls, crit, showHide);
	arrEls = document.body.getElementsByTagName('div');
	this.toggleEls(arrEls, crit, showHide);
}



this.showFrmType = function()		//turabian7()
{
	this.showHideType('_book_', 'show');
	this.showHideType('_journal_', 'show')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'show');

	this.showHideType('_musicscore_', 'hide');
	this.showHideType('_online_', 'hide');
}



this.toggleAdvanced = function()		//turabian7()
{
	var arrEls = document.body.getElementsByTagName('span');
	this.toggleEls(arrEls, '_adv_');
	arrEls = document.body.getElementsByTagName('div');
	this.toggleEls(arrEls, '_adv_');
	if (isVisible('_adv_menu'))
	{
		setSubCookie("Turabian", "interface", "adv", '&');
	}
	else
	{
		setSubCookie("Turabian", "interface", "bas", '&');
	}
	return false;
}


this.writeConveyMsgSpan = function()		//turabian7()
{
	var i = 0;
	var str = '';
	str += "<span id='turabian7conveyMsgSpan' style='position:absolute;z-Index:100;top:0;left:0;cursor:move;' ";
	str += "onMouseDown = 'chooseDiv(\"turabian7conveyMsgSpan\");' onMouseUp = 'unChooseDiv();'";
	str += "></span>";
	dw(str);
	hideObject('turabian7conveyMsgSpan');
}


this.genMsgHead = function(nr)		//turabian7()
{
	var str = '';
	if (nr != null)
		str += "<table bgcolor = 'green' width = '" + this.msgWidth + "'><tr><td>";
	else
		str += str += "<table bgcolor = 'green'><tr><td>";
	str += "<table bgcolor = '#f0f0f0' width = '100%'><tr><td>";
	return str;
}


this.genMsgTail = function(id)		//turabian7()
{
	var str = '';
	if (id != null)
	{
		str += "<form><input type = 'reset' value = 'close' ";
		str += "onClick = \"hideObject('" + id + "');return false;\" /></form>";
	}
	str += "</td></tr></table>";
	str += "</td></tr></table>";
	return str;
}


this.msgLeftTop = function()		//turabian7()
{
	var x = animato.x;
	var y = animato.y
	if(window.screen)
	{
		x = parseInt(screen.availWidth / 4) - 200;
		y = parseInt(screen.availHeight / 2) - 200 + document.body.scrollTop;
	}
	return[x, y]	
}


this.conveyMsg = function(msg)		//turabian7()
{
	var str = '';
	var xy = this.msgLeftTop();
	this.closeMessages();
	str += this.genMsgHead(this.msgWidth);
	str += msg;
	str += "<form>";
	str += "<input type = 'reset' value = 'close' onClick = \"hideObject('turabian7conveyMsgSpan')";
	str += ";return false;\" />";
	str += "</form>";
	str += this.genMsgTail();
	showHtml('turabian7conveyMsgSpan', str);
	showObject('turabian7conveyMsgSpan');
	this.arrConveys[this.arrConveys.length] = 'turabian7conveyMsgSpan';
	moveElem('turabian7conveyMsgSpan', xy[0], xy[1]);
	return false;
}


this.showMsg = function(id)		//turabian7()
{
	var xy = this.msgLeftTop();
	this.closeMessages();
	showObject(id);
	this.arrConveys[this.arrConveys.length] = id;
	moveElem(id, xy[0], xy[1]);
	return false;
}


this.closeMessages = function()		//turabian7()
{
	var i = 0;
	if (this.keepMsgsOpen)
		return;
	for (i = 0; i < this.arrConveys.length; i++)
	{
		hideObject(this.arrConveys[i]);
	}
	this.arrConveys = new Array();	
}


this.editAgain = function()		//turabian7()
{

	this.prepare4Submit();
	window.document.frmCollect.biblSubmitted.value = 'editAgain';
	window.document.frmCollect.submit();
	return false;
}



this.forResults = function(idResults)	//turabian7()
{
	var res = document.getElementById(idResults).innerHTML;
	res = replace(res, "{:", "<");
	res = replace(res, ":}", ">");
	res = replace(res, ",,", ",");
	document.getElementById(idResults).innerHTML = res;
}



this.displCitation = function(id, val)		//turabian7()
{
	var str = "";
	val = replace(val, "{:I:}", "{:i:}");
	val = replace(val, "{:/I:}", "{:/i:}");
	val = replace(val, "{:U:}", "{:u:}");
	val = replace(val, "{:/U:}", "{:/u:}");
	val = replace(val, "{:i:}", "<i>");
	val = replace(val, "{:/i:}", "</i>");
	val = replace(val, "{:u:}", "<u>");
	val = replace(val, "{:/u:}", "</u>");
	val = replace(val, "{:", "&lt;");
	val = replace(val, ":}", "&gt;");
	val = replace(val, "  ", " ");
	val = replace(val, "( ", "(");
	val = replace(val, " )", ")");
	val = replace(val, "andquote</i>.", ".andquote</i>");
	val = replace(val, "Andquote", "&#147;")
	val = replace(val, "andquote", "&#148;")
	val = replace(val, "...", "~");
	val = replace(val, "..", ".");
	val = replace(val, "~", "...");
	val = replace(val, ",,", ",");
	str += "<span style = 'font-family:Times New Roman;font-size:" + (this.fontsize + 5) + "px;'>";
	str += val;
	str == "</span>";
	str = this.setQuotes(str);
	document.getElementById(id).innerHTML = str;
}


this.setQuotes = function(str)
{
	str = replace(str, "&quot;", "yuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyu");
	str = replace(str, "&quot", "&quot;");
	str = replace(str, "yuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyuyu", "&quot;");
	return setQuotes(str);
}



this.processFrmOnLoad = function()		//turabian7()		
{
	var i = 0;
	var val = '';
	for (i = 0; i < window.document.frmCollect.elements.length; i++)
	{
		val = window.document.frmCollect.elements[i].value
		val = replace(val, "{:", "<");
		val = replace(val, ":}", ">");
		window.document.frmCollect.elements[i].value = val;
	}
	if (window.document.frmCollect.biblSubmitted.value == 'yes' && this.noErrors == true)
	{
		hideObject("spanCollectForm");
		showObject("spanCollectedForm");
		hideObject('basAdv');
	}
	else
	{
		hideObject("spanCollectedForm");
	}
	try
	{
		if (!this.specialAuthorCases)
		{
			hideObject('specialAuthorCasesSpan');
		}
	}
	catch(e){}
	this.showFrmType();
	this.chooseInterface();
	this.showNonEpmtyFields();
	this.getCitationType();
	this.chkBibo();
}




this.prepare4Submit = function()		//turabian7()
{
	var i = 0;
	var val = '';
	var elName = '';
	for (i = 0; i < window.document.frmCollect.elements.length; i++)
	{
		val = window.document.frmCollect.elements[i].value
		val = replace(val, "U>", "i>");
		val = replace(val, "u>", "i>");
		val = replace(val, "<", "{:");
		val = replace(val, ">", ":}");
		elName = window.document.frmCollect.elements[i].name;
		if (inStr(LCase(elName), "title") != -1)
		{
			val = replace(val, "&", "and");
		}
		window.document.frmCollect.elements[i].value = val;
	}
}


this.chkLocator = function()
{
	var isLocator = false;
	try
	{
		if (window.document.frmCollect.Movement.value != '')
			isLocator = true;
	}
	catch(e){}
	try
	{
		if (window.document.frmCollect.measureNrs1.value != '')
			isLocator = true;
	}
	catch(e){}
	try
	{
		if (window.document.frmCollect.pageNrs1.value != '')
			isLocator = true;
	}
	catch(e){}
	try
	{
		if (window.document.frmCollect.pageNrs2.value != '')
			isLocator = true;
	}
	catch(e){}	
	try
	{
		if (window.document.frmCollect.descriptiveLocator.value != '')
			isLocator = true;
	}
	catch(e){}	
	if (!isLocator)
	try
	{
		window.document.frmCollect.pageNrs1.value = 'page nr.';
	}
	catch(e){}
}



this.processFrmOnSubmit = function()		//turabian7()
{
	if (!this.isReady())
		return false;
	var dstamp = new Date();	
	var stamp = dstamp.valueOf().toString();
	this.prepare4Submit();
	if (window.document.frmCollect.biblID.value == '')
	{
		window.document.frmCollect.biblID.value = this.tStamp + "_" + this.dStamp + "_" + stamp;
		window.document.frmCollect.biblSubmitted.value = '';
	}
	this.chkLocator();
	window.document.frmCollect.biblSubmitted.value = 'yes';
	return true;
}



this.clearFrm = function()		//turabian7()
{
	this.makeClear();
	return false;
}



this.makeClear = function()		//turabian7()
{
	var i = 0;
	try
	{
		hideObject("noPeriodicalDefined");
		hideObject("noPeriodicalDefined2");
	}
	catch(c){}
	for (i = 0; i < window.document.frmCollect.elements.length; i++)
	{
		if (window.document.frmCollect.elements[i].value)
			window.document.frmCollect.elements[i].value = '';
		if (window.document.frmCollect.elements[i].checked)
			window.document.frmCollect.elements[i].checked = false;
	}
	window.document.frmCollected.editAgain.value = "edit"
	window.document.frmCollected.makeNew.value = "make new entry"
	window.document.frmCollect.submitButton.value = "Submit";
	window.document.frmCollect.resetButton.value = "Clear";
	if (window.document.frmCollect.Edition)
		window.document.frmCollect.Edition.options[1].selected = true;
	if (window.document.frmCollect.VolumeNr)
	{
		try
		{
			window.document.frmCollect.VolumeNr.options[1].selected = true;
		}
		catch(e){}
	}
	if (window.document.frmCollect.SeriesNr)
		window.document.frmCollect.SeriesNr.options[1].selected = true;
	if (window.document.frmCollect.postedMonth)
		window.document.frmCollect.postedMonth.options[1].selected = true;
}


this.addAuthor = function()		//turabian7()
{	
	this.authorNameCounter++;
	if ((this.authorNameCounter * 1 + this.lastauthor * 1) < this.authorNameNumber)
	{
		showObject("author" + (this.authorNameCounter * 1 + this.lastauthor * 1));
		if (window.document.frmCollect.anonim)
			window.document.frmCollect.anonim.checked = false;
		if (window.document.frmCollect.pseudo)
			window.document.frmCollect.pseudo.checked = false;
		if (window.document.frmCollect.authorWithinTitle)
			window.document.frmCollect.authorWithinTitle.checked = false;
		try
		{
			hideObject('specialAuthorCasesSpan');
		}
		catch(e){}
	}
	else
	{
		alert("Cannot add more - maximum is " + (this.authorNameCounter + this.lastauthor - 1));
	}
	return false;
}


this.addEditor = function()		//turabian7()
{	
	this.editorNameCounter++;
	if (this.editorNameCounter * 1 + this.lasteditor * 1 < this.editorNameNumber)
	{
		showObject("editor" + (this.editorNameCounter * 1 + this.lasteditor * 1));
	}
	else
	{
		alert("Cannot add more - maximum is " + (this.editorNameCounter + this.lasteditor - 1));
	}
	return false;
}


this.showNonEpmtyFields = function()		//turabian7()
{
	var i = 0;
	var frm = window.document.frmCollect;
	for (i = 1; i < this.authorNameNumber; i++)
	{
		if (eval("frm.Author" + i + "FName").value != '')
		{
			showObject("author" + i);
			this.lastauthor = i - 1;
		}
		if (eval("frm.Author" + i + "LName").value != '')
		{
				showObject("author" + i);
				this.lastauthor = i - 1;
		}
	}
	for (i = 1; i < this.editorNameNumber; i++)
	{
		if (eval("frm.Editor" + i + "FName").value != '')
		{
			showObject("editor" + i);
			this.lasteditor = i - 1;
		}
		if (eval("frm.Editor" + i + "LName").value != '')
		{
			showObject("editor" + i);
			this.lasteditor = i - 1;
		}
	}
	if (frm.Translator1FName)
	{
		for (i = 1; i < this.translatorNameNumber; i++)
		{
			if (eval("frm.Translator" + i + "FName").value != '')
			{
				showObject("translator" + i);
				this.lasttranslator = i - 1;
			}
			if (eval("frm.Translator" + i + "LName").value != '')
			{
				showObject("translator" + i);
				this.lasttranslator = i - 1;
			}
		}
	}

	if (frm.Subtitle2)
	{
		if (frm.Subtitle2.value != '')
		{
			showObject("Subtitle2");
			hideObject("Subtitle2Sign");
		}
	}	
}



this.getBiborefo = function()		//turabian7()
{
	var frm = null;
	var br = getSubCookie("Turabian7", "biborefo", "&");
	if (inStr(LCase(location.href), 'request') == -1)
		frm = window.document.frmCollect;
	else
		frm = window.document.pasteLibFrm;
	if (br != "ref")
		frm.biborefo[0].checked = true;
	else	
		frm.biborefo[1].checked = true;
	if (this.citationStyle != "")
		hideObject("biborefoSpan");
}



this.setBibiTurabian = function()
{
	this.setBibl();
}


this.TurOnly = function(getStyle)		//turabian7()
{
	if (getSubCookie("Tur7Util", "citationStyle", '&') == "" || getSubCookie("Tur7Util", "citationStyle", '&') == "Turabian")
		showObject('biborefoSpan');
	else
		hideObject('biborefoSpan');
	if (getStyle == "")
		return;
	if (getStyle != "Turabian")
		hideObject('biborefoSpan');
	else
		showObject('biborefoSpan');
}


this.chkBibo = function()
{
	try
	{
		if (document.getElementById("citTypeTurabian").innerHTML == "")
		{	
			hideObject("biborefoSpan");
		}
		else
		{
			showObject("biborefoSpan");
		}
	}
	catch(e){}		
}



this.setBibl = function()		//turabian7()
{
	try
	{
		showObject("chapterSpan");
	}
	catch(e){}
	setSubCookie("Turabian7", "biborefo", "bib", "&");
}


this.setRef = function()		//turabian7()
{
	try
	{
		hideObject("chapterSpan");
	}
	catch(e){}
	setSubCookie("Turabian7", "biborefo", "ref", "&");
}


this.turToggle = function(i)		//turabian7()
{
	toggle("id_" + i);
	toggle("plus_" + i);
	toggle("minus_" + i);
	return false;
}


this.dataHelperDispl = function()		//turabian7()
{
	var str = '';
	var pSession = getSubCookie('Turabian7', 'pSession', '&');
	var tSession = getSubCookie('Turabian7', 'tSession', '&');
	var dstamp = new Date();	
	var stamp = dstamp.valueOf().toString();

	if (getSubCookie('Turabian7', 'init', '&') == 'true')
	{
		str += "<span id = 'isFlashInstalled'><table bgcolor = '#d0d0d0'><tr><td><table bgcolor = '#e0e0e0'><tr><td><br><b>";
		str += "<font size = '+1'>Checking for Flash...<br>";
		str += "<font color = 'red'>";
		str += "Make sure you have Flash installed in this browser."
		str += "</font>"
		str += "<br>If this message persists on other pages, you need to download Flash at:<br>";
		str += "<a href = 'http://get.adobe.com/flashplayer/' target = 'getFlash'>";
		str += "<u>http://get.adobe.com/flashplayer/</u></a>";
		str += "<br>or use a different browser with Flash already installed.";
		str += "<br><font color = 'red'>eTurabian will not function without Flash.</font><br>";
		str += "<br></b></font></td></tr></table></td></tr></table><br><br><br><br><br><br></span>";
	}
	str += '<object	classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
    str += 'width="1" ';
	str += 'height="1" ';
	str += 'id="movie" ';
	str += 'allowScriptAccess="always" ';
	str += 'align="middle"> ';
	str += '<param name="movie" value="dataHelper.swf" swLiveConnect="true" /> ';
	str += '<param name="allowScriptAccess" value="always" /> ';
	str += '<param name="quality" value="high" /> ';
	str += '<param name="scale" value="noscale" /> ';
	str += '<param name="salign" value="lt" /> ';
	str += '<param name="bgcolor" value="#ffffff"/> ';
	str += '<embed src="dataHelper.swf" ';
	str += 'bgcolor="#ffffff" ';
	str += 'width="1" ';
	str += 'height="1" ';
	str += 'name="movie" ';
	str += 'quality="high" ';
	str += 'align="middle" ';
	str += 'allowScriptAccess="always" ';
	str += 'type="application/x-shockwave-flash" ';
	str += 'pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	str += '/> ';
	str += '</object> ';

	if (tSession == '')
	{
		setSubCookie('Turabian7', 'tSession', stamp, '&');	
	}	
	if (pSession == '')
	{
		dw(str);
		setSubCookie('Turabian7', 'init', 'true', '&');
	}
	else
	{
		if (this.widget)
		{
			this.widgetReady = true;
		}	
	}
}


this.submitBlogger = function()
{	
	if (this.widgetReady)
	{
		clearInterval(animato.IntID['submitBlogger']);
		window.document.frmCollect.submit();
	}
}


//!!!!!!!!!!!!!!!!!!!!! turabian7 class end !!!!!!!!!!!!!!!!!!!!!//
}




function t7requestBook()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();

this.Turabian_Adr = "school_book_print.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.prepare4Submit = function()		//t7requestBook
{
	var i = 0;
	var val = '';
	var elName = '';
	for (i = 0; i < window.document.frmCollect.elements.length; i++)
	{
		val = window.document.frmCollect.elements[i].value
		val = replace(val, "<", "{:");
		val = replace(val, ">", ":}");
		elName = window.document.frmCollect.elements[i].name;
		if (inStr(LCase(elName), "title") != -1)
		{
			val = replace(val, "&", "and");
		}
		window.document.frmCollect.elements[i].value = replace(val, chr(9), "");	
	}
}


this.processFrmOnSubmit = function()		//t7requestBook
{
	if (!this.isReady())
		return false;
	var dstamp = new Date();	
	var stamp = dstamp.valueOf().toString();
	this.prepare4Submit();
	if (window.document.frmCollect.biblID.value == '')
	{
		window.document.frmCollect.biblID.value = this.tStamp + "_" + this.dStamp + "_" + stamp;
		window.document.frmCollect.biblSubmitted.value = '';
	}
	this.chkLocator();
	window.document.frmCollect.biblSubmitted.value = 'yes';
	setSubCookie("Turabian", "interface", "adv", '&');
	hideObject('collPasteLibFrm');
	return true;
}



this.addTranslator = function()		//t7requestBook
{	
	this.translatorNameCounter++;
	if (this.translatorNameCounter * 1 + this.lasttranslator * 1 < this.translatorNameNumber)
	{
		showObject("translator" + (this.translatorNameCounter * 1 + this.lasttranslator * 1));
	}
	else
	{
		alert("Cannot add more - maximum is " + (this.translatorNameCounter + this.lasttranslator - 1));
	}
	return false;
}

//!!!!!!!!!!!!!!!!!!!!! t7requestBook class end !!!!!!!!!!!!!!!!!!!!!//
}




function t7requestMARC()
{
this.base = t7requestBook;
this.base();


this.processFrmOnSubmit = function()		//t7requestMARC
{
	if (!this.isReady())
		return false;
	var dstamp = new Date();	
	var stamp = dstamp.valueOf().toString();
	this.prepare4Submit();
	if (window.document.frmCollect.biblID.value == '')
	{
		window.document.frmCollect.biblID.value = this.tStamp + "_" + this.dStamp + "_" + stamp;
		window.document.frmCollect.biblSubmitted.value = '';
	}
	this.chkLocator();
	window.document.frmCollect.biblSubmitted.value = 'yes';
	window.document.frmCollect.action = getSubCookie('Turabian7', 'ctype', '&');
	setSubCookie("Turabian", "interface", "adv", '&');
	hideObject('collPasteLibFrm');
	return true;
}

//!!!!!!!!!!!!!!!!!!!!! t7requestMARC class end !!!!!!!!!!!!!!!!!!!!!//
}




function t7book()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();

this.Turabian_Adr = "school_book_print.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.addTranslator = function()		//t7book
{	
	this.translatorNameCounter++;
	if (this.translatorNameCounter * 1 + this.lasttranslator * 1 < this.translatorNameNumber)
	{
		showObject("translator" + (this.translatorNameCounter * 1 + this.lasttranslator * 1));
	}
	else
	{
		alert("Cannot add more - maximum is " + (this.translatorNameCounter + this.lasttranslator - 1));
	}
	return false;
}


this.showFrmType = function()		//t7book()
{
	this.showHideType('_book_', 'show');
	this.showHideType('_journal_', 'show')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'show');

	this.showHideType('_musicscore_', 'hide');
	this.showHideType('_online_', 'hide');
}


//!!!!!!!!!!!!!!!!!!!!! t7book class end !!!!!!!!!!!!!!!!!!!!!//
}






function t7journal()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_journal_print.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7journal - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'show')
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_notonline_', 'show');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'hide');
}


//!!!!!!!!!!!!!!!!!!!!! t7journal class end !!!!!!!!!!!!!!!!!!!!!//
}





function t7musicScore()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7book;
this.base();


this.Turabian_Adr = "school_musicscore_print.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7musicScore  - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'hide')
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_notonline_', 'show');

	this.showHideType('_musicscore_', 'show');
	this.showHideType('_online_', 'hide');
	this.showHideType('_adv_Chapter', 'hide');
	this.showHideType('chapterSpan', 'hide');
}


//!!!!!!!!!!!!!!!!!!!!! t7musicScore class end !!!!!!!!!!!!!!!!!!!!!//
}





function t7musicScoreOnline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7musicScore;
this.base();


this.Turabian_Adr = "school_musicscore_online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7musicScore  - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'hide')
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'show');
	this.showHideType('_online_', 'show');
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_adv_Chapter', 'hide');
	this.showHideType('chapterSpan', 'hide');
}


//!!!!!!!!!!!!!!!!!!!!! t7musicScoreOnline class end !!!!!!!!!!!!!!!!!!!!!//
}





function t7bookOnline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7book;
this.base();


this.Turabian_Adr = "school_book_online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7bookOnline - overrides
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'hide')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'show');
}


//!!!!!!!!!!!!!!!!!!!!! t7bookOnline class end !!!!!!!!!!!!!!!!!!!!!//
}




function t7journalOnline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7journal;
this.base();


this.Turabian_Adr = "school_journal_online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7journalOnline - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'show')
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'show');
}


//!!!!!!!!!!!!!!!!!!!!! t7journalOnline class end !!!!!!!!!!!!!!!!!!!!!//
}



function t7ThesisAndDiss()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_Thesis_Dissertation.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7ThesisAndDiss() - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'hide')
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'hide');
}

//!!!!!!!!!!!!!!!!!!!!! t7ThesesAndDiss class end !!!!!!!!!!!!!!!!!!!!!//
}



function t7ThesisAndDissOnline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7ThesisAndDiss;
this.base();


this.Turabian_Adr = "school_Thesis_Dissertation_Online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";



this.showFrmType = function()		//t7journalOnline - overrides t7ThesisAndDiss()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'hide')
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'show');
}

//!!!!!!!!!!!!!!!!!!!!! t7ThesisAndDissOnline class end !!!!!!!!!!!!!!!!!!!!!//
}


function t7Website()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_Website.html";
this.MLA_Adr = "school_Website_MLA.html";
this.APA_Adr = "school_Website_APA.html";


this.showFrmType = function()		//t7Website - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_journal_', 'hide')
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'show');
}

//!!!!!!!!!!!!!!!!!!!!! t7Website class end !!!!!!!!!!!!!!!!!!!!!//
}



function t7Website_MLA()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7Website;
this.base();
this.citationStyle = "MLA";


//!!!!!!!!!!!!!!!!!!!!! t7Website_MLA class end !!!!!!!!!!!!!!!!!!!!!//
}


function t7Website_APA()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7Website;
this.base();
this.citationStyle = "APA";


//!!!!!!!!!!!!!!!!!!!!! t7Website_MLA class end !!!!!!!!!!!!!!!!!!!!!//
}





function MustInherit_t7Blog()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7Website;
this.base();

this.Turabian_Adr = "school_Blog.html";
this.MLA_Adr = "school_Blog_MLA.html";
this.APA_Adr = "school_Blog_APA.html";



//!!!!!!!!!!!!!!!!!!!!! MustInherit_t7Blog !!!!!!!!!!!!!!!!!!!!!//
}




function t7Blog()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = MustInherit_t7Blog;
this.base();
this.TurabianAdr = "school_Blog.html";



//!!!!!!!!!!!!!!!!!!!!! t7Blog end !!!!!!!!!!!!!!!!!!!!!//
}



function MLA_Blog()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = MustInherit_t7Blog;
this.base();
this.citationStyle = "MLA";



//!!!!!!!!!!!!!!!!!!!!! MLA_Blog end !!!!!!!!!!!!!!!!!!!!!//
}


function APA_Blog()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = MustInherit_t7Blog;
this.base();
this.citationStyle = "APA";



//!!!!!!!!!!!!!!!!!!!!! MLA_Blog end !!!!!!!!!!!!!!!!!!!!!//
}




function TWigdet()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = t7Website;
this.base();

this.citationStyle = "";
this.widget = true;
this.more = '';


this.getCitationType = function()
{
	//nothing
}


this.setCitationType = function(citationType)
{
	//nothing
}


this.displBloggerWidgets = function()
{
	try
	{
		if (document.getElementById("Turabian").innerHTML == '')
		{
			document.getElementById("Turabian").innerHTML += "<font size = '-1'>Bibliography:</font><br>";
			document.getElementById("Turabian").innerHTML += Turabian_iFrame.document.getElementById("bibliograspan").innerHTML;
			if (document.getElementById("Turabian").innerHTML == '')
				document.getElementById("Turabian").innerHTML = this.more;
			
			document.getElementById("Turabian").innerHTML += "<br><font size = '-1'>Note:</font><br>";
			document.getElementById("Turabian").innerHTML += Turabian_iFrame.document.getElementById("fotnotespan").innerHTML;
			if (document.getElementById("Turabian").innerHTML == '')	
				document.getElementById("Turabian").innerHTML = this.more;
		}
	}
	catch(e){}
	try
	{
		if(document.getElementById("APA").innerHTML == '')
		{
			document.getElementById("APA").innerHTML += APA_iFrame.document.getElementById("bibliograspan").innerHTML;
			if (document.getElementById("APA").innerHTML == '')
				document.getElementById("APA").innerHTML = this.more;
		}
	}
	catch(e){}
	try
	{
		if (document.getElementById("MLA").innerHTML == '')
		{
			document.getElementById("MLA").innerHTML += MLA_iFrame.document.getElementById("bibliograspan").innerHTML;
			if (document.getElementById("MLA").innerHTML == '')
				document.getElementById("MLA").innerHTML = this.more;
		}
	}
	catch(e){}
}




//!!!!!!!!!!!!!!!!!!!!! TWigdet end !!!!!!!!!!!!!!!!!!!!!//
}




function t7magazine()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_magazine_print.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7magazine - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'show')
	this.showHideType('_notmusicscore_', 'hide');
	this.showHideType('_notonline_', 'show');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'hide');
}


//!!!!!!!!!!!!!!!!!!!!! t7magazine class end !!!!!!!!!!!!!!!!!!!!!//
}



function t7magazineonline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_magazine_online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7magazineonline - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'show')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'show');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'show');
}


//!!!!!!!!!!!!!!!!!!!!! t7magazineonline class end !!!!!!!!!!!!!!!!!!!!!//
}



function t7newspaper()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_newspaper_print.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7newspaper - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'show')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'show');
	this.showHideType('_musicscore_', 'hide');

	this.showHideType('_online_', 'hide');
}


//!!!!!!!!!!!!!!!!!!!!! t7newspaper class end !!!!!!!!!!!!!!!!!!!!!//
}



function t7sermonOnline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_sermon_online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7sermonOnline - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'hide')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');
	this.showHideType('_online_', 'show');
}


//!!!!!!!!!!!!!!!!!!!!! t7lectureOnline class end !!!!!!!!!!!!!!!!!!!!!//
}





function t7lectureOnline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_lecture_online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7lectureOnline
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'hide')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');
	this.showHideType('_online_', 'show');
}


//!!!!!!!!!!!!!!!!!!!!! t7lectureOnline class end !!!!!!!!!!!!!!!!!!!!!//
}




function t7multimediaOnline(mType)
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();

this.mType = mType;
if (this.mType == "video" || this.mType == "audio")
{
	//nothing for now
}
else
{
	alert("Wrong Multimedia Type - expected 'video' or 'audio', got '" + this.mType + "'");
	this.mType = '';
}
this.Turabian_Adr = "school_Multimedia_Online.html?multiType=" + mType;
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7lectureOnline
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'hide')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');
	this.showHideType('_online_', 'show');
}


//!!!!!!!!!!!!!!!!!!!!! t7lectureOnline class end !!!!!!!!!!!!!!!!!!!!!//
}




function t7review(isOnline)
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();

this.isOnline = isOnline;
if (this.isOnline)
	this.Turabian_Adr = "school_review.html?online=yes";
else
	this.Turabian_Adr = "school_review.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";


this.showFrmType = function()		//t7lectureOnline
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'hide')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');
	if (this.isOnline)
		this.showHideType('_online_', 'show');
	else
		this.showHideType('_online_', 'hide');
}


this.reviewIn = function(revMediaType)
{
	hideObject('magazineDate');
	hideObject('journalIssueVolume');
	hideObject('nonMagazineDate');
	showObject('spanPublYear');
	showObject("noPeriodicalDefined");
	showObject("noPeriodicalDefined2");
	document.getElementById("perTitle").innerHTML = 'Periodical';
	document.frmCollect.MediaType[0].checked = false;
	document.frmCollect.MediaType[1].checked = false;
	document.frmCollect.MediaType[2].checked = false;
	if (revMediaType == "journal")
	{
		showObject('journalIssueVolume');
		showObject('magazineDate');
		document.getElementById("perTitle").innerHTML = 'Journal';
		document.frmCollect.MediaType[0].checked = true;
	}
	if (revMediaType == "magazine")
	{
		showObject('magazineDate');
		document.getElementById("perTitle").innerHTML = 'Magazine';
		document.frmCollect.MediaType[1].checked = true;
	}
	if (revMediaType == "newspaper")
	{
		showObject('nonMagazineDate');
		document.getElementById("perTitle").innerHTML = 'Newspaper';
		document.frmCollect.MediaType[2].checked = true;
	}
	if (revMediaType == "")
	{
		hideObject("noPeriodicalDefined");
		hideObject("noPeriodicalDefined2");
		hideObject('spanPublYear');
	}
}


//!!!!!!!!!!!!!!!!!!!!! t7review class end !!!!!!!!!!!!!!!!!!!!!//
}





function t7netflixOnline()
{
//!!!!!!!!!!!!!!!!!!!!! class begin !!!!!!!!!!!!!!!!!!!!!//

this.base = turabian7;
this.base();


this.Turabian_Adr = "school_Netflix_Online.html";
this.MLA_Adr = "None";
this.APA_Adr = "None";
this.webTitle = '';


this.showFrmType = function()		//t7netflixOnline - overrides turabian7()
{
	this.showHideType('_book_', 'hide');
	this.showHideType('_magazine_', 'hide')
	this.showHideType('_notmusicscore_', 'show');
	this.showHideType('_notonline_', 'hide');
	this.showHideType('_musicscore_', 'hide');
	this.showHideType('_online_', 'show');
}


this.toggleBookFormat = function()
{
	var str = document.frmCollect.bookType.value;
	if (str == "DVD")
	{
		document.frmCollect.bookType.value = "VHS";
	}
	else
	{
		if (str == "VHS")
			document.frmCollect.bookType.value = "DVD";
	}
	
}



this.specifyStreamingSite = function(site)
{
	var frm = document.frmCollect;
	var sp = document.getElementById('pm_frmTitle')
	var sw = LCase(site);
	switch(sw)
	{
		case "netflix":
		{
			frm.Edition.value = 'Netflix';
			sp.innerHTML = frm.Edition.value + " " + this.webTitle;
			document.title = sp.innerHTML;
			frm.MediaType.value = 'WMV';
			frm.bookType.value = 'http://www.netflix.com/';
			break;
		}
		case "amazon":
		{
			frm.Edition.value = 'Amazon';
			sp.innerHTML = frm.Edition.value + " " + this.webTitle;
			document.title = sp.innerHTML;
			frm.MediaType.value = 'FLV';
			frm.bookType.value = 'http://www.amazon.com/';		
			break;
		}
		case "vudu":
		{
			frm.Edition.value = 'Vudu';
			sp.innerHTML = frm.Edition.value + " " + this.webTitle;
			document.title = sp.innerHTML;
			frm.MediaType.value = 'HDX';
			frm.bookType.value = 'http://www.vudu.com/';		
			break;
		}
		case "hulu":
		{
			frm.Edition.value = 'Hulu';
			sp.innerHTML = frm.Edition.value + " " + this.webTitle;
			document.title = sp.innerHTML;
			frm.MediaType.value = 'FLV';
			frm.bookType.value = 'http://www.hulu.com/';		
			break;
		}
	}

}


//!!!!!!!!!!!!!!!!!!!!! t7netflixOnline class end !!!!!!!!!!!!!!!!!!!!!//
}




//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!///

function EksendiaDisplayStudio()
{
	this.allowedMediaExtensions = null;	
	this.nrOfUploads = 0;
	this.beP = 0;
	this.player = null;
	this.windowsMedia = true;
	this.now = -1;
	this.random = -1;
	this.addQ = '';
	this.local = false;
	this.pNr = '';
	this.fileExt = '';
	this.realExt = '';
	this.playFile = '';
	this.uid = 0;
	this.p2close = null;
	this.running = false;



	//////////////////////////
	this.closePlayer = function()
	{
		if (!animato.isVB)
		{
			document.getElementById(ems.p2close).innerHTML = '';
			showObject(ems.p2hide);
		}
		else
		{
			hideObject(ems.p2close);
			showObject(ems.p2hide);
		}
	}
	


	//////////////////////////
	this.play = function(h, w, pNr, fileExt, spanID)
	{
		var qt = false;
		if (inStr(LCase(navigator.userAgent), "safari") != -1)
			qt = true;
		if (inStr(LCase(navigator.userAgent), "windows") == -1)
			qt = true;
		if (this.running)
		{
			if (animato.isVB)
			{
				showObject(ems.p2close);
				hideObject(ems.p2hide);
				return;
			}
		}
		this.p2close = spanID;
		this.p2hide = spanID + "2";
		var playFile = pNr;
		var str = '';
		if(qt)
			str = ems.QuickTimePlayer(h, w, replace(LCase(playFile), ".wmv", ".mov"), fileExt);
		else
			str = ems.windowMedia(h, w, playFile, fileExt);
		this.displPlayerCode(str);
		document.getElementById(spanID).innerHTML = str;
		hideObject(ems.p2hide);
		this.running = true
	}
	
	
		//////////////////////////
	this.QuickTimePlayer = function(h, w, playF, fn, fx)
	{
		var qt = '';
		var str2 = '';
		h += 60;
		str2 += "<table bgcolor = 'black'><tr><td>";
		str2 += "<a href = '#' onClick = 'ems.closePlayer(";
		str2 += ");return false;'><font color = 'white' size = '+1'><b>Close</b></font></a></td></tr></table>";
		if (fn == 'mp3')
		{
			qt = "<table bgcolor = 'black'><tr><td>";
		}
		qt += '<OBJECT id = "MediaPlayerID" CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';
		qt += 'WIDTH="' + w + '"HEIGHT="' + h + '"';
		qt += 'CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
		qt += '<PARAM name="SRC" VALUE="' + playF + '">';
		qt += '<PARAM name="AUTOPLAY" VALUE="true">';
		qt += '<PARAM name="CONTROLLER" VALUE="true">';
		qt += '<EMBED SRC="' + playF + '" ';
		qt += 'WIDTH="' + w + '"HEIGHT="' + h + '" ';
		qt += 'AUTOPLAY="true" ';
		qt += 'CACHE=true'
		qt += 'CONTROLLER="true" PLUGINSPAGE="http://www.apple.com/quicktime/download/">';
		qt += '</EMBED></OBJECT>';
		if (fn == 'mp3')
		{
			qt += "</td></tr></table>";
		}
		return qt + str2;
}


	//////////////////////////
	this.windowMedia = function(h, w, playF, fx)
	{
		var str2 = '';
		var wm = '';
		str2 += "<table bgcolor = 'black'><tr><td>";
		str2 += "<a href = '#' onClick = 'ems.closePlayer(";
		str2 += ");return false;'><font color = 'white' size = '+1'><b>Close</b></font></a></td></tr></table>";
		if (fx == "wma" || fx == "mp3")
		{
				h += 0;
		}
		else
		{
				h +=85;
		}

		wm += '<OBJECT id = "MediaPlayerID" ';
		if ((fx ==  "wmv") || (fx == "wma"))
			wm += 'CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ';
		else
			wm += 'classid="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A" ';
			
		wm += 'WIDTH="' + w + '" HEIGHT="' + h + '" ';
		wm += 'STANDBY="Loading Windows Media Player components..." ';
		if (animato.isVB)
		{
			wm += 'TYPE="application/x-oleobject"> ';
		}
		else
		{
			wm += 'type="application/x-mplayer2"> ';
		}

		wm += '<PARAM NAME="FileName" VALUE="' + playF + '"> ';
		if (animato.isVB)
		{
			wm += '<PARAM name="ShowControls" VALUE="true"> ';
			wm += '<param name="ShowStatusBar" value="false"> ';
			wm += '<PARAM name="ShowDisplay" VALUE="false"> ';
			wm += '<PARAM name="autostart" VALUE="true"> ';
			wm += '<PARAM name="stretchToFit" VALUE="false"> ';
			
		}
		else
		{
			wm += '<PARAM name="ShowControls" VALUE="1"> ';
			wm += '<param name="ShowStatusBar" value="0"> ';
			wm += '<PARAM name="ShowDisplay" VALUE="0"> ';
			wm += '<PARAM name="autostart" VALUE="1"> ';
			wm += '<PARAM name="stretchToFit" VALUE="0"> ';
		}
		
		wm += '<EMBED TYPE="application/x-mplayer2" SRC="' + playF + '" NAME="MediaPlayer" ';
		wm += 'WIDTH="' + w + '" HEIGHT="' + h + '" ';
		wm += 'ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="1" stretchToFit ="0"> ';
		wm += '</EMBED>';
		wm += '</OBJECT> ';
		
		return wm + str2;
	}


	//////////////////////////
	this.playerSizeChange = function(chH, chW)
	{
	document.getElementById("MediaPlayerID").height = chH;
	document.getElementById("MediaPlayerID").width = chW;
	}



	//////////////////////////
	this.displPlayerCode = function(strCode)
	{
		return;
		var s = strCode;
		s = replace(s, ">", ":}");
		s = replace(s, ":}", ">\n");
		alert(s);
	}
}
//class EksendiaMusicStudio end
var ems = new EksendiaDisplayStudio();






	 
