var xmlhttp;
var div_id;

function load(path, id, action)
{		
	div_id=id;		
	xmlhttp=GetXmlHttpObject();
		
	if (xmlhttp==null)
	{
		alert ("Your browser does not support XMLHTTP!");
		return;
	}
	
	var url = path.replace('?', ':q:');
	
	xmlhttp.onreadystatechange=stateChanged;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function GetXmlHttpObject()
{
	if (window.XMLHttpRequest)
	{
		return new XMLHttpRequest();
	}
	
	if (window.ActiveXObject)
	{
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
	return null;
}

function stateChanged()
{
	if (xmlhttp.readyState==4)
	{
		document.getElementById(div_id).innerHTML=xmlhttp.responseText;
	}
}

$(document).ready(function(){
	$('#banner').innerfade({
		animationtype: 'fade',
		speed: 'slow',
		timeout: 8000,
		type: 'random',
		containerheight: '355px'
	});
	$('#projects').innerfade({
		animationtype: 'fade',
		speed: 'slow',
		timeout: 9000,
		type: 'random',
		containerheight: '122px'
	});
	
	$(document).bind("contextmenu",function(e){  
		return false;  
	});
	
});

