/* Vanish input text if is default */
function vanishInput(input, defaultValue) {
    if (defaultValue  == input.value) {
        input.value= "";
    }
    input.select();
}

/* Reset input text to default if empty */
function resetInput(input, defaultValue) {
    if("" == input.value) {
        input.value = defaultValue;
    }
}


	function overit(a){
		a.parentNode.setAttribute("class", "ahover");
		a.parentNode.setAttribute("className", "ahover");
	}
	
	function outit(a){
		a.parentNode.removeAttribute("class", "ahover");
		a.parentNode.removeAttribute("className", "ahover");
	}
	
	function launchLesson(subjFolder, topicFolder, matchCode, iter, htmlFile, htmlWidth, htmlHeight)
	{
		// open the window
		// IE8 fails when launching pages from the local file system if the url 
		// variables have values that include multiple relative path sequences.
		// For example: "../content/skillstutor6/latest/" would pass, but 
		// "../../content/skillstutor6/latest/" would fail and fill the address
		// bar of the newly opened window with the absolute path of the variable
		// like so, "file:///C:/content/skillstutor6/latest/" instead of 
		// "Fluid2.html?path=../../content/skillstutor6/latest/"
		// So, the fastest solution is to define rootFolder in Fluid2.html
		
		var rootFolder = "";
		//var rootFolder = "../../../content/skillstutor6/latest/";
		var trgFolder = rootFolder + subjFolder + "/" + topicFolder + "/" + matchCode + "/";
		var dataFile = trgFolder + matchCode + "_" + iter + "_data.xml";
		var rsrcFile = trgFolder + matchCode  + "_" + iter + "_rsrc.xml";
		//ESC - 10/12/10 - added "&demo=" for online demo support. change to true when needed
		var theURL = htmlFile + "?data=" + dataFile + "&rsrc=" + rsrcFile + "&log=ERROR&demo=true";
		var width = htmlWidth;
		var height = htmlHeight;
		var features = "status=no,resizable=no";
		window.open(theURL, "SkillsTutor", "width=" + width + ",height=" + height + "," + features);
	}


