function overMove(direction) {
	document.getElementById('arrow_'+direction).src = '/images/arrow_'+direction+'_on.gif';
}

function outMove(direction) {
	document.getElementById('arrow_'+direction).src = '/images/arrow_'+direction+'.gif';
}

function overInfo() {
	if (document.getElementById('infobutton').src.indexOf('info.gif') != -1) {
		document.getElementById('infobutton').src = '/images/info_on.gif';
	}
}

function outInfo() {
	if (document.getElementById('infobutton').src.indexOf('info_on.gif') != -1) {
		document.getElementById('infobutton').src = '/images/info.gif';
	}
}

var clickStatus = 'off';
var pos = 0;
function clickInfo() {
	if (clickStatus == 'off' && pos == 0) {
		clickStatus = 'on'
		pos = 352;
		moveInfo('in');
		document.getElementById('infobutton').src = '/images/info_off.gif';
	} else if (clickStatus == 'on' && pos == 0) {
		clickStatus = 'off'
		pos = 352;
		moveInfo('out');
		document.getElementById('infobutton').src = '/images/info.gif';
	}
}

function moveInfo(direction) {
	if (direction == 'in' && pos > 0) {
		if (pos > 80) {
			pos = pos / 1.1;
		} else if (pos > 40) {
			pos = pos / 1.5;
		} else {
			pos = pos / 1.8;
		}
		if (pos < 2) {
			pos = 0;
		}
		pos = Math.round(pos * 100)/100;
		show = pos - 352;
		setTimeout("moveInfo('in')", 50);
	} else if (direction == 'out' && pos > 0) {
		if (pos > 80) {
			pos = pos / 1.1;
		} else if (pos > 40) {
			pos = pos / 1.5;
		} else {
			pos = pos / 1.8;
		}
		if (pos < 2) {
			pos = 0;
		}
		pos = Math.round(pos * 100)/100;
		show = '-' + pos;
		setTimeout("moveInfo('out')", 50);
	}
	
	if (pos < 0) {
		pos = 0;
		show = 0;
	} else if (pos > 352) {
		pos = 352;
		show = 352;
	}
	document.getElementById('scrollportfolio').style.marginTop = show + 'px';
}
