﻿// JScript-Datei

function Transcription()
{
	this.lastPanel = null;
	this.quire = null;
	this.folio = null;
	this.side = null;
	this.cols = null;
	this.type = 1;
	this.transcriptionURL = "../handler/transcription.ashx";
}

Transcription.prototype.init = function(quire, folio, side, cols)
{
	this.transcriptionContainer = $("transcriptionText");
	this.transcriptionHead = $("transcriptionHead");


	this.quire = quire;
	this.folio = folio;
	this.side = side;
	this.cols = cols;

    workspace.init(); 
	workspace.setTranslation();
}


Transcription.prototype.setTranscriptionContent = function()
{
			params = {q:this.quire, f:this.folio, s: this.side, type:this.type};
			var myAjax = new Ajax.Updater(
				{success: this.transcriptionContainer}, 
				this.transcriptionURL, 
				{
					method: 'get', 
					parameters: params,
					asynchronous: false
			});
			linking.init(this.transcriptionContainer);
}

Transcription.prototype.changeView = function(type)
{
	transHead = $A(this.transcriptionHead.getElementsByTagName("span"));

	for(i=0;i<transHead.length;i++)
	{
		if(transHead[i].id!="view"+type)
		{
			$(transHead[i]).removeClassName("head_element_active");
		}
		else
		{		
			$(transHead[i]).addClassName("head_element_active");
		}
	}
	this.type = type;
	this.setTranscriptionContent();
    workspace.setCookie();

}

transcription = new Transcription();

  var ol_fgcolor='#FFFFFF';
  var ol_bgcolor='#000000';
  var ol_padxl = 3;
  var ol_padxr = 3;
  var ol_padxt = 3;
  var ol_padxb = 3;
  var ol_textfont = "Arial Unicode MS, Palatino Linotype, Lucida Sans, Lucida Grande, Arial";
