var escpath;
var pagepath;
var obj;
var transformType="";
var fieldType="";
var escType=1;
var dialogHead="<table class='attribtes'><tr><th width='130'>数据类型&nbsp;</th><th width='120'>属性名&nbsp;</th><th width='285'>属性值</th><th>&nbsp;提示</th></tr>";
var pagingNo="<eqml:pagingno count=\"10\" index=\"5\">\r\n<eqml:if test=\"{$pageno} != 1 && {$pagecount} > 10\"><a href=\"{$firstpageurl}\">首页</a>&nbsp;<a href=\"{$prevpageurl}\">上一页</a>&nbsp;</eqml:if>\r\n<eqml:pl><a href=\"{$url}\">{$no}</a>&nbsp;</eqml:pl>{$pageno}&nbsp;<eqml:pr><a href=\"{$url}\">{$no}</a>&nbsp;</eqml:pr>\r\n<eqml:if test=\"{$pagecount} != {$pageno} && {$pagecount} > 10\"><a href=\"{$nextpageurl}\">下一页</a>&nbsp;<a href=\"{$lastpageurl}\">尾页</a>&nbsp;</eqml:if>\r\n<eqml:if test=\"{$pagecount} > 10\"><form id=\"{$pagenoname}\" action=\"{$pagenourl}\" method=\"post\" onsubmit=\"if(document.getElementById('{$pagenoname}').{$pagenoname}.value>0&&document.getElementById('{$pagenoname}').{$pagenoname}.value<={$pagecount}&&document.getElementById('{$pagenoname}').{$pagenoname}.value!={$pageno}){if(document.getElementById('{$pagenoname}').{$pagenoname}.value>1){document.getElementById('{$pagenoname}').action+='pageno'+document.getElementById('{$pagenoname}').{$pagenoname}.value;}document.getElementById('{$pagenoname}').action+='.shtml';}else{return false;}\"><input name=\"{$pagenoname}\" type=\"text\" value=\"{$pagecount}\" size=\"5\"/><button type=\"submit\">跳页</button></form></eqml:if>\r\n</eqml:pagingno>";

function bw(o,value){
OnElementClick(o);
InsertText(value);
}

function sy(o,value){
OnElementClick(o);
InsertText(value);
}

function ap(o,t){
transformType=t;
OnElementClick(o);
var content="变量名称:<input id='name'/><button type=\"button\" id=\"yes\" onclick=\"apOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button>";
EasyMask.init({ width: 455, height: 70, title: 'Application变量', detail: content });
$("name").focus(); 
}

function se(o,t){
transformType=t;
OnElementClick(o);
var content="变量名称:<input id='name'/><button type=\"button\" id=\"yes\" onclick=\"seOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button>";
EasyMask.init({ width: 455, height: 70, title: 'Session变量', detail: content });
$("name").focus(); 
}

function co(o,t){
transformType=t;
OnElementClick(o);
var content="<table class='attribtes'>";
content+="<tr><td>Cookie名称</td><td><input id='cookie' value=''/></td></tr>";
content+="<tr><td>变量名称</td><td><input id='key' value=''/></td></tr>";
content+="<tr><td align=\"right\" colspan=\"2\"><button type=\"button\" id=\"yes\" onclick=\"coOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 390, height: 136, title: '获取Cookie变量值', detail: content });
$("cookiename").focus(); 
}

function eqmlurl(o){
OnElementClick(o);
var content="<table class='attribtes'>";
content+="<tr><td>参数名称</td><td><input id='keyname' value=''/></td></tr>";
content+="<tr><td>参数值</td><td><input id='keyvalue' value=''/></td></tr>";
content+="<tr><td align=\"right\" colspan=\"2\"><button type=\"button\" id=\"yes\" onclick=\"urlOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 390, height: 136, title: '向本页传参数的url', detail: content });
$("keyname").focus(); 
}

function re(o,t){
transformType=t;
OnElementClick(o);
var content="变量名称:<input id='name'/><button type=\"button\" id=\"yes\" onclick=\"reOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button>";
EasyMask.init({ width: 455, height: 70, title: 'Request变量', detail: content });
$("name").focus(); 
}

function qu(o,t){
transformType=t;
OnElementClick(o);
var content="变量名称:<input id='name'/><button type=\"button\" id=\"yes\" onclick=\"quOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button>";
EasyMask.init({ width: 455, height: 70, title: 'QueryString变量', detail: content });
$("name").focus(); 
}

function fo(o,t){
transformType=t;
OnElementClick(o);
var content="变量名称:<input id='name'/><button type=\"button\" id=\"yes\" onclick=\"foOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button>";
EasyMask.init({ width: 455, height: 70, title: 'Form变量', detail: content });
$("name").focus(); 
}

function eqmlcontrol1(o){
eqmlcontrol(o);
escType=1;
}

function eqmlcontrol2(o){
eqmlcontrol(o);
escType=2;
}

function eqmlcontrol(o){
OnElementClick(o);
var content="";
if(document.client.BSDevelopExtension.value==".esc"&&document.client.BSDevelopName.value!=""){
content="<iframe src=\"selectfile.ashx?extension=.esc\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"100%\"></iframe>";
}
else{
content="<iframe src=\"selectfile.ashx?extension=.esc\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"100%\"></iframe>";
}
EasyMask.init({ width: 700, height: 400, padding:"0", title: '选取控件文件(后缀名.esc)', detail: content });
}

function eqmlpageurl(o){
escType=3;
OnElementClick(o);
var content="<iframe src=\"selectfile.ashx?extension=esp\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"100%\"></iframe>";
EasyMask.init({ width: 700, height: 400, padding:"0",title: '选取要链接的文件(后缀名.esp)', detail: content });
}

function eqmlmember(o){
OnElementClick(o);
InsertText("<eqml:member>\r\n        //private string demo1;\r\n        //private void demo2()\r\n        //{\r\n        //}\r\n</eqml:member>");
}

function eqmlexecute(o){
OnElementClick(o);
InsertText("<eqml:execute>\r\n            //string demo1=\"hello!\";\r\n            //result.Append(demo1);\r\n</eqml:execute>");
}

function eqmlout(o){
OnElementClick(o);
InsertText("<eqml:out></eqml:out>");
}

function eqmlonce(o){
OnElementClick(o);
InsertText("<eqml:once>...输出...</eqml:once>");
}

function eqmlif(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>bool</td><td>test</td><td><input id='test' value='true'/></td><td>规定测试的条件(放空则默认为:true)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"ifOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 130, title: '&lt;eqml:if&gt;', detail: content });
$("test").focus(); 
}

function eqmlchoose(o){
OnElementClick(o);
InsertText("<eqml:choose>\r\n\r\n</eqml:choose>");
}

function eqmlwhen(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>bool</td><td>test</td><td><input id='test' value='true'/></td><td>规定测试的条件(放空则默认为:true)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"whenOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 130, title: '&lt;eqml:when&gt;', detail: content });
$("test").focus(); 
}

function eqmlotherwise(o){
OnElementClick(o);
InsertText("<eqml:otherwise>\r\n\r\n</eqml:otherwise>");
}

function eqmltry(o){
OnElementClick(o);
InsertText("<eqml:try>\r\n\r\n<eqml:catch>\r\n{$message}\r\n</eqml:catch>\r\n</eqml:try>");
}

function eqmlcatch(o){
OnElementClick(o);
InsertText("<eqml:catch>\r\n{$message}\r\n</eqml:catch>");
}

function eqmlfor(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int / double</td><td>from</td><td><input id='from' value='1'/></td><td>从(放空则默认为:1)</td></tr>";
content+="<tr><td>int / double</td><td>to</td><td><input id='to' value='1'/></td><td>到(放空则默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"forOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '&lt;eqml:for&gt;', detail: content });
$("from").focus(); 
}

function eqmltotext(o){
OnElementClick(o);
InsertText("<eqml:htmltotext></eqml:htmltotext>");
}

function eqmlhtmlencode(o){
OnElementClick(o);
InsertText("<eqml:htmlencode></eqml:htmlencode>");
}

function eqmlurlencode(o){
OnElementClick(o);
InsertText("<eqml:urlencode></eqml:urlencode>");
}

function eqmlsubtext(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>length</td><td><input id='length' value='50'/></td><td>要截取的字节数(放空则默认为:50)</td></tr>";
content+="<tr><td>string</td><td>moretext</td><td><input id='moretext' value='...'/></td><td>超出指定字节数时后缀提示</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"subtextOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '&lt;eqml:subtext&gt;', detail: content });
$("length").focus(); 
}

function eqmlsubstring(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>length</td><td><input id='length' value='50'/></td><td>要截取的字符数(放空则默认为:50)</td></tr>";
content+="<tr><td>string</td><td>moretext</td><td><input id='moretext' value='...'/></td><td>超出指定字符数时后缀提示</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"substringOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '&lt;eqml:substring&gt;', detail: content });
$("length").focus(); 
}

function eqmllanguage(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>string</td><td>source</td><td><select id='source'>";
content+="<option value='simplifiedchinese'>简体中文</option>";
content+="<option value='traditionalchinese'>繁体中文</option>";
content+="<option value='english'>英语</option>";
content+="<option value='arabic'>阿拉伯语</option>";
content+="<option value='russian'>俄语</option>";
content+="<option value='german'>德语</option>";
content+="<option value='french'>法语</option>";
content+="<option value='italian'>意大利语</option>";
content+="<option value='spanish'>西班牙语</option>";
content+="<option value='portuguese'>葡萄牙语</option>";
content+="<option value='japanese'>日语</option>";
content+="<option value='korean'>韩语</option>";
content+="<option value='thai'>泰语</option>";
content+="<option value='vietnamese'>越南语</option>";
content+="<option value='other'>其它</option>";
content+="</select></td><td>源语言</td></tr>";
content+="<tr><td>string</td><td>dest</td><td><select id='dest'>";
content+="<option value='{$qus.language}'>当前使用的语言</option>";
content+="<option value='simplifiedchinese'>简体中文</option>";
content+="<option value='traditionalchinese'>繁体中文</option>";
content+="<option value='english'>英语</option>";
content+="<option value='arabic'>阿拉伯语</option>";
content+="<option value='russian'>俄语</option>";
content+="<option value='german'>德语</option>";
content+="<option value='french'>法语</option>";
content+="<option value='italian'>意大利语</option>";
content+="<option value='spanish'>西班牙语</option>";
content+="<option value='portuguese'>葡萄牙语</option>";
content+="<option value='japanese'>日语</option>";
content+="<option value='korean'>韩语</option>";
content+="<option value='thai'>泰语</option>";
content+="<option value='vietnamese'>越南语</option>";
content+="<option value='other'>其它</option>";
content+="</select></td><td>目标语言</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"languageOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '&lt;eqml:language&gt;', detail: content });
$("source").focus(); 
}

function eqmlstringpaging(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>pagelength</td><td><input id='pagelength' value='500'/></td><td>每页几个字符(放空则默认为:500)</td></tr>";
content+="<tr><td>int</td><td>pageno</td><td><input id='pageno' value='1'/></td><td>返回第几页数据(放空则默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"stringpagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '&lt;eqml:stringpaging&gt;', detail: content });
$("pagelength").focus();
}

function eqmlstring(o){
OnElementClick(o);
InsertText("<eqml:string>...要进行分页的数据...</eqml:string>");
}

function eqmldateformat(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>HaiLi.DateTime</td><td>date</td><td><input id='date' value='{$now}'/></td><td>要格式化的日期数据</td></tr>";
content+="<tr><td>string</td><td>ingmt</td><td><select id='ingmt'>";
content+="<option value='-12:00'>(GMT-12:00) 日界线西</option>";
content+="<option value='-11:00'>(GMT-11:00) 萨摩亚群岛</option>";
content+="<option value='-10:00'>(GMT-10:00) 夏威夷</option>";
content+="<option value='-09:00'>(GMT-09:00) 阿拉斯加</option>";
content+="<option value='-08:00'>(GMT-08:00) 太平洋时间(美国和加拿大)</option>";
content+="<option value='-08:00'>(GMT-08:00) 下加利福尼亚州</option>";
content+="<option value='-07:00'>(GMT-07:00) 奇瓦瓦,拉巴斯,马萨特兰(旧)</option>";
content+="<option value='-07:00'>(GMT-07:00) 奇瓦瓦,拉巴斯,马萨特兰(新)</option>";
content+="<option value='-07:00'>(GMT-07:00) 山地时间(美国和加拿大)</option>";
content+="<option value='-07:00'>(GMT-07:00) 亚利桑那</option>";
content+="<option value='-06:00'>(GMT-06:00) 瓜达拉哈拉,墨西哥城,蒙特雷(旧)</option>";
content+="<option value='-06:00'>(GMT-06:00) 瓜达拉哈拉,墨西哥城,蒙特雷(新)</option>";
content+="<option value='-06:00'>(GMT-06:00) 萨斯喀彻温</option>";
content+="<option value='-06:00'>(GMT-06:00) 中部时间(美国和加拿大)</option>";
content+="<option value='-06:00'>(GMT-06:00) 中美洲</option>";
content+="<option value='-05:00'>(GMT-05:00) 波哥大,利马,基多</option>";
content+="<option value='-05:00'>(GMT-05:00) 东部时间(美国和加拿大)</option>";
content+="<option value='-05:00'>(GMT-05:00) 印地安那州(东部)</option>";
content+="<option value='-04:30'>(GMT-04:30) 加拉加斯</option>";
content+="<option value='-04:00'>(GMT-04:00) 大西洋时间(加拿大)</option>";
content+="<option value='-04:00'>(GMT-04:00) 库亚巴</option>";
content+="<option value='-04:00'>(GMT-04:00) 乔治敦,拉巴斯,马瑙斯,圣胡安</option>";
content+="<option value='-04:00'>(GMT-04:00) 圣地亚哥</option>";
content+="<option value='-04:00'>(GMT-04:00) 亚松森</option>";
content+="<option value='-03:30'>(GMT-03:30) 纽芬兰</option>";
content+="<option value='-03:00'>(GMT-03:00) 巴西利亚</option>";
content+="<option value='-03:00'>(GMT-03:00) 布宜诺斯艾利斯</option>";
content+="<option value='-03:00'>(GMT-03:00) 格陵兰</option>";
content+="<option value='-03:00'>(GMT-03:00) 卡宴,福塔雷萨</option>";
content+="<option value='-02:00'>(GMT-02:00) 协调世界时-02</option>";
content+="<option value='-02:00'>(GMT-02:00) 中大西洋</option>";
content+="<option value='-01:00>(GMT-01:00) 佛得角群岛</option>";
content+="<option value='-01:00'>(GMT-01:00) 亚速尔群岛</option>";
content+="<option value=''>(GMT) 格林威治标准时间:都柏林,爱丁堡,伦敦,里斯本</option>";
content+="<option value=''>(GMT) 卡萨布兰卡</option>";
content+="<option value=''>(GMT) 蒙罗维亚,雷克雅未克</option>";
content+="<option value=''>(GMT) 协调世界时</option>";
content+="<option value='+01:00'>(GMT+01:00) 阿姆斯特丹,柏林,伯尔尼,罗马,斯德哥尔摩,维也纳</option>";
content+="<option value='+01:00'>(GMT+01:00) 贝尔格莱德,布拉迪斯拉发,布达佩斯,卢布尔雅那,布拉格</option>";
content+="<option value='+01:00'>(GMT+01:00) 布鲁塞尔,哥本哈根,马德里,巴黎</option>";
content+="<option value='+01:00'>(GMT+01:00) 萨拉热窝,斯科普里,华沙,萨格勒布</option>";
content+="<option value='+01:00'>(GMT+01:00) 中非西部</option>";
content+="<option value='+02:00'>(GMT+02:00) 安曼</option>";
content+="<option value='+02:00'>(GMT+02:00) 贝鲁特</option>";
content+="<option value='+02:00'>(GMT+02:00) 大马士革</option>";
content+="<option value='+02:00'>(GMT+02:00) 哈拉雷,比勒陀利亚</option>";
content+="<option value='+02:00'>(GMT+02:00) 赫尔辛基,基辅,里加,索非亚,塔林,维尔纽斯</option>";
content+="<option value='+02:00'>(GMT+02:00) 开罗</option>";
content+="<option value='+02:00'>(GMT+02:00) 明斯克</option>";
content+="<option value='+02:00'>(GMT+02:00) 温得和克</option>";
content+="<option value='+02:00'>(GMT+02:00) 雅典,布加勒斯特,伊斯坦布尔</option>";
content+="<option value='+02:00'>(GMT+02:00) 耶路撒冷</option>";
content+="<option value='+03:00'>(GMT+03:00) 巴格达</option>";
content+="<option value='+03:00'>(GMT+03:00) 科威特,利雅得</option>";
content+="<option value='+03:00'>(GMT+03:00) 莫斯科,圣彼得堡,伏尔加格勒</option>";
content+="<option value='+03:00'>(GMT+03:00) 内罗毕</option>";
content+="<option value='+03:30'>(GMT+03:30) 德黑兰</option>";
content+="<option value='+04:00'>(GMT+04:00) 阿布扎比,马斯喀特</option>";
content+="<option value='+04:00'>(GMT+04:00) 埃里温</option>";
content+="<option value='+04:00'>(GMT+04:00) 巴库</option>";
content+="<option value='+04:00'>(GMT+04:00) 第比利斯</option>";
content+="<option value='+04:00'>(GMT+04:00) 高加索标准时间</option>";
content+="<option value='+04:00'>(GMT+04:00) 路易港</option>";
content+="<option value='+04:30'>(GMT+04:30) 喀布尔</option>";
content+="<option value='+05:00'>(GMT+05:00) 塔什干</option>";
content+="<option value='+05:00'>(GMT+05:00) 叶卡捷琳堡</option>";
content+="<option value='+05:00'>(GMT+05:00) 伊斯兰堡,卡拉奇</option>";
content+="<option value='+05:30'>(GMT+05:30) 马德拉斯,加尔各答,孟买,新德里</option>";
content+="<option value='+05:30'>(GMT+05:30) 斯里哈亚华登尼普拉</option>";
content+="<option value='+05:45'>(GMT+05:45) 加德满都</option>";
content+="<option value='+06:00'>(GMT+06:00) 阿斯塔纳</option>";
content+="<option value='+06:00'>(GMT+06:00) 达卡</option>";
content+="<option value='+06:00'>(GMT+06:00) 新西伯利亚</option>";
content+="<option value='+06:30'>(GMT+06:30) 仰光</option>";
content+="<option value='+07:00'>(GMT+07:00) 克拉斯诺亚尔斯克</option>";
content+="<option value='+07:00'>(GMT+07:00) 曼谷,河内,雅加达</option>";
content+="<option value='+08:00' selected>(GMT+08:00) 北京,重庆,香港特别行政区,乌鲁木齐</option>";
content+="<option value='+08:00'>(GMT+08:00) 吉隆坡,新加坡</option>";
content+="<option value='+08:00'>(GMT+08:00) 珀斯</option>";
content+="<option value='+08:00'>(GMT+08:00) 台北</option>";
content+="<option value='+08:00'>(GMT+08:00) 乌兰巴托</option>";
content+="<option value='+08:00'>(GMT+08:00) 伊尔库茨克</option>";
content+="<option value='+09:00'>(GMT+09:00) 大坂,札幌,东京</option>";
content+="<option value='+09:00'>(GMT+09:00) 汉城</option>";
content+="<option value='+09:00'>(GMT+09:00) 雅库茨克</option>";
content+="<option value='+09:30'>(GMT+09:30) 阿德莱德</option>";
content+="<option value='+09:30'>(GMT+09:30) 达尔文</option>";
content+="<option value='+10:00'>(GMT+10:00) 布里斯班</option>";
content+="<option value='+10:00'>(GMT+10:00) 符拉迪沃斯托克</option>";
content+="<option value='+10:00'>(GMT+10:00) 关岛,莫尔兹比港</option>";
content+="<option value='+10:00'>(GMT+10:00) 霍巴特</option>";
content+="<option value='+10:00'>(GMT+10:00) 堪培拉,墨尔本,悉尼</option>";
content+="<option value='+11:00'>(GMT+11:00) 马加丹,索罗门群岛,新喀里多尼亚</option>";
content+="<option value='+12:00'>(GMT+12:00) 奥克兰,惠灵顿</option>";
content+="<option value='+12:00'>(GMT+12:00) 彼得罗巴甫洛夫斯克-堪察加 - 旧用</option>";
content+="<option value='+12:00'>(GMT+12:00) 斐济</option>";
content+="<option value='+12:00'>(GMT+12:00) 协调世界时+12</option>";
content+="<option value='+13:00'>(GMT+13:00) 努库阿洛法</option>";
content+="</select></td><td>输入时区(放空则默认为:+08:00)</td></tr>";
content+="<tr><td>string</td><td>outgmt</td><td><select id='outgmt'>";
content+="<option value='-12:00'>(GMT-12:00) 日界线西</option>";
content+="<option value='-11:00'>(GMT-11:00) 萨摩亚群岛</option>";
content+="<option value='-10:00'>(GMT-10:00) 夏威夷</option>";
content+="<option value='-09:00'>(GMT-09:00) 阿拉斯加</option>";
content+="<option value='-08:00'>(GMT-08:00) 太平洋时间(美国和加拿大)</option>";
content+="<option value='-08:00'>(GMT-08:00) 下加利福尼亚州</option>";
content+="<option value='-07:00'>(GMT-07:00) 奇瓦瓦,拉巴斯,马萨特兰(旧)</option>";
content+="<option value='-07:00'>(GMT-07:00) 奇瓦瓦,拉巴斯,马萨特兰(新)</option>";
content+="<option value='-07:00'>(GMT-07:00) 山地时间(美国和加拿大)</option>";
content+="<option value='-07:00'>(GMT-07:00) 亚利桑那</option>";
content+="<option value='-06:00'>(GMT-06:00) 瓜达拉哈拉,墨西哥城,蒙特雷(旧)</option>";
content+="<option value='-06:00'>(GMT-06:00) 瓜达拉哈拉,墨西哥城,蒙特雷(新)</option>";
content+="<option value='-06:00'>(GMT-06:00) 萨斯喀彻温</option>";
content+="<option value='-06:00'>(GMT-06:00) 中部时间(美国和加拿大)</option>";
content+="<option value='-06:00'>(GMT-06:00) 中美洲</option>";
content+="<option value='-05:00'>(GMT-05:00) 波哥大,利马,基多</option>";
content+="<option value='-05:00'>(GMT-05:00) 东部时间(美国和加拿大)</option>";
content+="<option value='-05:00'>(GMT-05:00) 印地安那州(东部)</option>";
content+="<option value='-04:30'>(GMT-04:30) 加拉加斯</option>";
content+="<option value='-04:00'>(GMT-04:00) 大西洋时间(加拿大)</option>";
content+="<option value='-04:00'>(GMT-04:00) 库亚巴</option>";
content+="<option value='-04:00'>(GMT-04:00) 乔治敦,拉巴斯,马瑙斯,圣胡安</option>";
content+="<option value='-04:00'>(GMT-04:00) 圣地亚哥</option>";
content+="<option value='-04:00'>(GMT-04:00) 亚松森</option>";
content+="<option value='-03:30'>(GMT-03:30) 纽芬兰</option>";
content+="<option value='-03:00'>(GMT-03:00) 巴西利亚</option>";
content+="<option value='-03:00'>(GMT-03:00) 布宜诺斯艾利斯</option>";
content+="<option value='-03:00'>(GMT-03:00) 格陵兰</option>";
content+="<option value='-03:00'>(GMT-03:00) 卡宴,福塔雷萨</option>";
content+="<option value='-02:00'>(GMT-02:00) 协调世界时-02</option>";
content+="<option value='-02:00'>(GMT-02:00) 中大西洋</option>";
content+="<option value='-01:00>(GMT-01:00) 佛得角群岛</option>";
content+="<option value='-01:00'>(GMT-01:00) 亚速尔群岛</option>";
content+="<option value=''>(GMT) 格林威治标准时间:都柏林,爱丁堡,伦敦,里斯本</option>";
content+="<option value=''>(GMT) 卡萨布兰卡</option>";
content+="<option value=''>(GMT) 蒙罗维亚,雷克雅未克</option>";
content+="<option value=''>(GMT) 协调世界时</option>";
content+="<option value='+01:00'>(GMT+01:00) 阿姆斯特丹,柏林,伯尔尼,罗马,斯德哥尔摩,维也纳</option>";
content+="<option value='+01:00'>(GMT+01:00) 贝尔格莱德,布拉迪斯拉发,布达佩斯,卢布尔雅那,布拉格</option>";
content+="<option value='+01:00'>(GMT+01:00) 布鲁塞尔,哥本哈根,马德里,巴黎</option>";
content+="<option value='+01:00'>(GMT+01:00) 萨拉热窝,斯科普里,华沙,萨格勒布</option>";
content+="<option value='+01:00'>(GMT+01:00) 中非西部</option>";
content+="<option value='+02:00'>(GMT+02:00) 安曼</option>";
content+="<option value='+02:00'>(GMT+02:00) 贝鲁特</option>";
content+="<option value='+02:00'>(GMT+02:00) 大马士革</option>";
content+="<option value='+02:00'>(GMT+02:00) 哈拉雷,比勒陀利亚</option>";
content+="<option value='+02:00'>(GMT+02:00) 赫尔辛基,基辅,里加,索非亚,塔林,维尔纽斯</option>";
content+="<option value='+02:00'>(GMT+02:00) 开罗</option>";
content+="<option value='+02:00'>(GMT+02:00) 明斯克</option>";
content+="<option value='+02:00'>(GMT+02:00) 温得和克</option>";
content+="<option value='+02:00'>(GMT+02:00) 雅典,布加勒斯特,伊斯坦布尔</option>";
content+="<option value='+02:00'>(GMT+02:00) 耶路撒冷</option>";
content+="<option value='+03:00'>(GMT+03:00) 巴格达</option>";
content+="<option value='+03:00'>(GMT+03:00) 科威特,利雅得</option>";
content+="<option value='+03:00'>(GMT+03:00) 莫斯科,圣彼得堡,伏尔加格勒</option>";
content+="<option value='+03:00'>(GMT+03:00) 内罗毕</option>";
content+="<option value='+03:30'>(GMT+03:30) 德黑兰</option>";
content+="<option value='+04:00'>(GMT+04:00) 阿布扎比,马斯喀特</option>";
content+="<option value='+04:00'>(GMT+04:00) 埃里温</option>";
content+="<option value='+04:00'>(GMT+04:00) 巴库</option>";
content+="<option value='+04:00'>(GMT+04:00) 第比利斯</option>";
content+="<option value='+04:00'>(GMT+04:00) 高加索标准时间</option>";
content+="<option value='+04:00'>(GMT+04:00) 路易港</option>";
content+="<option value='+04:30'>(GMT+04:30) 喀布尔</option>";
content+="<option value='+05:00'>(GMT+05:00) 塔什干</option>";
content+="<option value='+05:00'>(GMT+05:00) 叶卡捷琳堡</option>";
content+="<option value='+05:00'>(GMT+05:00) 伊斯兰堡,卡拉奇</option>";
content+="<option value='+05:30'>(GMT+05:30) 马德拉斯,加尔各答,孟买,新德里</option>";
content+="<option value='+05:30'>(GMT+05:30) 斯里哈亚华登尼普拉</option>";
content+="<option value='+05:45'>(GMT+05:45) 加德满都</option>";
content+="<option value='+06:00'>(GMT+06:00) 阿斯塔纳</option>";
content+="<option value='+06:00'>(GMT+06:00) 达卡</option>";
content+="<option value='+06:00'>(GMT+06:00) 新西伯利亚</option>";
content+="<option value='+06:30'>(GMT+06:30) 仰光</option>";
content+="<option value='+07:00'>(GMT+07:00) 克拉斯诺亚尔斯克</option>";
content+="<option value='+07:00'>(GMT+07:00) 曼谷,河内,雅加达</option>";
content+="<option value='+08:00' selected>(GMT+08:00) 北京,重庆,香港特别行政区,乌鲁木齐</option>";
content+="<option value='+08:00'>(GMT+08:00) 吉隆坡,新加坡</option>";
content+="<option value='+08:00'>(GMT+08:00) 珀斯</option>";
content+="<option value='+08:00'>(GMT+08:00) 台北</option>";
content+="<option value='+08:00'>(GMT+08:00) 乌兰巴托</option>";
content+="<option value='+08:00'>(GMT+08:00) 伊尔库茨克</option>";
content+="<option value='+09:00'>(GMT+09:00) 大坂,札幌,东京</option>";
content+="<option value='+09:00'>(GMT+09:00) 汉城</option>";
content+="<option value='+09:00'>(GMT+09:00) 雅库茨克</option>";
content+="<option value='+09:30'>(GMT+09:30) 阿德莱德</option>";
content+="<option value='+09:30'>(GMT+09:30) 达尔文</option>";
content+="<option value='+10:00'>(GMT+10:00) 布里斯班</option>";
content+="<option value='+10:00'>(GMT+10:00) 符拉迪沃斯托克</option>";
content+="<option value='+10:00'>(GMT+10:00) 关岛,莫尔兹比港</option>";
content+="<option value='+10:00'>(GMT+10:00) 霍巴特</option>";
content+="<option value='+10:00'>(GMT+10:00) 堪培拉,墨尔本,悉尼</option>";
content+="<option value='+11:00'>(GMT+11:00) 马加丹,索罗门群岛,新喀里多尼亚</option>";
content+="<option value='+12:00'>(GMT+12:00) 奥克兰,惠灵顿</option>";
content+="<option value='+12:00'>(GMT+12:00) 彼得罗巴甫洛夫斯克-堪察加 - 旧用</option>";
content+="<option value='+12:00'>(GMT+12:00) 斐济</option>";
content+="<option value='+12:00'>(GMT+12:00) 协调世界时+12</option>";
content+="<option value='+13:00'>(GMT+13:00) 努库阿洛法</option>";
content+="</select></td><td>输出时区(放空则默认为:+08:00)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"dateformatOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '&lt;eqml:dateformat&gt;', detail: content });
$("date").focus(); 
}

function eqmlselectrow(o){
OnElementClick(o);
var content=SelectBase();
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"selectrowOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 290, title: '&lt;eqml:selectrow&gt;', detail: content });
$("connection").focus(); 
}

function eqmlselecttop(o){
OnElementClick(o);
var content=SelectBase();
content+="<tr><td>bool</td><td>distinct</td><td><select id='distinct'>";
content+="<option value='true'>是</option>";
content+="<option value='false' selected>否</option>";
content+="</select></td><td>返回唯一不同的数据</td></tr>";
content+="<tr><td>int</td><td>top</td><td><input id='pagesize' value='10'/></td><td>返回前几行数据(放空返回全部数据)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"selecttopOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 354, title: '&lt;eqml:selecttop&gt;', detail: content });
$("connection").focus(); 
}

function eqmlselectpaging(o){
OnElementClick(o);
var content=SelectBase();
content+="<tr><td>bool</td><td>distinct</td><td><select id='distinct'>";
content+="<option value='true'>是</option>";
content+="<option value='false' selected>否</option>";
content+="</select></td><td>返回唯一不同的数据</td></tr>";
content+="<tr><td>int</td><td>pagesize</td><td><input id='pagesize' value='10'/></td><td>每页几行数据(放空默认为:10)</td></tr>";
content+="<tr><td>int</td><td>pageno</td><td><input id='pageno' value='1'/></td><td>返回第几页数据(放空默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"selectpagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 386, title: '&lt;eqml:selectpaging&gt;', detail: content });
$("connection").focus(); 
}

function eqmlreadfile(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>string</td><td>rootpath</td><td><input id='rootpath' value='/'/></td><td>基准根目录路径(相对于当前文件)</td></tr>";
content+="<tr><td>string</td><td>path</td><td><input id='path'/></td><td>要读取的文件路径(相对于rootpath)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"readfileOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '&lt;eqml:readfile&gt;', detail: content });
$("path").focus(); 
}

function eqmlreadtop(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>string</td><td>rootpath</td><td><input id='rootpath' value='/'/></td><td>基准根目录路径(相对于当前文件)</td></tr>";
content+="<tr><td>string</td><td>path</td><td><input id='path'/></td><td>要读取的目录路径(相对于rootpath)</td></tr>";
content+="<tr><td>bool</td><td>isreadchild</td><td><select id='isreadchild'>";
content+="<option value='true'>是</option>";
content+="<option value='false' selected>否</option>";
content+="</select></td><td>读取子级目录下的文件列表</td></tr>";
content+="<tr><td>bool</td><td>isgetdirectoryinfo</td><td><select id='isgetdirectoryinfo'>";
content+="<option value='true'>是</option>";
content+="<option value='false' selected>否</option>";
content+="</select></td><td>读取目录信息</td></tr>";
content+="<tr><td>bool</td><td>isgetfileinfo</td><td><select id='isgetfileinfo'>";
content+="<option value='true'>是</option>";
content+="<option value='false'>否</option>";
content+="</select></td><td>读取文件信息</td></tr>";
content+="<tr><td>string</td><td>name</td><td><input id='name'/></td><td>文件名必须包含的文字(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>content</td><td><input id='con'/></td><td>内容必须包含的文字(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>extension</td><td><input id='extension'/></td><td>文件后缀限制(放空为不限,例:.rar)</td></tr>";
content+="<tr><td>int</td><td>minlength</td><td><input id='minlength'/></td><td>文件大小不能小于几字节(放空为不限)</td></tr>";
content+="<tr><td>int</td><td>maxlength</td><td><input id='maxlength'/></td><td>文件大小不能大于几字节(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>mincreationtime</td><td><input id='mincreationtime'/></td><td>创建时间不能早于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>maxcreationtime</td><td><input id='maxcreationtime'/></td><td>创建时间不能晚于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>minlastwritetime</td><td><input id='minlastwritetime'/></td><td>修改时间不能早于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>maxlastwritetime</td><td><input id='maxlastwritetime'/></td><td>修改时间不能晚于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>minlastaccesstime</td><td><input id='minlastaccesstime'/></td><td>访问时间不能早于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>maxlastaccesstime</td><td><input id='maxlastaccesstime'/></td><td>访问时间不能晚于的时间(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>order</td><td>"+FileOrderSelect(true)+"</td><td>排序方式</td></tr>";
content+="<tr><td>int</td><td>top</td><td><input id='pagesize'/></td><td>返回前几行数据(放空返回全部数据)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"readtopOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 500, title: '&lt;eqml:readtop&gt;', detail: content });
$("path").focus(); 
}

function eqmlreadpaging(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>string</td><td>rootpath</td><td><input id='rootpath' value='/'/></td><td>基准根目录路径(相对于当前文件)</td></tr>";
content+="<tr><td>string</td><td>path</td><td><input id='path'/></td><td>要读取的目录路径(相对于rootpath)</td></tr>";
content+="<tr><td>bool</td><td>isreadchild</td><td><select id='isreadchild'>";
content+="<option value='true'>是</option>";
content+="<option value='false' selected>否</option>";
content+="</select></td><td>读取子级目录下的文件列表</td></tr>";
content+="<tr><td>bool</td><td>isgetdirectoryinfo</td><td><select id='isgetdirectoryinfo'>";
content+="<option value='true'>是</option>";
content+="<option value='false' selected>否</option>";
content+="</select></td><td>读取目录信息</td></tr>";
content+="<tr><td>bool</td><td>isgetfileinfo</td><td><select id='isgetfileinfo'>";
content+="<option value='true'>是</option>";
content+="<option value='false'>否</option>";
content+="</select></td><td>读取文件信息</td></tr>";
content+="<tr><td>string</td><td>name</td><td><input id='name'/></td><td>文件名必须包含的文字(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>content</td><td><input id='con'/></td><td>内容必须包含的文字(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>extension</td><td><input id='extension'/></td><td>文件后缀限制(放空为不限,例:.rar)</td></tr>";
content+="<tr><td>int</td><td>minlength</td><td><input id='minlength'/></td><td>文件大小不能小于几字节(放空为不限)</td></tr>";
content+="<tr><td>int</td><td>maxlength</td><td><input id='maxlength'/></td><td>文件大小不能大于几字节(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>mincreationtime</td><td><input id='mincreationtime'/></td><td>创建时间不能早于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>maxcreationtime</td><td><input id='maxcreationtime'/></td><td>创建时间不能晚于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>minlastwritetime</td><td><input id='minlastwritetime'/></td><td>修改时间不能早于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>maxlastwritetime</td><td><input id='maxlastwritetime'/></td><td>修改时间不能晚于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>minlastaccesstime</td><td><input id='minlastaccesstime'/></td><td>访问时间不能早于的时间(放空为不限)</td></tr>";
content+="<tr><td>HaiLi.DateTime</td><td>maxlastaccesstime</td><td><input id='maxlastaccesstime'/></td><td>访问时间不能晚于的时间(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>order</td><td>"+FileOrderSelect(true)+"</td><td>排序方式</td></tr>";
content+="<tr><td>int</td><td>pagesize</td><td><input id='pagesize' value='10'/></td><td>每页几行数据(放空默认为:10)</td></tr>";
content+="<tr><td>int</td><td>pageno</td><td><input id='pageno' value='1'/></td><td>返回第几页数据(放空默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"readpagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 500, title: '&lt;eqml:readpaging&gt;', detail: content });
$("path").focus(); 
}

function eqmldatarow(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>System.Data.DataRow</td><td>data</td><td><input id='data' value='null'/></td><td>内存数据</td></tr>";
content+="<tr><td>bool</td><td>isdispose</td><td><select id='isdispose'>";
content+="<option value='true' selected>是</option>";
content+="<option value='false'>否</option>";
content+="</select></td><td>使用完毕后释放内存数据</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"datarowOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '&lt;eqml:datarow&gt;', detail: content });
$("data").focus(); 
}

function eqmldatatable(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>System.Data.DataTable</td><td>data</td><td><input id='data' value='null'/></td><td>内存数据</td></tr>";
content+="<tr><td>bool</td><td>isdispose</td><td><select id='isdispose'>";
content+="<option value='true' selected>是</option>";
content+="<option value='false'>否</option>";
content+="</select></td><td>使用完毕后释放内存数据</td></tr>";
content+="<tr><td>string</td><td>order</td><td><input id='order'/></td><td>排序方式</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"datatableOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '&lt;eqml:datatable&gt;', detail: content });
$("data").focus(); 
}

function eqmldatapaging(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>HaiLi.DataPaging</td><td>data</td><td><input id='data' value='null'/></td><td>内存数据</td></tr>";
content+="<tr><td>bool</td><td>isdispose</td><td><select id='isdispose'>";
content+="<option value='true' selected>是</option>";
content+="<option value='false'>否</option>";
content+="</select></td><td>使用完毕后释放内存数据</td></tr>";
content+="<tr><td>string</td><td>order</td><td><input id='order'/></td><td>排序方式</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"datapagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '&lt;eqml:datapaging&gt;', detail: content });
$("data").focus(); 
}

function eqmlpagingno(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>count</td><td><input id='count' value='10'/></td><td>显示数字翻页按钮个数(放空则默认:10)</td></tr>";
content+="<tr><td>int</td><td>index</td><td><input id='index' value='5'/></td><td>当前页码按钮显示在第几个位置<br/>(放空则默认:5)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"pagingnoOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 174, title: '&lt;eqml:pagingno&gt;', detail: content });
$("count").focus(); 
}

function eqmlpl(o){
OnElementClick(o);
InsertText("<eqml:pl><a href=\"{$url}\">{$no}</a>&nbsp;</eqml:pl>");
}

function eqmlpr(o){
OnElementClick(o);
InsertText("<eqml:pr><a href=\"{$url}\">{$no}</a>&nbsp;</eqml:pr>");
}

function eqmlnodata(o){
OnElementClick(o);
InsertText("<eqml:nodata>没有数据</eqml:nodata>");
}

function eqmlrows(o){
OnElementClick(o);
InsertText("<eqml:rows><eqml:row></eqml:row></eqml:rows>");
}

function eqmlrow(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>count</td><td><input id='count'/></td><td>输出几行数据(放空默认为:1,*为自动)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"rowOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 130, title: '&lt;eqml:row&gt;', detail: content });
$("count").focus(); 
}

function field(o,t){
fieldType=t;
OnElementClick(o);
var content="字段名称:<input id='name'/><button type=\"button\" id=\"yes\" onclick=\"fieldOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button>";
EasyMask.init({ width: 455, height: 70, title: '字段值输出', detail: content });
$("name").focus(); 
}

function eqmlorder(o){
OnElementClick(o);
orderNeedNull=false;
var content=dialogHead;
content+="<tr><td></td><td></td><td>"+ConnectionSelect()+"</td><td>数据库连接名称</td></tr>";
content+="<tr><td></td><td></td><td>"+FromSelect(true,0)+"</td><td>要查询的表或视图</td></tr>";
content+="<tr><td>string</td><td>by</td><td>"+OrderSelect(true,0,0)+"<select id='ordertype' style='width:63px;'><option value='asc'>升序</option><option value='desc'>降序</option></select></td><td>排序方式</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"orderOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '&lt;eqml:order&gt;', detail: content });
$("connection").focus(); 
}

function eqmlorder2(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>string</td><td>by</td><td>"+FileOrderSelect(false);
content+="</td><td>进行排序的文件属性</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"orderOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 130, title: '&lt;eqml:order&gt;', detail: content });
$("name").focus(); 
}

function eqmlorder3(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>string</td><td>by</td><td><input id='order' style='width:217px;'><select id='ordertype' style='width:63px;'><option value='asc'>升序</option><option value='desc'>降序</option></select>";
content+="</td><td>排序方式(例:title desc)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"orderOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 130, title: '&lt;eqml:order&gt;', detail: content });
$("name").focus(); 
}

function eqmlasc(o){
OnElementClick(o);
InsertText("<eqml:asc><a href=\"{$url}\">列名▲</a></eqml:asc>");
}

function eqmldesc(o){
OnElementClick(o);
InsertText("<eqml:desc><a href=\"{$url}\">列名▼</a></eqml:desc>");
}

function eqmldefault(o){
OnElementClick(o);
InsertText("<eqml:default><a href=\"{$url}\">列名</a></eqml:default>");
}

function SelectBase(){
orderNeedNull=true;
var content=dialogHead;
content+="<tr><td>string</td><td>connection</td><td>"+ConnectionSelect()+"</td><td>数据库连接名称</td></tr>";
content+="<tr><td>string</td><td>from</td><td>"+FromSelect(true,0)+"</td><td>要查询的表或视图</td></tr>";
content+="<tr><td>string</td><td>where</td><td><input id='where'/></td><td>查询条件</td></tr>";
content+="<tr><td>string</td><td>group</td><td>"+GroupSelect(true,0,0)+"</td><td>分组</td></tr>";
content+="<tr><td>string</td><td>having</td><td><input id='having'/></td><td>分组查询条件</td></tr>";
content+="<tr><td>string</td><td>order</td><td>"+OrderSelect(true,0,0)+"<select id='ordertype' style='width:63px;'><option value='asc'>升序</option><option value='desc'>降序</option></select></td><td>排序方式</td></tr>";
return content;
}

function ConnectionSelect(){	
var content="<select id='connection' onchange=\"UpdateFromSelect();\">";
for(var i=0;i<=fields.length-1;i++){
content+="<option value='"+fields[i][2]+"'>"+fields[i][2]+"</option>";
}
content+="</select>";
return content;
}

function FromSelect(isAll,connectionIndex){
var content="";
if(isAll){content="<select id='from' onchange=\"UpdateGroupSelect();UpdateOrderSelect();\">";}
for(var i=0;i<=fields[connectionIndex][1].length-1;i++){
//if(fields[connectionIndex][1][i][1].length>0){
content+="<option value='"+fields[connectionIndex][1][i][0]+"'>"+fields[connectionIndex][1][i][0]+"</option>";
//}
}
if(isAll){content+="</select>";}
return content;
}

function GroupSelect(isAll,connectionIndex,fromIndex){
var content="";
if(isAll){content="<select id='group'>";}
if(fields[connectionIndex][1][fromIndex][1].length>0){
content+="<option value=''></option>";
for(var j=0;j<=fields[connectionIndex][1][fromIndex][1].length-1;j++){
content+="<option value='"+fields[connectionIndex][1][fromIndex][1][j][0]+"'>"+fields[connectionIndex][1][fromIndex][1][j][0]+"</option>";
}
}
if(isAll){content+="</select>";}
return content;
}

var orderNeedNull=true;
function OrderSelect(isAll,connectionIndex,fromIndex){
var content="";
if(isAll){content="<select id='order' style='width:221px;height:21px;'>";}
if(fields[connectionIndex][1][fromIndex][1].length>0){
if(orderNeedNull){content+="<option value=''></option>";}
for(var j=0;j<=fields[connectionIndex][1][fromIndex][1].length-1;j++){
content+="<option value='"+fields[connectionIndex][1][fromIndex][1][j][0]+"'>"+fields[connectionIndex][1][fromIndex][1][j][0]+"</option>";
}
for(var j=0;j<=fields[connectionIndex][1][fromIndex][1].length-1;j++){
content+="<option value='sum("+fields[connectionIndex][1][fromIndex][1][j][0]+")'>sum("+fields[connectionIndex][1][fromIndex][1][j][0]+")</option>";
}
for(var j=0;j<=fields[connectionIndex][1][fromIndex][1].length-1;j++){
content+="<option value='avg("+fields[connectionIndex][1][fromIndex][1][j][0]+")'>avg("+fields[connectionIndex][1][fromIndex][1][j][0]+")</option>";
}
for(var j=0;j<=fields[connectionIndex][1][fromIndex][1].length-1;j++){
content+="<option value='min("+fields[connectionIndex][1][fromIndex][1][j][0]+")'>min("+fields[connectionIndex][1][fromIndex][1][j][0]+")</option>";
}
for(var j=0;j<=fields[connectionIndex][1][fromIndex][1].length-1;j++){
content+="<option value='max("+fields[connectionIndex][1][fromIndex][1][j][0]+")'>max("+fields[connectionIndex][1][fromIndex][1][j][0]+")</option>";
}
for(var j=0;j<=fields[connectionIndex][1][fromIndex][1].length-1;j++){
content+="<option value='count("+fields[connectionIndex][1][fromIndex][1][j][0]+")'>count("+fields[connectionIndex][1][fromIndex][1][j][0]+")</option>";
}
}
if(isAll){content+="</select>";}
return content;
}

function UpdateFromSelect(){
if(window.ActiveXObject){
$("from").outerHTML=FromSelect(true,$("connection").options.selectedIndex);
}
else{
$("from").innerHTML=FromSelect(false,$("connection").options.selectedIndex);
}
UpdateOrderSelect();
UpdateGroupSelect();
}

function UpdateOrderSelect(){
if($("order")){
if(window.ActiveXObject){
$("order").outerHTML=OrderSelect(true,$("connection").options.selectedIndex,$("from").options.selectedIndex);
}
else{
$("order").innerHTML=OrderSelect(false,$("connection").options.selectedIndex,$("from").options.selectedIndex);
}
}
}

function UpdateGroupSelect(){
if($("group")){
if(window.ActiveXObject){
$("group").outerHTML=GroupSelect(true,$("connection").options.selectedIndex,$("from").options.selectedIndex);
}
else{
$("group").innerHTML=GroupSelect(false,$("connection").options.selectedIndex,$("from").options.selectedIndex);
}
}
}

function FileOrderSelect(needNull){
var content="<select id='order' style='width:221px;height:21px;'>";
if(needNull){
content+="<option value=''></option>";
}
content+="<option value='isfile'>是否是文件</option>";
content+="<option value='name'>名称</option>";
content+="<option value='extension'>扩展名</option>";
content+="<option value='length'>大小</option>";
content+="<option value='creationtime'>创建时间</option>";
content+="<option value='lastwritetime'>修改时间</option>";
content+="<option value='lastaccesstime'>访问时间</option>";
content+="<option value='path'>路径</option>";
content+="</select><select id='ordertype' style='width:63px;'><option value='asc'>升序</option><option value='desc'>降序</option></select>";
return content;
}

function ArticleOrderSelect(needNull){
var content="<select id='order' style='width:221px;height:21px;'>";
if(needNull){
content+="<option value=''></option>";
}
content+="<option value='ChannelID'>频道ID</option>";
content+="<option value='CreateDate'>创建时间</option>";
content+="<option value='UpdateDate'>修改时间</option>";
content+="</select><select id='ordertype' style='width:63px;'><option value='asc'>升序</option><option value='desc'>降序</option></select>";
return content;
}

function BweOK(){
if(escType==1){
escpath="/"+escpath;
}
var attributes=" path=\""+escpath+"\"";
var attributeName=$N("AName");
var attributeValue=$N("AT");
for(var i=0;i<=attributeName.length-1;i++){
if(data[i][0]==1){
if(attributeValue[i].value==""){return;}
}
attributes+=" "+attributeName[i].value+"=\""+attributeValue[i].value+"\"";
}
EasyMask.close();
InsertText("<eqml:control"+attributes+"></eqml:control>");
}

function fieldOK(){
var result=$("name").value;
if(result!=""){
EasyMask.close();
InsertText("{$ro"+fieldType+"."+result+"}");
}
}

function apOK(){
var result=$("name").value;
if(result==""){
ShowMessageDialog("提示","名称不能为空");
return;
}
EasyMask.close();
InsertText("{$ap"+transformType+"."+result+"}");
}

function seOK(){
var result=$("name").value;
if(result==""){
ShowMessageDialog("提示","名称不能为空");
return;
}
EasyMask.close();
InsertText("{$se"+transformType+"."+result+"}");
}

function coOK(){
var cookie=$("cookie").value;
var key=$("key").value;
if(cookie==""){
ShowMessageDialog("提示","Cookie名称不能为空");
return;
}
if(key==""){
ShowMessageDialog("提示","变量名称不能为空");
return;
}
EasyMask.close();
InsertText("{$"+cookie+transformType+"."+key+"}");
}

function urlOK(){
var keyname=$("keyname").value;
var keyvalue=$("keyvalue").value;
EasyMask.close();
if(keyname==""){
InsertText("{$url}");
}
else{
if(keyvalue==""){
InsertText("{$url."+keyname+"}");
}
else{
InsertText("{$url."+keyname+"}="+keyvalue);	
}
}
}

function reOK(){
var result=$("name").value;
if(result==""){
ShowMessageDialog("提示","名称不能为空");
return;
}
EasyMask.close();
InsertText("{$re"+transformType+"."+result+"}");
}

function quOK(){
var result=$("name").value;
if(result==""){
ShowMessageDialog("提示","名称不能为空");
return;
}
EasyMask.close();
InsertText("{$qu"+transformType+"."+result+"}");
}

function foOK(){
var result=$("name").value;
if(result==""){
ShowMessageDialog("提示","名称不能为空");
return;
}
EasyMask.close();
InsertText("{$f"+transformType+"."+result+"}");
}

function ifOK(){
var result=$("test").value;
EasyMask.close();
InsertText("<eqml:if test=\""+result+"\">\r\n\r\n</eqml:if>");
}

function whenOK(){
var result=$("test").value;
EasyMask.close();
InsertText("<eqml:when test=\""+result+"\">\r\n\r\n</eqml:when>");
}

function forOK(){
var from=$("from").value;
var to=$("to").value;
EasyMask.close();
InsertText("<eqml:for from=\""+from+"\" to=\""+to+"\">\r\n\r\n</eqml:for>");
}

function subtextOK(){
var length=$("length").value;
var moretext=$("moretext").value;
EasyMask.close();
InsertText("<eqml:subtext length=\""+length+"\" moretext=\""+moretext+"\"></eqml:subtext>");
}

function substringOK(){
var length=$("length").value;
var moretext=$("moretext").value;
EasyMask.close();
InsertText("<eqml:substring length=\""+length+"\" moretext=\""+moretext+"\"></eqml:substring>");
}

function languageOK(){
var source=$("source").value;
var dest=$("dest").value;
EasyMask.close();
InsertText("<eqml:language source=\""+source+"\" dest=\""+dest+"\"></eqml:language>");
}

function stringpagingOK(){
var pagelength=$("pagelength").value;
var pageno=$("pageno").value;
if(pagelength!=""&&pageno!=""){
EasyMask.close();
var content="<eqml:stringpaging pagelength=\""+pagelength+"\" pageno=\""+pageno+"\">";
content+="\r\n<eqml:string>...要进行分页的数据...</eqml:string>\r\n<br/>";
content+="\r\n"+pagingNo+"\r\n</eqml:stringpaging>";
InsertText(content);
}
}

function dateformatOK(){
var date=$("date").value;
var ingmt=$("ingmt").value;
var outgmt=$("outgmt").value;
EasyMask.close();
InsertText("<eqml:dateformat date=\""+date+"\" ingmt=\""+ingmt+"\" outgmt=\""+outgmt+"\">{$y}-{$m}-{$d}&nbsp;{$hh}:{$ii}:{$ss}</eqml:dateformat>");
}

function pagingnoOK(){
var count=$("count").value;
var index=$("index").value;
if(count!=""&&index!=""){
EasyMask.close();
InsertText("<eqml:pagingno count=\""+count+"\" index=\""+index+"\">\r\n<eqml:if test=\"{$pageno} != 1 && {$pagecount} > "+count+"\"><a href=\"{$firstpageurl}\">首页</a>&nbsp;<a href=\"{$prevpageurl}\">上一页</a>&nbsp;</eqml:if>\r\n<eqml:pl><a href=\"{$url}\">{$no}</a>&nbsp;</eqml:pl>{$pageno}&nbsp;<eqml:pr><a href=\"{$url}\">{$no}</a>&nbsp;</eqml:pr>\r\n<eqml:if test=\"{$pagecount} != {$pageno} && {$pagecount} > "+count+"\"><a href=\"{$nextpageurl}\">下一页</a>&nbsp;<a href=\"{$lastpageurl}\">尾页</a>&nbsp;</eqml:if>\r\n<eqml:if test=\"{$pagecount} > "+count+"\"><form id=\"{$pagenoname}\" action=\"{$pagenourl}\" method=\"post\" onsubmit=\"if(document.getElementById('{$pagenoname}').{$pagenoname}.value>0&&document.getElementById('{$pagenoname}').{$pagenoname}.value<={$pagecount}&&document.getElementById('{$pagenoname}').{$pagenoname}.value!={$pageno}){if(document.getElementById('{$pagenoname}').{$pagenoname}.value>1){document.getElementById('{$pagenoname}').action+='pageno'+document.getElementById('{$pagenoname}').{$pagenoname}.value;}document.getElementById('{$pagenoname}').action+='.shtml';}else{return false;}\"><input name=\"{$pagenoname}\" type=\"text\" value=\"{$pagecount}\" size=\"5\"/><button type=\"submit\">跳页</button></form></eqml:if>\r\n</eqml:pagingno>");
}
}

function orderOK(){
var order=$("order").value;
var orderType=$("ordertype").value;
EasyMask.close();
InsertText("<eqml:order by=\""+order+" "+orderType+"\"><eqml:asc><a href=\"{$url}\">"+order+"▲</a></eqml:asc><eqml:desc><a href=\"{$url}\">"+order+"▼</a></eqml:desc><eqml:default><a href=\"{$url}\">"+order+"</a></eqml:default></eqml:order>");
}

function rowOK(){
var count=$("count").value;
EasyMask.close();
if(count==""||count==1){
InsertText("<eqml:row></eqml:row>");
}
else{
InsertText("<eqml:row count=\""+count+"\"></eqml:row>");
}
}

function selectrowOK(){
var connection=$("connection").value;
var from=$("from").value;
var where=$("where").value;
var group=$("group").value;
var having=$("having").value;
var order=$("order").value;
var orderType=$("ordertype").value;
if(order!=""){
order+=" "+orderType;	
}
if(connection!=""&&from!=""){
EasyMask.close();
InsertText("<eqml:selectrow connection=\""+connection+"\" from=\""+from+"\" where=\""+where+"\" group=\""+group+"\" having=\""+having+"\" order=\""+order+"\">\r\n\r\n</eqml:selectrow>");
}
}

function selecttopOK(){
var connection=$("connection").value;
var from=$("from").value;
var where=$("where").value;
var group=$("group").value;
var having=$("having").value;
var order=$("order").value;
var orderType=$("ordertype").value;
if(order!=""){
order+=" "+orderType;	
}
var distinct=$("distinct").value;
var top=$("pagesize").value;
if(connection!=""&&from!=""){
EasyMask.close();
InsertText("<eqml:selecttop connection=\""+connection+"\" from=\""+from+"\" where=\""+where+"\" group=\""+group+"\" having=\""+having+"\" order=\""+order+"\" distinct=\""+distinct+"\" top=\""+top+"\">\r\n<eqml:rows><eqml:row>\r\n\r\n</eqml:row></eqml:rows>\r\n</eqml:selecttop>");
}
}

function selectpagingOK(){
var connection=$("connection").value;
var from=$("from").value;
var where=$("where").value;
var group=$("group").value;
var having=$("having").value;
var order=$("order").value;
var orderType=$("ordertype").value;
if(order!=""){
order+=" "+orderType;	
}
var distinct=$("distinct").value;
var pagesize=$("pagesize").value;
var pageno=$("pageno").value;
if(connection!=""&&from!=""){
EasyMask.close();
InsertText("<eqml:selectpaging connection=\""+connection+"\" from=\""+from+"\" where=\""+where+"\" group=\""+group+"\" having=\""+having+"\" order=\""+order+"\" distinct=\""+distinct+"\" pagesize=\""+pagesize+"\" pageno=\""+pageno+"\">\r\n<eqml:rows><eqml:row>\r\n\r\n</eqml:row></eqml:rows>\r\n<br/>\r\n"+pagingNo+"\r\n</eqml:selectpaging>");
}
}

function readfileOK(){
var rootpath=$("rootpath").value;
var path=$("path").value;
EasyMask.close();
InsertText("<eqml:readfile rootpath=\""+rootpath+"\" path=\""+path+"\">\r\n\r\n</eqml:readfile>");
}

function readpagingOK(){
var rootpath=$("rootpath").value;
var path=$("path").value;
var isreadchild=$("isreadchild").value;
var isgetdirectoryinfo=$("isgetdirectoryinfo").value;
var isgetfileinfo=$("isgetfileinfo").value;
var name=$("name").value;
var content=$("con").value;
var extension=$("extension").value;
var minlength=$("minlength").value;
var maxlength=$("maxlength").value;
var mincreationtime=$("mincreationtime").value;
var maxcreationtime=$("maxcreationtime").value;
var minlastwritetime=$("minlastwritetime").value;
var maxlastwritetime=$("maxlastwritetime").value;
var minlastaccesstime=$("minlastaccesstime").value;
var maxlastaccesstime=$("maxlastaccesstime").value;
var order=$("order").value;
var orderType=$("ordertype").value;
if(order!=""){
order+=" "+orderType;	
}
var pagesize=$("pagesize").value;
var pageno=$("pageno").value;
if(pagesize!=""&&pageno!=""){
EasyMask.close();
InsertText("<eqml:readpaging rootpath=\""+rootpath+"\" path=\""+path+"\" isreadchild=\""+isreadchild+"\" isgetdirectoryinfo=\""+isgetdirectoryinfo+"\" isgetfileinfo=\""+isgetfileinfo+"\" name=\""+name+"\" content=\""+content+"\" extension=\""+extension+"\" minlength=\""+minlength+"\" maxlength=\""+maxlength+"\" mincreationtime=\""+mincreationtime+"\" maxcreationtime=\""+maxcreationtime+"\" minlastwritetime=\""+minlastwritetime+"\" maxlastwritetime=\""+maxlastwritetime+"\" minlastaccesstime=\""+minlastaccesstime+"\" maxlastaccesstime=\""+maxlastaccesstime+"\" order=\""+order+"\" pagesize=\""+pagesize+"\" pageno=\""+pageno+"\">\r\n<eqml:rows><eqml:row>\r\n\r\n</eqml:row></eqml:rows>\r\n<br/>\r\n"+pagingNo+"\r\n</eqml:readpaging>");
}
}

function readtopOK(){
var rootpath=$("rootpath").value;
var path=$("path").value;
var isreadchild=$("isreadchild").value;
var isgetdirectoryinfo=$("isgetdirectoryinfo").value;
var isgetfileinfo=$("isgetfileinfo").value;
var name=$("name").value;
var content=$("con").value;
var extension=$("extension").value;
var minlength=$("minlength").value;
var maxlength=$("maxlength").value;
var mincreationtime=$("mincreationtime").value;
var maxcreationtime=$("maxcreationtime").value;
var minlastwritetime=$("minlastwritetime").value;
var maxlastwritetime=$("maxlastwritetime").value;
var minlastaccesstime=$("minlastaccesstime").value;
var maxlastaccesstime=$("maxlastaccesstime").value;
var order=$("order").value;
var orderType=$("ordertype").value;
if(order!=""){
order+=" "+orderType;	
}
var top=$("pagesize").value;
EasyMask.close();
InsertText("<eqml:readtop rootpath=\""+rootpath+"\" path=\""+path+"\" isreadchild=\""+isreadchild+"\" isgetdirectoryinfo=\""+isgetdirectoryinfo+"\" isgetfileinfo=\""+isgetfileinfo+"\" name=\""+name+"\" content=\""+content+"\" extension=\""+extension+"\" minlength=\""+minlength+"\" maxlength=\""+maxlength+"\" mincreationtime=\""+mincreationtime+"\" maxcreationtime=\""+maxcreationtime+"\" minlastwritetime=\""+minlastwritetime+"\" maxlastwritetime=\""+maxlastwritetime+"\" minlastaccesstime=\""+minlastaccesstime+"\" maxlastaccesstime=\""+maxlastaccesstime+"\" order=\""+order+"\" top=\""+top+"\">\r\n<eqml:rows><eqml:row>\r\n\r\n</eqml:row></eqml:rows>\r\n</eqml:readtop>");
}

function datarowOK(){
var data=$("data").value;
var isdispose=$("isdispose").value;
EasyMask.close();
InsertText("<eqml:datarow data=\""+data+"\" isdispose=\""+isdispose+"\">\r\n\r\n</eqml:datarow>");
}

function datatableOK(){
var data=$("data").value;
var isdispose=$("isdispose").value;
var order=$("order").value;
EasyMask.close();
InsertText("<eqml:datatable data=\""+data+"\" isdispose=\""+isdispose+"\" order=\""+order+"\">\r\n<eqml:rows><eqml:row>\r\n\r\n</eqml:row></eqml:rows>\r\n</eqml:datatable>");
}

function datapagingOK(){
var data=$("data").value;
var isdispose=$("isdispose").value;
var order=$("order").value;
EasyMask.close();
InsertText("<eqml:datapaging data=\""+data+"\" isdispose=\""+isdispose+"\" order=\""+order+"\">\r\n<eqml:rows><eqml:row>\r\n\r\n</eqml:row></eqml:rows>\r\n<br/>\r\n"+pagingNo+"\r\n</eqml:datapaging>");
}

function GetPath(inputPath){
var espPath=document.client.BSDevelopPath2.value;
if(espPath!=""){
espPath=espPath.substr(0,espPath.length-1);
}
if(espPath==""){
return inputPath;
}
var result="";          
var group1 = inputPath.split("/");
var group2 = espPath.split("/");
var index = group1.length;
for (var i = 0; i <= group1.length - 1; i++){
if (group2.length - 1 >= i){
if (group1[i] != group2[i]){
index = i;
break;
}
}
else{
index = i;
break;
}
}
var length = group2.length - index ;
for(var i = 1; i <= length; i++){
result += "../";
}
for(var i = index; i <= group1.length - 1; i++){
if(i == index){
result += group1[i];
}
else{
result += "/" + group1[i];
}
}
return result;
}

function FileSelected(path){
EasyMask.close();
if(escType==3){
pagepath=GetPath(path);
AjaxRequest("edit.ashx?_action=getpageurlkeys&path="+escape(path),"",esp,null);
}
else if(escType==1||document.client.BSDevelopPath2.value==""){
escpath=path;
AjaxRequest("edit.ashx?_action=getattributes&path="+escape(path),"",esc,null);
}
else if(escType==2){
escpath=GetPath(path);
AjaxRequest("edit.ashx?_action=getattributes&path="+escape(path),"",esc,null);
}
}

var data;
function esc(r){
if(r.substring(0,1)!='['){
ShowMessageDialog("提示",r)
return;
}
data=eval(r);
if(data.length==0){
if(escType==1){
escpath="/"+escpath;
}
var attributes=" path=\""+escpath+"\"";
InsertText("<eqml:control"+attributes+"></eqml:control>");
return;
}
var content=dialogHead;
content+="<tr><td>string</td><td>path</td><td><input id='path' value='"+escpath+"' disabled/></td><td>控件文件的路径(相对于当前文件)</td></tr>";
for(var i=0;i<=data.length-1;i++){
if(data[i][0]==1){
content+="<tr><td>"+data[i][1]+"</td><td>"+data[i][2]+"</td><td><input name=\"AName\" type=\"hidden\" value=\""+data[i][2]+"\"><input name=\"AT\" value=\""+data[i][3]+"\"/></td><td>"+data[i][4]+"</td></tr>";
}
else{
content+="<tr><td>"+data[i][1]+"</td><td>"+data[i][2]+"</td><td><input name=\"AName\" type=\"hidden\" value=\""+data[i][2]+"\"><input name=\"AT\" value=\""+data[i][3]+"\"/></td><td>"+data[i][4]+"</td></tr>";
}
}
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"BweOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
var height=32*(data.length+1)+98;
EasyMask.init({ width:800, height: height, title: '&lt;eqml:control&gt;', detail: content });
}

function esp(r){
if(r.substring(0,1)!='['){
ShowMessageDialog("提示",r)
return;
}
var staticdirectorypath="";
if(pagepath.lastIndexOf("/")>0){
staticdirectorypath=pagepath.substring(0,pagepath.lastIndexOf("/")+1);
}
var content=dialogHead;
content+="<tr><td>string</td><td>pagepath</td><td><input id='pagepath' value='"+pagepath+"' disabled/></td><td>要链接的页面路径(相对于当前文件)</td></tr>";
content+="<tr><td>bool</td><td>isstatic</td><td><input id='isstatic' value='{$isstatic}'/></td><td>链接到静态页(放空默认为:{$isstatic})</td></tr>";
content+="<tr><td>string</td><td>staticdirectorypath</td><td><input id='staticdirectorypath' value='"+staticdirectorypath+"'/></td><td>静态页所在的目录路径(相对于当前文件)</td></tr>";
content+="<tr><td>string</td><td>staticextension</td><td><input id='staticextension' value='.html'/></td><td>静态页扩展名</td></tr>";
data=eval(r);
if(data.length>0){
for(var i=0;i<=data.length-1;i++){
content+="<tr><td>string</td><td>"+data[i]+"</td><td><input name=\"AName\" type=\"hidden\" value=\""+data[i]+"\"><input name=\"AT\" value=\"\"/></td><td>url参数"+(i+1)+"</td></tr>";
}
}
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"PageUrlOK();\">确定</button><button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
var height=32*(data.length+4)+98;
EasyMask.init({ width:820, height: height, title: '&lt;eqml:pageurl&gt;', detail: content });
}

function PageUrlOK(){
var attributes=" pagepath=\""+pagepath+"\" isstatic=\""+$("isstatic").value+"\" staticdirectorypath=\""+$("staticdirectorypath").value+"\" staticextension=\""+$("staticextension").value+"\"";
var attributeName=$N("AName");
var attributeValue=$N("AT");
for(var i=0;i<=attributeName.length-1;i++){
attributes+=" "+attributeName[i].value+"=\""+attributeValue[i].value+"\"";
}
EasyMask.close();
InsertText("<eqml:pageurl"+attributes+"><a href=\"{$url}\">xxx</a></eqml:pageurl>");
}

function getsiteid(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid'></select></td><td>当前站点ID</td></tr>";
content+="<tr><td>int</td><td>depth</td><td><input id='depth' value='1'/></td><td>要返回ID的层级深度</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getsiteidOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获取某个层级深度的站点ID', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus(); 
}

function getsiteidOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var depth=$("depth").value.trim();
if(depth!=""){
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetSiteID("+siteid+", "+depth+")");
}
}

function getsitebyid(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid'></select></td><td>站点ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getsitebyidOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 130, title: '获得某个站点的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus(); 
}

function getsitebyidOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetSite("+siteid+")");
}

function getsitebyfullname(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>parentsiteid</td><td><select id='siteid'></select></td><td>上一级站点ID</td></tr>";
content+="<tr><td>string</td><td>fullname</td><td><input id='fullname' value=''/></td><td>站点名称(放空返回第一个)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getsitebyfullnameOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获得某个站点的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=true;
IsShowChannelRoot=false;
SetSite();
$("fullname").focus(); 
}

function getsitebyfullnameOK(){
var parentsiteid=$("siteid").value;
if(parentsiteid==-1){
parentsiteid="{$qui.siteid}";
}
var fullname=$("fullname").value;
if(fullname==""){
fullname="null";
}
else if(fullname.indexOf("{$")==-1){
fullname="\""+fullname+"\"";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetSite("+siteid+", "+fullname+")");
}

function getsitetop(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>parentsiteid</td><td><select id='siteid'></select></td><td>上一级站点ID</td></tr>";
content+="<tr><td>bool</td><td>isopened</td><td><select id='isopened'><option value=''>不限</option><option value='true' selected='selected'>显示</option><option value='false'>隐藏</option></select></td><td>状态限制</td></tr>";
content+="<tr><td>int</td><td>top</td><td><input id='pagesize' value=''/></td><td>返回前几个子站点(放空返回全部)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getsitetopOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '获得多个站点的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=true;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getsitetopOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var isopened=$("isopened").value;
var top=$("pagesize").value.trim();
if(top==""){
top=0;
}
EasyMask.close();
if(isopened==""){
InsertText("HaiLi.CMS.Data.GetSiteTop("+siteid+", "+top+")");
}
else{
InsertText("HaiLi.CMS.Data.GetSiteTop("+siteid+", "+isopened+", "+top+")");
}
}

function getsitepaging(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>parentsiteid</td><td><select id='siteid'></select></td><td>上一级站ID</td></tr>";
content+="<tr><td>bool</td><td>isopened</td><td><select id='isopened'><option value=''>不限</option><option value='true' selected='selected'>显示</option><option value='false'>隐藏</option></select></td><td>状态限制</td></tr>";
content+="<tr><td>int</td><td>pagesize</td><td><input id='pagesize' value='10'/></td><td>每页几行数据(放空默认为:10)</td></tr>";
content+="<tr><td>int</td><td>pageno</td><td><input id='pageno' value='{$qus.pageno} == null ? 1 : {$qui.pageno}'/></td><td>返回第几页数据(放空默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getsitepagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 226, title: '获得分页站点的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=true;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getsitepagingOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var isopened=$("isopened").value;
var pagesize=$("pagesize").value.trim();
if(pagesize==""){
pagesize=10;
}
var pageno=$("pageno").value.trim();
if(pageno==""){
pageno=1;
}
EasyMask.close();
if(isopened==""){
InsertText("HaiLi.CMS.Data.GetSitePaging("+siteid+", "+pagesize+", "+pageno+")");
}
else{
InsertText("HaiLi.CMS.Data.GetSitePaging("+siteid+", "+isopened+", "+pagesize+", "+pageno+")");
}
}

function getsitelocation(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid'></select></td><td>站点ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getsitelocationOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 130, title: '获得某个站点的位置信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus(); 
}

function getsitelocationOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetSiteLocation("+siteid+")");
}

function getsitetree(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>mode</td><td><select id='mode'><option value='1'>展开全部</option><option value='2'>展开当前一级站点下的全部</option><option value='3' selected='selected'>展开一条路径(到当前站点的子站点终止)</option><option value='4'>展开一条路径(到当前站点终止)</option></select></td><td>模式</td></tr>";
content+="<tr><td>int</td><td>rootsiteid</td><td><select id='rootsiteid'></select></td><td>起始站点ID</td></tr>";
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid'></select></td><td>当前站点ID</td></tr>";
content+="<tr><td>bool</td><td>isopened</td><td><select id='isopened'><option value=''>不限</option><option value='true' selected='selected'>显示</option><option value='false'>隐藏</option></select></td><td>状态限制</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getsitetreeOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 226, title: '获取站点导航树信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=true;
IsShowChannelRoot=false;
SetRootSite();
$("mode").focus();
}

function getsitetreeOK(){
var mode=$("mode").value;
var rootsiteid=$("rootsiteid").value;
if(rootsiteid==-1){
rootsiteid="{$qui.siteid}";
}
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var isopened=$("isopened").value;
EasyMask.close();
if(isopened==""){
InsertText("HaiLi.CMS.Data.GetSiteTree("+mode+", "+rootsiteid+", "+siteid+")");
}
else{
InsertText("HaiLi.CMS.Data.GetSiteTree("+mode+", "+rootsiteid+", "+siteid+", "+isopened+")");
}
}

function getchannelid(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid'></select></td><td>频道ID</td></tr>";
content+="<tr><td>int</td><td>depth</td><td><input id='depth' value='1'/></td><td>要返回ID的层级深度</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getchannelidOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '获取某个层级深度的频道ID', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus(); 
}

function getchannelidOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
if(channelid==-1){
channelid="{$qui.channelid}";
}
var depth=$("depth").value.trim();
if(depth!=""){
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetChannelID("+siteid+", "+channelid+", "+depth+")");
}
}

function getchannelbyid(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid'></select></td><td>频道ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getchannelbyidOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获得某个频道的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getchannelbyidOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
if(channelid==-1){
channelid="{$qui.channelid}";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetChannel("+siteid+", "+channelid+")");
}

function getchannelbyfullname(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>parentchannelid</td><td><select id='channelid'></select></td><td>上一级频道ID</td></tr>";
content+="<tr><td>string</td><td>fullname</td><td><input id='fullname' value=''/></td><td>频道名称(放空返回第一个)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getchannelbyfullnameOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '获得某个频道的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getchannelbyfullnameOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var parentchannelid=$("channelid").value;
if(parentchannelid==-1){
parentchannelid="{$qui.channelid}";
}
var fullname=$("fullname").value;
if(fullname==""){
fullname="null";
}
else if(fullname.indexOf("{$")==-1){
fullname="\""+fullname+"\"";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetChannel("+siteid+", "+parentchannelid+", "+fullname+")");
}

function getchanneltop(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>parentchannelid</td><td><select id='channelid'></select></td><td>上一级频道ID</td></tr>";
content+="<tr><td>bool</td><td>isopened</td><td><select id='isopened'><option value=''>不限</option><option value='true' selected='selected'>显示</option><option value='false'>隐藏</option></select></td><td>状态限制</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>空</option><option value='2'>引用</option><option value='3'>文章</option></select></td><td>类型限制</td></tr>";
content+="<tr><td>int</td><td>top</td><td><input id='pagesize' value=''/></td><td>返回前几个频道(放空返回全部)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getchanneltopOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 258, title: '获得多个频道的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getchanneltopOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var parentchannelid=$("channelid").value;
if(parentchannelid==-1){
parentchannelid="{$qui.channelid}";
}
var isopened=$("isopened").value;
var type=$("type").value;
var top=$("pagesize").value.trim();
if(top==""){
top=0;
}
EasyMask.close();
var result="HaiLi.CMS.Data.GetChannelTop("+siteid+", "+parentchannelid;
if(isopened!=""){
result+=", "+isopened;
}
if(type!=0){
result+=", "+type;
}
result+=", "+top+")";
InsertText(result);
}

function getchannelpaging(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>parentchannelid</td><td><select id='channelid'></select></td><td>上一级频道ID</td></tr>";
content+="<tr><td>bool</td><td>isopened</td><td><select id='isopened'><option value=''>不限</option><option value='true' selected='selected'>显示</option><option value='false'>隐藏</option></select></td><td>状态限制</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>空</option><option value='2'>引用</option><option value='3'>文章</option></select></td><td>类型限制</td></tr>";
content+="<tr><td>int</td><td>pagesize</td><td><input id='pagesize' value='10'/></td><td>每页几行数据(放空默认为:10)</td></tr>";
content+="<tr><td>int</td><td>pageno</td><td><input id='pageno' value='{$qus.pageno} == null ? 1 : {$qui.pageno}'/></td><td>返回第几页数据(放空默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getchannelpagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 290, title: '获得分页频道的信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getchannelpagingOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var parentchannelid=$("channelid").value;
if(parentchannelid==-1){
parentchannelid="{$qui.channelid}";
}
var isopened=$("isopened").value;
var type=$("type").value;
var pagesize=$("pagesize").value.trim();
if(pagesize==""){
pagesize=10;
}
var pageno=$("pageno").value.trim();
if(pageno==""){
pageno=1;
}
EasyMask.close();
var result="HaiLi.CMS.Data.GetChannelPaging("+siteid+", "+parentchannelid;
if(isopened!=""){
result+=", "+isopened;
}
if(type!=0){
result+=", "+type;
}
result+=", "+pagesize+", "+pageno+")";
InsertText(result);
}

function getchannellocation(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid'></select></td><td>频道ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getchannellocationOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获得某个频道的位置信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getchannellocationOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
if(channelid==-1){
channelid="{$qui.channelid}";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetChannelLocation("+siteid+", "+channelid+")");
}

function getchanneltree(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>mode</td><td><select id='mode'><option value='1'>展开全部</option><option value='2'>展开当前一级频道下的全部</option><option value='3' selected='selected'>展开一条路径(到当前频道的子频道终止)</option><option value='4'>展开一条路径(到当前频道终止)</option></select></td><td>模式</td></tr>";
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetRootChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>rootchannelid</td><td><select id='rootchannelid'></select></td><td>起始频道ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid'></select></td><td>当前频道ID</td></tr>";
content+="<tr><td>bool</td><td>isopened</td><td><select id='isopened'><option value=''>不限</option><option value='true' selected='selected'>显示</option><option value='false'>隐藏</option></select></td><td>状态限制</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>空</option><option value='2'>引用</option><option value='3'>文章</option></select></td><td>类型限制</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getchanneltreeOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 290, title: '获取频道导航树信息', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("mode").focus();
}

function getchanneltreeOK(){
var mode=$("mode").value;
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var rootchannelid=$("rootchannelid").value;
if(rootchannelid==-1){
rootchannelid="{$qui.channelid}";
}
var channelid=$("channelid").value;
if(channelid==-1){
channelid="{$qui.channelid}";
}
var isopened=$("isopened").value;
var type=$("type").value;
EasyMask.close();
var result="HaiLi.CMS.Data.GetChannelTree("+mode+", "+siteid+", "+rootchannelid+", "+channelid;
if(isopened!=""){
result+=", "+isopened;
}
if(type!=0){
result+=", "+type;
}
result+=")";
InsertText(result);
}

function getarticlebyid(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid'></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>id</td><td><input id='id' value='{$qui.id}'/></td><td>文章ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getarticlebyidOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获得某篇文章', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getarticlebyidOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var id=$("id").value;
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetArticle("+siteid+", "+id+")");
}

function getarticlebytitle(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr><td>string</td><td>title</td><td><input id='fullname' value=''/></td><td>标题(放空返回第一篇)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getarticlebytitleOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '获得某篇文章', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getarticlebytitleOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
if(channelid==-1){
channelid="{$qui.channelid}";
}
var title=$("fullname").value;
if(title==""){
title="null";
}
else if(title.indexOf("{$")==-1){
title="\""+title+"\"";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetArticle("+siteid+", "+channelid+", "+title+")");
}

function getprevarticle(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid'></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>id</td><td><input id='id' value='{$qui.id}'/></td><td>文章ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getprevarticleOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获得上一篇篇文章', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getprevarticleOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var id=$("id").value;
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetPrevArticle("+siteid+", "+id+")");
}

function getnextarticle(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid'></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>id</td><td><input id='id' value='{$qui.id}'/></td><td>文章ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getnextarticleOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获得下一篇文章', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getnextarticleOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var id=$("id").value;
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetNextArticle("+siteid+", "+id+")");
}

function getarticlecount(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr id='isreadchildchannelcontainer' style='display:none;'><td>bool</td><td>isreadchildchannel</td><td><select id='isreadchildchannel'><option value='true'>是</option><option value='false' selected>否</option></select></td><td>读取子频道下的文章</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>图片文章</option><option value='2'>视频文章</option><option value='3'>附件文章</option></select></td><td>文章类型限制</td></tr>";
content+="<tr><td>string</td><td>keyword</td><td><input id='keyword'/></td><td>搜索关键词(放空为不限)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getarticlecountOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 258, title: '获取文章数量', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getarticlecountOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
var isreadchildchannel=$("isreadchildchannel").value;
var type=$("type").value;
var keyword="";
if($("keyword").value!=""){
if($("keyword").value.indexOf("$")>-1||$("keyword").value.indexOf("this.")>-1){
keyword=$("keyword").value;
}
else{
keyword="\"" + $("keyword").value + "\"";
}
}
EasyMask.close();
var result;
if(type==0){
result="HaiLi.CMS.Data.GetArticleCount(";
}
else if(type==1){
result="HaiLi.CMS.Data.GetImageArticleCount(";
}
else if(type==2){
result="HaiLi.CMS.Data.GetMediaArticleCount(";
}
else if(type==3){
result="HaiLi.CMS.Data.GetOtherArticleCount(";
}
if(siteid!=0){
result+=siteid;
if(channelid=="0"){
result+=", false";
}
else if(channelid==-1){
result+=", {$qui.channelid}, "+isreadchildchannel;
}
else{
result+=", "+channelid+", "+isreadchildchannel;
}
if(keyword!=""){
result+=", "+keyword;
}
result+=")";
}
else{
if(keyword!=""){
result+=keyword;
result+=")";
}
else{
result+=")";
}
}
InsertText(result);
}

function getarticletop(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr id='isreadchildchannelcontainer' style='display:none;'><td>bool</td><td>isreadchildchannel</td><td><select id='isreadchildchannel'><option value='true'>是</option><option value='false' selected>否</option></select></td><td>读取子频道下的文章</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>图片文章</option><option value='2'>视频文章</option><option value='3'>附件文章</option></select></td><td>文章类型限制</td></tr>";
content+="<tr><td>string</td><td>keyword</td><td><input id='keyword'/></td><td>搜索关键词(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>order</td><td>"+ArticleOrderSelect(true)+"</td><td>排序方式</td></tr>";
content+="<tr><td>int</td><td>top</td><td><input id='pagesize' value=''/></td><td>返回前几篇文章(放空返回全部)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getarticletopOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 322, title: '获得多篇文章', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getarticletopOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
var isreadchildchannel=$("isreadchildchannel").value;
var type=$("type").value;
var keyword="";
if($("keyword").value!=""){
if($("keyword").value.indexOf("$")>-1||$("keyword").value.indexOf("this.")>-1){
keyword=$("keyword").value;
}
else{
keyword="\"" + $("keyword").value + "\"";
}
}
var order=$("order").value;
var orderType=$("ordertype").value;
if(order==""){
order="null";
}
else{
order="\""+order+" "+orderType+"\"";
}
var top=$("pagesize").value.trim();
if(top==""){
top=0;
}
EasyMask.close();
var result;
if(type==0){
result="HaiLi.CMS.Data.GetArticleTop(";
}
else if(type==1){
result="HaiLi.CMS.Data.GetImageArticleTop(";
}
else if(type==2){
result="HaiLi.CMS.Data.GetMediaArticleTop(";
}
else if(type==3){
result="HaiLi.CMS.Data.GetOtherArticleTop(";
}
if(siteid!=0){
result+=siteid;
if(channelid=="0"){
result+=", false";
}
else if(channelid==-1){
result+=", {$qui.channelid}, "+isreadchildchannel;
}
else{
result+=", "+channelid+", "+isreadchildchannel;
}
if(keyword!=""){
result+=", "+keyword;
}
result+=", "+order+", "+top+")";
}
else{
if(keyword!=""){
result+=keyword;
result+=", "+order+", "+top+")";
}
else{
result+=order+", "+top+")";
}
}
InsertText(result);
}

function getarticlepaging(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr id='isreadchildchannelcontainer' style='display:none;'><td>bool</td><td>isreadchildchannel</td><td><select id='isreadchildchannel'><option value='true'>是</option><option value='false' selected>否</option></select></td><td>读取子频道下的文章</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>图片文章</option><option value='2'>视频文章</option><option value='3'>附件文章</option></select></td><td>文章类型限制</td></tr>";
content+="<tr><td>string</td><td>keyword</td><td><input id='keyword'/></td><td>搜索关键词(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>order</td><td>"+ArticleOrderSelect(true)+"</td><td>排序方式</td></tr>";
content+="<tr><td>int</td><td>pagesize</td><td><input id='pagesize' value='10'/></td><td>每页几行数据(放空默认为:10)</td></tr>";
content+="<tr><td>int</td><td>pageno</td><td><input id='pageno' value='{$qus.pageno} == null ? 1 : {$qui.pageno}'/></td><td>返回第几页数据(放空默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getarticlepagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 354, title: '获得分页文章', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getarticlepagingOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
var isreadchildchannel=$("isreadchildchannel").value;
var type=$("type").value;
var keyword="";
if($("keyword").value!=""){
if($("keyword").value.indexOf("$")>-1||$("keyword").value.indexOf("this.")>-1){
keyword=$("keyword").value;
}
else{
keyword="\"" + $("keyword").value + "\"";
}
}
var order=$("order").value;
var orderType=$("ordertype").value;
if(order==""){
order="null";
}
else{
order="\""+order+" "+orderType+"\"";
}
var pagesize=$("pagesize").value.trim();
if(pagesize==""){
pagesize=10;
}
var pageno=$("pageno").value.trim();
if(pageno==""){
pageno=1;
}
EasyMask.close();
var result;
if(type==0){
result="HaiLi.CMS.Data.GetArticlePaging(";
}
else if(type==1){
result="HaiLi.CMS.Data.GetImageArticlePaging(";
}
else if(type==2){
result="HaiLi.CMS.Data.GetMediaArticlePaging(";
}
else if(type==3){
result="HaiLi.CMS.Data.GetOtherArticlePaging(";
}
if(siteid!=0){
result+=siteid;
if(channelid=="0"){
result+=", false";
}
else if(channelid==-1){
result+=", {$qui.channelid}, "+isreadchildchannel;
}
else{
result+=", "+channelid+", "+isreadchildchannel;
}
if(keyword!=""){
result+=", "+keyword;
}
result+=", "+order+", "+pagesize+", "+pageno+")";
}
else{
if(keyword!=""){
result+=keyword;
result+=", "+order+", "+pagesize+", "+pageno+")";
}
else{
result+=order+", "+pagesize+", "+pageno+")";
}
}
InsertText(result);
}

function getquotebyid(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>id</td><td><input id='id' value='{$qui.id}'/></td><td>站点ID</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getquotebyidOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 162, title: '获得某篇引用', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getquotebyidOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var id=$("id").value;
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetQuote("+siteid+", "+id+")");
}

function getquotebytitle(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr><td>string</td><td>title</td><td><input id='fullname' value=''/></td><td>标题(放空返回第一篇)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getquotebytitleOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 194, title: '获得某篇引用', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=false;
SetSite();
$("siteid").focus();
}

function getquotebytitleOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
if(channelid==-1){
channelid="{$qui.channelid}";
}
var title=$("fullname").value;
if(title==""){
title="null";
}
else if(title.indexOf("{$")==-1){
title="\""+title+"\"";
}
EasyMask.close();
InsertText("HaiLi.CMS.Data.GetArticle("+siteid+", "+channelid+", "+title+")");
}

function getquotecount(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr id='isreadchildchannelcontainer' style='display:none;'><td>bool</td><td>isreadchildchannel</td><td><select id='isreadchildchannel'><option value='true'>是</option><option value='false' selected>否</option></select></td><td>读取子频道下的文章</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>图片文章</option><option value='2'>视频文章</option><option value='3'>附件文章</option></select></td><td>文章类型限制</td></tr>";
content+="<tr><td>string</td><td>keyword</td><td><input id='keyword'/></td><td>搜索关键词(放空为不限)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getquotecountOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 258, title: '获取引用数量', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getquotecountOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
var isreadchildchannel=$("isreadchildchannel").value;
var type=$("type").value;
var keyword="";
if($("keyword").value!=""){
if($("keyword").value.indexOf("$")>-1||$("keyword").value.indexOf("this.")>-1){
keyword=$("keyword").value;
}
else{
keyword="\"" + $("keyword").value + "\"";
}
}
EasyMask.close();
var result;
if(type==0){
result="HaiLi.CMS.Data.GetQuoteCount(";
}
else if(type==1){
result="HaiLi.CMS.Data.GetImageQuoteCount(";
}
else if(type==2){
result="HaiLi.CMS.Data.GetMediaQuoteCount(";
}
else if(type==3){
result="HaiLi.CMS.Data.GetOtherQuoteCount(";
}
if(siteid!=0){
result+=siteid;
if(channelid=="0"){
result+=", false";
}
else if(channelid==-1){
result+=", {$qui.channelid}, "+isreadchildchannel;
}
else{
result+=", "+channelid+", "+isreadchildchannel;
}
if(keyword!=""){
result+=", "+keyword;
}
result+=")";
}
else{
if(keyword!=""){
result+=keyword;
result+=")";
}
else{
result+=")";
}
}
InsertText(result);
}

function getquotetop(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr id='isreadchildchannelcontainer' style='display:none;'><td>bool</td><td>isreadchildchannel</td><td><select id='isreadchildchannel'><option value='true'>是</option><option value='false' selected>否</option></select></td><td>读取子频道下的文章</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>图片引用</option><option value='2'>视频引用</option><option value='3'>附件引用</option></select></td><td>引用类型限制</td></tr>";
content+="<tr><td>string</td><td>keyword</td><td><input id='keyword'/></td><td>搜索关键词(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>order</td><td>"+ArticleOrderSelect(true)+"</td><td>排序方式</td></tr>";
content+="<tr><td>int</td><td>top</td><td><input id='pagesize' value=''/></td><td>返回前几篇引用(放空返回全部)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getquotetopOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 322, title: '获得多篇引用', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getquotetopOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
var isreadchildchannel=$("isreadchildchannel").value;
var type=$("type").value;
var keyword="";
if($("keyword").value!=""){
if($("keyword").value.indexOf("$")>-1||$("keyword").value.indexOf("this.")>-1){
keyword=$("keyword").value;
}
else{
keyword="\"" + $("keyword").value + "\"";
}
}
var order=$("order").value;
var orderType=$("ordertype").value;
if(order==""){
order="null";
}
else{
order="\""+order+" "+orderType+"\"";
}
var top=$("pagesize").value.trim();
if(top==""){
top=0;
}
EasyMask.close();
var result;
if(type==0){
result="HaiLi.CMS.Data.GetQuoteTop(";
}
else if(type==1){
result="HaiLi.CMS.Data.GetImageQuoteTop(";
}
else if(type==2){
result="HaiLi.CMS.Data.GetMediaQuoteTop(";
}
else if(type==3){
result="HaiLi.CMS.Data.GetOtherQuoteTop(";
}
if(siteid!=0){
result+=siteid;
if(channelid==0){
result+=", false";
}
else if(channelid==-1){
result+=", {$qui.channelid}, "+isreadchildchannel;
}
else{
result+=", "+channelid+", "+isreadchildchannel;
}
if(keyword!=""){
result+=", "+keyword;
}
result+=", "+order+", "+top+")";
}
else{
if(keyword!=""){
result+=keyword;
result+=", "+order+", "+top+")";
}
else{
result+=order+", "+top+")";
}
}
InsertText(result);

}

function getquotepaging(o){
OnElementClick(o);
var content=dialogHead;
content+="<tr><td>int</td><td>siteid</td><td><select id='siteid' onchange=\"SetChannel();\"></select></td><td>站点ID</td></tr>";
content+="<tr><td>int</td><td>channelid</td><td><select id='channelid' onchange=\"OnChannelIDChange();\"></select></td><td>频道ID</td></tr>";
content+="<tr id='isreadchildchannelcontainer' style='display:none;'><td>bool</td><td>isreadchildchannel</td><td><select id='isreadchildchannel'><option value='true'>是</option><option value='false' selected>否</option></select></td><td>读取子频道下的引用</td></tr>";
content+="<tr><td>int</td><td>type</td><td><select id='type'><option value='0'>不限</option><option value='1'>图片文章</option><option value='2'>视频文章</option><option value='3'>附件文章</option></select></td><td>引用类型限制</td></tr>";
content+="<tr><td>string</td><td>keyword</td><td><input id='keyword'/></td><td>搜索关键词(放空为不限)</td></tr>";
content+="<tr><td>string</td><td>order</td><td>"+ArticleOrderSelect(true)+"</td><td>排序方式</td></tr>";
content+="<tr><td>int</td><td>pagesize</td><td><input id='pagesize' value='10'/></td><td>每页几行数据(放空默认为:10)</td></tr>";
content+="<tr><td>int</td><td>pageno</td><td><input id='pageno' value='{$qus.pageno} == null ? 1 : {$qui.pageno}'/></td><td>返回第几页数据(放空默认为:1)</td></tr>";
content+="<tr><td align=\"right\" colspan=\"4\"><button type=\"button\" id=\"yes\" onclick=\"getquotepagingOK();\">确定</button>&nbsp;<button type=\"button\" onclick=\"EasyMask.close();\">取消</button></td></tr></table>";
EasyMask.init({ width: 820, height: 354, title: '获得分页引用', detail: content });
IsShowCurrent=true;
IsShowSiteRoot=false;
IsShowChannelRoot=true;
SetSite();
$("siteid").focus();
}

function getquotepagingOK(){
var siteid=$("siteid").value;
if(siteid==-1){
siteid="{$qui.siteid}";
}
var channelid=$("channelid").value;
var isreadchildchannel=$("isreadchildchannel").value;
var type=$("type").value;
var keyword="";
if($("keyword").value!=""){
if($("keyword").value.indexOf("$")>-1||$("keyword").value.indexOf("this.")>-1){
keyword=$("keyword").value;
}
else{
keyword="\"" + $("keyword").value + "\"";
}
}
var order=$("order").value;
var orderType=$("ordertype").value;
if(order==""){
order="null";
}
else{
order="\""+order+" "+orderType+"\"";
}
var pagesize=$("pagesize").value.trim();
if(pagesize==""){
pagesize=10;
}
var pageno=$("pageno").value.trim();
if(pageno==""){
pageno=1;
}
EasyMask.close();
var result;
if(type==0){
result="HaiLi.CMS.Data.GetQuotePaging(";
}
else if(type==1){
result="HaiLi.CMS.Data.GetImageQuotePaging(";
}
else if(type==2){
result="HaiLi.CMS.Data.GetMediaQuotePaging(";
}
else if(type==3){
result="HaiLi.CMS.Data.GetOtherQuotePaging(";
}
if(siteid!=0){
result+=siteid;
if(channelid==0){
result+=", false";
}
else if(channelid==-1){
result+=", {$qui.channelid}, "+isreadchildchannel;
}
else{
result+=", "+channelid+", "+isreadchildchannel;
}
if(keyword!=""){
result+=", "+keyword;
}
result+=", "+order+", "+pagesize+", "+pageno+")";
}
else{
if(keyword!=""){
result+=keyword;
result+=", "+order+", "+pagesize+", "+pageno+")";
}
else{
result+=order+", "+pagesize+", "+pageno+")";
}
}
InsertText(result);
}

function OnChannelIDChange(){
if($("channelid").value=="0"){
$("isreadchildchannelcontainer").style.display="none";
}
else{
$("isreadchildchannelcontainer").style.display="";
}
}