// check feedback form
function CheckForm() {
	var x = document.feedback.email.value;
	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	
	if (document.feedback.name.value == "") {
		alert("Please enter your name");
		document.feedback.name.focus();
		return false;
	}
	
	else if (filter.test(x) == false) {
		alert("Please enter a valid email address");
		document.feedback.email.focus();
		return false;
	}
	else if (document.feedback.comments.value == "") {
		alert("Please enter some comments");
		document.feedback.comments.focus();
		return false;
	}
	
	return true;
}


// English Dictionary definitions
var dWidth = 250;

var dDef1 = "A set of stimuli judged relative to a standard stimulus.  In the method of limits, a series of comparison stimuli is presented in ascending (\"less than\" to \"more than\") or descending (\"more than\" to \"less than\") order, and a subject judges the comparison stimulus as \"more than,\" \"equal to, \" or \"less than\" the standard stimulus for each trial.  In the method of constant stimuli, one of the comparison stimuli is randomly chosen for a trial, and a subject judges the comparison stimulus as \"more than\" or \"less than\" the standard stimulus.  In the method of adjustment, a subject adjusts the comparison stimulus to appear equal to the standard stimulus.";

var dDef2 = "A systematic error in judgment in which the point of subjective equality (PSE) is significantly larger or smaller than the point of objective equality (POE).  For example, if you consistently guess the height of a 9 meter high pole to be 10 meters, you would be making a constant error of one meter.  Constant error is defined as the point of subjective equality (PSE) minus the point of objective equality (POE). A positive value indicates the mean judgment to be larger than the real value and a negative value indicates the mean judgment to be smaller.  The absolute value of the constant error is inversely related to accuracy.";

var dDef3 = "A technique for \"removing\" from the experimental results the effect of the order of presentation.  For example, if you asked a group of people to compare the tastes of Coke and Pepsi, your experiment would be counterbalanced, if half of your subjects tasted Coke before Pepsi and half tasted Pepsi before Coke.";

var dDef4 = "The tendency to make a response before it is appropriate to do so.  If in the method of limits a subject anticipates the equal stimulus and responds \"equal to\" prematurely, he/she would be making an error of expectation.  For example, if a runner started racing before the gun went off, he/she would be making an error of expectation.";

var dDef5 = "The tendency to continue making the same response after that response is no longer appropriate. For example, if in the method of limits a subject becomes accustomed to making a \"more than\" judgment and continues making this response longer than necessary, he/she would be making an error of habituation.  Trying to stroke your beard when you shaved it off yesterday, or going to last year's locker the first day of classes are other examples of errors of habituation.";

var dDef6 = "The range of values of the comparison stimulus in which the comparison stimulus cannot be reliably discriminated from the standard stimulus.  The range is two JNDs, and it spans from one JND below the PSE to one JND above the PSE.  For example, a 10.001 cm-long comparison line would be within the interval of uncertainty for a standard stimulus 10.000 cm long.  As well, a comparison piece of cherry pie weighing 0.333 kg would probably be within your interval of uncertainty for weight discrimination if the standard was a piece of pie weighing 0.334 kg.";

var dDef7 = "The smallest difference between stimuli that can be reliably discriminated 50% of the time.  The just noticeable difference (JND) is also known as the difference threshold (DT) and the difference limen (DL).  For example, if a line length of 10.3 cm is reliably judged longer when compared with a line length of 10 cm, the JND is 0.3 cm.  In the method of limits and the method of constant stimuli, the JND is one half of the interval of uncertainty (IU).  In the method of adjustment, the JND is 0.6745 multiplied by the standard deviation of the responses.  If a set of lights of various brightness were compared to a standard light, it would be very easy to tell that some lights were brighter or dimmer than the standard (more than one JND from the standard).  Other lights from the set, however, would be difficult to distinguish from the standard (less than one JND from the standard).";

var dDef8 = "The largest comparison stimulus reliably judged to be less than the standard.  In the method of limits, the lower threshold in a descending trial is defined as the stimulus value halfway between the value of the last \"equal to\" response and the value of the first \"less than\" response; in an ascending trial, it is the stimulus value halfway between the last \"less than\" response and the first \"equal to\" response.  In the method of constant stimuli, the lower threshold is the stimulus value that evokes the \"more than\" response 25% of the time, or the \"less than\" response 75% of the time.  In the method of adjustment, it is the mean of the subjects' adjustments minus 0.6745 multiplied by the standard deviation (PSE-JND).  For example, the largest ice cream cone, which you can tell is smaller reliably than a standard cone, is a lower threshold.";

var dDef9 = "A distribution of scores whose graphic representation has a bell-shaped form.  For example, heights tend to be normally distributed.  Very few adults are either extremely tall (more than 2.1 meters or 7 feet) or extremely short (less than 1.2 meters or 4 feet), while most adults are close to the average height (1.7 meters or 5 feet 8 inches for males - 1.6 meters or 5 feet 3 inches for females).";

var dDef10 = "An S-shaped curve in appearance; also called a \"Sigmoid\" curve.  The curve takes this shape when one plots the percentage or frequency of scores in a normal distribution that are less than or equal to given values.  For example, since heights follow a normal distribution, if we were to plot the percentage of people whose heights are less than or equal to different values, this curve would be shaped like an ogive.";

var dDef11 = "The point at which the comparison stimulus value physically equals the value of the standard stimulus.  For example, if the strength of a set of perfumes were compared to a standard perfume whose strength was 7, then the POE would be 7.";

var dDef12 = "The point at which a comparison stimulus is judged equal to the standard stimulus.  In the method of limits, it is both the midpoint between the UT and LT and the mean of the stimulus values that evoke \"equal to\" responses.  In the method of constant stimuli, it is the stimulus value that evokes the \"more than\" or \"less than\" response 50% of the time.  In the method of adjustment, it is the mean value of the adjustments.  For example, if we wanted to determine the perceived size of the moon, we might have subjects adjust a disk to equal the perceived size of the moon.  If the average adjusted size of the disk is 10 cm. squared, then the PSE is 10 cm. squared.";

var dDef13 = "Two independent qualities of a set of judgments.  Precision is said to be high when the variability of the judgments (JND) is small.  Accuracy is said to be high when the central tendency of the judgments (PSE) is close to the actual value.  For example, a set of darts scattered evenly around the bull's-eye of a dartboard demonstrates low precision; nonetheless, the accuracy is high, since the average dart position is the bull's-eye (See Figure 1 in POSTSCRPIT).";

var dDef14 = "A procedural or nonsensory factor that influences responses to stimuli.  The errors of expectation and habituation are response biases that can be identified when using the method of limits.";

var dDef15 = "The stimulus for which you wish to determine a psychophysical value, and to which comparison stimuli are judged or adjusted.  If you wish to determine the JND for a 10 cm line length, the 10 cm line that you use to do this is the standard stimulus.";

var dDef16 = "The smallest comparison stimulus reliably judged to be greater than the standard.  In the method of limits, the upper threshold in a descending trial is defined as the stimulus value that is halfway between the last \"more than\" response and the first \"equal to\" response; in an ascending trial, it is the stimulus value halfway between the last \"equal to\" response and the first \"more than\" response.  In the method of constant stimuli, the upper threshold is the stimulus value that evokes the \"more than\" response 75% of the time, or the \"less than\" response 25% of the time.  In the method of adjustment, it is the mean of the subject's adjustments plus 0.6745 multiplied by the standard deviation (PSE + JND).  As an example, the smallest slice of bread you can still tell is larger reliably than a standard slice is an upper threshold.";

var dDef17 = "Unsystematic error in judgments.  The higher the JND, the larger the variable error.  A large variable error shows low precision; a small variable error shows high precision.";

var dDef18 = "A statement that the magnitude of the JND is a constant proportion of the standard stimulus intensity.  For example, a large person must lose more weight than a small person before other people will notice that they lost weight.  Mathematically, Weber's Law is expressed: JND = K x S, where JND is the size of the just noticeable difference, K is a constant known as the Weber fraction, and S is the size of the standard stimulus.  Modern psychophysics has modified this equation to take into account that perception starts at a non-zero value.  The modified equation is JND = K x S + C, where C is a constant.";


// English Calculation definitions
var cWidth = 300;

var cDef1 = "The Interval of Uncertainty (IU) in all three methods is the difference between the UT (upper threshold) and the LT (lower threshold). It is also equal to two times the JND.<br>br><div align=\"center\">IU = UT - LT<br><br>IU = 2 (JND)</div>";

var cDef2 = "In the method of limits, the Just Noticeable Difference (JND) is calculated by the following formulas:<br><div align=\"center\">JND = IU/2.</div><br>In the method of adjustment, the JND is calculated by multiplying the standard deviation of the scores (adjustments) by 0.6745:<br><br><div align=\"center\">JND = 0.6745 (S.D.)</div><br>where S.D. is the standard deviation. For example, if the standard deviation is 1.5, then<br><br><div align=\"center\">JND = 0.6745 (1.5) = 1.01175</div>"; 

var cDef3 = "The Mean (or average) is the sum of all the values divided by the total number of values. This is expressed mathematically below with n representing the number of values in the set and xn representing the nth number of that set.<br><br><div align=\"center\"><img src=\"/psycho/en/pics_en/mol_f1.gif\"></div><br>For example, if the set of numbers were<br><br><div align=\"center\">JND = 0.6745 (S.D.)<br><img src=\"/psycho/en/pics_en/mol_f2.gif\">"; 

var cDef4 = "The Standard Deviation is a measure of variability. The standard deviation is the square root of the Variance and is calculated as follows:<br><div align=\"center\"><img src=\"/psycho/en/pics_en/mol_f3.gif\"></div><br>where x is a data value and n is the number of data values<br><br>For example, consider the following data values:<br><div align=\"center\"><img src=\"/psycho/en/pics_en/mol_f4.gif\"></div>"; 

var cDef5 = "In the method of limits, the Point of Subjective Equality (PSE) is calculated using one of the following formulas:<br><br><div align=\"center\">PSE = (UT + LT)/2<br><br>PSE = IU/2 + LT<br><br>PSE = LT + JND<br><br></div>where UT is the mean upper threshold, LT is the mean lower threshold, IU is the interval of uncertainty and JND is the just noticeable difference.<br><br>In the method of adjustment, the PSE is the mean of the adjusted line lengths."; 

var cDef6 = "In the method of adjustment, the Upper Threshold (UT) is calculated by adding one JND to the PSE. The Lower Threshold (LT) is calculated by subtracting one JND from the PSE. The mathematical formulas are:<br><br><div align=\"center\">UT = PSE + JND<br><br>LT = PSE - JND<br><br>For example, if the PSE is 50 and the JND is 1, then:<br><br>UT = 50 + 1 = 51<br><br>LT = 50 - 1 = 49<br><br></div>For the method of limits, the UT for each trial is halfway between the greatest equal to response and the first longer than response. The LT for each trial is halfway between the smallest equal to response and the first smaller than response.<br><br>The mean upper (lower) threshold is the mean of the upper (lower) thresholds."; 

var cDef7 = "The Interval of Uncertainty (IU) in all three methods is the difference between the UT (upper threshold) and the LT (lower threshold). It is also equal to two times the JND.<br><br><div align=\"center\">IU = UT - LT<br><br>IU = 2 (JND)<br><br>";

var cDef8 = "In the method of constant stimuli, the JND (just noticeable difference) is equal to half the IU.<br><div align=\"center\"><img src=\"/psycho/en/pics_en/mocs_f1.gif\"></div>"; 

var cDef9 = "In the method of constant stimuli, the LT (lower threshold) is the comparison stimulus value corresponding to 25% \"longer than\" responses<br><br>Graphically, the LT can be determined by drawing a horizontal line from the 25% point on the ordinate axis of the graph and from there dropping a vertical line to the abscissa. The point on the abscissa corresponding to the 25% point is the value of the LT"; 

var cDef10 = "In the method of constant stimuli, the PSE (point of subjective equality) is the stimulus value that evokes the \"longer than\" or \"less than\" response 50% of the time<br><br>Graphically, the PSE can be determined by drawing a horizontal line from the 50% point on the ordinate axis of the graph and then dropping a vertical line from that point to the abscissa. The point on the abscissa corresponding to the 50% point is the value of the PSE."; 

var cDef11 = "In the method of constant stimuli, the UT (upper threshold) is the comparison stimulus value corresponding to 75% \"longer than\" responses<br><br>Graphically, the UT can be determined by drawing a horizontal line from the 75% point on the ordinate axis of the graph and from there dropping a vertical line to the abscissa. The point on the abscissa corresponding to the 75% point is the value of the UT."; 

var cDef12 = "The Interval of Uncertainty (IU) in all three methods is the difference between the UT (upper threshold) and the LT (lower threshold). It is also equal to two times the JND.<br><br><div align=\"center\">IU = UT - LT<br><br>IU = 2 (JND)</div>";

var cDef13 = "In the method of limits, the Just Noticeable Difference (JND) is calculated by the following formulas:<br><div align=\"center\">JND = IU/2.</div><br>In the method of adjustment, the JND is calculated by multiplying the standard deviation of the scores (adjustments) by 0.6745:<br><div align=\"center\">JND = 0.6745 (S.D.)</div><br>where S.D. is the standard deviation.<br><br>For example, if the standard deviation is 1.5, then<br><div align=\"center\">JND = 0.6745 (1.5)<br><br>= 1.01175</div>"; 

var cDef14 = "The Mean (or average) is the sum of all the values divided by the total number of values. This is expressed mathematically below with n representing the number of values in the set and xn representing the nth number of that set.<br><br><div align=\"center\"><img src=\"/psycho/en/pics_en/mol_f1.gif\"></div><br>For example, if the set of numbers were<br><br><div align=\"center\">JND = 0.6745 (S.D.)<br><img src=\"/psycho/en/pics_en/mol_f2.gif\">";

var cDef15 = "In the method of limits, the Point of Subjective Equality (PSE) is calculated using one of the following formulas:<br><br><div align=\"center\">PSE = (UT + LT) /2<br><br>PSE = IU/2 + LT<br><br>PSE = LT + JND<br><br></div>where UT is the mean upper threshold, LT is the mean lower threshold, IU is the interval of uncertainty and JND is the just noticeable difference.<br><br>In the method of adjustment, the PSE is the mean of the adjusted line lengths."; 

var cDef16 = "The Standard Deviation is a measure of variability. The standard deviation is the square root of the Variance and is calculated as follows:<br><div align=\"center\"><img src=\"/psycho/en/pics_en/mol_f3.gif\"></div><br>where x is a data value and n is the number of data values<br><br>For example, consider the following data values:<br><div align=\"center\"><img src=\"/psycho/en/pics_en/mol_f4.gif\"></div>"; 

var cDef17 = "In the method of adjustment, the Upper Threshold (UT) is calculated by adding one JND to the PSE. The Lower Threshold (LT) is calculated by subtracting one JND from the PSE. The mathematical formulas are:<br><br><div align=\"center\">UT = PSE + JND<br><br>LT = PSE - JND</div><br>For example, if the PSE is 50 and the JND is 1, then:<br><br><div align=\"center\">UT = 50 + 1 = 51<br><br>LT = 50 - 1 = 49</div><br>For the method of limits, the UT for each trial is halfway between the greatest equal to response and the first longer than response. The LT for each trial is halfway between the smallest equal to response and the first smaller than response.<br><br>The mean upper (lower) threshold is the mean of the upper (lower) thresholds."; 

var cDef18 = "<div align=\"center\"><img src=\"/psycho/en/pics_en/wl_f1.gif\"></div><br>The slope is a measure of how fast a line rises or falls. The slope is positive if the line rises, and negative if it falls (viewing left to right). A slope close to zero indicates that the line is almost flat.<br><br>To calculate the slope, subtract the Y coordinates of the two points on a line (the rise) and divide by the difference between the X coordinates of the same two points (the run). The formula is:<br><div align=\"center\"><img src=\"/psycho/en/pics_en/wl_f2.gif\"></div>";

var cDef19 = "Constant error is a systematic error in judgment in which the point of subjective equality (PSE) is larger or smaller than the point of objective equality (POE).<br><br>For example, if you always guessed the height of a 9-meter pole to be 10 meters, you would be making a constant error. Mathematically,<br><br><div align=\"center\">constant error = PSE - POE</div><br>The absolute value of the constant error is inversely related to accuracy."; 
var cDef20 = "Variable Error is synonymous with JND, and is any unsystematic error in judgment unpredictably higher or lower than the PSE.<br><br>A large Variable Error represents low precision, and a small Variable Error shows high precision.<br><br>In the Method of Adjustment, the JND is 0.6745 multiplied by the standard deviation of the responses."; 

var cDef21 = "Weber`s Law states that the JND is a constant proportion of stimulus intensity. For example, a large person must lose more weight than a small person before other people will notice the weight loss. Mathematically, Weber`s Law is expressed:<br><div align=\"center\">JND = K x S</div><br>where JND is the size of the just noticeable difference, K is a constant known as the Weber fraction, and S is the size of the standard stimulus.";

var cDef22 = "Constant error is a systematic error in judgment in which the Point of Subjective Equality (PSE) is larger or smaller than the point of objective equality (POE).<br><br>For example, if you always guessed the height of a 9-meter pole to be 10 meters, you would be making a constant error. Mathematically,<br><br><div align=\"center\">constant error = PSE - POE</div><br>The absolute value of the constant error is inversely related to accuracy."; 

var cDef23 = "Variable Error is synonymous with JND, and is any unsystematic error in judgment unpredictably higher or lower than the PSE.<br><br>A large Variable Error represents low precision, and a small Variable Error shows high precision.<br><br>In the Method of Adjustment, the JND is 0.6745 multiplied by the standard deviation of the responses."; 

var cDef24 = "Weber`s Law states that the JND is a constant proportion of stimulus intensity. For example, a large person must lose more weight than a small person before other people will notice the weight loss.<br><br>Mathematically, Weber`s Law is expressed:<br><br><div align=\"center\">JND = K x S</div><br>Where JND is the size of the just noticeable difference, K is a constant known as the Weber fraction, and S is the size of the standard stimulus.";
