function si(x) {
		bild=document.getElementById('bilden');
		bild.src='img/high/' + x;
	}

var scrolltimer

function stopSc() {
	if (scrolltimer) clearInterval(scrolltimer);	
}

function getPos(x) {
	ps=x.style.left;

	if (ps=="" || ps=='undefined')  {
		ps=0
	}
	else {
		ps=parseInt(ps)
	}
	
	return ps
}

function startScroll(direction, interv) {
	stopSc();
	
	if (direction=='left') {
		if (interv==30) {
			scrolltimer=setInterval("doScrollLeft(-4)", interv);
		}
		else {
			scrolltimer=setInterval("doScrollLeft(-7)", interv);
		}
	}
	else {
		if (interv==30) {
			scrolltimer=setInterval("doScrollRight(+4)", interv);
		}
		else {
			scrolltimer=setInterval("doScrollRight(+7)", interv);
		}
	}
}

function doScrollLeft(offs) {
	l=document.getElementById('Scroller');
	if ((-1*getPos(l))>l.offsetWidth-615) {
		stopSc();
		return;
	}
	l.style.left=getPos(l)+offs + 'px';
}

function doScrollRight(offs) {
	l=document.getElementById('Scroller');
	if (getPos(l)>-1) {
		stopSc();
		return;
	}
	l.style.left=getPos(l)+offs + 'px';
}

var m='info' + '@' + 'creafoto.' + 'se'
var m2='peter' + '@' + 'creafoto.' + 'se'
var m3='gunilla' + '@' + 'creafoto.' + 'se'

function writeM() {
	document.write('<a href="mai' + 'lto:' + m + '">' + m + '</a><br /><a href="mai' + 'lto:' + m2 + '">' + m2 + '</a><br /><a href="mailto:' + m3 + '">' + m3 + '</a>')
}
	
function writeFooter() {
	//nobody wants spam...
	document.write('Creafoto • Luckerstad • 592 91 • Vadstena • 0143-290 82 • <a href="mai' + 'lto:' + m + '">' + m + '</a>')
}


function OP(x) {
	l=document.getElementById('mainframe').src='/' + x + '/'
}
