window.onload = function(){
	if(document.getElementById('menu2')){
  	var menu2 = document.getElementById('menu2');
  	menu2.onmouseover = menu2.onmouseout = function(){ drop('aboutus'); }	
  	var menu3 = document.getElementById('menu3');
  	menu3.onmouseover = menu3.onmouseout = function(){ drop('developments'); }
	}
}

function drop(menu){
	style = document.getElementById(menu).style; 
	var change = (style.display=="block")?'none':'block'; 
	style.display = change;	
}

function show(id){ 
	var box = document.getElementById("popup").style;
	box.display = 'block';
	var pdt = document.getElementById("pdt");
	pdt.src = 'images/'+id+'.jpg';
	pdt.style.display = 'block';
	
	var page = document.getElementById("page").style;
	page.opacity = 0.5;
	page.filter = 'alpha(opacity=' + 50 + ')';	
}

function hide(){
	var page = document.getElementById("page").style;
	page.opacity = 1;
	page.filter = 'alpha(opacity=' + 100 + ')';	
	
	var box = document.getElementById("popup").style;
	box.display = 'none';	
}


var fade=100;


function flash(){
	var pix = document.getElementById("mix");
	var pixstyl = document.getElementById("mix").style;
		if(fade > 0){			
			var fading = "Alpha(Opacity=" + fade + ")";
			pixstyl.filter = fading;
			pixstyl.opacity = fading/100;
			fade-=1;
			setTimeout("flash()", 10);				
	}else if(fade == 0){
		pix.src = "images/profile" + (Math.floor(Math.random()*4) + 1) + ".jpg";;					
		fade = 100;	
		pixstyl.filter = "Alpha(Opacity=100)";
		pixstyl.opacity = 1;
		var chill2 = setTimeout("flash()", 15000);		
}
}

