Source code for Browser support optimizing files

disp_mess.xml - Displays the message sent to R&D
index.xml - Starting page of R&D
messForm.xml - Pop-up window form
message.xml - New page form
popup.xsl - Pop-up window template
Start by creating popup.xsl. Title should be "Popup template".
When creating the xml-files, choose "Common Template" for all files except
messForm.xml, that should have the "Popup template".
Place all files in the R&D folder.
index.xml
<!-- New code -->
<head>
  <script language="JavaScript">
   <!--
    messageWindow = '';
    
    function openMessWin(url)
    {
      messageWindow =
        window.open(url,'messWin','toolbar=no,status=no,height=570,width=388');
      if(!messageWindow.opener)
        messageWindow.opener = self;
    }
  //-->
  </script>
</head>
<!-- New code ends -->

<h1>Robotics Evaluation</h1>
<p initial="initial">The R&amp;D team is for the moment training some robots.
The team also recommends you to check out another poject in the graphics Labs,
and some samples from using Roxen Web technology</p>
<p />

<img src="robodog.psd" width="240" height="205" alt="Robodog" border="0"
     align="left" />
<br clear="all"><font size="-1"><b>Snapshot from the Labs.</b></font></br>

<!-- New code -->
<p />
<p />

<h1>Contact R&amp;D</h1>
<p initial="initial">If you have any suggestions, complaints or other messages
to the R&amp;D
staff, please don't hesitate to

<if supports="javascript">
  <!-- javascript pop-up form -->
  contact us.
  <form>
    <input type="button" value="CONTACT R&amp;D"
           onClick='openMessWin("messForm.xml")' />
  </form>

   <form name="hiddenForm" action="disp_mess.xml">
     <input type="hidden" name="_name" />
     <input type="hidden" name="mail" />
     <input type="hidden" name="mess" />
   </form>

   <noscript>
     <p>
       <b>This page uses JavaScript, so you should enable JavaScript in your
       browser options and reload this page for the button above to work.
       Else, <a href=&quot;message.xml&quot;>click here</a>
       to contact R&amp;D staff.</b>
     </p>
   </noscript>
</if>

<else>
  <!-- new page html form -->
  <a href="message.xml"><b>contact us</b></a>.
</else>

</p>
<!-- New code ends -->
disp_mess.xml          Up
<h1>Message sent</h1>

<p>Following message sent to R&amp;D:</p>

<table border="0">
  <tr>
    <td><b>From:</b></td><td>&form._name;</td>
  </tr>
  <tr>
    <td><b>Mail:</b></td><td>&form.mail;</td>
  </tr>
</table>

<p><b>Message:</b></p>

<p>&form.mess;</p>

<a href="index.xml"><b>BACK TO R&amp;D</b></a>
messForm.xml          Up
<script language="JavaScript">
  <!--
  function checkData ()
  {
    if (document.messForm._NAME.value.length > 0)
    {
      window.opener.document.hiddenForm._name.value =
        document.messForm._NAME.value;
      window.opener.document.hiddenForm.mail.value =
        document.messForm.MAIL.value;
      window.opener.document.hiddenForm.mess.value =
        document.messForm.MESS.value;

      window.opener.document.hiddenForm.submit();

      window.close();
      return false;
    }
    else
    {
       alert("You must enter a name!");
       return true;       
    }
  }

  function pushed(action)
  {
    if(action == "submit")
      checkData();
    else if(action == "clear")
           document.messForm.MESS.value="";
         else
           window.close();
  }
  //-->
</script>

<p>Please fill in this form and click 'Send'
to send a message to the R&amp;D staff.</p>

<form name="messForm" onSubmit="return checkData()">
  <table border="0">
    <tr>
      <td><b>Name:</b></td><td><input type="text" name="_NAME" size="25"/></td>
    </tr>
    <tr>
      <td><b>Mail:</b></td><td><input type="text" name="MAIL" size="25"/></td>
    </tr>
  </table>

  <textarea name="MESS" rows="15" cols="50">
    Write your message here...
  </textarea>
  <p></p>
  <input type="button" value="SEND" onClick='pushed("submit")'/>
  <input type="button" value="Cancel" onClick='pushed("close")'/>
  <input type="button" value="Clear" onClick='pushed("clear")'/>
</form>
message.xml          Up
<h1>Contact R&amp;D</h1>

<p>Please fill in this form and click 'Send'
to send a message to the R&amp;D staff.
</p>

<form name="messForm" action="disp_mess.xml" method="post">
<table border="0">
  <tr>
    <td><b>Name:</b></td><td><input type="text" name="_name" size="25" /></td>
  </tr>
  <tr>
    <td><b>Mail:</b></td><td><input type="text" name="mail" size="25" /></td>
  </tr>
</table>

<textarea name="mess" rows="10" cols="50">
Write your message here...
</textarea>
<br/>
<input type="submit" value="SEND" />
</form>
popup.xsl          Up
<?xml version='1.0'?>

<xsl:stylesheet rxml:copy-unknown-elements=&quot;yes&quot;>

<xsl:import href=&quot;/templates/buttons.xsl&quot; />
<xsl:import href=&quot;/templates/containers.xsl&quot; />
<xsl:import href=&quot;/templates/color-palette1.xsl&quot; />

<xsl:output method=&quot;html&quot; />

<xsl:param name=&quot;company-logo&quot; rxml:type=&quot;string&quot; select=&quot;'DemoLabs'&quot; />
<xsl:param name=&quot;company-full&quot; rxml:type=&quot;string&quot; select=&quot;'DemoLabs, Inc.'&quot; />


<xsl:param name=&quot;logo-font&quot; rxml:type=&quot;font&quot; select=&quot;'quadrangle'&quot; />
<xsl:param name=&quot;logo-font-size&quot; rxml:type=&quot;int&quot; select=&quot;'36'&quot; /&gt
<xsl:param name=&quot;h1-font&quot; rxml:type=&quot;font&quot; select=&quot;'yikes!'&quot; />
<xsl:param name=&quot;h1-font-size&quot; rxml:type=&quot;int&quot; select=&quot;'36'&quot; />
<xsl:param name=&quot;h2-fonts&quot; rxml:type=&quot;string&quot;
           select=&quot;'arial, helvetica, sans-serif'&quot; />
<xsl:param name=&quot;table-border&quot; rxml:type=&quot;int&quot; select=&quot;0&quot; />

<xsl:template match=&quot;/&quot;>

<html>

<head>
  <meta name=&quot;keywords&quot; content=&quot;&page.keywords;&quot;/>
  <meta name=&quot;description&quot; content=&quot;&page.description;&quot;/>
  <title>&page.title;</title>
</head>

<body bgcolor=&quot;{$bgcolor-primary}&quot; link=&quot;{$fgaccent-secondary}&quot;
vlink=&quot;{$fgaccent-secondary}&quot; text=&quot;{$fgcolor-primary}&quot; 
alink=&quot;{$fgaccent-primary}&quot; topmargin=&quot;0&quot; bottommargin=&quot;0&quot;
marginwidth=&quot;0&quot; marginheight=&quot;0&quot; leftmargin=&quot;0&quot;
rightmargin=&quot;0&quot;>

<center>

  <!-- DemoLabs logo -->
  <table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;{$table-border}&quot;>
    <tr>
      <td width=&quot;100%&quot; valign=&quot;top&quot; align=&quot;left&quot; bgcolor=&quot;{$bgcolor-secondary}&quot;>
        <gtext font=&quot;{$logo-font}&quot; fgcolor=&quot;{$fgaccent-secondary}&quot;
            bgcolor=&quot;{$bgcolor-secondary}&quot; bshadow=&quot;1&quot; 
            fontsize=&quot;{$logo-font-size}&quot; xspacing=&quot;10&quot;
            yspacing=&quot;2&quot; scolor=&quot;#333333&quot; outline=&quot;{$bgaccent-secondary},2&quot; 
            border=&quot;0&quot; align=&quot;left&quot; valign=&quot;top&quot; border=&quot;0&quot;
            xsize=&quot;400&quot; format=&quot;gif&quot; quant=&quot;128&quot; move=&quot;10,5&quot;
            vspace=&quot;5&quot;><xsl:value-of select=&quot;$company-logo&quot; />
        </gtext>       
      </td>
    </tr>  
  </table>


  <!-- Black line -->
  <table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;{$table-border}&quot;>
    <tr>
      <td colspan=&quot;2&quot; bgcolor=&quot;{$bgaccent-secondary}&quot; width=&quot;100%&quot;>
        <img src=&quot;internal-roxen-unit&quot; width=&quot;400&quot; height=&quot;10&quot; alt=&quot;&quot;
             border=&quot;0&quot;/>
      </td>
    </tr>

   <!-- Space before content -->
    <tr>
      <td colspan=&quot;2&quot; bgcolor=&quot;{$bgcolor-primary}&quot; width=&quot;100%&quot;>
        <img src=&quot;internal-roxen-unit&quot; width=&quot;400&quot; height=&quot;10&quot; alt=&quot;&quot;
             border=&quot;0&quot;/>
      </td>
    </tr> 
  </table>


  <!-- Page contents -->
  <table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;{$table-border}&quot;>
    <tr>
      <td bgcolor=&quot;{$bgcolor-primary}&quot;>
        <img src=&quot;internal-roxen-unit&quot; width=&quot;10&quot; height=&quot;2&quot; alt=&quot;&quot;
             border=&quot;0&quot;/>
      </td>
    
     <!-- Contents -->
      <td allign=&quot;left&quot; valign=&quot;top&quot;>
        <font face=&quot;{$h2-fonts}&quot;>
          <xsl:apply-templates />
          <br />&nbsp;
        </font>
      </td>      
    </tr>  
  </table>



  <table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;{$table-border}&quot;>

    <!-- Black line -->
    <tr>
      <td colspan=&quot;2&quot; bgcolor=&quot;{$bgaccent-primary}&quot; width=&quot;100%&quot;>
        <img src=&quot;internal-roxen-unit&quot; width=&quot;400&quot; height=&quot;10&quot; alt=&quot;&quot;
             border=&quot;0&quot;/>
      </td>
    </tr>

    <!-- Copyright -->
    <tr>
      <td bgcolor=&quot;{$bgcolor-secondary}&quot;>
        <img src=&quot;internal-roxen-unit&quot; width=&quot;10&quot; height=&quot;2&quot; alt=&quot;&quot;
             border=&quot;0&quot;/>
      </td>
      <td bgcolor=&quot;{$bgcolor-secondary}&quot;>
        <font color=&quot;{$fgcolor-secondary}&quot; face=&quot;{$h2-fonts}&quot; size=&quot;-1&quot;>
          Copyright © <date part=&quot;year&quot; />&nbsp;
          <xsl:value-of select=&quot;$company-full&quot; />, All rights reserved.
          <br />&nbsp;
        </font>
      </td>
    </tr>
  </table>

</center>

</body>

</html>

</xsl:template>

</xsl:stylesheet>