// JavaScript Document
function RemoveContent(d)
{
  window.document.getElementById(d).style.display = "none";
}
function InsertContent(d)
{
  window.document.getElementById(d).style.display = "";
}

var n=8;
var names=new Array(n);
names[0]="sites";
names[1]="cs";
names[2]="ajax";
names[3]="flash";
names[4]="php";
names[5]="photoshop";
names[6]="other";
names[7]="resume";
  
function getContent(i){
    var k;
	for (k=0;k<n;k++){
      RemoveContent(names[k]);
	}
	InsertContent(names[i]);
}

/* Ajax */

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
 	{
  		// Firefox, Opera 8.0+, Safari
  		xmlHttp=new XMLHttpRequest();
 	}
	catch (e)
 	{
  		// Internet Explorer
  		try
    	{
    		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    	}
  		catch (e)
    	{
    		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    	}
 	}
	return xmlHttp;
}

function slideShowReady() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("slideshow").innerHTML=xmlHttp.responseText;
	}
}

function slideShow()
{
	try
	{
		cat_id=document.getElementById("cat_id").value;
	}
	catch(err)
	{
		cat_id=0;
	}
	xmlHttp=GetXmlHttpObject();
  if (xmlHttp==null)
	{
  	alert ("Your browser does not support AJAX!");
  	return;
	} 

	xmlHttp.onreadystatechange=slideShowReady;
	xmlHttp.open("GET","library/slideShow.php?cat_id="+cat_id,true);
  xmlHttp.send(null);
}


	