// JavaScript Document
function slide(id,showcatid,catname)
{
    xmlHttp=getXmlHttpObject();
	//document.getElementById('details').style.display='block';
   //document.getElementById('site_show').style.display='none';
	if(xmlHttp==null)
	{
		alert("This Bowser Doesn't Support AJAX!");
		return;
	}
	xmlHttp.onreadystatechange=stateChangedimg;
	xmlHttp.open("GET","portfolio-category-thumbnails.php?page="+id+"&showcatid="+showcatid+"&catname="+catname);
	xmlHttp.send(null);
}
function stateChangedimg()
{
	if(xmlHttp.readyState==4)
	{
		
		
		document.getElementById("result").innerHTML=xmlHttp.responseText;
	
		var flashcount = document.getElementById("flashcount").innerHTML;
	
		if(flashcount>0)
		{
			for(i=1;i<=flashcount;i++)
			{
		       var result =document.getElementById("evaluate"+i).innerHTML;
			 
  				eval(result);
	  		    document.getElementById("evaluate"+i).innerHTML = "";
				var el = document.getElementById("evaluate"+i);
    			el.parentNode.removeChild(el);
				
			}
		}
		
	   document.getElementById("flashcount").innerHTML = "";
	   var ele = document.getElementById("flashcount");
	       	ele.parentNode.removeChild(ele);
		
		//eval("<script type=text/javascript>alert('sdf');t>");
		document.body.style.cursor = 'default';
	}
	else
	{
		document.getElementById("result").innerHTML="<div align=center>Loading .....</div>";
	}
}


var currentselected=-1;
function getshowrrom(catid,catname,whichone)
{
	var page=1;
	xmlHttp=getXmlHttpObject();
	//document.getElementById('details').style.display='block';
   //document.getElementById('result').style.display='none';
   document.body.style.cursor = 'wait';
	if(currentselected !=-1)
	{
      var ele = document.getElementById('thumbframe'+ currentselected);
	 	  ele.className = "thumbframe"; //For Most Browsers
	  document.getElementById('thumblinks'+ currentselected ).className = "thumblinks";
	  
	}
	
	
	document.getElementById('thumbframe'+ whichone ).className =  "thumbframeselected";
	document.getElementById('thumblinks'+ whichone ).className =  "thumblinksselected";
	
	currentselected = whichone;
	  
	if(xmlHttp==null)
	{
		alert("This Bowser Doesn't Support AJAX!");
		return;
	}
	xmlHttp.onreadystatechange=stateChangedimg;
	
	xmlHttp.open("GET","portfolio-category-thumbnails.php?page="+page+"&showcatid="+catid+"&catname="+catname);
	xmlHttp.send(null);
}

function slidedetails(page)
{
	
    xmlHttp=getXmlHttpObject();
	//document.getElementById('details').style.display='block';
   document.getElementById('site_show').style.display='none';
	
	if(xmlHttp==null)
	{
		alert("This Bowser Doesn't Support AJAX!");
		return;
	}
	xmlHttp.onreadystatechange=stateChangedimg;
	xmlHttp.open("GET","portfolio-category-thumbnails.php?page="+page);
	xmlHttp.send(null);
}
function getXmlHttpObject()
{
	try {
		xmlHttp=new XMLHttpRequest();
	 
	}
	catch(e) {
		try{
		 xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			xmlHttp=new ActiveXobject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}