function changeMap( item_id ) {

    var mapsImage = document.getElementById('mapsImage');
    
    mapsImage.src = mapsList[ item_id ].src;
    mapsImage.width = mapsList[ item_id ].width;
    mapsImage.height = mapsList[ item_id ].height;
}

function changeImage( small_image_iteration ) {

    var mainImage = document.getElementById( 'main_image' );
    var smallImage = document.getElementById( 'small_image_' + small_image_iteration );

	tmp_number = small_image_position[small_image_iteration];
	small_image_position[small_image_iteration] = curr_big_image_iteration;
	curr_big_image_iteration = tmp_number;

	smallImage.src = galleryImages[small_image_position[small_image_iteration]].small_src;
    smallImage.width = galleryImages[small_image_position[small_image_iteration]].small_width;
    smallImage.height = galleryImages[small_image_position[small_image_iteration]].small_height;
    smallImage.alt = galleryImages[small_image_position[small_image_iteration]].alt;
	
    mainImage.src = galleryImages[curr_big_image_iteration].src;
    mainImage.width = galleryImages[curr_big_image_iteration].width;
    mainImage.height = galleryImages[curr_big_image_iteration].height;
    mainImage.alt = galleryImages[curr_big_image_iteration].alt;
	
}

function setcookie( name, value, days ) {
	
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    } else {
        var expires = "";
    }
	
    document.cookie = name+"="+value+expires+"; path=/";
}

function skipIntro() {
	
    var oIntroBlock = document.getElementById('introBlock');
    oIntroBlock.style.display = 'none';

    setcookie('noIntro', '1');
	top.location.href = root_url + 'index.php?skip_intro=1';
}

function showIntro() {
	
	setcookie('noIntro', '');
	top.location.href = root_url + 'index.php?show_intro=1';
}