function Drag(ev) 
{
    var dragID = ev.target.id;

    //if true, user dragged something valid, if false, the 
    //user tried to drag something illegal
	var flag = false;
	
    //regular expression to see what color is being dragged
	if (/^red/.test(dragID) === true)
	{
		mostRecentDragColor = "red";
		flag = true;
	}
	else if (/^green/.test(dragID) === true)
	{
		mostRecentDragColor = "green";
		flag = true;
	}
	else if (/^blue/.test(dragID) === true)
	{
		mostRecentDragColor = "blue";
		flag = true;
	}
	else if (/^yellow/.test(dragID) === true)
	{
		mostRecentDragColor = "yellow";
		flag = true;
	}
	else if (/^purple/.test(dragID) === true)
	{
		mostRecentDragColor = "purple";
		flag = true;
	}
		
	if (flag === true) {
	    responsiveVoice.speak(mostRecentDragColor, "US English Female");
	    ev.dataTransfer.setData("content", ev.target.id);
	}
	else
	    mostRecentDragColor = null;
		
}
//allows the ghost image to be dragged across the screen
allows the ghost image to be dragged across the screen
allows the ghost image to be dragged across the screen
function Drag(ev) 
{
    var dragID = ev.target.id;
	var flag = false;
	if (/^red/.test(dragID) === true)
	{
		mostRecentDragColor = "red";
		flag = true;
	}
	else if (/^green/.test(dragID) === true)
	{
		mostRecentDragColor = "green";
		flag = true;
	}
	else if (/^blue/.test(dragID) === true)
	{
		mostRecentDragColor = "blue";
		flag = true;
	}
	else if (/^yellow/.test(dragID) === true)
	{
		mostRecentDragColor = "yellow";
		flag = true;
	}
	else if (/^purple/.test(dragID) === true)
	{
		mostRecentDragColor = "purple";
		flag = true;
	}
	if (flag === true) {
	    responsiveVoice.speak(mostRecentDragColor, "US English Female");
	    ev.dataTransfer.setData("content", ev.target.id);
	}
	else
	    mostRecentDragColor = null;
}
function Drag ( ev ) { var dragID = ev . target . id ; var flag = false ; if ( / ^red / . test ( dragID ) === true ) { mostRecentDragColor = "red" ; flag = true ; } else if ( / ^green / . test ( dragID ) === true ) { mostRecentDragColor = "green" ; flag = true ; } else if ( / ^blue / . test ( dragID ) === true ) { mostRecentDragColor = "blue" ; flag = true ; } else if ( / ^yellow / . test ( dragID ) === true ) { mostRecentDragColor = "yellow" ; flag = true ; } else if ( / ^purple / . test ( dragID ) === true ) { mostRecentDragColor = "purple" ; flag = true ; } if ( flag === true ) { responsiveVoice . speak ( mostRecentDragColor , "US English Female" ) ; ev . dataTransfer . setData ( "content" , ev . target . id ) ; } else mostRecentDragColor = null ; }
allows the ghost image to be dragged across the screen
allows the ghost image to be dragged across the screen
//if true, user dragged something valid, if false, the  //user tried to drag something illegal //regular expression to see what color is being dragged