//Enter domain of site to search.
var domainroot="www.hku.hk/socsc"
function jksitesearch(curobj){
document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value}


//bg color change
var today=new Date();
var month=today.getMonth();
var rncolors=[	"#919100:#484800:white:#B1A503:#FBFB00",  //Jan, lake green
				"#DB3D00:#8b2500:white:#E80000:#FF9C77",  //Feb, red
				"#1C7C98:#024061:white:#6A99AD:#B5E3FD",  //Mar, blue
				"#339966:#006633:white:#46C184:#A3E0C1",  //Apr, green
				"#B92F8C:#6F1C54:white:#D34B89:#EFC2E0",  //May, purple
				"#DB6D00:#932500:white:#FF8B17:#FFBBA4",  //Jun, orange
				"#919100:#484800:white:#B1A503:#FBFB00",  //Jul, lake green
				"#DB3D00:#8b2500:white:#E80000:#FF9C77",  //Aug, red
				"#1C7C98:#024061:white:#6A99AD:#B5E3FD",  //Sep, blue
				"#339966:#006633:white:#46C184:#A3E0C1",  //Oct, green
				"#B92F8C:#6F1C54:white:#D34B89:#EFC2E0", //nov, purple
				"#DB6D00:#932500:white:#FF8B17:#FFBBA4"];  //Dec, orange

var rngif=[	"rn1.gif", 		//Jan, lake green
			"rn2.gif", 		//Feb, red
			"rn4.gif", 		//Mar, blue
			"rn5.gif", 		//Apr, green
			"rn6.gif",		//May, purple
			"rn3.gif", 		//Jun, orange
			"rn1.gif", 		//Jul, lake green
			"rn2.gif",		//Aug, red
			"rn4.gif", 		//Sep, blue
			"rn5.gif",		//Oct, green
			"rn6.gif",		//Nov, purple
			"rn3.gif" ];	//Dec, orange

rnpic=rngif[month].split(":")[0];

//rncolor="FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorstr="+rncolors[month].split(":")[0]+
//",endColorstr="+rncolors[month].split(":")[1]+");"
//rncolor+="color: "+rncolors[month].split(":")[2]+";"
rncolor_index="background-image: url(images/"+rnpic+");"
rncolor_index+="background-repeat: repeat-x"

rncolor_index1="background-image: url(../images/"+rnpic+");"
rncolor_index1+="background-repeat: repeat-x"

rncolor="background-image: url(../images/"+rnpic+");"
rncolor+="background-repeat: repeat-x"

rncolor1="background-image: url(../../images/"+rnpic+");"
rncolor1+="background-repeat: repeat-x"

rntextdark="color: "+rncolors[month].split(":")[1]+";"

rntextlight="text-decoration: none;"
rntextlight+="color: "+rncolors[month].split(":")[0]+";"

rntextlight_h="text-decoration: underline;"
rntextlight_h+="color: "+rncolors[month].split(":")[0]+";"

rntext_a="text-decoration: none;"
rntext_a+="color: "+rncolors[month].split(":")[1]+";"

rntext_h="text-decoration: underline;"
rntext_h+="color: "+rncolors[month].split(":")[1]+";"

rnhdtext_a="text-decoration: none;"
rnhdtext_a+="color: "+rncolors[month].split(":")[1]+";"

rnhdtext_h="color: "+rncolors[month].split(":")[0]+";"

rnbglight="text-decoration: none;"
rnbglight+="background-color: "+rncolors[month].split(":")[0]+";"

rnbglight1="background-color: "+rncolors[month].split(":")[4]+";"

rnbgdark="background-color: "+rncolors[month].split(":")[1]+";"

rntd_a="width:100%;	height:100%; display:block; text-decoration: none; PADDING-LEFT: 10px; PADDING-top: 10px; PADDING-bottom: 10px; PADDING-right: 10px; font:14px Tahoma;"
rntd_a+="background-color: "+rncolors[month].split(":")[3]+";"
rntd_a+="color: "+rncolors[month].split(":")[2]+";"

rntd_h="width:100%;	height:100%; display:block; text-decoration: none; PADDING-LEFT: 10px; PADDING-top: 10px; PADDING-bottom: 10px; PADDING-right: 10px; font:14px Tahoma;"
rntd_h+="background-color: "+rncolors[month].split(":")[1]+";"

document.write('<style type="text/css">\n')

document.write('.rnbgcolor{'+rncolor+'}\n') 		//rnbgcolor

document.write('.rnbgcolor1{'+rncolor1+'}\n') 		//rnbgcolor1

document.write('.rnbgcolor_index{'+rncolor_index+'}\n') 	//rnbgcolor_index

document.write('.rnbgcolor_index1{'+rncolor_index1+'}\n') 	//rnbgcolor_index1

document.write('.rn {'+rntext_a+'}\n')				//rn
document.write('.rn a{'+rntext_a+'}\n')
document.write('.rn a:hover{'+rntext_h+'}\n')

document.write('.rnbglight{'+rnbglight+'}\n')		//rnbglight

document.write('.rnbglight1{'+rnbglight1+'}\n')		//rnbglight1

document.write('.rnbgdark{'+rnbgdark+'}\n')			//rnbgdark

document.write('.rntextdark{'+rntextdark+'}\n')		//rntextdark

document.write('.rntextlight{'+rntextlight+'}\n')	//rntextlight
document.write('.rntextlight a{'+rntextlight+'}\n')	
document.write('.rntextlight a:hover{'+rntextlight_h+'}\n')

document.write('.rnhdtext{'+rnhdtext_a+'}\n')		//rnhdtext
document.write('.rnhdtext:hover{'+rnhdtext_h+'}\n')	

document.write('.rntd a{'+rntd_a+'}\n')				//rntd
document.write('.rntd a:hover{'+rntd_h+'}\n')

document.write('<\/style>')
