document.observe("dom:loaded", function() {
	var h = $("base").offsetHeight-3;
	$("left-col-bgr").style.height= h+"px";
	$("right-col-bgr").style.height= h+"px";

      $("gal-right-img").observe("mouseover", function () {
	    if(active == 1) {
		$("gal-left-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-left-img"), {y: 40, x: 15, mode: 'absolute' });
		$("gal-center-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-center-img"), {y: 40, x:200, mode: 'absolute' });
	    }
	    if(active == 2) {
		$("gal-center-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-center-img"), {y: 40, x:200, mode: 'absolute' });
	    }
	    if(active == 1 || active == 2) {
		var src = $("gal-right-img-big").src;
		$("gal-right-img").src = src;
		$("gal-right-img").style.width = "170px";
		$("gal-right-img").style.height = "112px";
		$("gal-right-img").morph("width: 290px; height: 192px;");
		new Effect.Move($("gal-right-img"), {x: 385, y: 20, mode: 'absolute'});
		active = 3;
	    }
      });

      $("gal-center-img").observe("mouseover", function () {
	    if(active == 1) {
		var src = $("gal-center-img-big").src;
		$("gal-center-img").src = src;
		$("gal-center-img").style.width = "170px";
		$("gal-center-img").style.height = "112px";
		$("gal-center-img").morph("width: 290px; height: 192px;");
		new Effect.Move($("gal-center-img"), {y: 20, x: 200, mode: 'absolute'});
		$("gal-left-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-left-img"), { y: 40, x: 15, mode: 'absolute' });
		active = 2;
	    }
	    if(active == 3) {
		var src = $("gal-center-img-big").src;
		$("gal-center-img").src = src;
		$("gal-center-img").style.width = "170px";
		$("gal-center-img").style.height = "112px";
		$("gal-center-img").morph("width: 290px; height: 192px;");
		new Effect.Move($("gal-center-img"), {y: 20, x:200, mode: 'absolute'});
		$("gal-right-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-right-img"), {x: 505, y: 40, mode: 'absolute'});
		active = 2;
	    }

      });

      $("gal-left-img").observe("mouseover", function () {
	    if(active == 2) {
		var src = $("gal-left-img-big").src;
		$("gal-left-img").src = src;
		$("gal-left-img").style.width = "170px";
		$("gal-left-img").style.height = "112px";
		$("gal-left-img").morph("width: 290px; height: 192px;");
		new Effect.Move($("gal-left-img"), {y: 20, x: 15, mode: 'absolute'});
		$("gal-center-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-center-img"), {x: 320, y: 40, mode: 'absolute' });
		active = 1;
	    }
	    if(active == 3) {
		var src = $("gal-left-img-big").src;
		$("gal-left-img").src = src;
		$("gal-left-img").style.width = "170px";
		$("gal-left-img").style.height = "112px";
		$("gal-right-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-right-img"), {y: 40, x:505, mode: 'absolute' });
		$("gal-center-img").morph("width: 170px; height: 112px;");
		new Effect.Move($("gal-center-img"), {x:320, y: 40, mode: 'absolute' });
		$("gal-left-img").morph("width: 290px; height: 192px;");
		new Effect.Move($("gal-left-img"), {y: 20, x: 15, mode: 'absolute' });
		active = 1;
	    }
      });
});

var active = 2;