//¡ª¡ª¡ª¡ªUrl¡ª¡ª¡ª¡ª
urlsplit = document.URL.split("/");
var Url = Replace(urlsplit[urlsplit.length - 1].split("?")[0],"#","");//not toLowerCase

//¡ª¡ª¡ª¡ªHideV/ShowV/HideD/ShowD¡ª¡ª¡ª¡ª
function HideV(_s){
	if (findObj(_s) == null) return;
	findObj(_s).style.visibility = "hidden";
}
function ShowV(_s){
	if (findObj(_s) == null) return;
	findObj(_s).style.visibility = "visible";
}
function HideD(_s){
	if (findObj(_s) == null) return;
	findObj(_s).style.display = "none";
}
function ShowD(_s){
	if (findObj(_s) == null) return;
	findObj(_s).style.display = "inline";
}
//¡ª¡ª¡ª¡ªAddHtml/GetHtml/AddText¡ª¡ª¡ª¡ª
function AddHtml(_n,_s)
{	
	if (findObj(_n) != null) document.getElementById(_n).innerHTML = _s;
}
function GetHtml(_n)
{
	if (findObj(_n) != null) return document	.getElementById(_n).innerHTML;
}
//Only For IE5.0+
function AddText(_n,_s)
{	
	document.getElementById(_n).innerText = _s;
}
//¡ª¡ª¡ª¡ªReplace¡ª¡ª¡ª¡ª
function Replace(_s , _cs , _rs )
{return _s.split(_cs).join(_rs);}
//¡ª¡ª¡ª¡ªfindObj¡ª¡ª¡ª¡ª
// Example: obj = findObj("image1");
function findObj(theObj, theDoc)

{

  var p, i, foundObj;

  

  if(!theDoc) theDoc = document;

  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)

  {

    theDoc = parent.frames[theObj.substring(p+1)].document;

    theObj = theObj.substring(0,p);

  }

  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];

  for (i=0; !foundObj && i < theDoc.forms.length; i++) 

    foundObj = theDoc.forms[i][theObj];

  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 

    foundObj = findObj(theObj,theDoc.layers[i].document);

  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

  

  return foundObj;

}
//¡ª¡ª¡ª¡ªUNCDATA/CDATA¡ª¡ª¡ª¡ª
function UNCDATA(_s){
	_s = Replace(_s,"&lt;","<");
	_s = Replace(_s,"&gt;",">");
	_s = Replace(_s,"&amp;","&");
	_s = Replace(_s,"&apos;","'");
	_s = Replace(_s,"&quot;",'"');
	return _s;
}
function CDATA(_s){
	_s = Replace(_s,"<","&lt;");
	_s = Replace(_s,">","&gt;");
	_s = Replace(_s,"&","&amp;");
	_s = Replace(_s,"'","&apos;");
	_s = Replace(_s,'"',"&quot;");
	return _s;
}
//¡ª¡ª¡ª¡ªRequest¡ª¡ª¡ª¡ª
/*
*--------------- Read.htm -----------------
* Request[key]
* ¹¦ÄÜ:ÊµÏÖASPµÄÈ¡µÃURL×Ö·û´®,Request("AAA")
* ²ÎÊý:key,×Ö·û´®.
* ÊµÀý:alert(Request["AAA"])
*--------------- Request.htm -----------------
*/
var passurl=location.search;
var str="";
if (document.URL.split("?")[1] != undefined){
	str = Replace(document.URL.split("?")[1],"#","");
}
var Request = new Object();
if(passurl.indexOf("?")!=-1)
{
	strs = str.split("&");
	for(var i=0;i<strs.length;i++)
	{
		Request[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
	}
}
//¡ª¡ª¡ª¡ªreadCookie/writeCookie¡ª¡ª¡ª¡ª
// Example:

// alert( readCookie("myCookie") );

function readCookie(name)

{

  var cookieValue = "";

  var search = name + "=";

  if(document.cookie.length > 0)

  { 

    offset = document.cookie.indexOf(search);

    if (offset != -1)

    { 

      offset += search.length;

      end = document.cookie.indexOf(";", offset);

      if (end == -1) end = document.cookie.length;

      cookieValue = unescape(document.cookie.substring(offset, end))

    }

  }

  return cookieValue;

}

// Example:

// writeCookie("myCookie", "my name", 24);

// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.

function writeCookie(name, value, sec)

{

  var expire = "";

  if(sec != null)

  {

    expire = new Date((new Date()).getTime() + sec * 1000);

    expire = "; expires=" + expire.toGMTString();

  }

  document.cookie = name + "=" + escape(value) + expire;

}
