1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2<!--
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
5 *
6 * == BEGIN LICENSE ==
7 *
8 * Licensed under the terms of any of the following licenses at your
9 * choice:
10 *
11 *  - GNU General Public License Version 2 or later (the "GPL")
12 *    http://www.gnu.org/licenses/gpl.html
13 *
14 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15 *    http://www.gnu.org/licenses/lgpl.html
16 *
17 *  - Mozilla Public License Version 1.1 or later (the "MPL")
18 *    http://www.mozilla.org/MPL/MPL-1.1.html
19 *
20 * == END LICENSE ==
21 *
22 * Smileys (emoticons) dialog window.
23-->
24<html xmlns="http://www.w3.org/1999/xhtml">
25<head>
26	<title></title>
27	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
28	<meta name="robots" content="noindex, nofollow" />
29	<style type="text/css">
30		.Hand
31		{
32			cursor: pointer;
33			cursor: hand;
34		}
35	</style>
36	<script type="text/javascript">
37
38var oEditor = window.parent.InnerDialogLoaded() ;
39
40window.onload = function ()
41{
42	// First of all, translate the dialog box texts
43	oEditor.FCKLanguageManager.TranslatePage(document) ;
44}
45
46function InsertSmiley( url )
47{
48	oEditor.FCKUndo.SaveUndoStep() ;
49	var oImg = oEditor.FCK.InsertElement( 'img' ) ;
50	oImg.src = url ;
51	oImg.setAttribute( '_fcksavedurl', url ) ;
52
53	// For long smileys list, it seams that IE continues loading the images in
54	// the background when you quickly select one image. so, let's clear
55	// everything before closing.
56	document.body.innerHTML = '' ;
57
58	window.parent.Cancel() ;
59}
60
61function over(td)
62{
63	td.className = 'LightBackground Hand' ;
64}
65
66function out(td)
67{
68	td.className = 'DarkBackground Hand' ;
69}
70	</script>
71</head>
72<body scroll="no">
73	<table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">
74		<script type="text/javascript">
75
76var FCKConfig = oEditor.FCKConfig ;
77
78var sBasePath	= FCKConfig.SmileyPath ;
79var aImages		= FCKConfig.SmileyImages ;
80var iCols		= FCKConfig.SmileyColumns ;
81var iColWidth	= parseInt( 100 / iCols, 10 ) ;
82
83var i = 0 ;
84while (i < aImages.length)
85{
86	document.write( '<tr>' ) ;
87	for(var j = 0 ; j < iCols ; j++)
88	{
89		if (aImages[i])
90		{
91			var sUrl = sBasePath + aImages[i] ;
92			document.write( '<td width="' + iColWidth + '%" align="center" class="DarkBackground Hand" onclick="InsertSmiley(\'' + sUrl.replace(/'/g, "\\'" ) + '\')" onmouseover="over(this)" onmouseout="out(this)">' ) ;
93			document.write( '<img src="' + sUrl + '" border="0" />' ) ;
94		}
95		else
96			document.write( '<td width="' + iColWidth + '%" class="DarkBackground">&nbsp;' ) ;
97		document.write( '<\/td>' ) ;
98		i++ ;
99	}
100	document.write('<\/tr>') ;
101}
102
103		</script>
104	</table>
105</body>
106</html>
107