function bodyUnload(){
	document.getElementById("left").style.display='none';
	//alert("yes");
	}
	

//******************* Hide Other Links when we clink what we do section *********

function doHide(opt){
   
	if(opt==2){ 
	 $("#Welcome").hide(1000);
	 $("#Clients").hide(1000);
	 $("#How").hide(1000);
     $("#aboutusdiv").hide(1000);
	 $("#Do").show("slow");
     $("#allotherlinks").show("slow");
     
     $("#work_sub").show("slow");
	 
	 $("#contect_us").hide(1000);
	}
	if(opt==1){ 
	 $("#Do").hide(1000);
	 $("#Clients").hide(1000);
	 $("#How").hide(1000);
	 $("#Welcome").show("slow");
     $("#aboutusdiv").show("slow");
     $("#about_subpage").show("slow");
     $("#allotherlinks").hide(1000);
     $("#work_sub").hide(1000);
	 $("#contect_us").hide(1000);
	}
	if(opt==3){ 
	 $("#Do").hide(1000);
	 $("#Welcome").hide(1000);
	 $("#How").hide(1000);
     $("#aboutusdiv").hide(1000);
	 $("#Clients").show("slow");
     $("#allotherlinks").show("slow");
	 $("#contect_us").hide(1000);
	}
	if(opt==4){ 
	 $("#Do").hide(1000);
	 $("#Welcome").hide(1000);
	 $("#Clients").hide(1000);
     $("#aboutusdiv").hide(1000);
	 $("#How").show("slow");
     $("#allotherlinks").show("slow");
	 $("#contect_us").hide(1000);
	}
	if(opt==5){ 
	 $("#aboutusdiv").hide(1000);
	$("#allotherlinks").show("slow");
	 $("#Do").hide(1000);
	 $("#Welcome").hide(1000);
	 $("#Clients").hide(1000);
   
	 $("#How").hide(1000);
     
	 $("#contect_us").show("slow");
	}
	
	}
//**********************J query Function to get About us details pages***********************************//

function getaboutdetails(opt){
	if(opt==1){
		 $("#aboutdetail").hide(1000);
		  $("#hist").show("slow");
		   $("#bios").hide(1000);
		   $("#testmon").hide(1000);
		   $("#history").addClass("glow");
		   $("#bioss").removeClass("glow");
		   $("#bioss").removeClass("smptxt");
		    $("#test").removeClass("smptxt");
			 $("#test").removeClass("glow");
	}
	if(opt==2){
		 $("#aboutdetail").hide(1000);
		  $("#hist").hide(1000);
		   $("#testmon").hide(1000);
		   $("#bios").show("slow");
		    $("#bioss").addClass("glow");
		   $("#history").removeClass("glow");
		   $("#bioss").removeClass("smptxt");
		    $("#test").removeClass("smptxt");
			 $("#test").removeClass("glow");
	}
	if(opt==3){
		 $("#aboutdetail").hide(1000);
		 $("#hist").hide(1000);
		 $("#bios").hide(1000);
		  $("#testmon").show("slow");
		    $("#test").addClass("glow");
			$("#bioss").removeClass("glow");
		   $("#history").removeClass("glow");
		   $("#bioss").removeClass("smptxt");
	}
}
   //******************* Jquery Function to get left side links *********
	
	function getLinks(para){
		sideData(para);
		doHide(2);
		$("#leftLinks").addClass("loading");
		
		$.ajax({
		url : "getLinks.php?p_id="+para ,
		success : function (data) {
		$("#leftLinks").removeClass("loading");
		if(para==1) {
			
			$("#cd").html(data);
			$("#ws").hide(1000);
			$("#ss").hide(1000);
			$("#cd").show("slow");
			
			$("#tdw").removeClass("glow");
			$("#tds").removeClass("glow");
			$("#tdc").removeClass("glow");
			
			$("#tdc").addClass("glow");
			$("#tdw").addClass("smptxt");
			$("#tds").addClass("smptxt");
			
		}
		if(para==2) {
			$("#ws").html(data);
			$("#ws").show("slow");
			$("#cd").hide(1000);
			$("#ss").hide(1000);
			
			$("#tdw").removeClass("glow");
			$("#tds").removeClass("glow");
			$("#tdc").removeClass("glow");
			
			$("#tdw").addClass("glow");
			$("#tdc").addClass("smptxt");
			$("#tds").addClass("smptxt");
			
			
		}
		if(para==3) {
			$("#ss").html(data);
			$("#ss").show("slow");
			
			$("#ws").hide(1000);
			$("#cd").hide(1000);
			
			$("#tdw").removeClass("glow");
			$("#tds").removeClass("glow");
			$("#tdc").removeClass("glow");
			
			$("#tds").addClass("glow");
			$("#tdw").addClass("smptxt");
			$("#tdc").addClass("smptxt");
		}
		}
});
		}
		
		  //******************* Get Do Data *********
	
	function doData(p_id,cat,cat_id,first,last){
		doHide(2);
		//side(p_id);
		//document.getElementById("doContainer").innerHTML="";
		$("#mBody").addClass("loading");
		var td="#td_"+cat;
		
		$.ajax({
		url : "doData.php?p_id="+ p_id +"&cat="+ cat +"&cat_id=" + cat_id , 
		success : function (data) {
		$("#doContainer").html(data);
	    $("#mBody").removeClass("loading");
		
		for(var i=first;i<=last;i++){ 
		 var val="#td_"+i;
		 $(val).removeClass("glow"); 
         $(val).addClass("smptxt"); 
		}
		
		 $(td).removeClass("smptxt"); 
         $(td).addClass("glow"); 
		 //addReflections();
		}
});
		}
		
		 //******************* Function To get Detail Page *********
	
	function getDetail(id,p_id,cat_id,cat){
		 doHide(2);
		document.getElementById("doContainer").innerHTML="";
		$("#mBody").addClass("loading");
		$.ajax({
		url : "getDetail.php?p_id="+ p_id +"&cat="+ cat +"&cat_id=" + cat_id +"&id=" + id , 
		success : function (data) {
		$("#doContainer").html(data);
	    $("#mBody").removeClass("loading");
		// addReflections();
		}
});
		}
	
	function ByExperties(){
		 doHide(2);
		document.getElementById("doContainer").innerHTML="";
		$("#mBody").addClass("loading");
		$.ajax({
		url : "getExperties.php" , 
		success : function (data) {
		$("#doContainer").html(data);
	    $("#cBody").removeClass("loading");
		 $("#cBody").addClass("smptxt");
		  $("#regular").removeClass("glow");
		   $("#features").removeClass("glow");
		   $("#byexperties").addClass("glow");
		// addReflections();
		}
});
		}
	 //******************* Function To get Detail Page *********
	
	function sideData(p_id){
		 
		$.ajax({
		url : "sideData.php?p_id="+ p_id , 
		success : function (data) {
		$("#side").html(data);
	    
		 addReflections();
		}
});
		}
		
	 //******************* Navigational Side Data *********
	
	function side(p_id,cat){
		 
		$.ajax({
		url : "sideData.php?p_id="+ p_id + "&cat="+ cat , 
		success : function (data) {
		$("#side").html(data);
	    
		 addReflections();
		}
});
		}	
		
	
		
   //**************		Function getClients ***********************
   
   
   function getClients(cat_id,start){
		
		//doHide(3); 
		document.getElementById("doContainer").innerHTML="";
		$("#cBody").addClass("loading");
		$.ajax({
		url : "getClients.php?cat_id="+ cat_id +"&start=" + start , 
		success : function (data) {
		$("#doContainer").html(data);
	    $("#cBody").removeClass("loading");
		
		 if(cat_id==1){
		  $("#features").removeClass("smptxt"); 
          $("#features").addClass("glow");
		  
		  $("#regular").removeClass("glow"); 
          $("#regular").addClass("smptxt");
		    $("#byexperties").removeClass("glow"); 
		 }
		 
		 if(cat_id==2){
		  $("#regular").removeClass("smptxt"); 
          $("#regular").addClass("glow"); 
		  
		  $("#features").removeClass("glow"); 
          $("#features").addClass("smptxt");
		   $("#byexperties").removeClass("glow"); 
		 }
		 
		 //addReflections();
		}
});
		
		}
		
		 //******************* Function To get Cleint Detail *********
	
	function clientDetail(id,cat_id){
		// doHide(3);
		document.getElementById("doContainer").innerHTML="";
		$("#cBody").addClass("loading");
		$.ajax({
		url : "clientDetail.php?id="+ id +"&cat_id="+ cat_id , 
		success : function (data) {
		$("#doContainer").html(data);
	    $("#cBody").removeClass("loading");
		// addReflections();
		}
});
		}
		
		function StafDetail(id){
		// doHide(3);
		document.getElementById("doContainer").innerHTML="";
		$("#cBody").addClass("loading");
		$.ajax({
		url : "stafDetail.php?id="+ id  , 
		success : function (data) {
		$("#doContainer1").html(data);
	    $("#cBody1").removeClass("loading");
		// addReflections();
		}
});
		}
		
		//************************** Desiging Form Validation *******************
		
	function valid(){
	if(document.frmAccount.type.value == ""){
	alert("Please select design type!.");
	document.frmAccount.type.focus();
	return false;
	}
	else if(document.frmAccount.fname.value == ""){
	alert("Please enter your First Name!.");
	document.frmAccount.fname.focus();
	return false;
}
else if(document.frmAccount.lname.value == ""){
	alert("Please enter your Last Name!.");
	document.frmAccount.lname.focus();
	return false;
}


else if(document.frmAccount.email.value == ""){
		alert("Please enter e-mail address!.");
		document.frmAccount.email.focus();
		return false;
}
else if(document.frmAccount.email.value.indexOf('@') == -1){
		alert("Please enter a valid e-mail address. Missing '@' sign!.");
		document.frmAccount.email.focus();
		return false;
}
else if(document.frmAccount.email.value.indexOf('.') == -1){
		alert("Please enter a valid e-mail address.\nMissing '.' in your e-mail address!.");
		document.frmAccount.email.focus();
		return false;
}
else if(document.frmAccount.phone.value == ""){
		alert("Please enter your Phone No!.");
		document.frmAccount.phone.focus();
		return false;
}
else if(document.frmAccount.mobile.value == ""){
		alert("Please enter your Mobile No!.");
		document.frmAccount.mobile.focus();
		return false;
}
else{
webPost();
return true;

}
			
			}
	
	
	//*********************** Web Design Posting **************
	
	
function webPost(){
		 $("#wload").addClass("loading");
		 $("#tblFrm").hide();
		 //alert("Hello");
		 
		$.ajax({
		
		url : "wdPost.php?title="+ document.frmAccount.title.value +"&fname="+ document.frmAccount.fname.value +"&lname="+document.frmAccount.lname.value +"&email="+document.frmAccount.email.value +"&description="+ document.frmAccount.description.value + "&phone=" +document.frmAccount.phone.value +"&mobile=" + document.frmAccount.mobile.value +"&address="+ document.frmAccount.address.value +"&type="+document.frmAccount.type.value  , 
		success : function (data) {
		//$("#test").html(data);
	    $("#wload").removeClass("loading");
		$("#wmsg").show();
		}
});
		
		}		
	
	
	
	//***************************** CSS Swithcer ****************
	
	function switcher(para){
		
	
	   if(para==1) document.getElementById("st").href="mstyle.css";
		if(para==2) document.getElementById("st").href="style.css";
		if(para==3) document.getElementById("st").href="pstyle.css";
		if(para==4) document.getElementById("st").href="cstyle.css";
		if(para==5) document.getElementById("st").href="gstyle.css";
		
	}
	
	 //******************* Paging *********
	
	function paging(p_id,cat,cat_id,start,end){
		doHide(2);
		//side(p_id);
		document.getElementById("doContainer").innerHTML="";
		$("#mBody").addClass("loading");
		//var td="#td_"+cat;
		
		$.ajax({
		url : "doData.php?p_id="+ p_id +"&cat="+ cat +"&cat_id=" + cat_id +"&start=" + start + "&end=" + end , 
		success : function (data) {
		$("#doContainer").html(data);
	    $("#mBody").removeClass("loading");
		
		/*for(var i=first;i<=last;i++){ 
		 var val="#td_"+i;
		 $(val).removeClass("glow"); 
         $(val).addClass("smptxt"); 
		}
		
		 $(td).removeClass("smptxt"); 
         $(td).addClass("glow"); */
		 addReflections();
		}
});
		}
		
//*********************J Query Function to get value link Details**************************************************//		
		function getValuesDetails(opt){
			if(opt==1){
				$("#creativedetails").show("slow");
				$("#knowledgedetails").hide(1000);
				$("#worthdetails").hide(1000);
				$("#intigritydetails").hide(1000);
				$("#featured").addClass("glow");
				 $("#knowledge").removeClass("glow");
				   $("#intigrity").removeClass("glow");
				   $("#worth").removeClass("glow");
			}
			
			if(opt==2){
				$("#creativedetails").hide(1000);
				$("#knowledgedetails").show("slow");
				$("#worthdetails").hide(1000);
				$("#intigritydetails").hide(1000);
				 $("#featured").removeClass("glow");
				 $("#knowledge").addClass("glow");
				  $("#intigrity").removeClass("glow");
				   $("#worth").removeClass("glow");
			}
			if(opt==3){
				$("#creativedetails").hide(1000);
				$("#knowledgedetails").hide(1000);
				$("#intigritydetails").hide(1000);
				$("#worthdetails").show("slow");
				 $("#worth").addClass("glow");
				 $("#featured").removeClass("glow");
				   $("#knowledge").removeClass("glow");
				   $("#intigrity").removeClass("glow");
			}
			
			if(opt==4){
				$("#creativedetails").hide(1000);
				$("#knowledgedetails").hide(1000);
				$("#worthdetails").hide(1000);
				$("#intigritydetails").show("slow");
				 $("#intigrity").addClass("glow");
				  $("#featured").removeClass("glow");
				   $("#knowledge").removeClass("glow");
				    $("#worth").removeClass("glow");
			}
			
		}
