function toggleClue(el) {

	document.getElementById(el).parentNode.id = el+'Cell';

	var coords = findPos(document.getElementById(el));
	document.getElementById(el+'Show').style.left = (coords[0] + 275)+"px";
	document.getElementById(el+'Show').style.top = (coords[1] - 200)+"px";

	var coords = findPos(document.getElementById(el));

	var cellClass = el+'Cell';

	var state = document.getElementById(el+'Show').style.display;
	if(state == 'block') {
		state = 'none';
		removeClass(document.getElementById(cellClass), 'active');
	}
	else {
		state = 'block';
		addClass(document.getElementById(cellClass), 'active');
	}


	document.getElementById(el+'Show').style.display = state;
}


function toggleBullet(el) {


	var xOff = 0;
	var coords = findPos(document.getElementById(el));

	if(coords[0] > 630) {
		xOff = 320;
/*		if(hasClass(el+'Show', 'clueBlock')) {
			removeClass(el+'Show', 'clueBlock');
			addClass(el+'Show', 'clueBlockLeft');
		}*/	

		document.getElementById(el+'Show').className = 'hidden switchLeft';
// 		alert(document.getElementById(el+'Show').className);

	}

	document.getElementById(el+'Show').style.left = ((coords[0] - 10) - xOff)+"px";
	document.getElementById(el+'Show').style.top = (coords[1] - 520)+"px";

	var state = document.getElementById(el+'Show').style.display;
	if(state == 'block') {
		state = 'none';
	}
	else {
		state = 'block';
	}


	document.getElementById(el+'Show').style.display = state;
	

}


function toggleMenu(el) {

	var toggleDiv = el.id+'Hidden';
	var MenuDiv = el.id+'Menu';

	//toggle
	var state = document.getElementById(toggleDiv).style.display;
	if(state == 'block') {
		state = 'none';
		document.getElementById(MenuDiv).className = '';
	}
	else {
		state = 'block';
		document.getElementById(MenuDiv).className = 'menuOn';
	el.style.cursor = "pointer";
	el.style.cursor = "hand";
	}


	document.getElementById(toggleDiv).style.display = state;
}


function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return [curleft,curtop];
}
