function changeImageByName(imgName,imgSrc) {
    document[imgName].src=imgSrc;
}

function changeImage(imgObj,imgSrc) {
    imgObj.src=imgSrc;
}

function preloadImage(imgURL){
    imgObject = new Image();
    imgObject.src = imgURL;
}

function preloadImages(imagesToLoad){
      for(i=0;i<imagesToLoad.length;i++){
        preloadImage(imagesToLoad[i]);
        //document.write('<img src="'+imagesToLoad[i]+'"><br>');
    }
}
function preloadAllImages(){

    imagesToLoad = new Array(                            
                           // '../img/main/home/hu/fel_es_egynapos_kicsi_hover.png',
                           // '../img/main/home/hu/pozsonyi_varosnezes_kicsi_hover.png',
                           // '../img/main/home/hu/egyeb_szolgaltatasok_kicsi_hover.png',
//                            '../img/top/menu/hu/menuitem01_hover.png',
//                            '../img/top/menu/hu/menuitem02_hover.png',
//                            '../img/top/menu/hu/menuitem03_hover.png',
//                            '../img/top/menu/hu/menuitem04_hover.png',
//                            '../img/top/menu/hu/menuitem05_hover.png',
//                            '../img/top/menu/hu/menuitem06_hover.png',
//                            '../img/top/menu/hu/menuitem07_hover.png',
                            '../img/submenu/bullet_hover.gif'
                       );

    preloadImages(imagesToLoad);
}

function preloadHomePageImages(){
    /*
    imagesToLoad = new Array(
                            '../img/main/home/hu/fel_es_egynapos_hover.png',
                            '../img/main/home/hu/pozsonyi_varosnezes_hover.png',
                            '../img/main/home/hu/egyeb_szolgaltatasok_hover.png'
                            );   
   preloadImages(imagesToLoad);
   */
}

function changeColor(objId,color){

    document.getElementById(objId).style.color = color;

}
function goBackToReferrer(){
    if (document.referrer != '') {
        window.location.href=document.referrer;
    }
}

function setHoverOpacity(obj)
{
    obj.style.opacity=1;
    obj.filters.alpha.opacity=100
}

function setNormalOpacity(obj)
{
    obj.style.opacity=0.6;
    obj.filters.alpha.opacity=60;
}