﻿// JScript 文件
var xmlHttp;
var returnString;

function ShowForm(url, width, height, optValidate) {

	window.open (url,'News','height='+height+',width='+width+',top=200,left=200,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') 
} 

function ShowDialog(url, width, height, optValidate) {
 
	var arr = showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:yes;status:no");
} 


function createXMLHttpRequest()
{
   if(window.ActiveXObject)
   {
       xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest)
   {
       xmlHttp=new XMLHttpRequest();
   }  
}

function RcreateXMLHttpRequest()
{
    var xmlHttp2;
      if(window.ActiveXObject)
   {
       xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest)
   {
       xmlHttp2=new XMLHttpRequest();
   } 
   return xmlHttp2;
}



function clearModelsList(DesSelect)
{
    var models;
    models=document.getElementById(DesSelect);
    while(models.childNodes.length>0)
    {
        models.removeChild(models.childNodes[0]);
    }
}


function handleStateChange()
{
   if(xmlHttp.readyState==4)
   {
       if(xmlHttp.status==200)
       {
           returnString=unescape(xmlHttp.responseText);

       }
   }
}

function AJpost(postInfo)
{
        createXMLHttpRequest();    xmlHttp.onreadystateChange=handleStateChange;    xmlHttp.open("POST","Ajax.aspx",false);	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");	xmlHttp.send(postInfo);	}function AJpostNoalert(postInfo)
{
    var eZuStudio = new ActiveXObject("Microsoft.XMLHTTP");    eZuStudio.open("POST","PostData.aspx",false);	eZuStudio.setRequestHeader("Content-Type","application/x-www-form-urlencoded");	eZuStudio.send(postInfo);	returnString=unescape(eZuStudio.responseText);	alert(unescape(eZuStudio.responseText));	}