// http://thunder.eeap.cwru.edu/ccal/view.htm 
// this is the web site converting lunar to western
//
// Year   Spring Festival:    Autumn Festival
// 2007		2/18		9/25
// 2008		2/7		9/14
// 2009		1/26		10/3
// 2010		2/14		9/22
//


function overCell(el) {
el.style.background='#FCF7F2';
}

function outCell(el) {
el.style.background='';
}


// used for pages in lower level directories, logo is small in this case, js file also is in lower leverl. no dead link occurs
function getLogo21(alt) {
var thisImg;
var alt;
var thisDate= new Date();
var thisYear= thisDate.getFullYear();
var thisMonth = thisDate.getMonth();
var thisDay = thisDate.getDate();
var weekDay = thisDate.getDay();
var inWhichWeek;

inWhichWeek = Math.floor((thisDay -1) / 7 ) + 1;	// this day is in which week (1 or 2 or 3 or 4 ...)	

thisImg = "../images/logo-2.gif";	// default display	//default

if (thisYear ==2006 && thisMonth == 0 && (thisDay >=29 && thisDay <=31)) // spring
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2007 && thisMonth == 1 && (thisDay >=18 && thisDay <=20)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2008 && thisMonth == 1 && (thisDay >=7 && thisDay <=9)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2009 && thisMonth == 0 && (thisDay >=26 && thisDay <=28)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2010 && thisMonth == 1 && (thisDay >=14 && thisDay <=16)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}

if (thisYear == 2005 && thisMonth == 8 && thisDay ==18 ) // autumn
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2006 && thisMonth == 9 && thisDay ==6 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2007 && thisMonth == 8 && thisDay ==25 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2008 && thisMonth == 8 && thisDay ==14 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2009 && thisMonth == 9 && thisDay ==3 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2010 && thisMonth == 8 && thisDay ==22 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}

if (thisMonth == 4 && (thisDay >=1 && thisDay<4) )	// May day 5/1-3
{
thisImg = "../images/logoLabor-2.gif";	
}
if (thisMonth == 6 && thisDay ==4 )	// independent day 7/4
{
thisImg = "../images/logoUSA-2.gif";	
}
if (thisMonth == 8 && weekDay == 1 && inWhichWeek == 1)	// Laborday 9/the first week/Monday
{
thisImg = "../images/logoLabor-2.gif";	
}
if (thisMonth == 9 && (thisDay >=1 && thisDay<4) )	// National day 10/1-3
{
thisImg = "../images/logoChina-2.gif";	
}
if (thisMonth == 9 && thisDay == 31 )	// Holloween day 10/31
{
thisImg = "../images/logoHolloween-2.gif";	
}
if (thisMonth == 10  && (weekDay >= 4 && weekDay <= 6) && inWhichWeek == 4 )	// Thanksgiving day 11/the fourth week\thursday-saturday
{
thisImg = "../images/logoThanksgiving-2.gif";	
}
if (thisMonth == 11 && (thisDay >23 && thisDay<27) )	// christmas 12/24-26
{
thisImg = "../images/logoChristmas-2.gif";	
}
if (thisMonth == 0 && (thisDay >=1 && thisDay<4) )	// new year 1/1-3
{
thisImg = "../images/logoChristmas-2.gif";	
}

document.write("<a href=../index.htm class=blue onclick=blur()><img border=0  src="  + thisImg  + " alt='" + alt + "' width = 205 height=45 align=baseline ");

}


// used for asp pages
function getLogo3(alt) {
var thisImg;
var alt;

var thisDate= new Date();
var thisYear= thisDate.getFullYear();
var thisMonth = thisDate.getMonth();
var thisDay = thisDate.getDate();
var weekDay = thisDate.getDay();
var inWhichWeek;

inWhichWeek = Math.floor((thisDay -1) / 7 ) + 1;	// this day is in which week (1 or 2 or 3 or 4 ...)	

thisImg = "../images/logo-2.gif";	// default display	//default

if (thisYear ==2006 && thisMonth == 0 && (thisDay >=29 && thisDay <=31)) // spring
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2007 && thisMonth == 1 && (thisDay >=18 && thisDay <=20)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2008 && thisMonth == 1 && (thisDay >=7 && thisDay <=9)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2009 && thisMonth == 0 && (thisDay >=26 && thisDay <=28)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}
if (thisYear ==2010 && thisMonth == 1 && (thisDay >=14 && thisDay <=16)) 
{
thisImg = "../images/logoSpringFestival-2.gif";
}

if (thisYear == 2005 && thisMonth == 8 && thisDay ==18 ) // autumn
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2006 && thisMonth == 9 && thisDay ==6 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2007 && thisMonth == 8 && thisDay ==25 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2008 && thisMonth == 8 && thisDay ==14 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2009 && thisMonth == 9 && thisDay ==3 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}
if (thisYear ==2010 && thisMonth == 8 && thisDay ==22 ) 
{
thisImg = "../images/logoMoonFestival-2.gif";
}

if (thisMonth == 4 && (thisDay >=1 && thisDay<4) )	// May day 5/1-3
{
thisImg = "../images/logoLabor-2.gif";	
}
if (thisMonth == 6 && thisDay ==4 )	// independent day 7/4
{
thisImg = "../images/logoUSA-2.gif";	
}
if (thisMonth == 8 && weekDay == 1 && inWhichWeek == 1)	// Laborday 9/the first week/Monday
{
thisImg = "../images/logoLabor-2.gif";	
}
if (thisMonth == 9 && (thisDay >=1 && thisDay<4) )	// National day 10/1-3
{
thisImg = "../images/logoChina-2.gif";	
}
if (thisMonth == 9 && thisDay == 31 )	// Holloween day 10/31
{
thisImg = "../images/logoHolloween-2.gif";	
}
if (thisMonth == 10  && (weekDay >= 4 && weekDay <= 6) && inWhichWeek == 4)	// Thanksgiving day 11/the fourth week\thursday-saturday
{
thisImg = "../images/logoThanksgiving-2.gif";	
}
if (thisMonth == 11 && (thisDay >23 && thisDay<27) )	// christmas 12/24-26
{
thisImg = "../images/logoChristmas-2.gif";	
}
if (thisMonth == 0 && (thisDay >=1 && thisDay<4) )	// new year 1/1-3
{
thisImg = "../images/logoChristmas-2.gif";	
}

document.write("<a href=../index.htm class=blue onclick=blur()><img border=1  src="  + thisImg  + " alt='" + alt + "' width = 205 height=45 align=middle ");

}

var Image1 = new Image()
var Image1C = new Image()
Image1.src = "../structures/copyRight.jpg";
Image1C.src = "../structures/copyRightC.jpg";

var Image2 = new Image()
Image2.src = "../structures/empty.jpg";

function showIt()
{
	document.copyRight.src=Image1.src;
	
}
function showItC()
{
	document.copyRight.src=Image1C.src;
	
}
function hideIt()
{
	document.copyRight.src=Image2.src;
	
}

function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }

