// JavaScript Document
function grabAncestors(target) {
	
	//Grab ancestors and confirm not in a DIV we don't want to click from
	var ancestor0 = target.attr('id');
	var ancestor1 = target.parent().attr('id');
	var ancestor2 = target.parent().parent().attr('id');
	var ancestor3 = target.parent().parent().parent().attr('id');
	var ancestor4 = target.parent().parent().parent().parent().attr('id');
	var ancestor5 = target.parent().parent().parent().parent().parent().attr('id');
	var ancestor6 = target.parent().parent().parent().parent().parent().parent().attr('id');
	var ancestor7 = target.parent().parent().parent().parent().parent().parent().parent().attr('id');	
	var ancestor8 = target.parent().parent().parent().parent().parent().parent().parent().parent().parent().attr('id');	
	var ancestor9 = target.parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().attr('id');		
	
	//Create ancestors array
	var myAncestors = new Array();
	for(i=0;i<9;i++) {
		var thisAncestor = eval('ancestor'+i);
		if( thisAncestor != '' ) { myAncestors[i] = thisAncestor }
	}
	
	return myAncestors;
	
}
