<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta HTTP-EQUIV=Expires CONTENT=0>
<Link rel="stylesheet" type="text/css" href="pop.css">
<script language="JavaScript">
var sAction = "INSERT";
var sTitle = "&#25554;&#20837;";
var oControl;
var oSeletion;
var sRangeType;
var sFromUrl = "http://";
var sAlt = "";
var sBorder = "0";
var sBorderColor = "#000000";
var sFilter = "";
var sAlign = "";
var sWidth = "";
var sHeight = "";
var sVSpace = "";
var sHSpace = "";
var sCheckFlag = "file";
oSelection = dialogArguments.Dvbbs_Composition.document.selection.createRange();
sRangeType = dialogArguments.Dvbbs_Composition.document.selection.type;
if (sRangeType == "Control") {
	if (oSelection.item(0).tagName == "IMG"){
		sAction = "MODI";
		sTitle = "&#20462;&#25913;";
		sCheckFlag = "url";
		oControl = oSelection.item(0);
		sFromUrl = oControl.src;
		sAlt = oControl.alt;
		sBorder = oControl.border;
		sAlign = oControl.align;
		sWidth = oControl.width;
		sHeight = oControl.height;

	}
}

document.write("<title>Dvbbs&#22810;&#21151;&#33021;&#32534;&#36753;&#22120;--&#22270;&#29255;&#23646;&#24615;&#65288;" + sTitle + "&#65289;</title>");

// &#21021;&#22987;&#20540;
function InitDocument(){
	SearchSelectValue(d_align, sAlign.toLowerCase());
	d_fromurl.value = sFromUrl;
	d_border.value = sBorder;
	d_width.value = sWidth;
	d_height.value = sHeight;
	showimages();
}

// &#25628;&#32034;&#19979;&#25289;&#26694;&#20540;&#19982;&#25351;&#23450;&#20540;&#21305;&#37197;&#65292;&#24182;&#36873;&#25321;&#21305;&#37197;&#39033;
function SearchSelectValue(o_Select, s_Value){
	for (var i=0;i<o_Select.length;i++){
		if (o_Select.options[i].value == s_Value){
			o_Select.selectedIndex = i;
			return true;
		}
	}
	return false;
}

// &#26412;&#31383;&#21475;&#36820;&#22238;&#20540;
function ReturnValue(){
	sFromUrl = d_fromurl.value;
	sBorder = d_border.value;
	sAlign = d_align.value;
	sWidth = d_width.value;
	sHeight = d_height.value;
	if (sAction == "MODI") {
		oControl.src = sFromUrl;
		oControl.alt = sAlt;
		oControl.border = sBorder;
		oControl.align = sAlign;
		oControl.width = sWidth;
		oControl.height = sHeight;
	}else{
		var sHTML = '<img src="'+sFromUrl+'" border="'+sBorder+'" align="'+sAlign+'"';
		if (sWidth!=""){
			sHTML=sHTML+' width="'+sWidth+'"';
		}
		if (sHeight!=""){
			sHTML=sHTML+' height="'+sHeight+'"';
		}
		sHTML = sHTML+'>';
	}
	if (sFromUrl.length<10){sHTML='';}
	window.returnValue = sHTML;
	window.close();
}

function showimages(){
	sFromUrl = d_fromurl.value;
	sBorder = d_border.value;
	sAlign = d_align.value;
	sWidth = d_width.value;
	sHeight = d_height.value;
	var sHTML = '<img src="'+sFromUrl+'" border="'+sBorder+'" align="'+sAlign+'"';
	if (sWidth!=""){
		sHTML=sHTML+' width="'+sWidth+'"';
	}
	if (sHeight!=""){
		sHTML=sHTML+' height="'+sHeight+'"';
	}
	sHTML = sHTML+'>';
	if (sFromUrl.length<10){sHTML='';}
	document.getElementById('showimage').innerHTML = sHTML;
}

// &#28857;&#30830;&#23450;&#26102;&#25191;&#34892;
function ok(){
	// &#25968;&#23383;&#22411;&#36755;&#20837;&#30340;&#26377;&#25928;&#24615;
	d_border.value = ToInt(d_border.value);
	d_width.value = ToInt(d_width.value);
	d_height.value = ToInt(d_height.value);
	ReturnValue();
}
// &#26159;&#21542;&#26377;&#25928;&#39068;&#33394;&#20540;
function IsColor(color){
	var temp=color;
	if (temp=="") return true;
	if (temp.length!=7) return false;
	return (temp.search(/\#[a-fA-F0-9]{6}/) != -1);
}
// &#36716;&#20026;&#25968;&#23383;&#22411;&#65292;&#24182;&#26080;&#21069;&#23548;0&#65292;&#19981;&#33021;&#36716;&#21017;&#36820;&#22238;""
function ToInt(str){
	str=BaseTrim(str);
	if (str!=""){
		var sTemp=parseFloat(str);
		if (isNaN(sTemp)){
			str="";
		}else{
			str=sTemp;
		}
	}
	return str;
}
// &#36716;&#20026;&#25968;&#23383;&#22411;&#65292;&#24182;&#26080;&#21069;&#23548;0&#65292;&#19981;&#33021;&#36716;&#21017;&#36820;&#22238;""
function ToInt(str){
	str=BaseTrim(str);
	if (str!=""){
		var sTemp=parseFloat(str);
		if (isNaN(sTemp)){
			str="";
		}else{
			str=sTemp;
		}
	}
	return str;
}
// &#22522;&#26412;&#20449;&#24687;&#25552;&#31034;&#65292;&#24471;&#21040;&#28966;&#28857;&#24182;&#36873;&#23450;
function BaseAlert(theText,notice){
	alert(notice);
	theText.focus();
	theText.select();
	return false;
}
// &#21482;&#20801;&#35768;&#36755;&#20837;&#25968;&#23383;
function IsDigit(){
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
// &#36873;&#39068;&#33394;
function SelectColor(what){
	var dEL = document.all("d_"+what);
	var sEL = document.all("s_"+what);
	var arr = showModalDialog("selcolor.html", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0; help:0");
	if (arr) {
		dEL.value=arr;
		sEL.style.backgroundColor=arr;
	}
}
// &#21435;&#31354;&#26684;&#65292;left,right,all&#21487;&#36873;
function BaseTrim(str){
	  lIdx=0;rIdx=str.length;
	  if (BaseTrim.arguments.length==2)
	    act=BaseTrim.arguments[1].toLowerCase()
	  else
	    act="all"
      for(var i=0;i<str.length;i++){
	  	thelStr=str.substring(lIdx,lIdx+1)
		therStr=str.substring(rIdx,rIdx-1)
        if ((act=="all" || act=="left") && thelStr==" "){
			lIdx++
        }
        if ((act=="all" || act=="right") && therStr==" "){
			rIdx--
        }
      }
	  str=str.slice(lIdx,rIdx)
      return str
}
</script>
<BODY bgColor=menu onload="InitDocument()">
<table border=0 cellpadding=0 cellspacing=0 align=center width="97%">
<tr>
<td>
	<fieldset>
	<legend>&#22270;&#29255;&#26469;&#28304;</legend>
	<table border=0 cellpadding=2 cellspacing=0 width="100%">
		<tr><td colspan=5 height=5></td></tr>
		<tr>
			<td width=7></td>
			<td width=54 align=right>&#32593;&#32476;:</td>
			<td width=5></td>
			<td width="*"><input type=text id="d_fromurl" style="width:200px" size=30 value="http://" onkeyup="showimages()" ></td>
			<td width=7></td>
		</tr>
		<tr><td colspan=5 height=5></td></tr>
	</table>
	</fieldset>
	</td>
	<td width="250" height="*" rowspan="4" valign=top>
	<fieldset>
	<legend>&#22270;&#29255;&#39044;&#35272;</legend>
	<table border=0 cellpadding=0 cellspacing=0 height="100%">
	<tr><td height=5></td></tr>
	<tr>
		<td height="*" id=showimage> </td>
	</tr>
	<tr><td height=5></td></tr>
	</table>
	</fieldset>
</td>
</tr>
<tr><td height=5></td></tr>
<tr>
	<td>
	<fieldset>
	<legend>&#22270;&#29255;&#23646;&#24615;</legend>
	<table border=0 cellpadding=0 cellspacing=0>
	<tr><td colspan=8 height=5></td></tr>
	<tr><td colspan=8 height=5></td></tr>
	<tr>
		<td width=2></td>
		<td width=60 noWrap>&#36793;&#26694;&#31895;&#32454;:</td>
		<td width=5></td>
		<td width=2><input type=text id=d_border size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" onkeyup="showimages()" ></td>
		<td width=7></td>
		<td width=60 noWrap>&#23545;&#40784;&#26041;&#24335;:</td>
		<td width=5></td>
		<td width=2>
			<select id=d_align size=1 style="width:72px" onchange="showimages()">
			<option value='' selected>&#40664;&#35748;</option>
			<option value='left'>&#23621;&#24038;</option>
			<option value='right'>&#23621;&#21491;</option>
			<option value='top'>&#39030;&#37096;</option>
			<option value='middle'>&#20013;&#37096;</option>
			<option value='bottom'>&#24213;&#37096;</option>
			<option value='absmiddle'>&#32477;&#23545;&#23621;&#20013;</option>
			<option value='absbottom'>&#32477;&#23545;&#24213;&#37096;</option>
			<option value='baseline'>&#22522;&#32447;</option>
			<option value='texttop'>&#25991;&#26412;&#39030;&#37096;</option>
			</select>
		</td>
	</tr>
	<tr><td colspan=9 height=5></td></tr>
	<tr>
		<td></td>
		<td width=60 noWrap>&#22270;&#29255;&#23485;&#24230;:</td>
		<td ></td>
		<td width=2><input type=text id=d_width size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" onkeyup="showimages()" maxlength=4></td>
		<td ></td>
		<td width=60 noWrap>&#22270;&#29255;&#39640;&#24230;:</td>
		<td ></td>
		<td width=2><input type=text id=d_height size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" onkeyup="showimages()" maxlength=4></td>
	</tr>
	<tr><td colspan=8 height=5></td></tr>
	</table>
	</fieldset>
	</td>
</tr>
<tr><td height=5 ></td></tr>
<tr>
<td align=center ><input type=submit value='  &#30830;&#23450;  ' id=Ok onclick="ok()">&nbsp;&nbsp;
<input type=button value='  &#21462;&#28040;  ' onclick="window.close();"></td>
</tr>
</table>
</body>
</html>