function disp(){var now= new Date();var watch1 = now.toLocaleString();document.form1.field1.value = watch1;setTimeout("disp()",1000);}<!--////By kitayan HTML タグであそぼう！http://www4.osk.3web.ne.jp/~kitayan/speed=3;//点滅スピードmy_cnt=0;my_cnt2=0;//背景色設定	back_color=new Array;	back_color[0]="#FF0033";	back_color[1]="#FFFFFF";//フォントカラー設定	font_color=new Array;	font_color[0]="#FFFFFF";	font_color[1]="#000000";			function my_bgcolor()		{		if(document.all)				{document.all("t1").bgColor=back_color[my_cnt]				document.all("t1").style.color=font_color[my_cnt];				}				my_cnt++;				if(my_cnt >= back_color.length)my_cnt=0;				setTimeout('my_bgcolor()',speed*1000);				}//-->/** * http.js: utilities for scripted HTTP requests * * From the book JavaScript: The Definitive Guide, 5th Edition, * by David Flanagan. Copyright 2006 O'Reilly Media, Inc. (ISBN: 0596101996) */// Make sure we haven't already been loadedvar HTTP;if (HTTP && (typeof HTTP != "object" || HTTP.NAME))    throw new Error("Namespace 'HTTP' already exists");// Create our namespace, and specify some meta-informationHTTP = {};HTTP.NAME = "HTTP";    // The name of this namespaceHTTP.VERSION = 1.0;    // The version of this namespace// This is a list of XMLHttpRequest creation factory functions to tryHTTP._factories = [    function() { return new XMLHttpRequest(); },    function() { return new ActiveXObject("Msxml2.XMLHTTP"); },    function() { return new ActiveXObject("Microsoft.XMLHTTP"); }];// When we find a factory that works, store it hereHTTP._factory = null;/** * Create and return a new XMLHttpRequest object. *  * The first time we're called, try the list of factory functions until * we find one that returns a nonnull value and does not throw an * exception.  Once we find a working factory, remember it for later use. */HTTP.newRequest = function() {    if (HTTP._factory != null) return HTTP._factory();    for(var i = 0; i < HTTP._factories.length; i++) {        try {            var factory = HTTP._factories[i];            var request = factory();            if (request != null) {                HTTP._factory = factory;                return request;            }        }        catch(e) {            continue;        }    }    // If we get here, none of the factory candidates succeeded,    // so throw an exception now and for all future calls.    HTTP._factory = function() {        throw new Error("XMLHttpRequest not supported");    }    HTTP._factory(); // Throw an error}/** * Use XMLHttpRequest to fetch the contents of the specified URL using * an HTTP GET request.  When the response arrives, pass it (as plain * text) to the specified callback function. *  * This function does not block and has no return value. */HTTP.getText = function(url, callback) {    var request = HTTP.newRequest();    request.onreadystatechange = function() {        if (request.readyState == 4 && request.status == 200)            callback(request.responseText);    }    request.open("GET", url);    request.send(null);};/* 対象IDを可変にするための変更 20090411 */HTTP.getText2 = function(url, callback , idname) {    var request = HTTP.newRequest();    request.onreadystatechange = function() {        if (request.readyState == 4 && request.status == 200)            callback(request.responseText,idname);    }    request.open("GET", url);    request.send(null);};/** * Use XMLHttpRequest to fetch the contents of the specified URL using * an HTTP GET request.  When the response arrives, pass it (as a parsed * XML Document object) to the specified callback function. *  * This function does not block and has no return value. */HTTP.getXML = function(url, callback) {    var request = HTTP.newRequest();    request.onreadystatechange = function() {        if (request.readyState == 4 && request.status == 200)            callback(request.responseXML);    }    request.open("GET", url);    request.send(null);};/** * Use an HTTP HEAD request to obtain the headers for the specified URL. * When the headers arrive, parse them with HTTP.parseHeaders() and pass the * resulting object to the specified callback function. If the server returns * an error code, invoke the specified errorHandler function instead.  If no * error handler is specified, pass null to the callback function. */HTTP.getHeaders = function(url, callback, errorHandler) {    var request = HTTP.newRequest();    request.onreadystatechange = function() {        if (request.readyState == 4) {            if (request.status == 200) {                callback(HTTP.parseHeaders(request));            }            else {                if (errorHandler) errorHandler(request.status,                                               request.statusText);                else callback(null);            }        }    }    request.open("HEAD", url);    request.send(null);};/** * Parse the response headers from an XMLHttpRequest object and return * the header names and values as property names and values of a new object. */HTTP.parseHeaders = function(request) {    var headerText = request.getAllResponseHeaders();  // Text from the server    var headers = {}; // This will be our return value    var ls = /^\s*/;  // Leading space regular expression    var ts = /\s*$/;  // Trailing space regular expression    // Break the headers into lines    var lines = headerText.split("\n");    // Loop through the lines    for(var i = 0; i < lines.length; i++) {        var line = lines[i];        if (line.length == 0) continue;  // Skip empty lines        // Split each line at first colon, and trim whitespace away        var pos = line.indexOf(':');             var name = line.substring(0, pos).replace(ls, "").replace(ts, "");        var value = line.substring(pos+1).replace(ls, "").replace(ts, "");        // Store the header name/value pair in a JavaScript object        headers[name] = value;    }    return headers;};WithScript.counter = 0;
