﻿// <![CDATA[

	var desc = "";
	var via = "";

// ==============================================================================================================
// 	TEXTAREA 限制輸入字數
// ==============================================================================================================

	function TextAreaMaxLength(thsElement, ElementId, maxlength)
	{
		var objElement = document.getElementById(ElementId);
		var strValue = thsElement.value;

		if (strValue.length > maxlength)
		{
			thsElement.style.color = "#FF0000";
			objElement.innerHTML = "【字數太多，刪掉" + (strValue.length - maxlength) + "個吧！】";
		}
		else
		{
			thsElement.style.color = "";
			objElement.innerHTML = "【尚餘 " + (maxlength - strValue.length) + " 個字元 / 限制 " + maxlength + " 個字元】";
		}

		thsElement.onfocus = null;
		thsElement.onkeydown = thsElement.onkeyup = function () 	{

			var strValue = this.value;

			if (strValue.length > maxlength)
			{
				this.style.color = "#FF0000";
				objElement.innerHTML = "【字數太多，刪掉" + (strValue.length - maxlength) + "個吧！】";
			}
			else
			{
				this.style.color = "";
				objElement.innerHTML = "【尚餘 " + (maxlength - strValue.length) + " 個字元 / 限制 " + maxlength + " 個字元】";
			}
		}
	}

// ==============================================================================================================
// 	
// ==============================================================================================================

	function UriEncode(strUri)
	{
		return strUri.replace(/\"/g, "%22").replace(/</g, "%3C").replace(/>/g, "%3E");
	}

// ==============================================================================================================
// 	AJAX 物件
// ==============================================================================================================

	function Ajax()
	{
		this.XMLHTTP = false;

		this.receives = function () 	{

		}

		this.reqeust = function () 	{

			var thsClass = this;

			this.XMLHTTP.onreadystatechange = function ()	{

				if (thsClass.XMLHTTP.readyState == 4 && thsClass.XMLHTTP.status == 200)
					thsClass.receives();
			}
		}

		if (window.XMLHttpRequest)
		{
			this.XMLHTTP = new XMLHttpRequest();

			this.reqeust();
		}
		else if (window.ActiveXObject)
		{
			try
			{
				this.XMLHTTP = new ActiveXObject("Msxml2.XMLHTTP");

				this.reqeust();
			}
			catch (e)
			{
				try
				{

					this.XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");

					this.reqeust();
				}
				catch (e)
				{
				}
			}
		}
	}

// ==============================================================================================================
// 	尋找特定父節點
// ==============================================================================================================

	function ParentNodeTagName(objElement, ElementTagName)
	{
		ElementTagName = ElementTagName.toUpperCase();

		do
		{
			objElement = objElement.parentNode;
		}
		while (objElement.tagName != ElementTagName)

		return objElement;
	}

// ==============================================================================================================
// 	進階編輯
// ==============================================================================================================

	function htmlEditor(thsElement, elementsName, elementsValue)
	{
		thsElement.innerHTML = "<input type=\"hidden\" id=\"" + elementsName + "\" name=\"" + elementsName + "\" value=\"" + HtmlEncode(elementsValue) + "\" style=\"display:none\" /><input type=\"hidden\" id=\"" + elementsName + "___Config\" value=\"\" style=\"display:none\" /><iframe id=\"" + elementsName + "___Frame\" src=\"/fckeditor/editor/fckeditor.html?InstanceName=" + elementsName + "&amp;Toolbar=Basic\" width=\"100%\" height=\"130\" frameborder=\"0\" scrolling=\"no\"></iframe>";
	}

// ==============================================================================================================
// 	視窗 ModalDialog 出現
// ==============================================================================================================

	function openModalDialog(thsElement, strHeader, strMiddle, strFooter, pxWidth, pxHeight)
	{
		this.DocumentElement = function () 	{

			var minY = 0;
			var minX = 0;
			var objElement = document.createElement("DIV");

			objElement.style.clear = "both";

			document.body.appendChild(objElement);

			var pxHeight = objElement.offsetTop;

			document.body.removeChild(objElement);

			minY = (screen.height > pxHeight) ? Math.max(minY, pxHeight) : minY;
			minY = (screen.height > document.documentElement.clientHeight) ? Math.max(minY, document.documentElement.clientHeight) : minY;
			minY = (screen.height > document.body.clientHeight) ? Math.max(minY, document.body.clientHeight) : minY;
			minY = (screen.height > document.body.scrollHeight) ? Math.max(minY, document.body.scrollHeight) : minY;
			minY = (screen.height > document.body.offsetHeight) ? Math.max(minY, document.body.offsetHeight) : minY;
			minX = (screen.width > document.documentElement.clientWidth) ? Math.max(minX, document.documentElement.clientWidth) : minX;
			minX = (screen.width > document.body.clientWidth) ? Math.max(minX, document.body.clientWidth) : minX;
			minX = (screen.width > document.body.scrollWidth) ? Math.max(minX, document.body.scrollWidth) : minX;
			minX = (screen.width > document.body.offsetWidth) ? Math.max(minX, document.body.offsetWidth) : minX;

			var maxY = Math.max(minY, screen.height);

			maxY = Math.max(maxY, pxHeight);
			maxY = Math.max(maxY, document.documentElement.clientHeight);
			maxY = Math.max(maxY, document.body.clientHeight);
			maxY = Math.max(maxY, document.body.scrollHeight);
			maxY = Math.max(maxY, document.body.offsetHeight);
			maxY += document.body.offsetTop + document.body.offsetTop;

			return { "minHeight": minY, "minWidth": minX, "maxHeight": maxY };
		}

		this.ResetMouse = function () 	{

			document.onmouseup = function () 	{

				document.onmousemove = null;
				document.onmouseup = null;
			}
		}

		this.ResetPosition = function (objElement) 	{

			this.ResetMouse();

			var pxW = objElement.offsetWidth;
			var pxH = objElement.offsetHeight;
			var pxC = pxW / 2 - 3.5;
			var pxM = pxH / 2 - 3.5;

			for (var i=0; i<objElement.childNodes.length; i++)
			{
				if (objElement.childNodes[i] && objElement.childNodes[i].tagName && objElement.childNodes[i].tagName == "DIV")
				{
					objElement.childNodes[i].style.visibility = "visible";

					switch (objElement.childNodes[i].style.cursor)
					{
						case "s-resize":

							objElement.childNodes[i].style.top = pxH + "px";

						case "n-resize":

							objElement.childNodes[i].style.left = pxC + "px";

							break;

						case "ne-resize":

							objElement.childNodes[i].style.left = pxW + "px";

							break;

						case "e-resize":

							objElement.childNodes[i].style.left = pxW + "px";

						case "w-resize":

							objElement.childNodes[i].style.top = pxM + "px";

							break;

						case "se-resize":

							objElement.childNodes[i].style.left = pxW + "px";

						case "sw-resize":

							objElement.childNodes[i].style.top = pxH + "px";

							break;
					}
				}
			}
		}

		this.ConvertToInt = function (px) 	{

			px += "";
			px = px.replace(/[a-zA-Z]+$/, "");

			return isNaN(px) ? 0 : Number(px);
		}

		this.ButtonClick = function (objElement) 	{

		}

		this.mouseXY = function (e) 	{

			var x, y;

			if (document.all)
			{
				x = event.x;
				y = event.y;
			}
			else
			{
				x = e.pageX;
				y = e.pageY;
			}

			return { "X" : x, "Y" : y};
		}

		this.positionXY = function (objElement)	{

			var x = objElement.offsetLeft;
			var y = objElement.offsetTop;

			while (objElement=objElement.offsetParent)
			{
				x += objElement.offsetLeft;
				y += objElement.offsetTop;
			}

			return { "X": x, "Y": y };
		}

		//

		var thsClass = this;
		var aryElement = new Array();
		var pntElement = document.body.getElementsByTagName("embed");

		for (var i=0; i<pntElement.length; i++)
		{
			aryElement[i] = new Array(pntElement[i], pntElement[i].style.visibility);
			pntElement[i].style.visibility = "hidden";
		}

		var tbElement = document.createElement("TABLE");
		var trElement = tbElement.insertRow(-1);
		var tdElement = trElement.insertCell(-1);

		tbElement.cellSpacing = 1;
		tbElement.cellPadding = 0;

		trElement = document.createElement("TABLE");
		trElement.cellSpacing = 0;
		trElement.cellPadding = 0;

		tdElement.className = "DialogHeader";

		tdElement.appendChild(trElement);

		tdElement = trElement.insertRow(-1);

		trElement = tdElement.insertCell(-1);

		trElement.style.cursor = "move";
		trElement.style.width = "100%";

		trElement.innerHTML = strHeader + "&nbsp;";

		//

		var divElement = tdElement.insertCell(-1);

		pntElement = document.createElement("INPUT");
		pntElement.type = "button";
		pntElement.value = "×";

		divElement.appendChild(pntElement);

		//

		tdElement = thsElement.parentNode;
		divElement = document.createElement("DIV");

		var strHTML = "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: move;\"></div>";

		strHTML += "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: n-resize;\"></div>";
		strHTML += "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: ne-resize;\"></div>";
		strHTML += "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: w-resize;\"></div>";
		strHTML += "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: e-resize;\"></div>";
		strHTML += "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: sw-resize;\"></div>";
		strHTML += "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: s-resize;\"></div>";
		strHTML += "<div class=\"DialogDot\" style=\"height: 7px; width: 7px; left: -7px; top: -7px; position: absolute; visibility: hidden; background-repeat: no-repeat; cursor: se-resize;\"></div>";

		divElement.style.position = "absolute";
		divElement.style.top = "0px";
		divElement.style.left = "0px";
		divElement.className = "Dialog";

		divElement.innerHTML = strHTML;

		divElement.appendChild(tbElement);

		this.RemoveBlock = function () 	{

			if (tdElement)
				tdElement.appendChild(thsElement);

			document.body.removeChild(tbElement);

			for (var i=0; i<aryElement.length; i++)
				aryElement[i][0].style.visibility = aryElement[i][1];
		}

		pntElement.onclick = function () 	{

			thsClass.RemoveBlock();
		}

		pntElement = tbElement.insertRow(-1);

		tbElement = document.createElement("DIV");

		this.MouseMove = function (e) 	{

			thsClass.ResetMouse();

			var mouXY = thsClass.mouseXY(e);
			var posXY = thsClass.positionXY(divElement);
			var x = posXY.X - mouXY.X;
			var y = posXY.Y - mouXY.Y;

			document.onmousemove = function (e) {

				var movXY = thsClass.mouseXY(e);
				var ox = x + movXY.X;
				var oy = y + movXY.Y;

				divElement.style.left = ox + "px";
				divElement.style.top  = oy + "px";

				return false;
			}
		}

		trElement.onmousedown = function (e) 	{

			thsClass.MouseMove(e);
		}

		//

		trElement = pntElement.insertCell(-1);

		pntElement = document.createElement("DIV");

		pntElement.className = "DialogLabel";
		pntElement.innerHTML = strMiddle;

		trElement.appendChild(pntElement);

		//

		var chdElement = document.createElement("DIV");

		chdElement.className = "DialogScroll";
		chdElement.style.width = pxWidth + "px";
		chdElement.style.height = pxHeight + "px";
		chdElement.style.overflow = "auto";

		chdElement.appendChild(thsElement);

		trElement.appendChild(chdElement);

		//

		pntElement = document.createElement("DIV");

		pntElement.className = "DialogLabel";
		pntElement.innerHTML = strFooter;

		trElement.appendChild(pntElement);

		//

		pntElement = document.createElement("DIV");

		pntElement.className = "DialogButton";

		trElement.appendChild(pntElement);

		//

		trElement = document.createElement("INPUT");
		trElement.type = "button";
		trElement.value = "確定";

		trElement.onclick = function () 	{

			thsClass.ButtonClick(this);
		}

		pntElement.appendChild(trElement);

		trElement = document.createElement("INPUT");
		trElement.type = "button";
		trElement.value = "取消";

		trElement.onclick = function () 	{

			thsClass.RemoveBlock();
		}

		pntElement.appendChild(trElement);

		//

		tbElement.style.position = "absolute";
		tbElement.style.top = 0;
		tbElement.style.left = document.body.offsetLeft + "px";
		tbElement.style.width = "100%";
		tbElement.innerHTML = "<iframe marginwidth=\"0\" marginheight=\"0\" height=\"100%\" width=\"100%\" scrolling=\"no\" border=\"0\" frameborder=\"0\" class=\"DialogBlock\"></iframe>";

		trElement = document.createElement("DIV");

		trElement.className = "DialogBlock";
		trElement.style.top = 0;
		trElement.style.left = -document.body.offsetLeft + "px";
		trElement.style.width = (document.body.offsetLeft + document.body.offsetLeft) + "px";
		trElement.style.position = "absolute";

		tbElement.appendChild(trElement);

		pntElement = document.createElement("DIV");

		pntElement.className = "DialogBlock";
		pntElement.style.top = 0;
		pntElement.style.left = document.body.offsetLeft + "px";
		pntElement.style.width = "100%";
		pntElement.style.position = "absolute";

		tbElement.appendChild(pntElement);

		tbElement.appendChild(divElement);

		//

		document.body.appendChild(tbElement);

		var oDocument = this.DocumentElement();

		trElement.style.height = oDocument.maxHeight + "px";
		tbElement.style.height = oDocument.maxHeight + "px";
		pntElement.style.height = oDocument.maxHeight + "px";

		divElement.onmousedown = function ()	{

			var boolCancel = false;
			var objElement = this;

			thsClass.ResetPosition(this);

			document.onmousedown = function () 	{

				if (boolCancel)
				{
					for (var i=0; i<objElement.childNodes.length; i++)
					{
						if (objElement.childNodes[i] && objElement.childNodes[i].tagName && objElement.childNodes[i].tagName == "DIV")
							objElement.childNodes[i].style.visibility = "hidden";
					}
				}

				boolCancel = true;
			}

			for (var i=0; i<this.childNodes.length; i++)
			{
				if (this.childNodes[i] && this.childNodes[i].tagName && this.childNodes[i].tagName == "DIV")
				{
					switch (this.childNodes[i].style.cursor)
					{
						case "move":

							this.childNodes[i].onmousedown = function (e) 	{

								thsClass.MouseMove(e);
							}

							break;

						case "n-resize":

							this.childNodes[i].onmousedown = function (e) 	{

								var mouXY = thsClass.mouseXY(e);

								document.onmousemove = function (e) {

									var movXY = thsClass.mouseXY(e);
									var oy = mouXY.Y - movXY.Y;

									mouXY = movXY;

									var iHeight = thsClass.ConvertToInt(chdElement.style.height);

									if (iHeight > pxHeight || oy > 0)
									{
										chdElement.style.height = (iHeight + oy) + "px";

										divElement.style.top = (thsClass.ConvertToInt(divElement.style.top) - oy) + "px";

										thsClass.ResetPosition(divElement);
									}
								}
							}

							break;

						case "ne-resize":

							this.childNodes[i].onmousedown = function (e) 	{

								var mouXY = thsClass.mouseXY(e);
								var perx = thsClass.ConvertToInt(chdElement.style.width) / thsClass.ConvertToInt(chdElement.style.height);

								document.onmousemove = function (e) {

									var movXY = thsClass.mouseXY(e);
									var oy = mouXY.Y - movXY.Y;

									mouXY = movXY;

									var iHeight = thsClass.ConvertToInt(chdElement.style.height);

									if (iHeight > pxHeight || oy > 0)
									{
										chdElement.style.height = (iHeight + oy  ) + "px";
										chdElement.style.width  = (iHeight * perx) + "px";

										divElement.style.top = (thsClass.ConvertToInt(divElement.style.top) - oy) + "px";

										thsClass.ResetPosition(divElement);
									}
								}
							}

							break;

						case "w-resize":

							this.childNodes[i].onmousedown = function (e) 	{

								var mouXY = thsClass.mouseXY(e);

								document.onmousemove = function (e) {

									var movXY = thsClass.mouseXY(e);
									var ox = mouXY.X - movXY.X;

									mouXY = movXY;

									var iWidth = thsClass.ConvertToInt(chdElement.style.width);

									if (iWidth > pxWidth || ox > 0)
									{
										chdElement.style.width = (iWidth + ox) + "px";

										divElement.style.left = (thsClass.ConvertToInt(divElement.style.left) - ox) + "px";

										thsClass.ResetPosition(divElement);
									}
								}
							}

							break;

						case "e-resize":

							this.childNodes[i].onmousedown = function (e) 	{

								var mouXY = thsClass.mouseXY(e);

								document.onmousemove = function (e) {

									var movXY = thsClass.mouseXY(e);
									var ox = mouXY.X - movXY.X;

									mouXY = movXY;

									var iWidth = thsClass.ConvertToInt(chdElement.style.width);

									if (iWidth > pxWidth || ox < 0)
									{
										chdElement.style.width = (iWidth - ox) + "px";

										thsClass.ResetPosition(divElement);
									}
								}
							}

							break;

						case "sw-resize":

							this.childNodes[i].onmousedown = function (e) 	{

								var mouXY = thsClass.mouseXY(e);
								var pery = thsClass.ConvertToInt(chdElement.style.height) / thsClass.ConvertToInt(chdElement.style.width);

								document.onmousemove = function (e) {

									var movXY = thsClass.mouseXY(e);
									var ox = mouXY.X - movXY.X;

									mouXY = movXY;

									var iWidth = thsClass.ConvertToInt(chdElement.style.width);

									if (iWidth > pxWidth || ox > 0)
									{
										chdElement.style.width  = (iWidth + ox  ) + "px";
										chdElement.style.height = (iWidth * pery) + "px";

										divElement.style.left = (thsClass.ConvertToInt(divElement.style.left) - ox) + "px";

										thsClass.ResetPosition(divElement);
									}
								}
							}

							break;

						case "s-resize":

							this.childNodes[i].onmousedown = function (e) 	{

								var mouXY = thsClass.mouseXY(e);

								document.onmousemove = function (e) {

									var movXY = thsClass.mouseXY(e);
									var oy = mouXY.Y - movXY.Y;

									mouXY = movXY;

									var iHeight = thsClass.ConvertToInt(chdElement.style.height);

									if (iHeight > pxHeight || oy < 0)
									{
										chdElement.style.height = (thsClass.ConvertToInt(chdElement.style.height) - oy) + "px";

										thsClass.ResetPosition(divElement);
									}
								}
							}

							break;

						case "se-resize":

							this.childNodes[i].onmousedown = function (e) 	{

								var mouXY = thsClass.mouseXY(e);
								var iWidth  = thsClass.ConvertToInt(chdElement.style.width);
								var iHeight = thsClass.ConvertToInt(chdElement.style.height);
								var perx = iWidth / iHeight;
								var pery = iHeight / iWidth;

								document.onmousemove = function (e) {

									var movXY = thsClass.mouseXY(e);
									var ox = mouXY.X - movXY.X;
									var oy = mouXY.Y - movXY.Y;

									mouXY = movXY;

									if (Math.abs(ox) >= Math.abs(oy))
									{
										var iWidth = thsClass.ConvertToInt(chdElement.style.width);

										if (iWidth > pxWidth || ox < 0)
										{
											chdElement.style.width  = (iWidth - ox  ) + "px";
											chdElement.style.height = (iWidth * pery) + "px";
										}
									}
									else
									{
										iHeight = thsClass.ConvertToInt(chdElement.style.height);

										if (iHeight > pxHeight || oy < 0)
										{
											chdElement.style.height = (iHeight - oy  ) + "px";
											chdElement.style.width  = (iHeight * perx) + "px";
										}
									}

									thsClass.ResetPosition(divElement);
								}
							}

							break;
					}
				}
			}
		}

		divElement.style.top  = (((oDocument.minHeight > divElement.offsetHeight) ? (oDocument.minHeight - divElement.offsetHeight) : oDocument.minHeight) / 2) + "px";
		divElement.style.left = (((oDocument.minWidth  > divElement.offsetWidth ) ? (oDocument.minWidth  - divElement.offsetWidth ) : oDocument.minWidth ) / 2) + "px";

		location.hash = "#";
	}

// ==============================================================================================================
// 	選取 INPUT 元件 selected
// ==============================================================================================================

	function ListSelected(objElement, SelectedValue)
	{
		for (var i=0; i<objElement.length; i++)
		{
			if ((objElement.options[i].value + "") == (SelectedValue + ""))
			{
				objElement.options[i].selected = true;
				break;
			}
		}
	}

// ==============================================================================================================
// 	點選 INPUT 元件 checked
// ==============================================================================================================

	function BoxChecked(objElement, CheckedValue)
	{
		if (objElement.length)
		{
			for (var i=0; i<objElement.length; i++)
			{
				if (objElement[i].value == CheckedValue)
				{
					objElement[i].click();
					break;
				}
			}
		}
		else
		{
			if (objElement.value == CheckedValue)
				objElement[i].click();
		}
	}

// ==============================================================================================================
// 	Email 驗證
// ==============================================================================================================

	function validateEmail(strEmail)
	{
		var pattern = /^[a-zA-Z0-9\.\-_]+@[0-9a-zA-Z\-_]+\.[a-zA-Z_\-\.]+[^\.]$/;

		return pattern.test(strEmail);
	}

// ==============================================================================================================
// 	Url 驗證
// ==============================================================================================================

	function validateUrl(strUrl)
	{
		var pattern = /^[hH][tT]{2}[pP][sS]?[:][/][/][a-zA-Z0-9~!()_#?&%./=\-]+$/;

		return pattern.test(strUrl);
	}

// ==============================================================================================================
// 	實作 SQL 的 LTrim 方法
// ==============================================================================================================

	function LTrim(strString)
	{
		return strString.replace(/^[ \t\n\r]*/g, "");
	}

// ==============================================================================================================
// 	實作 SQL 的 RTrim 方法
// ==============================================================================================================

	function RTrim(strString)
	{
		return strString.replace(/[ \t\n\r]*$/g, "");
	}

// ==============================================================================================================
// 	實作 ASP 的 HtmlEncode 方法
// ==============================================================================================================

	function HtmlEncode(strHTML)
	{
		strHTML = strHTML.replace(/&/g, '&amp;');
		strHTML = strHTML.replace(/</g, '&lt;');
		strHTML = strHTML.replace(/>/g, '&gt;');
		strHTML = strHTML.replace(/"/g, '&quot;');

		return strHTML;
	}

	function nl2br(strHTML)
	{
		strHTML = strHTML.replace(/\r\n/g, "<br />");
		strHTML = strHTML.replace(/\r/g,   "<br />");
		strHTML = strHTML.replace(/\n/g,   "<br />");

		return strHTML;
	}

// ==============================================================================================================
// 	實作 ASP .NET  的 HtmlDecode 方法
// ==============================================================================================================

	function HtmlDecode(strHTML)
	{
		strHTML = strHTML.replace(/&amp;/g,  '&');
		strHTML = strHTML.replace(/&lt;/g,   '<');
		strHTML = strHTML.replace(/&gt;/g,   '>');
		strHTML = strHTML.replace(/&quot;/g, '"');

		return strHTML;
	}

// ==============================================================================================================
// 	Cookie - 取得、設定、刪除
// ==============================================================================================================

	function getCookie(theName)
	{
		theName += "=";

		var theCookie = document.cookie + ";";
		var s = theCookie.indexOf(theName);

		if (s < 0)
			return "";
		else
			return unescape(theCookie.substring((s + theName.length), theCookie.indexOf(";", s)));
	}

	function setCookie(theName, theValue)
	{
		var theDate = new Date("2020/1/1 18:56:35");

		document.cookie = theName + "=" + escape(theValue) + ";expires=" + theDate.toUTCString();
	}

	function delCookie(theName)
	{
		setCookie(theName, "");

		var theDate = new Date("1970/1/1 00:00:01");
	
		document.cookie = theName + "=;expires=" + theDate.toUTCString();
	}

// ]]>