function showHomeJoin(where){

if (document.getElementById(where).className=='join'){
     document.images[where].src="/images/home_no_join.gif";
     document.getElementById(where).className='not_join';
             }
    else{
        document.images[where].src="/images/home_join.gif";
        document.getElementById(where).className='join';
        }

}

function showHomeConnect(where){

if (document.getElementById(where).className=='connect'){
     document.images[where].src="/images/home_no_connect.gif";
     document.getElementById(where).className='not_connect';
             }
    else{
        document.images[where].src="/images/home_connect.gif";
        document.getElementById(where).className='connect';
        }

}






function showJoin(where){

if (document.getElementById(where).className=='join'){
     document.images[where].src="/images/not_join_buttom.gif";
     document.getElementById(where).className='not_join';
             }
    else{
        document.images[where].src="/images/join_buttom.gif";
        document.getElementById(where).className='join';
        }
    
}

function clipONJoin(where){
if (document.getElementById(where).className=='join'){
     document.images[where].src="/images/join_buttom_over.gif";
            }
}

function clipOUTJoin(where){
if (document.getElementById(where).className=='join'){
     document.images[where].src="/images/join_buttom.gif";
            }
}






function showConnect(where){

if (document.getElementById(where).className=='connect'){
     document.images[where].src="/images/not_connect_button.gif";
     document.getElementById(where).className='not_connect';
             }
    else{
        document.images[where].src="/images/connect_button.gif";
        document.getElementById(where).className='connect';
        }

}

function clipONConnect(where){

if (document.getElementById(where).className=='connect'){
     document.images[where].src="/images/connect_button_over.gif";
             }
}
function clipOUTConnect(where){

if (document.getElementById(where).className=='connect'){
     document.images[where].src="/images/connect_button.gif";
             }
}


var req;

function navigate(day,month,year,stor_id,uid,eid,strtp,endp) {
        var url = "/calendar.php?day="+day+"&month="+month+"&year="+year+"&stor_id="+stor_id+"&uid="+uid+"&eid="+eid+"&strtp="+strtp+"&endp="+endp;
        if(window.XMLHttpRequest) {
                req = new XMLHttpRequest();
        } else if(window.ActiveXObject) {
                req = new ActiveXObject("Microsoft.XMLHTTP");
        }
        req.open("GET", url, true);
        req.onreadystatechange = callback;
        req.send(null);
}

function callback() {        
        obj = document.getElementById("calendar");
        setFade(0);
        
		if(req.readyState == 4) {
                if(req.status == 200) {
                        response = req.responseText;
                        obj.innerHTML = response;
                        fade(0);
                } else {
                        alert("There was a problem retrieving the data:\n" + req.statusText);
                }
        }
}

function fade(amt) {
	if(amt <= 100) {
		setFade(amt);
		amt += 10;
		setTimeout("fade("+amt+")", 5);
    }
}

function setFade(amt) {
	obj = document.getElementById("calendar");
	
	amt = (amt == 100)?99.999:amt;
  
	// IE
	obj.style.filter = "alpha(opacity:"+amt+")";
  
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = amt/100;
  
	// Mozilla and Firefox
	obj.style.MozOpacity = amt/100;
  
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = amt/100;
}

