function showDiv(obj,num,len)
{
 for(var id = 1;id<=len;id++)
 {
  var ss=obj+id;
  var snav =obj+"nav"+id;
  if(id==num){
	try{document.getElementById(ss).style.display="block"}catch(e){};
	try{document.getElementById(snav).className="active"}catch(e){};
  }else{
	try{document.getElementById(ss).style.display="none"}catch(e){};
	try{document.getElementById(snav).className=""}catch(e){};
  }
 }  
}
function showFocus(num)
{
 for(var id = 1;id<=4;id++)
 {
  var fpid="focusPic"+id;
  var fcid="focusContent"+id;
  var fnid="focusnav"+id;
  if(id==num){
  	try{document.getElementById(fpid).style.display="block"}catch(e){};
	try{document.getElementById(fcid).style.display="block"}catch(e){};
	try{document.getElementById(fnid).className="active"}catch(e){};
  }else{
	try{document.getElementById(fpid).style.display="none"}catch(e){};
	try{document.getElementById(fcid).style.display="none"}catch(e){};
	try{document.getElementById(fnid).className=""}catch(e){};
  }
 }  
}
var hidid;
function calendar(divid,obj)
{	
	clearTimeout(hidid);
	obj.onmouseout=function(){
		hidid=setTimeout("hideDiv1()",300);
	}
	document.getElementById(divid).style.display="block";
	document.getElementById(divid).onmouseover=function(){
		clearTimeout(hidid);
	}
	document.getElementById(divid).onmouseout=function(aEvent){
		var myEvent = window.event ? window.event : aEvent;
		var srcElement=window.event ? myEvent.srcElement : myEvent.target;
		if(srcElement==document.getElementById("calendarContainer")){
			hidid=setTimeout("hideDiv1()",300);
		}
	}
}
function floatDiv1(divid,obj)
{	
	clearTimeout(hidid);
	obj.onmouseout=function(){
		hidid=setTimeout("hideDiv2()",300);
	}
	document.getElementById(divid).style.display="block";
	document.getElementById(divid).onmouseover=function(){
		clearTimeout(hidid);
	}
	document.getElementById(divid).onmouseout=function(aEvent){
		var myEvent = window.event ? window.event : aEvent;
		var srcElement=window.event ? myEvent.srcElement : myEvent.target;
		if(srcElement==document.getElementById("morekeyword1")){
			hidid=setTimeout("hideDiv2()",300);
		}
	}
}
function floatDiv2(divid,obj)
{	
	clearTimeout(hidid);
	obj.onmouseout=function(){
		hidid=setTimeout("hideDiv3()",300);
	}
	document.getElementById(divid).style.display="block";
	document.getElementById(divid).onmouseover=function(){
		clearTimeout(hidid);
	}
	document.getElementById(divid).onmouseout=function(aEvent){
		var myEvent = window.event ? window.event : aEvent;
		var srcElement=window.event ? myEvent.srcElement : myEvent.target;
		if(srcElement==document.getElementById("morekeyword2")){
			hidid=setTimeout("hideDiv3()",300);
		}
	}
}
function floatDiv20(divid,obj)
{	
	clearTimeout(hidid);
	obj.onmouseout=function(){
		hidid=setTimeout("hideDiv20()",300);
	}
	document.getElementById(divid).style.display="block";
	document.getElementById(divid).onmouseover=function(){
		clearTimeout(hidid);
	}
	document.getElementById(divid).onmouseout=function(aEvent){
		var myEvent = window.event ? window.event : aEvent;
		var srcElement=window.event ? myEvent.srcElement : myEvent.target;
		if(srcElement==document.getElementById("morekeyword20")){
			hidid=setTimeout("hideDiv20()",300);
		}
	}
}
function floatDiv30(divid,obj)
{	
	clearTimeout(hidid);
	obj.onmouseout=function(){
		hidid=setTimeout("hideDiv30()",300);
	}
	document.getElementById(divid).style.display="block";
	document.getElementById(divid).onmouseover=function(){
		clearTimeout(hidid);
	}
	document.getElementById(divid).onmouseout=function(aEvent){
		var myEvent = window.event ? window.event : aEvent;
		var srcElement=window.event ? myEvent.srcElement : myEvent.target;
		if(srcElement==document.getElementById("morekeyword30")){
			hidid=setTimeout("hideDiv30()",300);
		}
	}
}
function hideDiv1()
{
	try{document.getElementById("dcalendar").style.display="none"}catch(e){};
}
function hideDiv2()
{
	try{document.getElementById("hotkeyword1").style.display="none"}catch(e){};
}
function hideDiv3()
{
	try{document.getElementById("hotkeyword2").style.display="none"}catch(e){};
}
function hideDiv20()
{
	try{document.getElementById("hotkeyword20").style.display="none"}catch(e){};
}
function hideDiv30()
{
	try{document.getElementById("hotkeyword30").style.display="none"}catch(e){};
}
function IsChild(cNode,pNode){
	if(cNode==pNode) return false;
	while(cNode!=null){
		cNode=cNode.parentNode;
		if(cNode==pNode) return true; 
	}
	return false;
}
document.onmousedown=function(aEvent){
	var myEvent = window.event ? window.event : aEvent;
	var srcElement=window.event ? myEvent.srcElement : myEvent.target;
	if(!IsChild(srcElement,document.getElementById("newscalendar"))) hideDiv1();
	if(!IsChild(srcElement,document.getElementById("morekeyword1"))) hideDiv2();
	if(!IsChild(srcElement,document.getElementById("morekeyword2"))) hideDiv3();
	if(!IsChild(srcElement,document.getElementById("morekeyword20"))) hideDiv20();
	if(!IsChild(srcElement,document.getElementById("morekeyword30"))) hideDiv30();
}
