// JAVASCRIPT

var drop = new Array(); 
var act = new Array(); 
var Actact = false;
function menuswitch(element , on){
	if (on == 1){
		if (typeof(document.getElementById('drop' + element )) == 'object' && element !='' && document.getElementById('drop' + element) != null){
			drop[drop.length] = element;
			document.getElementById('drop' + element).style.display = 'block';	
		}
	}	

	for(i = 0; i < drop.length ; i++){
		if (drop[i] != element && drop[i] !=''){
			if (typeof(document.getElementById('drop' + i )) == 'object'){
				document.getElementById('drop' + drop[i]).style.display = 'none';
			}
		}
	}
}

function imageSwitch(obj , evt , sour){
	temp = new Array();
		
	temp['link'] = sour;
	temp['evt'] = evt;
	temp['id'] = obj.id;
	
	good = true;
	for(i = 0; i < act.length ; i++){
		if (evt == 'bold'){
			Actact = obj.id;
		}
		if (act[i]['id'] == obj.id){
			good = false;
		} 
	}
	if (good)
		act[act.length] = temp;	
	
	
	
	for(i = 0; i < act.length ; i++){
		if (!act[i]['src'] || act[i]['src'] == ''){
			act[i]['src'] = obj.src;
		}
		
		if ((evt  == "out" || evt == "over") && Actact == act[i]['id'])
			continue;
		
		if (obj.id == act[i]['id']){
			obj.src = sour;	
		} else {
			document.getElementById(act[i]['id']).src = act[i]['src'];	
		}
		
	}
		
	
}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+''
	win = window.open(mypage,myname,settings)
}

