﻿
document.writeln('<iframe  id="hideframe" src="about:blank" name="hideframe" onload="getContent()" frameborder=0 scrolling=no width=0 height=0></iframe>');
document.writeln('<form name="bform" id="bform" method="post" action="" target="hideframe">');
document.writeln('<input id="tbcontent" name="tbcontent" type="hidden" />');
document.writeln('<input id="sourceURL" name="sourceURL" type="hidden" />');
document.writeln('<input id="urlID" name="urlID" type="hidden" />');
document.writeln('<input id="fontSize" name="fontSize" type="hidden" />');
document.writeln('<input id="fontColor" name="fontColor" type="hidden" />');
document.writeln('<input id="dbName" name="dbName" type="hidden" />');
document.writeln('<input id="isonly" name="isonly" type="hidden" />');
document.writeln('<input id="wordL" name="wordL" type="hidden" /></form>');
var jsobj = document.getElementById("linkjs");
var pars = jsobj.src.split('?')[1].split(',');

//配置
var fontSize = pars[0];
var fontColor = pars[1];
var urlID = pars[2];
var dbName = pars[3];
var wordL = pars[4];
var isOnly = pars[5];
//
var sourceURL = window.location.href.replace('?', '-').replace('&', '-');
var adurl = "http://w.58v5.cn/ajaxdata.aspx";
var subed=false;
function getContent() {
    if (subed==false) return;
    var path = adurl + "?id=" + sourceURL;
    var oHead = document.getElementsByTagName('HEAD').item(0);
    var n = document.createElement("script");
    n.type = "text/javascript";
    n.charset = "utf-8";
    n.id = "getwordbackjs";
    n.src = path;
    oHead.appendChild(n);
}
var formobj = document.getElementById("bform");
var contentobj = document.getElementById("wordcontent");
if (contentobj) {
    var tbc = contentobj.innerHTML;
    tbc = encodeURI(tbc);
    document.getElementById("tbcontent").value = tbc;
    document.getElementById("sourceURL").value = sourceURL;
    document.getElementById("fontSize").value = fontSize;
    document.getElementById("fontColor").value = fontColor;
    document.getElementById("urlID").value = urlID;
    document.getElementById("dbName").value = dbName;
    document.getElementById("wordL").value = wordL;
    document.getElementById("isonly").value =isOnly ;

   //  var su=sourceURL.split('/')[2].split('.')[0];
   // if (su=="gz"||su=="sz"||su=="sh")
   // {
        subed=true;
        formobj.action = adurl;
        formobj.submit();
    //}
}