// JavaScript Document
/**************************************************/
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;
}




//sevices page contents...................................

function getCont(option)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	var url="sevicescontents.php";
	url=url+"?sid="+Math.random();
	url=url+"&serItem="+option;
	
	xmlHttp.onreadystatechange=schedulenext;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function schedulenext()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById('contnt').innerHTML=xmlHttp.responseText;
		
	//jquery styling for content
	$(function()
{
$("#lk").slideDown(800,function() {

$("#kk").fadeIn(500);

});
});
		
// jquerry styling ends here
	
	}
	else
	{ 
	document.getElementById('contnt').innerHTML="<img src=\"./images//loading.gif\"/>";
	}
}

//services page ends here.......................

//technology page ...................


function getTech(tchval)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	var url="techcontents.php";
	url=url+"?sid="+Math.random();
	url=url+"&techval="+tchval;
	
	xmlHttp.onreadystatechange=techniqus;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function techniqus()
{
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById('techcontnt').innerHTML=xmlHttp.responseText;
		
	//jquery styling for content
	$(function()
{
$("#techhed").animate({left:"0px"},500,'easeInOutBack',function(){
$("#techincont").fadeIn(200,'easeInOutBack');
	$(".fgu").fadeIn(200);											 
																												
																
		});



});

		
// jquerry styling ends here
	
	}
	else
	{ 
	document.getElementById('techcontnt').innerHTML="<img src=\"./images//loading.gif\"/>";
	}
}

//end of technology page

 function SANAjax(Mode,Page) {
 
		 	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	}
	
	
	
 
			var url = 'SANajax.php';
			var pmeters = 'mode='+Mode+'&Page='+Page;
			
			xmlHttp.open('POST',url,true);

			xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlHttp.setRequestHeader("Content-length", pmeters.length);
			xmlHttp.setRequestHeader("Connection", "close");
			xmlHttp.send(pmeters);
 
 
			xmlHttp.onreadystatechange = function()
			{
 
			if(xmlHttp.readyState == 3)  // Loading Request
				  {
	document.getElementById('listingAJAX').innerHTML = "<img src=\"./images//loading.gif\"/>";
				  }
 
				 if(xmlHttp.readyState == 4) // Return Request
				  {
		var response = xmlHttp.responseText;
 

				   document.getElementById('listingAJAX').innerHTML = response;
				//jquerry fancybox plug in for porfoli images   
				   $(function() {
               $("a.imgx").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			

			

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			/*
			*   Examples - various
			*/

		

		
		});
				   
				   //ends here
				  }
 
			}
 

			   }
