var adfiles=new Array();
adfiles["T0"]=new Array("img","banner0_0.jpg","1")

$(document).ready(function(){
//addads(adfiles,"Ads","div")
$("#artnr img").wrap("<center></center>"); 
});

var king_page='/kipage/';
function load(id) {
    var doc = $("#"+id);
    if (id == 'aja' || id == 'flo') {
        if (id == 'aja') { //document.body.scrollTop
            var widthaja = (document.documentElement.scrollWidth - 680 - 30) / 2;
            doc.css("left",widthaja + 'px');
            doc.css("top",(document.documentElement.scrollTop + 90) + 'px');
            doc.html('<div id="ajatitle"><span>Loading...</span><img src="' + king_page + 'system/images/close.gif" class="os" onclick="display(\'aja\')"/></div><div id="load"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>Loading...</div>');
        }
        else {
            var widthflo = (document.documentElement.scrollWidth - 360 - 30) / 2;
            doc.css("left",widthflo + 'px');
            doc.css("top",(document.documentElement.scrollTop + 190) + 'px');
            if (is != 0) {
                doc.html('<div id="flotitle"><span>Loading...</span><img src="' + king_page + 'system/images/close.gif" class="os" onclick="display(\'aja\')"/></div><div id="flomain">Loading...</div>');
            }
        }
    } else {
            doc.html('<img class=""os"" src="' + king_page + 'system/images/load.gif"/>');
    }
}
function posthtm(url, id, verbs, is) { //is null or 1
    var doc = $("#"+id);
    load(id);
    //	doc.innerHTML='<span><img src="image/load.gif"/>Loading...</span>';
    var xmlhttp = false;
    if (doc != null) {
        doc.css("visibility","visible");
        if (doc.css("visibility") == "visible") {
            xmlhttp = ajax_driv();
            xmlhttp.open("POST", url, true);
            xmlhttp.setRequestHeader("If-Modified-Since", "Thu, 01 Jan 1970 00:00:00 GMT");
            xmlhttp.onreadystatechange = function() {
                if (xmlhttp.readyState == 4) {
                    if (is || is == null) {
                        doc.html(xmlhttp.responseText);
                    }
                    else {
                        var data = {};
                        data = eval('(' + xmlhttp.responseText + ')');
                        doc.html(data.main);
                        eval(data.js);
                    };
                }
            }
            xmlhttp.setRequestHeader("Content-Length", verbs.length);
            xmlhttp.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");

            xmlhttp.send(verbs);
        }
    }
}
function ajax_driv() {
    var xmlhttp;
    if (window.ActiveXObject) {
        /* 不要删除以下注释，这部分不是注释 */
        /*@cc_on @*/
        /*@if (@_jscript_version >= 5)
		try {
		  xmlhttp = new ActiveXObject("Msxml2.xmlhttp");
		} catch (e) {
		  try {
			xmlhttp = new ActiveXObject("Microsoft.xmlhttp");
		  } catch (e) {
			xmlhttp = false;
		  }
		}
		@end @*/
    } else {
        xmlhttp = new XMLHttpRequest();
    }
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp;
}
