// JavaScript Document
<!--
//日期
var enabled = 0; today = new Date();
var day; var date;
if(today.getDay()==0) day = "星期日"
if(today.getDay()==1) day = "星期一"
if(today.getDay()==2) day = "星期二"
if(today.getDay()==3) day = "星期三"
if(today.getDay()==4) day = "星期四"
if(today.getDay()==5) day = "星期五"
if(today.getDay()==6) day = "星期六"
document.fgColor = "#000000";
date = (today.getYear()) + "年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日  " + day  +"";

//复制标题
function copyToClipBoard(){
   var clipBoardContent=''; 
   clipBoardContent+=document.all('content_title').innerText;
   clipBoardContent+='\r\n';
   clipBoardContent+=document.location.href;
   clipBoardContent+='\r\n';
   window.clipboardData.setData("Text",clipBoardContent);
   alert("复制成功，请粘贴到你的QQ/MSN上推荐给你的好友");
}

//调整字体大小
function doZoom(size){
	document.getElementById('zoom').style.fontSize=size+'px'
}

//用户登录
function CheckFormUserLogin()
{
	if(document.UserLogin.UserName.value=="")
	{
		alert("请输入用户名！");
		document.UserLogin.UserName.focus();
		return false;
	}
	if(document.UserLogin.Passwd.value == "")
	{
		alert("请输入密码！");
		document.UserLogin.Passwd.focus();
		return false;
	}
	if(document.UserLogin.verifycode.value == "")
	{
		alert("请输入验证码！");
		document.UserLogin.verifycode.focus();
		return false;
	}
}

// Example:
// writeCookie("myCookie", "my name", 24);
// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.
function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}

// 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;
}

// 图片预加载
function loadImages() {
    var d=document; 
	if(d.images){
		if(!d.MM_p) d.MM_p=new Array();
    	var i,j=d.MM_p.length,a=loadImages.arguments; 
		for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){
				d.MM_p[j]=new Image; 
				d.MM_p[j++].src=a[i];
			}
	}
}
// -->
