var thisdiv = "";
var x = 756; 
var drop = "";
var image = "";
var thisImg = 0;
var numberOfImgs = 2; //at number of ingaes with php
var Q = "";

function changeBG(thisdiv) {
    document.getElementById(thisdiv).style.backgroundImage = 'url("http://cameronclarkhomes.com/files/2010/05/'+thisdiv+'1.png")';
}

function resetBG(thisdiv) {
    document.getElementById(thisdiv).style.backgroundImage = 'url("http://cameronclarkhomes.com/files/2010/05/'+thisdiv+'.png")';
} 

function start() {
    if (x > 0) {
        drop = window.setTimeout("move()",25);
    }
    else {
        window.clearInterval(drop);
        document.getElementById("content").style.marginTop = "0px";
        drop = "";
    }
}

function move() {
    x = x - 7;
    document.getElementById("content").style.marginTop = "-"+x+"px";
    if (x > 0) {
        start();
    }
}

function lightUpScone(thisScone) {
    document.getElementById("listingL"+thisScone).style.backgroundImage = 'url("http://cameronclarkhomes.com/files/2010/05/scone1.png")';
    document.getElementById("listingR"+thisScone).style.backgroundImage = 'url("http://cameronclarkhomes.com/files/2010/05/scone1.png")';
}

function resetScone(thisScone) {
    document.getElementById("listingL"+thisScone).style.backgroundImage = 'url("http://cameronclarkhomes.com/files/2010/05/scone.png")';
    document.getElementById("listingR"+thisScone).style.backgroundImage = 'url("http://cameronclarkhomes.com/files/2010/05/scone.png")';    
}

function fixxedtext() {
    if (navigator.appName.indexOf("Microsoft")!=-1) {
        if (document.body.offsetWidth > 960) {
            var width = document.body.offsetWidth - 960;
            width = width / 2;
            document.getElementById("side").style.marginRight = width + "px";
        }
        if (document.body.offsetWidth < 960) {
            var width = 960 - document.body.offsetWidth;
            document.getElementById("side").style.marginRight = "-" + width + "px";
        }
    }
    else {
        if (window.innerWidth > 960) {
            var width = window.innerWidth - 960;
            width = width / 2;
            document.getElementById("side").style.marginRight = width + "px";
        }
        if (window.innerWidth < 960) {
            var width = 960 - window.innerWidth;
            document.getElementById("side").style.marginRight = "-" + width + "px";
        }    
    }
    window.setTimeout("fixxedtext()" , 2500)
}


 
     
