function selected_cat_id(frmName,tec_id)
{
		newurl = "index.ajax.php?tec_id="+tec_id;
		var frmobj	=	eval("document."+frmName);
		document.getElementById('pro_img').src = 'images/ajax-loader.gif';
		document.getElementById('div_pro_name').innerHTML = "";
		document.getElementById('div_pro_desc').innerHTML = "";
		document.getElementById('case_study').innerHTML = "";
		document.getElementById('view_portfolio').innerHTML = "";
		//our-work-link-hover
		
		var tech_id_arr = [ "1", "9", "19", "21" , "23"];
		
		for(i=0;i<5;i++)
		{
			var href_id = 'href_'+tech_id_arr[i];
			document.getElementById(href_id).className = "our-work-link"; 
		}
		var href_id = 'href_'+tec_id;
		document.getElementById(href_id).className = "our-work-link-hover";
		var strparameters = "";
		objxmlhttprequest.open("POST", newurl, true);
		objxmlhttprequest.onreadystatechange = function() {
		if(objxmlhttprequest.readyState == 4) {
			var response = objxmlhttprequest.responseText;
			MainData=response.split("<NEWTAG>");
			if(response == "fail") {
				return false;
			} else {
				document.getElementById('div_pro_name').innerHTML = MainData[0];
				document.getElementById('hi_pro_name').value = MainData[0];
				document.getElementById('div_pro_desc').innerHTML = MainData[1];
				document.getElementById('pro_img').src = MainData[2];
				document.getElementById('case_study').innerHTML = '<a href=\'javascript:MM_openBrWindow("clients-cs-details.php?pro_id='+MainData[3]+'&amp;flgcasestudy='+MainData[4]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Case Study</a>';
				document.getElementById('view_portfolio').innerHTML ='<a href=\'javascript:MM_openBrWindow("portfolio-details.php?pro_id='+MainData[3]+'&amp;flgcasestudy='+MainData[4]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Portfolio</a>';
				document.getElementById('all_content').innerHTML = MainData[5];
			}

		}	//	End of if.
	};
	objxmlhttprequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	objxmlhttprequest.setRequestHeader('Content-Length', strparameters.length);
	objxmlhttprequest.setRequestHeader('Connection', 'close');
	objxmlhttprequest.send(strparameters);
}

function selected_cat_id_onload(frmName,tec_id)
{
		newurl = "index.ajax.php?tec_id="+tec_id;
		var frmobj	=	eval("document."+frmName);
		var strparameters = "";
		objxmlhttprequest.open("POST", newurl, true);
		objxmlhttprequest.onreadystatechange = function() {
		if(objxmlhttprequest.readyState == 4) {
			var response = objxmlhttprequest.responseText;
			MainData=response.split("<NEWTAG>");
			if(response == "fail") {
				return false;
			} else {
				document.getElementById('hi_pro_name').value = MainData[0];
				document.getElementById('all_content').innerHTML = MainData[5];
			}

		}	//	End of if.
	};
	objxmlhttprequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	objxmlhttprequest.setRequestHeader('Content-Length', strparameters.length);
	objxmlhttprequest.setRequestHeader('Connection', 'close');
	objxmlhttprequest.send(strparameters);
}

// JavaScript Document
// Specify the Testimonial files
var pro_desc = new Array();
var pro_img = new Array();
var pro_id = new Array();
var pro_flgcasestudy = new Array();
// to add more images, just continue
// the pattern, adding to the array below
// do not edit anything below this line
var pro_p;

function pro_previous() {
	if(document.frmOurWork.techEnd.value <= 1)
	{return false;}
	
	var pro_name = new Array();
	for (pro_i=0;pro_i<document.frmOurWork.techEnd.value;pro_i++)
	{	
		pro_name[pro_i]=document.frmOurWork.techHidden[pro_i].value;
		pro_desc[pro_i]=document.frmOurWork.techHidden2[pro_i].value;
		pro_img[pro_i]=document.frmOurWork.techHidden3[pro_i].value;
		pro_id[pro_i]=document.frmOurWork.techHidden4[pro_i].value;
		pro_flgcasestudy[pro_i]=document.frmOurWork.techHidden5[pro_i].value;
	}
	pro_p = pro_name.length;
	
	for (pro_i = 0; pro_i < pro_p; pro_i++) {
		if (pro_name[pro_i] == document.getElementById("hi_pro_name").value) {
			if (pro_i == 0) {
				document.frmOurWork.techStart.value = 0;
				document.getElementById("div_pro_name").innerHTML=pro_name[pro_p - 1];
				document.getElementById("hi_pro_name").value=pro_name[pro_p - 1];
				document.getElementById("div_pro_desc").innerHTML=pro_desc[pro_p - 1];
				document.getElementById("pro_img").src=pro_img[pro_p - 1];
				document.getElementById('case_study').innerHTML = '<a href=\'javascript:MM_openBrWindow("clients-cs-details.php?pro_id='+pro_id[pro_p - 1]+'&amp;flgcasestudy='+pro_flgcasestudy[pro_p - 1]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Case Study</a>';
				document.getElementById('view_portfolio').innerHTML ='<a href=\'javascript:MM_openBrWindow("portfolio-details.php?pro_id='+pro_id[pro_p - 1]+'&amp;flgcasestudy='+pro_flgcasestudy[pro_p - 1]+'","","scrollbars=yes,resizable=yes,width=850,height=550\');" class="btn-text-link">View Portfolio</a>';
				
				return false;
			} else {	
				document.getElementById("div_pro_name").innerHTML=pro_name[pro_i - 1];
				document.getElementById("hi_pro_name").value=pro_name[pro_i - 1];
				document.getElementById("div_pro_desc").innerHTML=pro_desc[pro_i - 1];
				document.getElementById("pro_img").src=pro_img[pro_i - 1];
				document.getElementById('case_study').innerHTML = '<a href=\'javascript:MM_openBrWindow("clients-cs-details.php?pro_id='+pro_id[pro_i - 1]+'&amp;flgcasestudy='+pro_flgcasestudy[pro_i - 1]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Case Study</a>';
				document.getElementById('view_portfolio').innerHTML ='<a href=\'javascript:MM_openBrWindow("portfolio-details.php?pro_id='+pro_id[pro_i - 1]+'&amp;flgcasestudy='+pro_flgcasestudy[pro_i - 1]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Portfolio</a>';
				document.frmOurWork.techStart.value = pro_i - 1;
				return false;
			}
		}
	}
}

function pro_next() {

	if(document.frmOurWork.techEnd.value <= 1)
	{return false;}
	var pro_name = new Array();
	for (pro_i=0;pro_i<document.frmOurWork.techEnd.value;pro_i++)
	{	
		pro_name[pro_i]=document.frmOurWork.techHidden[pro_i].value;
		pro_desc[pro_i]=document.frmOurWork.techHidden2[pro_i].value;
		pro_img[pro_i]=document.frmOurWork.techHidden3[pro_i].value;
		pro_id[pro_i]=document.frmOurWork.techHidden4[pro_i].value;
		pro_flgcasestudy[pro_i]=document.frmOurWork.techHidden5[pro_i].value;
		
	}
	pro_p = pro_name.length;
	for (pro_i = 0; pro_i < pro_p; pro_i++) {
		if (pro_name[pro_i] == document.getElementById("hi_pro_name").value) {
			if ((pro_i + 1) == pro_p) {
				document.frmOurWork.techStart.value = 0;
				document.getElementById("div_pro_name").innerHTML=pro_name[0];
				document.getElementById("hi_pro_name").value=pro_name[0];
				document.getElementById("div_pro_desc").innerHTML=pro_desc[0];
				document.getElementById("pro_img").src=pro_img[0];
				document.getElementById('case_study').innerHTML = '<a href=\'javascript:MM_openBrWindow("clients-cs-details.php?pro_id='+pro_id[0]+'&amp;flgcasestudy='+pro_flgcasestudy[0]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Case Study</a>';
				document.getElementById('view_portfolio').innerHTML ='<a href="javascript:MM_openBrWindow("portfolio-details.php?pro_id='+pro_id[0]+'&amp;flgcasestudy='+pro_flgcasestudy[0]+'","","scrollbars=yes,resizable=yes,width=850,height=550");" class="btn-text-link">View Portfolio</a>';
				
				return false;
			} else {
				document.getElementById("div_pro_name").innerHTML=pro_name[pro_i + 1];
				document.getElementById("hi_pro_name").value=pro_name[pro_i + 1];
				document.getElementById("div_pro_desc").innerHTML=pro_desc[pro_i + 1];
				document.getElementById("pro_img").src=pro_img[pro_i + 1];
				document.getElementById('case_study').innerHTML = '<a href=\'javascript:MM_openBrWindow("clients-cs-details.php?pro_id='+pro_id[pro_i + 1]+'&amp;flgcasestudy='+pro_flgcasestudy[pro_i - 1]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Case Study</a>';
				document.getElementById('view_portfolio').innerHTML ='<a href=\'javascript:MM_openBrWindow("portfolio-details.php?pro_id='+pro_id[pro_i + 1]+'&amp;flgcasestudy='+pro_flgcasestudy[pro_i - 1]+'","","scrollbars=yes,resizable=yes,width=850,height=550");\' class="btn-text-link">View Portfolio</a>';
				document.frmOurWork.techStart.value = pro_i + 1;
				return false;
			}	
		}
	}
}


	/*for (i = 0; i < pro_name.length; i++) {
		pro_name.shift();
		pro_desc.shift();
		pro_img.shift();
		pro_id.shift();
	}*/
//  End -->
