Rollimage = new Array();

// about us  
Rollimage[0] = new Image(100,20); 
Rollimage[0].src = 'images/about_on.gif';

Rollimage[1] = new Image(100,20); 
Rollimage[1].src = 'images/about_off.gif';

// corporate   
Rollimage[2] = new Image(150,38); 
Rollimage[2].src = 'images/corporate_on.gif';

Rollimage[3] = new Image(150,38); 
Rollimage[3].src = 'images/corporate_off.gif';

// management
Rollimage[4] = new Image(128,20); 
Rollimage[4].src = 'images/management_on.gif';

Rollimage[5] = new Image(128,20); 
Rollimage[5].src = 'images/management_off.gif';

// clients
Rollimage[6] = new Image(86,20); 
Rollimage[6].src = 'images/clients_on.gif';

Rollimage[7] = new Image(86,20); 
Rollimage[7].src = 'images/clients_off.gif';

// strategic
Rollimage[8] = new Image(108,38); 
Rollimage[8].src = 'images/strategic_on.gif';

Rollimage[9] = new Image(108,38); 
Rollimage[9].src = 'images/strategic_off.gif';

// contact
Rollimage[10] = new Image(92,20); 
Rollimage[10].src = 'images/contact_on.gif';

Rollimage[11] = new Image(92,20); 
Rollimage[11].src = 'images/contact_off.gif';

// concepts
Rollimage[12] = new Image(125,100); 
Rollimage[12].src = 'images/concepts_on.jpg';

Rollimage[13] = new Image(125,100); 
Rollimage[13].src = 'images/concepts_off.jpg';

// programs
Rollimage[14] = new Image(125,100); 
Rollimage[14].src = 'images/programs_on.jpg';

Rollimage[15] = new Image(125,100); 
Rollimage[15].src = 'images/programs_off.jpg';

// budgets
Rollimage[16] = new Image(125,100); 
Rollimage[16].src = 'images/budgets_on.jpg';

Rollimage[17] = new Image(125,100); 
Rollimage[17].src = 'images/budgets_off.jpg';

// producing
Rollimage[18] = new Image(125,100); 
Rollimage[18].src = 'images/producing_on.jpg';

Rollimage[19] = new Image(125,100); 
Rollimage[19].src = 'images/producing_off.jpg';

// post
Rollimage[20] = new Image(125,100); 
Rollimage[20].src = 'images/post_on.jpg';

Rollimage[21] = new Image(125,100); 
Rollimage[21].src = 'images/post_off.jpg';

Rollimage[22] = new Image(100,20); 
Rollimage[22].src = 'images/home_on.gif';

Rollimage[23] = new Image(100,20); 
Rollimage[23].src = 'images/home_off.gif';


function SwapOut(s) {

	if (s == 'about') {	
 		document.about.src = Rollimage[0].src;
  		return true;
	}

	if (s == 'corporate') {	
 		document.corporate.src = Rollimage[2].src;
  		return true;
	}

	if (s == 'management') {	
 		document.management.src = Rollimage[4].src;
  		return true;
	}
	
	if (s == 'clients') {	
 		document.clients.src = Rollimage[6].src;
  		return true;
	}

	if (s == 'strategic') {	
 		document.strategic.src = Rollimage[8].src;
  		return true;
	}

	if (s == 'contact') {	
 		document.contact.src = Rollimage[10].src;
  		return true;
	}

	if (s == 'concepts') {	
 		document.concepts.src = Rollimage[12].src;
  		return true;
	}

	if (s == 'programs') {	
 		document.programs.src = Rollimage[14].src;
  		return true;
	}

	if (s == 'budgets') {	
 		document.budgets.src = Rollimage[16].src;
  		return true;
	}

	if (s == 'producing') {	
 		document.producing.src = Rollimage[18].src;
  		return true;
	}

	if (s == 'post') {	
 		document.post.src = Rollimage[20].src;
  		return true;
	}

	if (s == 'home') {	
 		document.home.src = Rollimage[22].src;
  		return true;
	}

} 



function SwapBack(s){
	
	if (s == 'about') {
  		document.about.src = Rollimage[1].src;
  		return true;
	}

	if (s == 'corporate') {
  		document.corporate.src = Rollimage[3].src;
  		return true;
	}
	
	if (s == 'management') {
  		document.management.src = Rollimage[5].src;
  		return true;
	}

	if (s == 'clients') {
  		document.clients.src = Rollimage[7].src;
  		return true;
	}


	if (s == 'strategic') {
  		document.strategic.src = Rollimage[9].src;
  		return true;
	}
	
	if (s == 'contact') {
  		document.contact.src = Rollimage[11].src;
  		return true;
	}

	if (s == 'concepts') {	
 		document.concepts.src = Rollimage[13].src;
  		return true;
	}

	if (s == 'programs') {	
 		document.programs.src = Rollimage[15].src;
  		return true;
	}

	if (s == 'budgets') {	
 		document.budgets.src = Rollimage[17].src;
  		return true;
	}

	if (s == 'producing') {	
 		document.producing.src = Rollimage[19].src;
  		return true;
	}

	if (s == 'post') {	
 		document.post.src = Rollimage[21].src;
  		return true;
	}

	if (s == 'home') {	
 		document.home.src = Rollimage[23].src;
  		return true;
	}
	
}




function blendimage(divid, imageid, imagefile, millisec) { 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 
     
    //set the current image as background 
    document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")"; 
     
    //make image transparent 
    changeOpac(0, imageid); 
     
    //make new image 
    document.getElementById(imageid).src = imagefile; 

    //fade in image 
    for(i = 0; i <= 100; i++) { 
        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed)); 
        timer++; 
    } 
} 



function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 


// change milliseconds to slow or hasten transition

function TransImages() {
	
		blendimage('blenddiv_left','blendimage_left', 'images/leftbella_hot.jpg',12000);
		blendimage('blenddiv_right','blendimage_right', 'images/rightbella_hot.jpg',12000);
		blendimage('blenddiv_left','blendimage_left', 'images/leftbella.jpg',12000);
		blendimage('blenddiv_right','blendimage_right', 'images/rightbella.jpg',12000);				
				
}





