
/***********************************************
* Image Thumbnail Viewer II script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify image paths and optional link (set link to "" for no link):

//Preload images ("yes" or "no"):
var preloadimg="no"

//Set optional link target to be added to all images with a link:
var optlinktarget=""

//Set image border width
var imgborderwidth=0

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
//var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"
var filterstring=""

///////No need to edit beyond here/////

if (preloadimg=="yes"){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}

function returnimgcode(theimg){
var imghtml=""
imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'"'
imghtml+=' alt="'+theimg[1]+'">'
return imghtml
}


function modifyimage(loadarea, descarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
var imgdobj=document.getElementById(descarea)

imgobj.innerHTML=returnimgcode(dynimages[imgindex])
imgdobj.innerHTML=dynimages[imgindex][2]
return false
}
}

function addEvent(obj, evType, fn) {
	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, true);
		return true;
	} else if (obj.attachEvent) {
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} else {
		return false;
	}
}

function getElementsByClass(name) {
	var found = 0;
	var elems = new Array();
	var alltags = document.getElementsByTagName("*");
	if (alltags) {
		for (i=0; i < alltags.length; i++) {
			if (alltags[i].className==name) {
				elems[found++]=alltags[i];
			}
		}
	}
	return(elems);
}

function printPage() {
  if (window.print) {
    setTimeout('window.print();', 200);
  }
  else if (agt.indexOf("mac") != -1) {
    alert("Az oldal nyomtat?s?hoz nyomd meg a 'Cmd+p' gombokat!");
  }
  else {
    alert("Az oldal nyomtat?s?hoz nyomd meg a 'Ctrl+p' gombokat!");
  }
}

function atReplacer() {
	var replaces=0;
	while (document.body.innerHTML.indexOf('##'+'kukac##')!=-1 && replaces<30) {
		document.body.innerHTML=document.body.innerHTML.replace('##'+'kukac##',String.fromCharCode(64));
		replaces++;
	}
}

addEvent(window, 'load', atReplacer);