<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet SYSTEM "http://commons.omniupdate.com/dtd/standard.dtd">

<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ou="http://omniupdate.com/XSL/Variables"
xmlns:fn="http://omniupdate.com/XSL/Functions"
xmlns:ouc="http://omniupdate.com/XSL/Variables"
exclude-result-prefixes="xs ou fn ouc">

	<xsl:template match="table[@class = 'form-insert']" >
<xsl:choose>
			<xsl:when test="$ou:action = 'pub'">
		<link href='//app4.ttuhsc.edu/formbuilder/handlers/ResourceHandler.ashx?Type=CSS&amp;FormKey={tbody/tr[2]/td[1]}' rel='stylesheet' />
		<script src="//app4.ttuhsc.edu/formbuilder/handlers/ResourceHandler.ashx?Type=JS&amp;FormKey={tbody/tr[2]/td[1]}"></script>
		<div id="formCtrls">
			<div id="JSCheck" style="font-weight: bold; width: 100%; font-size: 2em; text-align: center; line-height: 1.5em;">Java-script must be enabled to use this form. If you are using the form in OU it will be displayed after being published.</div>
			<textarea id="txtForm"></textarea>
			<script type="text/javascript">// <![CDATA[

//verification and ready handlers 
var verifyCallback = function (response) { 
ValidateCAPTHCA(response); 
}; 

var onloadCallback = function () { 
grecaptcha.render("RECAPTCHA_SPAN", { 
'sitekey': '6LewtA8TAAAAAKd9XLxCcPf8Ox1C2vkNIS1GFvBT', 
'callback': verifyCallback 
}); 
CAPTCHALoaded=true;
}; 


// ]]></script>
			<p>Help us prevent spam. Prove you are a human.</p>
			<span id="RECAPTCHA_SPAN"></span>
			
			<input id="btnSubmit" type="submit" value="Submit Form" />
		</div>
		</xsl:when>
			<xsl:otherwise>
				<h2>FormBuilder is active for this page.</h2>
				<xsl:copy-of select="." />
			</xsl:otherwise>
		</xsl:choose>		

	</xsl:template>

</xsl:stylesheet>
