// JavaScript Document
/*'''''''''''''''''''''''''''''
Request.QueryString 方法
方法方式:
按名字:
document.write( Request.QueryString.item("test") );
按索引
document.write( Request.QueryString.item(0) );

数组方式
按名字:
document.write( Request.QueryString.Item["test"] );
按索引
document.write( Request.QueryString.Item[0] );

得到长度:
document.write( Request.QueryString.count );

得到查询字串:
document.write( Request.QueryString.Current );

Request.Cookies 方法 同上

''''''''''''''''''''''''''''''*/
var Request = 
{
QueryString: new ThunderBirdRequestQueryString(),
Cookies: new ThunderBirdRequestCookies()
}
function ThunderBirdRequestQueryString()
{
this.Current = document.location.search;
this.count = 0;
this.Item = new Array();
this.item = function (strKey)
{
  if ( typeof(this.Item[strKey]) != "undefined" )
  {
   return this.Item[strKey];
  }
  else
  {
   return "";
  }
}
ThunderBirdRequestOnInit(/([^?&][a-z\d]*)=([^#&]*)/gim, this.Current, this.count, this.Item);
}
function ThunderBirdRequestCookies()
{
this.Current = document.cookie;
this.count = 0;
this.Item = new Array();
this.item = function (strKey)
{
  if ( typeof(this.Item[strKey]) != "undefined" )
  {
   return this.Item[strKey];
  }
  else
  {
   return "";
  }
}
ThunderBirdRequestOnInit(/([^?&][a-z\d]*)=([^#&;]*)/gim, this.Current, this.count, this.Item);
}
function ThunderBirdRequestOnInit(RegExpRule, Current, count, Item)
{
if ( Current != "" )
{
  while ( RegExpRule.exec(Current) != null )
  {
   Item[RegExp.$1] = RegExp.$2;
   Item[count] = RegExp.$2;
   count += 1;
  }
}
}