<html>
<head>
<script language=JavaScript>

var d = document;
var activeEditor = opener._de_E;
var pFrame = opener._de_E;

window.onload = function(){
	if (d.all){
		pFrame = d.frames["pFrame"].document;
		pFrame.body.contentEditable="true";
	} else {
		pFrame = getE("pFrame").contentDocument;
		pFrame.designMode="on";
	};
	this.focus();
}

function getE(id){
	return d.getElementById(id)
}

// paste data to editor
function doPaste() {
	text = pFrame.body.innerHTML;

	// clear data
	switch (activeEditor.pasteMethod){
		case "plaintext":
			//text = text.replace(/(\n)/gi,"");
			text = text.replace(/(\r)/gi,"");
			text = text.replace(/<br\/?>/gi,"\n");
			text = text.replace(/<[^>]+>/g,"");
			text = text.replace(/&lt;/g,"<");
			text = text.replace(/&gt;/g,">");
			text = text.replace(/&nbsp;/g," "); 
			text = text.replace( /\n/g, '<br/>' ) ;			
			break;
		case "wordtext":
			text = opener._de_Util.clearCode(text);
			break;
		default :

	}

	activeEditor._inserthtml(text);
	window.close();
}

document.onkeydown = function (evt) { 
	evt = (evt)?evt:(window.event)?window.event:""
	if (evt.keyCode == 13) {	// ENTER
		doPaste()
	}
};

</script>
<title>[sTxtSpecialPasteTitle]</title>
<script type="text/javascript">
	document.write('<link rel="stylesheet" href="'+window.opener._de_E.skinPath+'styles.css" type="text/css">');
</script>
</head>
<body class="de_dialogWindow">
<form name=formForm>
<div class="de_appOutside">
<div style="border: solid 1px #000000; background-color: #FFFFEE; padding:5px;">
	<img src="images/bulb.gif" align=left width=16 height=17>
	<span id="TxtSpecialPaste">[sTxtSpecialPaste]</span>
</div>
<br>

<table border="0" cellspacing="0" cellpadding="0" style="width:92%">
  <tr>
	<td>
		<!-- Editable frame -->
		<iframe id="pFrame" name="pFrame" src="javascript:void(0);" style="background-color:white;border:1px solid black;width:450px;height:280px;">
		</iframe>
	</td>
  </tr>
</table>

</div>
<div style="padding-top: 6px; float: right;">
<input type="button" name="insertForm" id="TxtOK" value="[sTxtOK]" class="de_Text75" onClick="javascript:doPaste();">
<input type="button" name="Submit" id="TxtCancel" value="[sTxtCancel]" class="de_Text75" onClick="javascript:window.close()">
</div>
</form>
</body>
</html>