// JavaScript Document
var _e, tgtW, tgtH, deltaW, deltaH;
function expand(e)
{
	//alert(element);
	//var i;
	//alert(e);
	
	_e = e;
	tgtW = 250;
	tgtH = 180;
	deltaW = 40;
	deltaH = 40;
	setTimeout("timerCallback()", 50);
	//for(i=1; i<50; i++)
	//{
		//alert(element.height);
		//element.height=90+i;
	//}
}

function contract(e)
{
	//alert("contracting");	
	_e = e;
	tgtW = 120;
	tgtH = 90;
	deltaW = -40;
	deltaH = -40;
	setTimeout("timerCallback()", 50);
}

function timerCallback()
{

	var curW = _e.width + deltaW;
	var curH = _e.height + deltaH;
	
	
//alert ("timercallback"+curW+tgtW+deltaW+curH+tgtH+deltaH);

	// is the width finished	
	if (deltaW > 0)
	{
		// expanding
		if (curW > tgtW) curW = tgtW;
	}
	else
	{
		if (curW < tgtW) curW = tgtW;
	}

	// is the height finished	
	if (deltaH > 0)
	{
		// expanding
		if (curH > tgtH) curH = tgtH;
	}
	else
	{
	  // contracting
		if (curH < tgtH) curH = tgtH;
	}
	
	_e.width = curW;
	_e.height = curH;
	
	if (curW != tgtW || curH != tgtH) setTimeout("timerCallback()", 100)
	
}



function resizeImage(e) 
	{ 
		if (document.layers) 
		{ 
			//Netscape 
			var xMousePos = e.pageX; 
			var xMousePosMax = window.innerWidth+window.pageXOffset; 
		} 
		else if (document.all) 
		{ 
			// IE 
			var xMousePos = window.event.x+document.body.scrollLeft; 
		}
		else if (document.getElementById) 
		{
			//Netscape 
			var xMousePos = e.pageX; 
			var xMousePosMax = window.innerWidth+window.pageXOffset; 
		} 
		
		var i = (-1 * (((xMousePos/340) - (250/340)) * ((xMousePos/340) - (250/340)))) + 1; 
		if (i < .4) i = .4; 
		if (i > 2) i = 2; 
		picture1.width=(170 * i); 
		picture1.height=(125 * i); 
		
		i = (-1 * (((xMousePos/340) - (420/340)) * ((xMousePos/340) - (420/340)))) + 1; 
		if (i < .4) i = .4; 
		if (i > 2) i = 2; 
		picture2.width=(170 * i); 
		picture2.height=(125 * i); 
		
		i = (-1 * (((xMousePos/340) - (525/340)) * ((xMousePos/340) - (525/340)))) + 1; 
		if (i < .4) i = .4; 
		if (i > 2) i = 2; 
		picture3.width=(170 * i); 
		picture3.height=(125 * i); 
		
		i = (-1 * (((xMousePos/340) - (600/340)) * ((xMousePos/340) - (600/340)))) + 1; 
		if (i < .4) i = .4; 
		if (i > 2) i = 2; 
		picture4.width=(170 * i); 
		picture4.height=(125 * i); 
		
		i = (-1 * (((xMousePos/340) - (680/340)) * ((xMousePos/340) - (680/340)))) + 1; 
		if (i < .4) i = .4; 
		if (i > 2) i = 2; 
		picture5.width=(170 * i); 
		picture5.height=(125 * i); 
		
		i = (-1 * (((xMousePos/340) - (760/340)) * ((xMousePos/340) - (760/340)))) + 1; 
		if (i < .4) i = .4; 
		if (i > 2) i = 2; 
		picture6.width=(170 * i); 
		picture6.height=(125 * i); 
		
		i = (-1 * (((xMousePos/340) - (820/340)) * ((xMousePos/340) - (820/340)))) + 1; 
		if (i < .4) i = .4; 
		if (i > 2) i = 2; 
		picture7.width=(170 * i); 
		picture7.height=(125 * i); 
		
	} 
	
	/*function output(message) 
	{ 
	alert("output");
		//obj = eval("text"); obj.
		//$("Title-div").innerHTML = "<font color="#fff" size=\"6\">"+message+"</font>"; 
	} */
	
	function output(message) 
	{ 
		obj = eval("text"); obj.innerHTML = "<font size=\"4\">"+message+"</font>"; 
	} 
	
	function handleMouse() 
	{ 
		if (document.layers) 
		{ 
			// Netscape 
			document.captureEvents(Event.MOUSEMOVE); 
			document.onmousemove = resizeImage;
		}
		else if (document.all) 
		{ 
			// Internet Explorer 
			document.onmousemove = resizeImage; 
		} 
		else if (document.getElementById) 
		{ 
			// Netcsape 6 
			document.onmousemove = resizeImage; 
		} 
	} 
	
	function doNothing(e) 
	{ 
		var i = 0.4; 
		picture1.width=(170 * i); 
		picture1.height=(125 * i); 
		picture2.width=(170 * i); 
		picture2.height=(125 * i); 
		picture3.width=(170 * i); 
		picture3.height=(125 * i); 
		picture4.width=(170 * i); 
		picture4.height=(125 * i); 
		picture5.width=(170 * i); 
		picture5.height=(125 * i); 
		picture6.width=(170 * i); 
		picture6.height=(125 * i); 
		picture7.width=(170 * i); 
		picture7.height=(125 * i); 
	} 
	
	function ignoreMouse() 
	{ 
		if (document.layers) 
		{ 
			// Netscape 
			document.captureEvents(Event.MOUSEMOVE); 
			document.onmousemove = doNothing; 
		} 
		else if (document.all) 
		{ 
			// Internet Explorer 
			document.onmousemove = doNothing; 
		} 
		else if (document.getElementById) 
		{
			// Netcsape 6 
			document.onmousemove = doNothing; 
		} 
	}

/*
	// slide variables for #2 these are extablished in #2 in the event scripts	
	var slide_aboutus;		done_aboutus=false; 	
	var slide_creations;	done_creations=false; 	
	var slide_research;		done_research=false; 	
	var slide_workshops;	done_workshops=false; */
	
	
