

function goC(url){
	if(document.getElementById('eventscalendar')){
		var obj=document.getElementById('eventscalendar');
		obj.style.opacity=0.3;
		obj.style.filter='alpha(opacity=30)';
		xmlhttpPost(url);
	}
}


function xmlhttpPost(strURL) {
    var xmlHttpReq = false;
    var self = this;
   
	try{// Firefox, Opera 8.0+, Safari
		self.xmlHttpReq=new XMLHttpRequest();
	}
	catch (e){// Internet Explorer
		try{
			self.xmlHttpReq=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}

    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(null);
}


function updatepage(str){
    var obj=document.getElementById('eventscalendar');
	obj.innerHTML = str;
	obj.style.opacity=1;
	obj.style.filter='alpha(opacity=100)';
}


function shiftOpacity(id, millisec) { 
    //if an element is invisible, make it visible, else make it ivisible 
    if(document.getElementById(id).style.opacity == 0) { 
        opacity(id, 0, 100, millisec); 
    } else { 
        opacity(id, 100, 0, millisec); 
    } 
} 

function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 


function showhidemeniu() {
	var meniu=document.getElementById("logomeniuitems");
	if (meniu.style.display=='block'){
		meniu.style.display='none';
	}
	else {
		changeOpac(0, 'logomeniuitems');
		meniu.style.display='block';
		opacity('logomeniuitems', 1, 100, 1000);
	}
}


function maxPhoto(img, height, width){
	winheight=height+10;
	winwidth=width+10;
	var title = document.title;
	var html="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
	html+="<html>\n";
	html+="<head>\n";
	html+="<title>" + title + "</title>\n";
	html+="<meta http-equiv='imagetoolbar' content='no'>\n";
	html+="</head>\n";
	html+="<body bgcolor='#ffffff'>";
	html+="<table windth='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center'>";
	html+="<img height='"+height+"' width='"+width+"' src='"+img+"' border='0'>";
	html+="</td></tr></table>";
	html+="</body>\n";
	html+="</html>\n";

	var Window2=open("","",",scrollbars=no, resizable=yes, location=no, menubar=no, status=no, height="+height+", width="+width);
	Window2.document.open();
	Window2.document.write(html);
	Window2.document.close();
}



