<!--
/* 
Az alábbi JavaScript forráskód kizárólagos jogtulajdonosa a 
WEBFocus Stúdió E.C.(WFS;info@webfocus.hu). A forrásfájl egésze
és részei is a szerzoi jog és a nemzetközi jogi egyezmények,
valamint egyéb, a szellemi tulajdonra vonatkozó jogszabályok
és nemzetközi egyezmények védelme alatt állnak.

All rights reserved for the following JavaScript source code by 
WEBFocus Stúdió E.C. (WFS;info@webfocus.hu).
The source file and its parts are under the proof of license and 
international rights agreements as well as other legislations for
intellectual property. Any changes, copies ,publications 
and other uses of the code without the permition of WFS is forbidden.
*/

/*
* Az átadott függvény az oldalbetöltodés után azonnal meg lesz hívva
* Fontos, hogy a függvény neve egyedi legyen, nem a metódus, hanem a függvény 
* "regisztrálása" szempontjából.
*/
function addToInicializalo(Fuggveny) {
	if (!window.onload) window.onload=new Function("for (Iterator in initFuggvenyek) {initFuggvenyek[Iterator]();}")
	if (! window.initFuggvenyek) window.initFuggvenyek=new Array
	window.initFuggvenyek.push(Fuggveny)	
}

function kepcsere(kep,ujkepSrc) {
	kep.oldsrc=kep.src
	kep.src=ujkepSrc
	kep.onmouseout=new Function("this.src=this.oldsrc");
}

var myablak;
function felbukkanoAblakMegjelenitese(url,title,urlref) {
	var allURL="/_Osztott/Blokk/KepMegjFelbukAblakban/kepMegjFelbukkanoAblakban.htm?src="+
			encodeURIComponent(url);
	if (title!=null) allURL+="&title="+encodeURIComponent(title);
	if (urlref!=null) allURL+="&urlref="+encodeURIComponent(urlref);
	myablak=window.open(
		allURL,
		"hello",
		"resizable=yes, scrollbars=yes,titlebar=no,width=200,height=50");
}

function getObjektum(ID) {
	return GetObjektum(ID);
}

function GetObjektum(ID, Dokumentum) {
  var p, i, foundObj;
  
  if(!Dokumentum) Dokumentum = document;
  if( (p = ID.indexOf("?")) > 0 && parent.frames.length) {
    Dokumentum = parent.frames[ID.substring(p+1)].document;
    ID = ID.substring(0,p);
  }
  if(!(foundObj = Dokumentum[ID]) && Dokumentum.all) 
  	foundObj = Dokumentum.all[ID];
  for (i=0; !foundObj && i < Dokumentum.forms.length; i++) 
    foundObj = Dokumentum.forms[i][ID];
  for(i=0; !foundObj && Dokumentum.layers && i < Dokumentum.layers.length; i++) 
    foundObj = GetObjektum(ID,Dokumentum.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(ID);
  
  return foundObj;
}

// Típusinicializálások ----------------------------------------------------------------

// Array típus kirejesztése  v1.0.5
// http://www.dithered.com/javascript/array/index.html
// code by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)

function isUndefined(property) {
	return (typeof property == 'undefined');
}

// Array.concat() - Join two arrays
if (isUndefined(Array.prototype.concat) == true) {
	Array.prototype.concat = function (secondArray) {
		var firstArray = this.copy();
		for (var i = 0; i < secondArray.length; i++) {
			firstArray[firstArray.length] = secondArray[i];
		}
		return firstArray;
	};
}

// Array.copy() - Copy an array
if (isUndefined(Array.prototype.copy) == true) {
	Array.prototype.copy = function() {
		var copy = new Array();
		for (var i = 0; i < this.length; i++) {
			copy[i] = this[i];
		}
		return copy;
	};
}

// Array.pop() - Remove the last element of an array and return it
if (isUndefined(Array.prototype.pop) == true) {
	Array.prototype.pop = function() {
		var lastItem = null;
		if ( this.length > 0 ) {
			lastItem = this[this.length - 1];
			this.length--;
		}
		return lastItem;
	};
}

// Array.push() - Add an element to the end of an array
if (isUndefined(Array.prototype.push) == true) {
	Array.prototype.push = function() {
		var currentLength = this.length;
		for (var i = 0; i < arguments.length; i++) {
			this[currentLength + i] = arguments[i];
		}
		return this.length;
	};
}

// Array.shift() - Remove the first element of an array and return it
if (isUndefined(Array.prototype.shift) == true) {
	Array.prototype.shift = function() {
		var firstItem = this[0];
		for (var i = 0; i < this.length - 1; i++) {
			this[i] = this[i + 1];
		}
		this.length--;
		return firstItem;
	};
}

// Array.slice() - Copy several elements of an array and return them
if (isUndefined(Array.prototype.slice) == true) {
	Array.prototype.slice = function(start, end) {
		var temp;
		if (end == null || end == '') end = this.length;
		
		// negative arguments measure from the end of the array
		else if (end < 0) end = this.length + end;
		if (start < 0) start = this.length + start;
		
		// swap limits if they are backwards
		if (end < start) {
			temp  = end;
			end   = start;
			start = temp;
		}
		
		// copy elements from array to a new array and return the new array
		var newArray = new Array();
		for (var i = 0; i < end - start; i++) {
			newArray[i] = this[start + i];
		}
		return newArray;
	};
}

//-->
