function preload( prefix, imgs, ext ) {
  for( i=0; i<imgs.length; i++ ) {
    img = prefix + imgs[i];
    eval( img + '_on  = new Image();' );
    eval( img + '_on.src = \'../../artistmicrosite/GRIHE/imgs/'  + prefix + imgs[i] + '_on.' + ext + '\';' );
    eval( img + '_off  = new Image();' );
    eval( img + '_off.src = \'../../artistmicrosite/GRIHE/imgs/' + prefix + imgs[i] + '_off.' + ext + '\';' );

  }
}   

function mover( name ) {
    eval( "document.images." + name + ".src = " + name + "_on.src" );
}  

function mout( name )
{
    eval( "document.images." + name + ".src = " + name + "_off.src" );
}

function init_intro()
{                                                
	
	$("intro_release").style.display = "none";
	$("helenegrimaud_photo").style.left = "-336px";
	$("logo").style.left = "-250px";	
	$("meta").style.top = "600px";	
	$("navigation").style.top = "-500px";	
	$("photo_border").style.display = "none";

	Event.observe( window, 'load', function() 
	{
		new Effect.BlindDown('photo_border', 
		{ 
	    	afterFinish: function() {
//	       	 new Effect.Appear('helenegrimaud_photo');
	       	 new Effect.Move('helenegrimaud_photo', {x: 242, y: 217, mode: 'absolute', duration: 3,
	            afterFinish: function() {
								new Effect.Move( "logo", { x: 143, y: 222, mode: "absolute", queue: "end"} );
								new Effect.Move( "meta", { x: 42, y: 562, mode: "absolute" } ); 
								new Effect.Move( "navigation", { x: 296, y: 83, mode: "absolute" } );
								new Effect.Appear( "intro_release", { delay: 3 });
	            }
	         });
	    }
	}
	);
	} );    
}


function GetInnerSize () {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	return [x,y];
}

function ResizeToInner (w, h, x, y) {
	// make sure we have a final x/y value
	// pick one or the other windows value, not both
	if (x==undefined) x = window.screenLeft || window.screenX;
	if (y==undefined) y = window.screenTop || window.screenY;
	// for now, move the window to the top left
	// then resize to the maximum viewable dimension possible
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth,screen.availHeight);
	// now that we have set the browser to it's biggest possible size
	// get the inner dimensions.  the offset is the difference.
	var inner = GetInnerSize();
	var ox = screen.availWidth-inner[0];
	var oy = screen.availHeight-inner[1];
	// now that we have an offset value, size the browser
	// and position it
	window.resizeTo(w+ox, h+oy);
	window.moveTo(x,y);
}

