var fear = "Remember feeling confident, strong, secure, and courageous. This is embracing the sense of excitement, ambition, daring, where you are prepared to take a calculated risk and move forward. Make it your intention to achieve your goals.";

var anger = "Refocus on the experience of compassion, acceptance and flexibility. When you realize how powerful you are then you have more capacity for tolerance. Evoke you ability for patience, openness, and make it your intention to keep it positive. Acknowledge the value of a positive attitude.";

var pain = "Refocus on the potential of reaching fulfillment acting on the possibilities. Recall a time that was happy and satisfying. Establish a state of harmony relaxing the body and returning to the positive emotions and good energy. Reject all the negative thoughts and feelings replace them with the healthy and happy ones.";

var disgust = "Refocus on the optimistic path and new possibilities. Search for memories of love, beauty, respect, pride, excitement, and feeling energized. Reject the negative thoughts and return to a positive state of mind. Act in a way that enhances the sense of pride, balance, and caring.";

var default_direct = "Click in the scroll panel on the far left to see how to achieve polarity shift."

function scroll(polarity) {
	var negativeDiv = document.getElementById('polar_negatives');
	var positiveDiv = document.getElementById('polar_positives');
	
	if (polarity == 'negative') {
		positiveDiv.scrollTop = negativeDiv.scrollTop;
	} else {
		negativeDiv.scrollTop = positiveDiv.scrollTop;
	}
}

function moveposition(neg,pos,directive) {

	var negativeDiv = document.getElementById('polar_negatives');
	var positiveDiv = document.getElementById('polar_positives');
	var directiveDiv = document.getElementById('polar_directive');
	positiveDiv.scrollTop = negativeDiv.scrollTop;

	var negativeItem = document.getElementById(neg);
	negativeItem.blur();
	var positiveItem = document.getElementById(pos);

	var negAll = negativeDiv.getElementsByTagName("a");
	var posAll = positiveDiv.getElementsByTagName("a");
	
	
	for (var i = 0; i <= negAll.length - 1; i++) { // Turn Off hilite Color for All
		negAll[i].style.backgroundColor = "#ffffcc";
		posAll[i].style.backgroundColor = "#ffffcc";
		negAll[i].className = "negLink";
	}

	negativeItem.style.backgroundColor ="#f3b8f2"; // hilite
	positiveItem.style.backgroundColor ="#f3b8f2";
	negativeItem.className = "polarOff";

	switch (directive) {
	case 'fear':
		directiveDiv.innerHTML = fear;
		break;
	case 'anger':
		directiveDiv.innerHTML = anger;
		break;
	case 'pain':
		directiveDiv.innerHTML = pain;
		break;
	case 'disgust':
		directiveDiv.innerHTML = disgust;
		break;
	default:
		directiveDiv.innerHTML = default_direct
		break;
	}	
	
	
}