var onSound =new Array();
var soundRoot = "";
function playSound(index){
	if(onSound[index]==false || onSound[index]==undefined){
		setTimeout("triggerSound('"+index+"')",100);
		onSound[index]=true;
	}
}
function triggerSound(index){
	if(onSound[index] == true){
		Sound.play(soundRoot+"rollover_click.mp3")
	}
}
function offSound(index){
	onSound[index] = false;
}

function is_child_of(parent, child) {
	if( child != null ) {			
		while( child.parentNode ) {
			if( (child = child.parentNode) == parent ) {
				return true;
			}
		}
	}
	return false;
}
function fixOnMouseOut(element, event, JavaScript_code) {
	var current_mouse_target = null;
	if( event.toElement ) {				
		current_mouse_target 			 = event.toElement;
	} else if( event.relatedTarget ) {				
		current_mouse_target 			 = event.relatedTarget;
	}
	if( !is_child_of(element, current_mouse_target) && element != current_mouse_target ) {
		eval(JavaScript_code);
	}
}
