//---fired prior to each example call and user svg "RESET" onclick---

var ResetRequest=false

function resetMatrix()
{
	ResetRequest=true //---stops example sequences set at true on example selection----

	svgSpan.style.visibility="visible"


	establishObjects()

	if(activeRow)
	{
		activeRow.style.backgroundColor=activeBG
	}
	activeRow=null

	scriptBlockValue.value=prettyIndent(initScript.text)

	//---all examples default reset---
   	sourceTypeSpan.innerText="SVG Source  "
	sourceValue.style.backgroundColor="palegoldenrod"
	codeTypeSpan.innerText="Javascript Functions  "
	scriptBlockValue.style.backgroundColor="khaki"
    ScriptExpandHt=null
	SourceExpandHt=null



	reduceSource()
	reduceScript()
	ScriptExpandHt=null
	SourceExpandHt=null
	SourceExpandCheck=false
	ScriptExpandCheck=false

	exampleTitleSpan.style.visibility="visible"
	reduceScriptCheck.style.visibility="visible"
	expandScriptCheck.style.visibility="visible"
	reduceSourceCheck.style.visibility="visible"
	expandSourceCheck.style.visibility="visible"
	exampleTitleSpan.innerHTML=""

	Bounding_BoxButton.disabled=true
	SVG_WrapperButton.disabled=true
	The_4_TransformationsSpan.disabled=true
	Matrix_ValuesSpan.disabled=true
	Appending_TransformsSpan.disabled=true
	Appending_TransformsTranslateSelect.selectedIndex=1
	Appending_TransformsRotateSelect.selectedIndex=1
	Appending_TransformsScaleSelect.selectedIndex=3
	Appending_TransformsSkewSelect.selectedIndex=1

	translateByButton.disabled=true
	goToButton.disabled=true

	resetRotate0Button.disabled=true
	resetScale1Button.disabled=true
	resetSkew0Button.disabled=true

	rotateByButton.disabled=true
	rotateToButton.disabled=true
	scaleByButton.disabled=true
	scaleToButton.disabled=true
	skewByButton.disabled=true
	skewToButton.disabled=true

	strategySpan.disabled=true
	quickReferenceSpan.innerHTML="Watch out: The Matrix may get you"
	rebuildButton.disabled=true
	CurrentActiveView=null

}

function establishObjects()
{
	var currentSVG=Neo.childNodes.item(0)
	Neo.removeChild(currentSVG)
	Neo.appendChild(CloneSVG)
	//---re establish objects---
	Matrix=Neo.documentElement;
	Matrixa=Neo.getElementById("Matrixa");
	Matrixc=Neo.getElementById("Matrixc");
	Matrixe=Neo.getElementById("Matrixe");
	Matrixb=Neo.getElementById("Matrixb");
	Matrixd=Neo.getElementById("Matrixd");
	Matrixf=Neo.getElementById("Matrixf");
	Zion=Neo.getElementById("Zion");
	PlayerText=Neo.getElementById("PlayerText")
	ChildrenCaption=Neo.getElementById("ChildrenCaption")
	Oracle=Neo.getElementById("Oracle")
	Ghost=Neo.getElementById("Ghost")
	TheMachines=Neo.getElementById("TheMachines")
	CloneSVG=Matrix.cloneNode(true)
	sourceValue.value=printNode(Matrix)
}


