// -- Main JavaScript Module for www.BrainDistrict.com
// -- Copyright 2009-2010 BrainDistrict®, All Rights Reserved.
// -- Author: Athanasios Alexandrides, topicdesk.com

// -- Area Rollovers
function changeVisOn (roll_name) {
       document.getElementById(roll_name).style.visibility = "visible";
    }
function changeVisOff (roll_name) {
       document.getElementById(roll_name).style.visibility = "hidden";
    }

// -- Home Rollover
function homeOn () {
		document.getElementById('logo_bd_1').style.visibility = 'hidden';
		document.getElementById('logo_bd_1_off').style.visibility = 'visible';
}
function homeOff () {
		document.getElementById('logo_bd_1_off').style.visibility = 'hidden';
		document.getElementById('logo_bd_1').style.visibility = 'visible';
}
// -- Logo Wing Animation
/*
function logoWingsOn () {
	setTimeout("document.getElementById('logo_bd_5').style.opacity = '0.25'", 500);
	setTimeout("document.getElementById('roll_wings_5_1').style.visibility = 'visible'", 1000);
	setTimeout("document.getElementById('roll_wings_5_1').style.visibility = 'hidden'", 3000);
    setTimeout("document.getElementById('roll_wings_5_2').style.visibility = 'visible'", 3000);
    }   
function logoWingsOff () {
	setTimeout("document.getElementById('roll_wings_5_2').style.visibility = 'hidden'", 2000);
	setTimeout("document.getElementById('logo_bd_5').style.opacity = '1.0'", 2500);
    }
*/
    
// -- Screenshot Animation
function screenshotOn () {
	document.getElementById('screenshot_home_products_4_1').style.opacity = '1.0';
	}
function screenshotOff () {
	document.getElementById('screenshot_home_products_4_1').style.opacity = '0.9';
	}
	
function screenshotDLWinOn () {
	document.getElementById('screenshot_dl_win').style.opacity = '1.0';
	}
function screenshotDLWinOff () {
	document.getElementById('screenshot_dl_win').style.opacity = '0.9';
	}
	
function screenshotDLMacOn () {
	document.getElementById('screenshot_dl_mac').style.opacity = '1.0';
	}
function screenshotDLMacOff () {
	document.getElementById('screenshot_dl_mac').style.opacity = '0.9';
	}

// -- Star Animation
function animateStarOn () {
	setTimeout("document.getElementById('download_star').style.backgroundPosition ='-229px'", 100);
	setTimeout("document.getElementById('download_star').style.backgroundPosition ='-458px'", 150);
	setTimeout("document.getElementById('download_star').style.backgroundPosition ='-687px'", 200);
    }   
function animateStarOff () {
	setTimeout("document.getElementById('download_star').style.backgroundPosition ='-458px'", 100);
	setTimeout("document.getElementById('download_star').style.backgroundPosition ='-229px'", 150);
	setTimeout("document.getElementById('download_star').style.backgroundPosition ='-0px'", 200);
    }
    

// -- Fader  
var c=0; 
var obj; 
var speed=50;

/*
window.onload=function() { 
obj=document.getElementById('logo_bd_1'); 
obj.onmouseover=function() { 
fadeInOut('in'); 
} 
obj.onmouseout=function() { 
fadeInOut('out'); 
} 
}
*/

/*
function fadeInOut(dir){ 
if(obj.filters) { 
obj.style.filter='alpha(opacity='+c+')'; 
} 
else { 
obj.style.opacity=c/100; 
} 
if(dir=='in') { 
dir1='in' 
c++; 
} 
else { 
dir1='out'; 
c--; 
} 
if(c>100){ 
c=100; 
return; 
} 
if(c<0){ 
c=0; 
return; 
} 
setTimeout('fadeInOut(dir1)',speed) 
} 
*/