Index: trunk/instant_messenger/xsl/window.xsl
===================================================================
--- trunk/instant_messenger/xsl/window.xsl	(revision 63)
+++ trunk/instant_messenger/xsl/window.xsl	(revision 151)
@@ -4,53 +4,29 @@
 
 <xsl:template match="/window">
-   <html>
-   <head>
-   </head>
-   <body>
-      <div id="{@id}_im_window_master" class="master" style="top:{@top};left:{@left};height:{(@height + 48)};width:{(@width + 12)};{@style};">
-        <div id="{@id}_im_window" class="pai" style="height:{(@height + 40)};">
-         	<div id="{@id}_im_window_icon" class="im_window_icon" />
-            <div class="tit"><xsl:value-of select="@title" /></div>
-            <xsl:apply-templates select="/" mode='buttons' />
-            <div class="filho" id="{@id}_im_window_body_inner" style="width:{@width};height:{@height};" />
-         </div>      
-      </div>
-
-      <div class="im-windowfantom-des" id="{@id}_im_window_fantom" />
-      <div class="im-windowfantom-des" id="{@id}_im_window_movable" />
-      <div class="im-window-resizehandle" id="{@id}_im_window_resize" style="visibility:hidden;" />
-   </body>
-   </html>
-</xsl:template>
-
-<xsl:template match="/window" mode="buttons">
-   <xsl:if test='@close and @close="true"'>
-      <div class="im-window-button im-window-closebutton" style="z-index:6000;right:4px" onclick="im_win.windowClose(this.parentNode.id);" />
-   </xsl:if>
-
-   <xsl:if test='@maximize and @maximize="true"'>
-      <xsl:choose>
-         <xsl:when test='@close and @close="true"'>
-            <div class="im-window-button im-window-maximizerestorebutton" style="z-index:6000;right:20px" onclick="im_win.windowMaximizeRestore(this.parentNode.id);" />
-         </xsl:when>
-         <xsl:otherwise>
-            <div class="im-window-button im-window-maximizerestorebutton" style="z-index:6000;right:4px" onclick="im_win.windowMaximizeRestore(this.parentNode.id);" />
-         </xsl:otherwise>
-      </xsl:choose>
-   </xsl:if>
-
-   <xsl:if test='@minimize and @minimize="true"'>
-      <xsl:choose>
-         <xsl:when test='@close and @close="true" and @maximize and @maximize="true"'>
-            <div class="im-window-button im-window-minimizebutton" style="z-index:6000;right:36px" onclick="im_win.windowMinimize(this.parentNode.id);" />
-         </xsl:when>
-         <xsl:when test='(@close and @close="true" or @maximize and @maximize="true") and not (@close and @close="true" and @maximize and @maximize="true")'>
-            <div class="im-window-button im-window-minimizebutton" style="z-index:6000;right:20px" onclick="im_win.windowMinimize(this.parentNode.id);" />
-         </xsl:when>
-         <xsl:otherwise>
-            <div class="im-window-button im-window-minimizebutton" style="z-index:6000;right:4px" onclick="im_win.windowMinimize(this.parentNode.id);" />
-         </xsl:otherwise>
-      </xsl:choose>
-   </xsl:if>
+	<div id="{name}_window_master" style="width:{width};" class="window" onmousedown="javascript:drag_drop.drag(event,this); javascript:im_window.window_focus(this);" dragdrop="true">
+		<b class="corner blackcorner">
+			<b class="corner1 blackcorner1"><b></b></b>
+			<b class="corner2 blackcorner2"><b></b></b>
+			<b class="corner3 blackcorner3"></b>
+			<b class="corner4 blackcorner4"></b>
+			<b class="corner5 blackcorner5"></b>
+		</b>
+		<div class="titulo" dragdrop="true">
+			<span id="{name}_window_title" style="float:left;" dragdrop="true">
+				<xsl:value-of select="title" />
+			</span>
+			<div id="{name}_window_title_buttons" style="float:right;">
+				<div id="{name}_button_minimize" style="display: {pButMin};" class="button_minimize" onclick="javascript:im_window.window_minimize('{name}');"></div>
+				<div id="{name}_button_maximize" style="display: {pButMax};" class="button_maximize1" onclick="javascript:im_window.window_maximize('{name}');"></div>
+				<div id="{name}_button_close" style="display: {pButClose};" class="button_close" onclick="javascript:im_window.window_close('{name}');"></div>
+			</div>
+		</div>
+		<div id="{name}_window_body" class="body">
+			<div id="{name}_window_body_content" class="content" style="overflow:auto;">
+				<xsl:copy-of select="content" />
+			</div>
+		</div>
+		<div id="{name}_window_bottom" class="rodape" dragdrop="false"></div>
+	</div>
 </xsl:template>
 
