<%@ page import="com.atlassian.jira.web.util.CookieUtils"%>
<%@ taglib uri="webwork" prefix="webwork" %>
<%
    if (!CookieUtils.hasSessionId(request.getCookies())) {
         CookieUtils.setSessionCookie(request, response, request.getParameter("sessionId"));
    }
%>
<html>
<head>
    <title><webwork:text name="'attachscreenshot.title'"/></title>
    <meta name="decorator" content="popup">
</head>
<body>
    <p>
	    <webwork:text name="'attachscreenshot.description.line1'"/><br>
	    <webwork:text name="'attachscreenshot.description.line2'"/>
	</p>
    <p>
	<center>

<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<OBJECT
    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,2,0"
    WIDTH = "600" HEIGHT = "500">
<PARAM NAME = CODE VALUE = "com.atlassian.jira.screenshot.applet.ScreenshotApplet" >
<PARAM NAME = ARCHIVE VALUE = "<%= request.getContextPath() %>/secure/applet/screenshot.jar" >
<PARAM NAME = MAYSCRIPT VALUE = true >

<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3.1">
<PARAM NAME="scriptable" VALUE="false">
<PARAM NAME = "post" VALUE  ="AttachFile.jspa?attachScreenshot=true"/>
<PARAM NAME = "issue" VALUE  ="<webwork:property value="id" />">
<PARAM NAME = "screenshotname" VALUE  ="<webwork:property value="nextScreenshotName"/>"/>
<PARAM NAME = "after" VALUE  ="ManageAttachments!default.jspa?id=<webwork:property value="id" />"/>
<PARAM NAME = "encoding" VALUE  ="<webwork:property value="/applicationProperties/encoding" />"/>
<PARAM NAME = "paste.text" VALUE  ="<webwork:text name="'attachfile.paste.label'" />"/>
<PARAM NAME = "filename.text" VALUE  ="<webwork:text name="'attachfile.filename.label'" />"/>
<PARAM NAME = "errormsg.filename.text" VALUE  ="<webwork:text name="'attachfile.applet.filename.error'" />"/>
<PARAM NAME = "comment.text" VALUE  ="<webwork:text name="'attachfile.comment.update.label'" />"/>
<PARAM NAME = "attach.text" VALUE  ="<webwork:text name="'attachfile.submitname'" />"/>
<PARAM NAME = "cancel.text" VALUE  ="<webwork:text name="'common.words.cancel'" />"/>
<PARAM NAME = "badconfiguration.text" VALUE  ="<webwork:text name="'attachfile.applet.configuration.error'" />"/>
<PARAM NAME = "security.text" VALUE  ="<webwork:text name="'attachfile.applet.security.problem'" />"/>
<PARAM NAME = "comment.level.text" VALUE  ="<webwork:text name="'comment.update.viewableby.label'" />"/>
<PARAM NAME = "allusers.text" VALUE  ="<webwork:text name="'comment.constants.allusers'" />"/>
<PARAM NAME = "groups.text" VALUE  ="<webwork:text name="'common.words.groups'" />"/>
<PARAM NAME = "projectroles.text" VALUE  ="<webwork:text name="'common.words.project.roles'" />"/>
<webwork:iterator value="/groupLevels" status="'paramStatus'">
<PARAM NAME = "comment.group.name.<webwork:property value="@paramStatus/index"/>" VALUE  ="<webwork:text name="." />"/>
</webwork:iterator>
<webwork:iterator value="/roleLevels" status="'paramStatus'">
<PARAM NAME = "comment.role.<webwork:property value="@paramStatus/index"/>" VALUE  ="<webwork:text name="./id/toString()" />|<webwork:text name="./name" />"/>
</webwork:iterator>

<COMMENT>
<EMBED
    type = "application/x-java-applet;version=1.4.2"
    CODE = "com.atlassian.jira.screenshot.applet.ScreenshotApplet" ARCHIVE = "<%= request.getContextPath() %>/secure/applet/screenshot.jar" WIDTH = "600" HEIGHT = "500" MAYSCRIPT = true post = "AttachFile.jspa?attachScreenshot=true" issue = "<webwork:property value="id" />" screenshotname = "<webwork:property value="nextScreenshotName"/>" after = "ManageAttachments!default.jspa?id=<webwork:property value="id" />" encoding = "<webwork:property value="/applicationProperties/encoding"/>" paste.text = "<webwork:text name="'attachfile.paste.label'"/>" filename.text = "<webwork:text name="'attachfile.filename.label'" />" comment.text = "<webwork:text name="'attachfile.comment.update.label'" />" attach.text = "<webwork:text name="'attachfile.submitname'" />" cancel.text = "<webwork:text name="'common.words.cancel'"/>" badconfiguration.text ="<webwork:text name="'attachfile.applet.configuration.error'" />" security.text ="<webwork:text name="'attachfile.applet.security.problem'" />" comment.level.text ="<webwork:text name="'comment.update.viewableby.label'" />" allusers.text ="<webwork:text name="'comment.constants.allusers'" /> " errormsg.filename.text ="<webwork:text name="'attachfile.applet.filename.error'" /> "
    <webwork:iterator value="/groupLevels" status="'paramStatus'">
    comment.group.name.<webwork:property value="@paramStatus/index"/> ="<webwork:text name="." />"
    </webwork:iterator>
    <webwork:iterator value="/roleLevels" status="'paramStatus'">
    comment.role.<webwork:property value="@paramStatus/index"/> ="<webwork:text name="./id/toString()" />|<webwork:text name="./name" />"
    </webwork:iterator>

    submit.access.key = "<webwork:text name="'common.forms.submit.accesskey'" />"
    cancel.access.key = "<webwork:text name="'common.forms.cancel.accesskey'" />"
    request.header = "<%=request.getHeader("USER-AGENT")%>"
    scriptable=false
    pluginspage="http://java.sun.com/products/plugin/"
/>
<NOEMBED>

</NOEMBED>
</EMBED>
</COMMENT>
</OBJECT>

<%--
<APPLET CODE = "com.atlassian.jira.screenshot.ScreenshotApplet" ARCHIVE = "screenshot.jar" WIDTH = "600" HEIGHT = "500" MAYSCRIPT = true>
<PARAM NAME = "post" VALUE  ="AttachFile.jspa"/>
<PARAM NAME = "issue" VALUE  ="<webwork:property value="id" />">
<PARAM NAME = "after" VALUE  ="ManageAttachments!default.jspa?id=<webwork:property value="id" />"/>
<PARAM NAME = "encoding" VALUE  ="<webwork:property value="/applicationProperties/encoding" />"/>

</APPLET>
--%>


<!--"END_CONVERTED_APPLET"-->

    <input type="submit" accesskey="<webwork:text name="'common.forms.cancel.accesskey'" />" onclick="window.close();" class="hiddenButton" name="randombutton" />
	</center>
    </p>
</body>
</html>
