var chlp_topics = new Array();
chlp_topics[0]= new Array ("Settlement","Geo-political identifier of the repository where the required document is held – usually a town or city name.");
chlp_topics[1]= new Array ("Repository","Typically the name of the institution which is responsible for the administration of the required physical document.");
chlp_topics[2]= new Array ("Query","Enter the search term. In the scroll-down menu, select the field to be searched. Selection of the ‘FullText’ option activates a full text search of all available data. Special rules apply to the ‘Shelf Mark’ option: if you are uncertain of the precise Shelf Mark, you can simply replace less significant characters (punctuation marks - full stop/period, dash, colon etc.) with spaces.");
chlp_topics[3]= new Array ("Search only for records relating to a full digital document","Some catalogue records relate to digital libraries containing accessible complex digital documents – in the majority of cases, these documents contain digitised images of pages or full text, accompanying texts, audio recordings etc. Select this option if you are only interested in catalogue entries relating to existing documents in a digital library.");
chlp_topics[4]= new Array ("Search digitised maps only","Some catalogue records relate to digital libraries containing accessible complex digital documents – a specialised group of which consists of digital copies of maps and their files.<br/><br/>Select this option if you are only interested in catalogue entries relating to existing copies of maps in a digital library.");
chlp_topics[5]= new Array ("Autocomplete search words","If this option is selected, the results will include all records containing variants of the search term, in the same way as if the * convention had been applied in the query.<br/><br/>Thus, a search on the expression Komensk will find records containing words such as Komenský, Komenského, Komenskému etc. (the same result is achieved, without resorting to this option, by using the star character: Komensk*).");
chlp_topics[6]= new Array ("Character tolerance","If this option is selected, the system will return a wider range of results, tolerating one ‘incorrect’ character in the search term. For example, a search on Comen* will return results including Komenský as well as Comenius (in this example, * signifies application of the * convention to the given search term – as if the Autocomplete option had been activated).");
chlp_topics[7]= new Array ("Accept orthographical variants of search word","In the sphere of historical holdings, a search term may be entered in various forms. A table has been drawn up, containing string variants frequently carrying the same meaning.<br/><br/>If this option is selected, the following strings are respectively treated as equivalents:<br/><br/>AE=OE=E<br>NN=MN=MPN<br>L=LL<br>R=RR<br>I=Y=J=II=IJ=JI<br>V=VV=W=U=UU=VU<br>IE=IHE=HIE<br>D=DD<br>Q=QU=CU<br>S=SS<br>TI=CI<br>CA=KA<br>T=TH=TT<br>CHA=CA<br>CHE=CE<br>SA=ZA<br>G=C=K<br>M=MM<br>IT=ID<br>ET=ED<br>SI=SCI<br>SE=SCE<br>SU=SUB<br>X=XS<br>P=PP");
chlp_topics[8]= new Array ("Search only for records in which the search words are immediately consecutive","By selecting this option, you can significantly narrow down your search, as long as you know that the search words form an exact phrase in the relevant field.");
chlp_topics[9]= new Array ("Advanced search","In advanced search mode, a query can be entered in more than one field and queries can be gradually narrowed down in successive steps (or, alternatively, expanded).");
chlp_topics[10]= new Array ("Index of Settlement","This index is an aphabetical listing of values contained in the given field. According to the content of the field the index may be accessed as a list of words, keywords, numbers or dates. In certain kinds of fields more types of indexes may be available. Use of the indexes can significantly simplify the formulation of precise queries.");
chlp_topics[11]= new Array ("Index for a Library","This index is an aphabetical listing of values contained in the given field. According to the content of the field the index may be accessed as a list of words, keywords, numbers or dates. In certain kinds of fields more types of indexes may be available. Use of the indexes can significantly simplify the formulation of precise queries.");
chlp_topics[12]= new Array ("Index for a selected field","This index is an aphabetical listing of values contained in the given field. According to the content of the field the index may be accessed as a list of words, keywords, numbers or dates. In certain kinds of fields more types of indexes may be available. Use of the indexes can significantly simplify the formulation of precise queries.");
chlp_topics[13]= new Array ("nadpis 3","text 3");
chlp_topics[14]= new Array ("nadpis 3","text 3");
chlp_topics[15]= new Array ("nadpis 3","text 3");
chlp_topics[16]= new Array ("nadpis 3","text 3");
chlp_topics[17]= new Array ("nadpis 3","text 3");

var chlp_wnd_move=false;
var chlp_wnd_open=false;
var chlp_wnd_origpos=true;

function chlp_close() {
	document.getElementById("chl_wnd_offcss").disabled=false;
	chlp_wnd_open=!chlp_wnd_open;
	chlp_wnd_origpos=true;
}

function chlp_open(topic, newX, newY) {
	chlp_wnd_move=false;
	document.getElementById("chl_wnd_offcss").disabled=true;
	document.getElementById("chlp_topic_header").innerHTML=chlp_topics[topic][0];
	document.getElementById("chlp_topic_text").innerHTML=chlp_topics[topic][1];
	if (!chlp_wnd_open || chlp_wnd_origpos==true) {
		document.getElementById("chlp_wnd").style.top=newY+document.body.scrollTop;
		document.getElementById("chlp_wnd").style.left=newX;
		chlp_wnd_open=true;
		chlp_wnd_origpos=true;
	}
}

function chlp_move(newX, newY) {
	if (chlp_wnd_move==true) {
		document.getElementById("chlp_wnd").style.top=newY-5+document.body.scrollTop;
		document.getElementById("chlp_wnd").style.left=newX-5;
		chlp_wnd_origpos=false;
	}
}

function chlp_returnXY(bodyX, bodyY) {
	alert(bodyX);
}

var events = new Object();

events.addListener = function(element,type,fcn)
{
  if (!element.addEventListener && !element.attachEvent) return false;
  if (element.addEventListener) element.addEventListener(type,fcn,false);
  else if (element.attachEvent)
  {
    element.attachEvent('on' + type,function(event) {
	var objEvent = new Object();
	objEvent.type = event.type;
	objEvent.target = event.srcElement;
	objEvent.currentTarget = element;
	objEvent.eventPhase = (objEvent.target == objEvent.currentTarget ? 2 : 3);
	objEvent.button = (event.button == 2 || event.button == 6 ? 2 : event.button == 4 ? 1 : event.button == 0 ? null : 0);
	objEvent.altKey = event.altKey;
	objEvent.ctrlKey = event.ctrlKey;
	objEvent.shiftKey = event.shiftKey;
	objEvent.metaKey = false;
	objEvent.clientX = event.clientX;
	objEvent.clientY = event.clientY;
	objEvent.relatedTarget = (objEvent.type == 'mouseover' ? event.fromElement : objEvent.type == 'mouseout' ? event.toElement : null);
	objEvent.stopPropagation = function() { event.cancelBubble = true; };
	objEvent.preventDefault = function() { event.returnValue = (objEvent.type == 'mouseover' && (objEvent.target.tagName.toLowerCase() == 'a' || objEvent.target.tagName.toLowerCase() == 'area') ? true : false); };
	objEvent.AT_TARGET = 2;
	objEvent.BUBBLING_PHASE = 3;
	
    objEvent.keyCode = event.keyCode;
	objEvent.charCode = event.keyCode;
	objEvent.offsetX = event.offsetX;
	objEvent.offsetY = event.offsetY;
	objEvent.x = event.x;
	objEvent.y = event.y;
	fcn(objEvent);
	})
  }
  return true;
};

events.removeListener = function(element,type,fcn)
{
  if (!element.removeEventListener && !element.detachEvent) return false;
  if (element.removeEventListener) element.removeEventListener(type,fcn,false);
  else if (element.detachEvent) element.detachEvent('on' + type,fcn);
  return true;
};

events.listenersArray = new Array();

events.addListeners = function()
{
  var i, element, repeat = false;
  for (i = 0; i < events.listenersArray.length; i++)
  {
    element = (events.listenersArray[i].element != '' ? eval(events.listenersArray[i].element) : false);
    if (element)
	{
	  events.addListeners.able = events.addListener(element,events.listenersArray[i].type,events.listenersArray[i].fcn);
	  events.listenersArray[i].element = '';
	}
	else if (events.listenersArray[i].element != '') repeat = true;
  }
  if (repeat) setTimeout('events.addListeners()',1000);
  else events.addListeners.done = true;
};


//events.addListener(document.getElementById('wt_body'),'mousemove',chlp_move());
