<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
<ui:composition>            

			<br/><br/>
			<script>
			//<![CDATA[
				Effect.Transitions.exponential = function(pos) {
					  return 1-Math.pow(1-pos,2);
				}
			//]]>
			</script>
			
			<style>
			.viewsourcepanel {
				border : 0px; padding: 0px; margin :  2px 0px 0px 0px; overflow: auto; width: 100%; background-color: #F3F7FB;
			}

			.viewsourcebody {
				padding-right: 0px; padding-left: 0px; padding-bottom: 0px; padding-top: 0px;
			}

			.viewsourceheader {
				border: 0px; padding: 0px; height: 6px; background-color: #E1E7ED; background-image:none;
			}

			.viewsourcediv {
				padding-right: 10px; padding-left: 10px; padding-bottom: 10px; padding-top: 5px; border-top : 2px solid #FFFFFF; border-bottom : 2px solid #FFFFFF;
			}

			.viewsourcediv pre {
				margin: 0px
			}

			.viewsourcelooklink {
				padding-left: 0px; font-size: 11px; cursor: pointer; color: #7795AF; font-family: Verdana; text-decoration: underline
			}

			.viewsourcehidelink {
				display: block; color: #7795AF; cursor: pointer; background-color: #E1E7ED; text-align: right; text-decoration: none; padding : 2px
			}
			</style>
			<f:subview>
			<div>

			<a4j:outputPanel id="hide2" styleClass="viewsourcelooklink" style="display:none">
				<rich:effect for="hide2" event="onclick" type="BlindUp" targetId="source1" params="id:'source1', duration:1.0" />
				<rich:effect for="hide2" event="onclick" type="Appear" targetId="look" params="delay:1.5, duration:0.5" />
				<rich:effect for="hide2" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.1" />
				<h:outputText style="padding-right:5px" value="Hide"/>
			</a4j:outputPanel>
 
			<a4j:outputPanel styleClass="viewsourcelooklink" id="look">
				<rich:effect for="look" event="onclick" type="Fade" params="delay:0.0, duration:0.1" disableDefault="true"/>
				<rich:effect for="look" event="onclick" type="BlindDown" targetId="source1" params="delay:0.1,duration:1.0,from:0.0,to:1.0"/>
				<rich:effect for="look" event="onclick" type="Appear"  targetId="source1"  params="delay:0.1,duration:0.5,from:0.0,to:1.0" />
				<rich:effect for="look" event="onclick" type="Appear"  targetId="hide2"  params="delay:1.5,duration:1.0,from:0.0,to:1.0" />
				<h:outputText escape="false" value="#{empty openlabel?'View Source' : openlabel }" />
			</a4j:outputPanel>


			<rich:panel  id="source1" bodyClass="viewsourcebody" headerClass="viewsourceheader" styleClass="viewsourcepanel" style="display:none">
				<f:facet name="header">
					<rich:spacer height="3px" />
				 </f:facet>					
			<div class="viewsourcediv">
				<rich:insert  src="#{sourcepath}" highlight="#{empty sourcetype? 'xhtml' : sourcetype }"/>
			</div>

			<a4j:outputPanel id="hide" styleClass="viewsourcehidelink">
				<rich:effect for="hide" event="onclick" type="BlindUp" targetId="source1" params="id:'source1', duration:1.0" />
				<rich:effect for="hide" event="onclick" type="Appear" targetId="look" params="delay:1.5, duration:0.5" />
				<rich:effect for="hide" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.1" />
				<h:outputText style="padding-right:5px" value="&lt;&lt;Hide Source"/>
			</a4j:outputPanel>

			</rich:panel>
			</div>
			</f:subview>

			

</ui:composition>
</html>

