// JavaScript Document

function techCheck(FailedURL){// FailedURL = the redirect URL for cookies disabled
	testCookie = get_cookie( "test" );
	// check for a cookie
	if (testCookie != "nothing") {// if a cookie is not found - redirect to error page	
		window.location=FailedURL + "?RResponse=Cookies are currently disabled in your browser.";
	}
	// set the JScheck field and hide JSmessage
	document.getElementById('JSCheck').value = "true";
	document.getElementById('JSMessage').style.display = "none";
}
function get_cookie( cookie_name ){
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

// Set a cookie to be sure that one exists.
document.cookie = "test=" + escape('nothing');


