var email;
var theTop = 200;
var old = theTop;

window.onload = function(){
	email = $('email');
	moveemail();
}

window.onscroll = function () {
	moveemail();
}

function moveemail()
{
	if (window.innerHeight)
	{
		  pos = window.pageYOffset
	}
	else if (document.documentElement && document.documentElement.scrollTop)
	{
		pos = document.documentElement.scrollTop
	}
	else if (document.body)
	{
		  pos = document.body.scrollTop
	}
	if (pos < theTop) pos = theTop;
	else pos += 30;
	if (pos == old)
	{
		//email.style.top = pos +"px";
	}
	old = pos;
	new Effect.Move ($('email'),{ x: 820, y: pos, mode: 'absolute'});
}
function moveEmailIcon(element,topic)
{
	return;
	//$('email').style.left = "700px";
	//$('email').style.top = Position.positionedOffset(element)[1] + "px";
	var the_email = cs_email;
	$('email_link').href = "mailto:" + the_email + "?subject=I have question about: "+stripAmpersand(topic);
	new Effect.Move ($('email'),{ x: 820, y: Position.positionedOffset(element)[1], mode: 'absolute'});
}

function stripAmpersand(string)
{
	string = string.replace("&amp;","%26");
	return string;
}
