// JavaScript Document
// footer position
function footer() {
		m=document.getElementById('main').offsetHeight;
		b=document.body.clientHeight;
		x=b-m-44;
		if (x>0) {document.getElementById('foot').style.marginTop=x+'px';}
}
function next() {
	w=0; v=0;
	for (i=1;i<100; i++){
		if(document.getElementById('im'+i))	
		{v=document.getElementById('im'+i).width; 	 w=w+v;}	/* number of images */
		else break;}
	w=w*(-1)+300;
	m=Number(document.getElementById('photo').className); 		/* marging before */
	y=m-80;
	if(y>w)
	{
		document.getElementById('photo').style.marginLeft=y+'px';
		document.getElementById('photo').className=y; 			/* margin after */
	}
}
function prev() {
	m=Number(document.getElementById('photo').className); 		/* marging before */
	y=m+80;
	if(y<80)
	{
		document.getElementById('photo').style.marginLeft=y+'px';
		document.getElementById('photo').className=y; 			/* margin after */
	}
}
