

/***********************************************
* 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++;
	}
}

	//With its friendly solutions-oriented approach, our timely and knowledgeable Technical Support Staff are completely at your disposal. Our Support Technicians are highly trained on the inner workings of the Internet and its associated technologies. Combined with effective troubleshooting techniques, we can quickly identify and resolve technical issues whether they are on our end or on the client end. </div> WHEREINPATH is where you are storing this script on your account IMAGESDIR is where on your acoount you are storing the icons for (expanded collapsed) */ imgout=new Image(9,9); imgin=new Image(9,9); /////////////////BEGIN USER EDITABLE/////////////////////////////// imgout.src="/gfx_shared/u.gif"; imgin.src="/gfx_shared/d.gif"; ///////////////END USER EDITABLE/////////////////////////////////// //this switches expand collapse icons function filter(imagename,objectsrc){ if (document.images){ document.images[imagename].src=eval(objectsrc+".src"); } } //show OR hide funtion depends on if element is shown or hidden

	function shoh(id) {

		if (document.getElementById) { // DOM3 = IE5, NS6
			if (document.getElementById(id).style.display == "none"){
				document.getElementById(id).style.display = 'block';
			} else {
				//filter(("img"+id),'imgout');
				document.getElementById(id).style.display = 'none';
			}
		} else {
			if (document.layers) {
				if (document.id.display == "none"){
					document.id.display = 'block';
					//filter(("img"+id),'imgin');
				} else {
					//filter(("img"+id),'imgout');
					document.id.display = 'none';
				}
			} else {
				if (document.all.id.style.visibility == "none"){
					document.all.id.style.display = 'block';
				} else {
					//filter(("img"+id),'imgout');
					document.all.id.style.display = 'none';
				}
			}
		}
	}

//********************************************************************************************
// Kedvencekhez
//********************************************************************************************
function createBookmarkLink(url, title)
{
	// IE Favorite
	if (window.external) {
		window.external.AddFavorite(window.location.href, title);
		return false;
	}
	// Mozilla Firefox Bookmark
	else if (window.sidebar) {
		return false;
	}
	// Opera Hotlist
	else if(window.opera && window.print) {
		return true;
	}
}



//********************************************************************************************
// DH OPTIONS
//********************************************************************************************

function fillSelect(_select, _options) {
  _select.options.length = 0;
  _select.options[0] = new Option("", "");
  var j = 1;
  for (var i in _options) {
    if (_options.hasOwnProperty(i)) {
      var option = new Option(_options[i], i);
      _select.options[j++] = option;
    }
  }
}

function dhSub(){
	document.ps.submit();
}

function ohSub(){
	document.quicksearch.submit();
}

function stSub(){
	document.st.submit();
}

function pirSub(){
	document.pir.submit();
}

function rpc(str){
    var date = new Date();
    str = str+'#'+date.getTime();

    head = document.getElementsByTagName('head').item(0);
    script=document.createElement('script');
    script.src= str;
    script.type='text/javascript';
    script.defer=true;
    void(head.appendChild(script));
}

function loadList(sel,selected) {

    select_obj = document.getElementById( sel );
    l          = select_obj.options.length - 1;

    for ( i=l; i>=0; i--) {
        select_obj.options[i] = null;
    }
    x = 0;
    for(i in data) {
        select_obj.options[x] = new Option(data[i], i);
        ++x;
    }
    select_obj.value = selected;
    select_obj.disabled = false;
}

function $(name) {
	return document.getElementById(name).value;
}

function getCities(field_shire, prefix) {
	var shire = $(field_shire);
	rpc( 'http://www.openhouse.hu/?event=jsRPC&type=getCities&shire=' + shire + '&prefix=' + prefix);
}



//********************************************************************************************
// Kezdolapnak
//********************************************************************************************
function setStartPage(obj, url)
{
	// IE Favorite
	if (window.external) {
		obj.style.behavior = "url(#default#homepage)";
		obj.setHomePage(url);
	}
	// Mozilla Firefox Bookmark
	else if (window.sidebar) {
		return false;
	}
	// Opera Hotlist
	else if(window.opera && window.print) {
		return false;
	}
}



//addEvent(window, 'load', atReplacer);
