﻿// JScript 檔

// ==============================================================================================================
// 	實作 AJAX 的  AjaxRequest() 物件含Mozilla
// ==============================================================================================================

    
    function AjaxRequest()
    { 
	    var A=null;

	    // Internet Explorer
	    try
	    {
		    A=new ActiveXObject("Msxml2.XMLHTTP");
	    }
	    catch(e)
	    {
		    try
		    {
			    A=new ActiveXObject("Microsoft.XMLHTTP");
		    }
		    catch(oc)
		    {
			    A=null;
		    }
	    }

	    // Mozilla
	    if ( !A && typeof XMLHttpRequest != "undefined" ) 
	    {
		    A=new XMLHttpRequest();
	    }
	    return A;
    }
    
// ==============================================================================================================
// 	實作 取亂數 的 Rnd() 方法
// ==============================================================================================================
    function Rnd()
    {
        var theDate = new Date();

        return theDate.getMinutes() + "" + theDate.getSeconds() + "" + theDate.getMilliseconds() + "" + Math.floor(Math.random()*10000000000000000);
    }
    