﻿
function visitor() 
{ 
//define variable 
var Jsay; 
var Jdayr; 
var Jtoday= new Date(); 
var Jyear= Jtoday.getYear(); Jmonth=Jtoday.getMonth(); 
Jday= Jtoday.getDay(); Jdate=Jtoday.getDate(); 
Jhrs= Jtoday.getHours(); Jmin=Jtoday.getMinutes(); 
Jsec=Jtoday.getSeconds(); 


document.write('<font color="#333333">今天是<font color=#333333>' + (Jmonth+1) ); 
document.write("</font>月<font color=#333333>"+Jdate+"</font>日 "); 
if (Jday==1) 
document.write("星期<font color=#333333>一</font>"); 
else if (Jday==2) 
document.write("星期<font color=#333333>二</font>"); 
else if (Jday==3) 
document.write("星期<font color=#333333>三</font>"); 
else if (Jday==4) 
document.write("星期<font color=#333333>四</font>"); 
else if (Jday==5) 
document.write("星期<font color=#333333>五</font>"); 
else if (Jday==6) 
document.write("星期<font color=#333333>六</font>"); 
else if (Jday==0) 
document.write("星期<font color=#333333>日</font>"); 
} 
/*
$(document).ready(
function(){

	function doLogin() {
		var uid = $('#uid').val();
		var pwd = $('#pwd').val();
		var cbfn = function(json) {
			if ('OK' == json.status) {
				//write cookie
				$.cookie('uid', uid, { path:"/" });
				location.href = '<?php echo $this->baseUrl() ?>/';
			} else {
				$('#pwd').attr('value', '');
				BB.stopBusy();
				alert(json.reason);
			}
			BB.stopBusy();
		}
		
		if ('' != uid && '' != pwd) {
			BB.showBusy();
			$.post('<?php echo $this->baseUrl() ?>/users/dologin', {email:uid, password:pwd}, cbfn, 'json');
		} 
	}
	
	function doLogout() {
		BB.showBusy();
		var cbfn = function(json) {
			location.href = '<?php echo $this->baseUrl() ?>/';
		}
		$.post('<?php echo $this->baseUrl() ?>/users/dologout', {}, cbfn, 'text');
	}
	
	function newCus() {
		BB.showBusy();
		location.href = '<?php echo $this->baseUrl() ?>/users/new';
	}
	function lostPwd () {
		BB.showBusy();
		location.href = '<?php echo $this->baseUrl() ?>/users/lostpwd';
	}
	function account () {
		BB.showBusy();
		location.href = '<?php echo $this->baseUrl() ?>/users/account';
	}
	function hostlogin () {
		BB.showBusy();
		location.href = '<?php echo $this->baseUrl() ?>/hotelmgr';
	}
	function bookrecord () {
		BB.showBusy();
		location.href = '<?php echo $this->baseUrl() ?>/users/bookrecord';
	}
	function mainPage() {
		BB.showBusy();
		location.href = '<?php echo $this->baseUrl() ?>/';
	}
	$('#loginBtn').click(doLogin);
	$('#logoutBtn').click(doLogout);
	$('#newCus').click(newCus);
	$('#lostPwd').click(lostPwd);
	$('#account').click(account);
	$('#hostlogin').click(hostlogin);
	$('#mainPage').click(mainPage);
	$('#bookrecord').click(bookrecord);
	if (null != $.cookie('uid')) {
		$('#uid').val($.cookie('uid'));
	}

}
)
*/