﻿// JavaScript Document
function getProNum( proID )
{
  if ( (proID == null) || (proID == "") ) {return;}
  var url = "/ajax.asp?type=getProNum&value="+escape( proID );
  xmlHttp.open("GET", url, true); 
  xmlHttp.onreadystatechange = function()
  {
      if (xmlHttp.readyState != 4) 
      {
         $('pro_Stock').innerHTML="<img src='/image/loading.gif' align='absmiddle'>loading...";
		 $('click_Counter').innerHTML="<img src='/image/loading.gif' align='absmiddle'>loading...";
		 $('buy_Counter').innerHTML="<img src='/image/loading.gif' align='absmiddle'>loading...";
      }
      else 
      { 
	      var response = xmlHttp.responseText ;
		  $('pro_Stock').innerHTML=response.split("|")[0];
		  $('click_Counter').innerHTML=response.split("|")[1];
		  $('buy_Counter').innerHTML=response.split("|")[2];
	  } 
  } 
  xmlHttp.send(null); 
}
function getUserInfo(uID)
{
  if ((uID == null) || (uID == "")) {return;}
  var url = "/ajax.asp?type=getUserInfo&value="+escape(uID);
  xmlHttp.open("GET", url, true); 
  xmlHttp.onreadystatechange = function()
  {
      if (xmlHttp.readyState != 4) 
      {
         $('user_credit').innerHTML="<img src='/image/loading.gif' align='absmiddle'>loading...";
      }
      else 
      { 
	      var response = xmlHttp.responseText ;
		  $('user_credit').innerHTML=response;
	  } 
  } 
  xmlHttp.send(null); 
}
