
	function checkEmail(fieldValue,field){
		if(fieldValue.search(/[\w.-]+@[\w.-]+\.\w+/)) {
			alert('Please enter a valid email address.');
			field.value = '';
		}
	}

	if (window.ColdFusion) ColdFusion.required['search']=true;

    _CF_checkCFForm_1 = function(_CF_this)
    {
        //reset on submit
        _CF_error_exists = false;
        _CF_error_messages = new Array();
        _CF_error_fields = new Object();
        _CF_FirstErrorField = null;

        //form element search required check
        if( !_CF_hasValue(_CF_this['search'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "search", _CF_this['search'].value, "Please enter a term in the search form to begin.");
            _CF_error_exists = true;
        }


        //display error messages and return success
        if( _CF_error_exists )
        {
            if( _CF_error_messages.length > 0 )
            {
                // show alert() message
                _CF_onErrorAlert(_CF_error_messages);
                // set focus to first form error, if the field supports js focus().
                if( _CF_this[_CF_FirstErrorField].type == "text" )
                { _CF_this[_CF_FirstErrorField].focus(); }

            }
            return false;
        }else {
            return true;
        }
    }



	function pop(){ 
		window.name="mainwindow";
		w=window.open("/games/scratch/drawings.cfm?popup=1","w","width=620,height=500,resizable=1,scrollbars=1")
		w.focus()
	}
	
	function rollNum(imgName) { // on function
		if (document.images) { document[imgName].src = "/img/numbers/" + imgName + "_over.gif"	}
	}
	function outNum(imgName) { // off function
		if (document.images)  {	document[imgName].src = "/img/numbers/" + imgName + "_off.gif"	}
	}

/* Referenzen */

function showRef(a) {
	if(document.getElementById(a).style.display != 'block') {
		document.getElementById(a).style.display = 'block';
	} else {
		document.getElementById(a).style.display = 'none';
	}
}

/*  Add to Body:
<a href="Javascript:showRef('q2');">Question?</a>
<span id="q2">answer</span>
*/

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}