function initImage() {
	imageId = 'thephoto';
	image = document.getElementById(imageId);
	setOpacity(image, 0);
	image.style.visibility = "visible";
	fadeIn(imageId,0);
}
function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 10;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
		}
	}
}
function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}
window.onload = function() {initImage()}

function Init(){
    try{
        req=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e){
        try{
            req=new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(oc){
            req=null;
        }
    }
    if(!req&&typeof XMLHttpRequest!="undefined"){
        req = new XMLHttpRequest();
	}
	return req;
}

function get_description(url){
  	req1=Init();
  	if(req1!=null){
	    req1.onreadystatechange = function(){
		  if (req1.readyState == 4){
		    if (req1.status == 200){
		      document.getElementById('news-col').innerHTML=req1.responseText;
		    }
		    else {
		        document.getElementById('news-col').innerHTML="Internal Server Error!";
		    }
		  }
		};
	    document.getElementById('news-col').innerHTML="Loading...";
	    req1.open("get", url, true);
	    try {
	       req1.send(null);
	    } catch (ex) {}
	}
}

function get_image(url){
  	req2=Init();
  	if(req2!=null){
	    req2.onreadystatechange = function(){
		  if (req2.readyState == 4){
		    if (req2.status == 200){
		      document.getElementById('featured-project').innerHTML=req2.responseText;
                      initImage();
		    }
		    else {
		        document.getElementById('featured-project').innerHTML="Internal Server Error!";
		    }
		  }
		};

	    req2.open("get", url, true);
	    try {
	       req2.send(null);
	    } catch (ex) {}
	}
}