<!--
// called by about-us.php

function move(i,plus)
{
	if ( plus==1 ){
   		i++;
        if (i>0) plus=0;
	}
	else{
    	i--;
        if (i==-250) plus=1;
	}
    	 
	document.cookie = 'picture-motion-i='+i;
	document.cookie = 'picture-motion-plus = '+plus;

	document.getElementById('interior_photo').style.left=i+"px";
	var pictureTimeout = setTimeout("move("+i+","+plus+")",50);
	
	var stop =	getCookie("picture-motion-stop");

	if ( stop == 'true' ){
		clearTimeout(pictureTimeout);
	}
}

function getValues()
{
	var values = new Array();	
	values[0]  = getCookie('picture-motion-i');
	values[1]  = getCookie('picture-motion-plus');
	
	if ( ( values[0] == null ) || ( values[1] == null ) ){
		values[0] = 0;
		values[1] = 1;
	}
	return values;
}

function load ()
{
	var values = getValues();
	move (values[0], values[1]);
}

function start ()
{
	document.cookie = 'picture-motion-stop=false';
	load();
}

function stop ()
{
	document.cookie = 'picture-motion-stop=true';
}


function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}




//-->