--- a/emailuis/emailui/data/html/email_rtl.html Wed Apr 14 15:42:15 2010 +0300
+++ b/emailuis/emailui/data/html/email_rtl.html Tue Apr 27 16:20:14 2010 +0300
@@ -1,19 +1,21 @@
<html dir="rtl">
<header>
<script language="javascript">
-function setEmailBodyDirection()
- {
- var bodyFrame = document.getElementById("body_frame");
- bodyFrame.contentWindow.document.body.dir = "rtl";
- bodyFrame.contentWindow.document.body.align = "right"
- }
+function setEmailBodyDirection() {
+ var htmlTagName = "html";
+ var d = document.getElementById("body_frame").contentWindow.document;
+ var a = d.getElementsByTagName(htmlTagName);
+ if (a.length > 0 ) {
+ a[0].setAttribute("dir", "rtl");
+ }
+}
onload=setEmailBodyDirection;
</script>
<script language="javascript" src="email.js"></script>
</header>
<frameset rows="10%,*" border="0" id="email_frameSet" onLoad="hideImages('body_frame')">
<frame id="header_frame" src="header.html" >
-<frame id="body_frame" src="temp/body.html" >
+<frame id="body_frame" src="temp/body.html" onLoad="setEmailBodyDirection()" >
</frameset>
</html>