// Popup functions
function imagePopUp( Image, Width, Height )
{
    if( !Image || !Width || !Height ) 
    { 
      return true; 
    }
      
    var href = Image.getAttribute("href");
      
    if( !href ) 
    { 
      return true; 
    }

    Width += 10; 
    Height += 10;

    imageWindow = null;
    imageWindow = popUp( href, Width, Height );
      
    if( imageWindow ) 
    { 
      imageWindow.focus(); 
    }
      
    return false;
}

function popUp( Url, Width, Height )
{
    var windowProperties = 'toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0, resizable=1 , width=' + Width + ', height=' + Height + ', left=50, top=50';

    return window.open( Url, '', windowProperties );
}

function popUpScale( Url, Scale )
{
    // Default sizes.
    var width = 750;
    var height = 650;
    
    if ( window.screen ) 
    {
        width = window.screen.availWidth * Scale / 100;
        height = window.screen.availHeight * Scale / 100;
    }

    popUp( Url, width, height );
}

// Image rollover change
function changeImage( Image )
{
    document.images.main_image.src = Image;
}

// Preload images
function preloadImages() {
	if (document.images) {
		for (var i = 0; i < preloadImages.arguments.length; i++) {
			(new Image()).src = preloadImages.arguments[i];
		}
	}
}

function swapimage(this_image){
	document.images[this_image].src = '/images/uk/nav_lang/' + this_image + '_2.gif';
}
		
function restoreimage(this_image){
	document.images[this_image].src = '/images/uk/nav_lang/' + this_image + '_1.gif';
}


