function backwin()
{
	window.back();
}

function onlynos()
{
	var a=window.event.keyCode;
	if((a<48 || a>57) && (a!=45) && (a!=32))
	{
		window.event.keyCode =0;
	}
}

function showpage(Id)
{

	if (Id == 0)
	{
		alert("No Product is purchased in u r cart")
		return;
	}


	if(document.getElementById("paypage").style.display=="none")
	{
	document.getElementById("paypage").style.display="block";
	}
}
function samedeliveryaddress()
{
		var chkobj 			= document.getElementById("sameaddress")

		var objbadd1 		= document.getElementById("billingaddress1")
		var objbadd2 		= document.getElementById("billingaddress2")
		var objbcity 		= document.getElementById("billingcity")
		var objbcountry 	= document.getElementById("billingcountry")
		var objbpostalcode 	= document.getElementById("billingpostalcode")

		var objdadd1 		= document.getElementById("deliveryaddress1")
		var objdadd2 		= document.getElementById("deliveryaddress2")
		var objdcity 		= document.getElementById("deliverycity")
		var objdcountry 	= document.getElementById("deliverycountry")
		var objdpostalcode 	= document.getElementById("deliverypostalcode")
		
		if (chkobj.checked)
		{
			objdadd1.value = objbadd1.value 
			objdadd2.value = objbadd2.value
			objdcity.value	= objbcity.value
			objdcountry.value = objbcountry.value
			objdpostalcode.value = objbpostalcode.value
			objdadd1.disabled=objdadd2.disabled=objdcity.disabled=objdcountry.disabled=objdpostalcode.disabled= true
		}
		else
		{
			objdadd1.value = ""
			objdadd2.value = ""
			objdcity.value	= ""
			objdcountry.value = ""
			objdpostalcode.value = ""
			objdadd1.disabled=objdadd2.disabled=objdcity.disabled=objdcountry.disabled=objdpostalcode.disabled= false
		}
}

function submitorderform(Id,Output,Page)
{
		if ((Id == 0 ) || (Id == ''))
		return;
		
		Form = document.createElement("form");
		Form.name = "frmSrch";
		Form.id = "frmSrch";
		
		Input = document.createElement("input");
		Input.type = "hidden";
		Input.name = "orderid";
		Input.id = "orderid";
		Input.value = Id;
		Form.appendChild(Input);
	
		Input = document.createElement("input");
		Input.type = "hidden";
		Input.name = "output";
		Input.id = "output";
		Input.value = Output;
		Form.appendChild(Input);

		document.body.appendChild(Form);
		Form.action = Page;
		Form.method="post"
		Form.submit();
}
//---------------removecart
  function removeorder(Id)
  {	
			if (Id == 0 )
				return;

			var VarChoic = confirm("Are you sure you want to remove the product");
			if(!VarChoic)
			{
				return;
			}

			var abcd
			abcd='0@0'
			for(i=1;i<=Id;i++)
			{
				var  ObjChkRemove = document.getElementById("cbproduct_"+i)
				var  ObjRateId = document.getElementById("rateid_"+i)
				if (ObjChkRemove.checked == true)
				{
					var ObjProductId = document.getElementById("productid_"+i)
					abcd = abcd + '-' + ObjProductId.value + '@' + ObjRateId.value
				}
			}

			if (abcd == '0@0' )
			{
				alert("Select Product to Remove")
				return;
			}
		
			var  ObjCartId = document.getElementById("cartid").value
			var  ObjOrderId = document.getElementById("orderid").value

			Para =  "productid="+abcd + "&cartid="+ObjCartId+"&orderid="+ ObjOrderId 
			
			//alert(Para)
			if (Para)
			{
				objXMLHttpRequest.onreadystatechange=removeorder_Output;
				var Url = "RemoveOrder_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","localhost");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			}
		
		//return false;
  }
  
  function removeorder_Output()
  {
	  
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
			OrderId = MsgDet[2]
			submitorderform(OrderId,'2','shopping-order.asp')
		}
		else if(parseInt(MsgDet[1])==10)
		{
			OrderId = MsgDet[2]
			submitorderform(OrderId,'2','shopping-order.asp')
		}
		else if(parseInt(MsgDet[1])==1)
		{
			OrderId = MsgDet[2]
			submitorderform(OrderId,'1','shopping-order.asp')
		}
		objXMLHttpRequest.abort();
	}
  }  
//---------------editcart
  function editorder(Id)
  {	
			if (Id == 0 )
				return;

			var abcd
			abcd='0@0@0'
			for(i=1;i<=Id;i++)
			{
				//var  ObjChkRemove = document.getElementById("cbproduct_"+i)
				var  ObjRateId = document.getElementById("rateid_"+i)
				var  ObjNoofqty = document.getElementById("quantityid_"+i)
				//if (ObjChkRemove.checked == true)
				//{
				var ObjProductId = document.getElementById("productid_"+i)
				abcd = abcd + '-' + ObjProductId.value + '@' + ObjRateId.value + '@' + ObjNoofqty.value
				//}
			}

			if (abcd == '0@0@0' )
			{
				alert("Select Product to Update")
				return;
			}
		
			var  ObjCartId = document.getElementById("cartid").value
			var  ObjOrderId = document.getElementById("orderid").value

			Para =  "productid="+abcd + "&cartid="+ObjCartId+"&orderid="+ ObjOrderId 
			
			if (Para)
			{
				objXMLHttpRequest.onreadystatechange=editOrder_Output;
				var Url = "editorder_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","localhost");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			}
		
		//return false;
  }
  
  function editOrder_Output()
  {
	  
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
				OrderId = MsgDet[2]
				submitorderform(OrderId,'2','shopping-order.asp')
		}
		else if(parseInt(MsgDet[1])==10)
		{
				OrderId = MsgDet[2]
				submitorderform(OrderId,'2','shopping-order.asp')
		}
		else if(parseInt(MsgDet[1])==1)
		{
				OrderId = MsgDet[2]
				submitorderform(OrderId,'1','shopping-order.asp')
		}
		objXMLHttpRequest.abort();
	}
  }  
 


//---------------editcart
  function editcart(Id)
  {	
			if (Id == 0 )
				return;

			//var VarChoic = confirm("Are you sure you want to update cart");
			//if(!VarChoic)
			//	return;

			var abcd
			abcd='0@0@0'
			for(i=1;i<=Id;i++)
			{
				//var  ObjChkRemove = document.getElementById("cbproduct_"+i)
				var  ObjRateId = document.getElementById("rateid_"+i)
				var  ObjNoofqty = document.getElementById("quantityid_"+i)
				//if (ObjChkRemove.checked == true)
				//{
					var ObjProductId = document.getElementById("productid_"+i)
					abcd = abcd + '-' + ObjProductId.value + '@' + ObjRateId.value + '@' + ObjNoofqty.value
				//}
			}

			if (abcd == '0@0@0' )
			{
				alert("Select Product to Update")
				return;
			}
		
			var  ObjCartId = document.getElementById("cartid").value
			Para =  "productid="+abcd + "&cartid="+ObjCartId
			if (Para)
			{
				objXMLHttpRequest.onreadystatechange=editcart_Output;
				var Url = "editCart_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","localhost");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			}
		
		//return false;
  }
  
  function editcart_Output()
  {
	  
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
			document.location.href = "shopping-cart.asp";
		}
		else if(parseInt(MsgDet[1])==10)
		{
			document.location.href = "shopping-cart.asp";
		}
		else if(parseInt(MsgDet[1])==1)
		{
			document.location.href = "shopping-cart.asp";
		}
		objXMLHttpRequest.abort();
	}
  }  
 

//---------------removecart
  function removecart(Id)
  {	
			if (Id == 0 )
				return;

			var VarChoic = confirm("Are you sure you want to remove the product");
			if(!VarChoic)
			{
				return;
			}

			var abcd
			abcd='0@0'
			for(i=1;i<=Id;i++)
			{
				var  ObjChkRemove = document.getElementById("cbproduct_"+i)
				var  ObjRateId = document.getElementById("rateid_"+i)
				if (ObjChkRemove.checked == true)
				{
					var ObjProductId = document.getElementById("productid_"+i)
					abcd = abcd + '-' + ObjProductId.value + '@' + ObjRateId.value
				}
			}

			if (abcd == '0@0' )
			{
				alert("Select Product to Remove")
				return;
			}
		
			var  ObjCartId = document.getElementById("cartid").value

			Para =  "productid="+abcd + "&cartid="+ObjCartId
			
			//alert(Para)
			if (Para)
			{
				objXMLHttpRequest.onreadystatechange=removecart_Output;
				var Url = "RemoveCart_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","localhost");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			}
		
		//return false;
  }
  
  function removecart_Output()
  {
	  
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
			document.location.href = "shopping-cart.asp";
		}
		else if(parseInt(MsgDet[1])==10)
		{
			document.location.href = "shopping-cart.asp";
		}
		else if(parseInt(MsgDet[1])==1)
		{
			document.location.href = "shopping-cart.asp";
		}
		objXMLHttpRequest.abort();
	}
  }  
 

function addcart(Id)
  {	
		//Para=GetPara()
		//if(Para)
		
		Para=GetPara()
		if(Para)
		{
		var ObjQty = document.getElementById("noofquantity_"+Id).value
		 
		if (ObjQty =='' || isNaN(ObjQty))
		{
			document.getElementById("output_"+Id).innerHTML ="Please enter the quatity";
			return false;
		}
		
		Para =  "productid="+Id+ "&noofquantity="+ObjQty
		//alert(Para)
		if (Para)
		{
			objXMLHttpRequest.onreadystatechange=AddCart_Output;
			var Url = "AddCart_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","localhost");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
  		}
		}
		
		//return false;
  }
  
  function AddCart_Output()
  {
	  
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
		//document.getElementById("output").innerHTML=MsgDet[2];
		}
		else if(parseInt(MsgDet[1])==10)
		{
			//alert("Login to add cart")
			//document.getElementById("customeremailid").focus();
			document.location.href="user.asp"
		}
		else if(parseInt(MsgDet[1])==1)
		{
			alert("Thanks for adding the product");
			document.getElementById("spannoofquantity").innerHTML  = MsgDet[3]
			document.getElementById("spantotalamount").innerHTML  = MsgDet[4]
		}
		objXMLHttpRequest.abort();
	}
  }  
 
//---------------login
  function customerlogin()
  {	
		var userid = document.getElementById("customeremailid").value
		var passw = document.getElementById("customerpassword").value
		var site 	= document.getElementById("site").value
		
		if (userid =='' ||   passw == '')
		{
			document.getElementById("output").innerHTML ="username and password are mandatory";
			return false;
		}
		
		Para =  "customeremailid=" + userid + "&customerpassword=" + passw + "&site="+site
		 
		if (Para)
		{
			 
			objXMLHttpRequest.onreadystatechange=customerlogin_Output;
			
			var Url = "UserLog_Srv.asp"; //Url of the file in the server.......
			 
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","localhost");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
  		}
		return false;
  }
  
  function customerlogin_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
		document.getElementById("output").innerHTML=MsgDet[2];
		document.getElementById("customeremailid").value="";
		document.getElementById("customerpassword").value="";
		}
		else if(parseInt(MsgDet[1])==8)
		{
		document.getElementById("output").innerHTML=MsgDet[2];
		document.getElementById("customeremailid").value="";
		document.getElementById("customerpassword").value="";
		}
		else if(parseInt(MsgDet[1])==1)
		{
		document.location.href ="index.asp";
		}
		objXMLHttpRequest.abort();
	}
  }  
  
  



 function customerlogin1()
  {	
		var userid = document.getElementById("customeremailid1").value
		var passw = document.getElementById("customerpassword1").value
		var site 	= document.getElementById("site1").value
		
		if (userid =='' ||   passw == '')
		{
			document.getElementById("output1").innerHTML ="username and password are mandatory";
			return false;
		}
		
		Para =  "customeremailid=" + userid + "&customerpassword=" + passw + "&site="+site
		 
		if (Para)
		{
			 
			objXMLHttpRequest.onreadystatechange=customerlogin1_Output;
			
			var Url = "UserLog_Srv.asp"; //Url of the file in the server.......
			 
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","localhost");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
  		}
		return false;
  }
  
  function customerlogin1_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
		document.getElementById("output1").innerHTML=MsgDet[2];
		document.getElementById("customeremailid1").value="";
		document.getElementById("customerpassword1").value="";
		}
		else if(parseInt(MsgDet[1])==8)
		{
		document.getElementById("output1").innerHTML=MsgDet[2];
		document.getElementById("customeremailid1").value="";
		document.getElementById("customerpassword1").value="";
		}
		else if(parseInt(MsgDet[1])==1)
		{
		document.location.href ="index.asp";
		}
		objXMLHttpRequest.abort();
	}
  }  
  

  
 
 //---------------categorystatuschange
  function categorystatuschange(Id)
  {	

		 Para = "categoryid="+Id
		if (document.getElementById("activestatus_"+Id).checked==true)
		{
			Para +=  "&activestatus=1"; 
		}
		else
		{
			Para +=  "&activestatus=0"; 
		}
	//alert(Para)
		if (Para)
		{
			 
			objXMLHttpRequest.onreadystatechange=categorystatuschange_Output;
			
			var Url = "category_Srv.asp"; //Url of the file in the server.......
			 
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","localhost");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
  		}
		return false;
  }
  
  function categorystatuschange_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert (objXMLHttpRequest.responseText);
		 var MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="category.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="category.asp?output=2"
			}
			else
			{
				document.location.href="category.asp?output=2"							
			}	
		objXMLHttpRequest.abort();
	}
  }  
 //---------------login
  function changespass()
  {	
		Para=GetPara()
		if(Para)
		{
  		objXMLHttpRequest.onreadystatechange=changepasss_Output;
		var Url = "changespassword_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","localhost");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
  		}
		return false;
  }
  
  function changepasss_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
			//alert(objXMLHttpRequest.responseText);
			var	MsgStr = objXMLHttpRequest.responseText.split("*");
			//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="admin.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="admin.asp?output=2"
			}
			else
			{
				document.location.href="admin.asp?output=2"							
			}	
	}
  }
//---------------login


  function login()
  {	
		Para=GetPara()
		if(Para)
		{
		objXMLHttpRequest.onreadystatechange=ClientOutput;
		var Url = "AdminLog_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","localhost");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
  		} 
  }
  
  function ClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgDet[1])==2)
		{
		document.getElementById("output").innerHTML=MsgDet[2];
		document.getElementById("userid").value="";
		document.getElementById("password").value="";
		}
		else if(parseInt(MsgDet[1])==8)
		{
			document.getElementById("output").innerHTML=MsgDet[2];
			document.getElementById("userid").value="";
			document.getElementById("password").value="";
		}
		else 
		{
			document.location.href ="index.asp";
		}
		objXMLHttpRequest.abort();
	}
  }  
  
  
  


/*  function login()
  {	

		Para=GetPara()
			  alert(Para)
		if(Para)
		{
		
  		objXMLHttpRequest.onreadystatechange=login_Output;
		var Url = "AdminLog_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","localhost");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
  		}
		return false;
  }
  
  function login_Output()
  {
	  
	  	alert(objXMLHttpRequest.readyState)
	if(objXMLHttpRequest.readyState == "4" )	
	{
		alert(objXMLHttpRequest.responseText)
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		if(parseInt(MsgDet[1])==2)
		{
		document.getElementById("output").innerHTML=MsgDet[2];
		document.getElementById("userid").value="";
		document.getElementById("password").value="";
		}
		else if(parseInt(MsgDet[1])==8)
		{
		document.getElementById("output").innerHTML=MsgDet[2];
		document.getElementById("userid").value="";
		document.getElementById("password").value="";
		}
		else if(parseInt(MsgDet[1])==1)
		{
		document.location.href ="index.asp";
		}
		objXMLHttpRequest.abort();
	}
  }  
 
 */
//===============================  Admin ======================================
 //---------------add / modify 
  function addadmin()
  {	
	Para = GetPara()
	//alert(Para);
	if (Para)
	{
		if((document.form1.activestatus[0].checked==false) && (document.form1.activestatus[1].checked==false))
		{
		document.getElementById("Sactivestatus").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
		}
		else
		{
		document.getElementById("Sactivestatus").innerHTML = ""	
			if (Para)
			{
				if(document.form1.activestatus[0].checked==true)
				Para=Para + "&activestatus=1"
				else
				Para=Para + "&activestatus=0"	
			}
		}

		objXMLHttpRequest.onreadystatechange=addadmin_output;
		var Url = "Admin_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","localhost");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		document.getElementById("butSave").disabled = true;
	}
  }
  
  function addadmin_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
			//alert(objXMLHttpRequest.responseText);
			var	MsgStr = objXMLHttpRequest.responseText.split("*");
			//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="admin.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="admin.asp?output=2"
			}
			else
			{
				document.location.href="admin.asp?output=2"							
			}	
	}
  }
  
function HowUKnowBHROnchange()
{
		var obj;
		ReasontxtObj = document.getElementById("others"); 
		if ((document.getElementById("howuknowbhr").value)=="Other....")
		{
			ReasontxtObj.disabled = false;
			ReasontxtObj.value = ""
			ReasontxtObj.focus();
		}
		else
		{ 
			ReasontxtObj.value = ""
			ReasontxtObj.disabled = true;
		}
}	

//=============================================================================
  function ChangeOrderStatus()
  {	
		Para = GetPara()
		if (Para)
			{
				if(document.form1.orderstatus.checked==true)
				Para=Para + "&orderstatus=c"
				else
				Para=Para + "&orderstatus=p"	
	
				//alert(Para)
				objXMLHttpRequest.onreadystatechange=ChangeOrderStatus_output;
				var Url = "ChangeOrderStatus_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","localhost");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
				document.getElementById("butSave").disabled = true;
			}
  }
  
  function ChangeOrderStatus_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==1)
		{
			if(parseInt(MsgStr[3])==1)
				document.location.href="Order-pro.asp?output=1"
			else
				document.location.href="Order-direct.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			if(parseInt(MsgStr[3])==1)
				document.location.href="Order-pro.asp?output=1"
			else
				document.location.href="Order-direct.asp?output=1"
		}
		else
		{
			document.location.href="Order-pro.asp?output=2"							
		}	
	}
  }
//===============================Usertype======================================
 //---------------add / modify 
 
    function addcustomerbrowser1()
	  {	
		Para = GetPara()
		alert(Para)
		if(Para)
			document.form1[0].submit()
	 }
  
  
   function addcustomerbrowser()
  {	
  		//alert("fff")
		Para = GetPara()
		//alert(Para)
		if(Para)
		{
				//alert("sin")
	
	document.form5.action = "Customer_Srv.asp";
	document.form5.method="POST"
	document.form5.submit();				
						//	alert("outisde")
		}
	/*	
	
			//if(document.getElementById("trainedprofessional").checked==true)
		//	Para=Para + "&trainedprofessional=1"
			//else
			Para=Para + "&trainedprofessional=0"	

			objXMLHttpRequest.onreadystatechange=addcustomerbrowser_output;
			var Url = "Customer_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.bhrdirect.co.uk");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}*/
  }
  
  function addcustomerbrowser_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		//alert(MsgStr[1])
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="my-account.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="registration.asp?output=2"
		}
		else
		{
			document.location.href="registration.asp?output=2"							
		}	
	}
  }
  //===============================Usertype======================================
 //---------------add / modify 
  function addcustomer()
  {	
		Para = GetPara()
		//alert(Para);
		if((document.form1.activestatus[0].checked==false) && (document.form1.activestatus[1].checked==false))
		{
			document.getElementById("Sactivestatus").innerHTML = "<font color=red>*</font>"
		}
		else
		{
			document.getElementById("Sactivestatus").innerHTML = ""	
			if (Para)
			{
				if(document.form1.trainedprofessional.checked==true)
				Para=Para + "&trainedprofessional=1"
				else
				Para=Para + "&trainedprofessional=0"	


				if(document.form1.activestatus[0].checked==true)
				Para=Para + "&activestatus=1"
				else
				Para=Para + "&activestatus=0"	
	
				objXMLHttpRequest.onreadystatechange=addcustomer_output;
				var Url = "Customer_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","localhost");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
				document.getElementById("butSave").disabled = true;
			}
	}
  }
  
  function addcustomer_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==1)
		{
			if(parseInt(MsgStr[3])==1)
				document.location.href="customer-pro.asp?output=1"
			else
				document.location.href="customer-direct.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			if(parseInt(MsgStr[3])==1)
				document.location.href="customer-pro.asp?output=1"
			else
				document.location.href="customer-direct.asp?output=1"
		}
		else
		{
			document.location.href="customer-pro.asp?output=2"							
		}	
	}
  }
//===============================Usertype======================================
 //---------------add / modify 
   function addusertype()
  {	
	Para = GetPara()
		//alert(Para);
		if((document.form1.activestatus[0].checked==false) && (document.form1.activestatus[1].checked==false))
		{
		document.getElementById("Sactivestatus").innerHTML = "<font color=red>*</font>"
		}
		else
		{
		document.getElementById("Sactivestatus").innerHTML = ""	
			if (Para)
			{

				if(document.form1.activestatus[0].checked==true)
				Para=Para + "&activestatus=1"
				else
				Para=Para + "&activestatus=0"	

				objXMLHttpRequest.onreadystatechange=addusertype_output;
				var Url = "usertype_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","localhost");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
				document.getElementById("butSave").disabled = true;
				
			}
	}
  }
  
  function addusertype_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="usertype.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="usertype.asp?output=2"
		}
		else
		{
			document.location.href="usertype.asp?output=2"							
		}	
	}
  }
  
//---------------add / modify ====== BulkUpdateProductPrice
  function BulkUpdateProductPrice()
  {	
		Para = GetPara()
		//alert(Para)
		if (Para)
		{
			document.form1.submit();			
		}
		else
		return false;
  }
//---------------add / modify ====== AddProduct
  function addproduct()
  {	
		Para = GetPara()
		if((document.form1.activestatus[0].checked==false) && (document.form1.activestatus[1].checked==false))
		{
			document.getElementById("Sactivestatus").innerHTML = "<font color=red>*</font>"
		}
		else
		{
			document.getElementById("Sactivestatus").innerHTML = ""	
			
			Input 		= document.createElement("input");
			Input.type 	= "hidden";
			Input.name 	= "activestatus";
			Input.id 	= "activestatus";

			if(document.form1.activestatus[0].checked==true)
				Input.value = 1;
			else
				Input.value = 0;

			Input1 		= document.createElement("input");
			Input1.type = "hidden";
			Input1.name = "newproduct";
			Input1.id 	= "newproduct";

			if(document.form1.newproduct.checked==true)
				Input1.value = 1;
			else
				Input1.value = 0;

			
			if (Para)
			{
				document.form1.appendChild(Input);
				document.form1.appendChild(Input1);
				document.form1.submit();			
			}
		}
  }

//----------------------add / modify  -- Addpermission
function addpermission()
{	
var abcd
abcd=0
	for(i=0;i<document.getElementById("LstPgDis").options.length;i++)
	{
		document.getElementById("LstPgDis").options[i].selected=true;
		abcd = abcd + "-" + document.getElementById("LstPgDis").options[i].value;
		document.getElementById("page").value=abcd
	}
		Para = GetPara()
		if (Para) {
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=addpermission_output;
		var Url = "Permission_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","localhost");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		document.getElementById("butSave").disabled = true;
		}
  }
  
  function addpermission_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText)
		var		MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==1)
			{
			document.location.href="permission.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="permission.asp?output=2"
			}
			else
			{
				document.location.href="permission.asp?output=2"
			}	
	}
  }
  
 //-----------------modify 
  //-------- Modify 

function modiconfirmcart(Id,i)
{
  
	if (i == 0)
	{
		alert("No Product is purchased in u r cart")
		return;
	}
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "cartid";
	Input.id = "cartid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "confirmorder_srv.asp";
	Form.method="post"
	Form.submit();
}

function modieditorder(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "orderid";
	Input.id = "orderid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "shopping-order.asp";
	Form.method="post"
	Form.submit();
}

function modiprofile(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "customerid";
	Input.id = "customerid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "registration.asp";
	Form.method="post"
	Form.submit();
}
function modiusertype(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "usertypeid";
	Input.id = "usertypeid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modiusertype.asp";
	Form.method="post"
	Form.submit();
}

function modicustomer(Id,site)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "customerid";
	Input.id = "customerid";
	Input.value = Id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "site";
	Input.id = "site";
	Input.value = site;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modicustomer.asp";
	Form.method="post"
	
	Form.submit();
}
function modipermission(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "usertypeid";
	Input.id = "usertypeid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modipermission.asp";
	Form.method="post"
	Form.submit();
}

function modiadmin(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "adminid";
	Input.id = "adminid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modiadmin.asp";
	Form.method="post"
	Form.submit();
}

function modiclient(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "clientid";
	Input.id = "clientid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modiclient.asp";
	Form.method="post"
	Form.submit();
}

function vieworder(Id,site)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "orderid";
	Input.id = "orderid";
	Input.value = Id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "site";
	Input.id = "site";
	Input.value = site;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "vieworder.asp";
	Form.method="post"
	Form.submit();
}
function orderstatusEdit(Id,site)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "orderid";
	Input.id = "orderid";
	Input.value = Id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "site";
	Input.id = "site";
	Input.value = site;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "changeorderstatus.asp";
	Form.method="post"
	Form.submit();
}
function modiproduct(Id,site)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "productid";
	Input.id = "productid";
	Input.value = Id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "site";
	Input.id = "site";
	Input.value = site;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modiproduct.asp";
	Form.method="post"
	Form.submit();
}
//===============================  AddCategory ======================================
 //---------------add / modify 
  function addcategory()
  {	
	Para = GetPara()

	if (Para)
	{
		if((document.form1.activestatus[0].checked==false) && (document.form1.activestatus[1].checked==false))
		{
		document.getElementById("Sactivestatus").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
		}
		else
		{
		document.getElementById("Sactivestatus").innerHTML = ""	
			if (Para)
			{
				if(document.form1.activestatus[0].checked==true)
				Para=Para + "&activestatus=1"
				else
				Para=Para + "&activestatus=0"	
			}
		}
		objXMLHttpRequest.onreadystatechange=addcategory_output;
		var Url = "category_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		document.getElementById("butSave").disabled = true;
	}
  }
  
  function addcategory_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
//alert(objXMLHttpRequest.responseText);
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="category.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="category.asp?output=2"
			}
			else
			{
				document.location.href="category.asp?output=1"							
			}	
	}
  }
  
  //-------- Modify 
 function modicategory(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "categoryid";
	Input.id = "categoryid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modicategory.asp";
	Form.method="post"
	Form.submit();
}

/////////////////////////////////////////////////////////////////////
function NewsUpdt()
{
var a, c, b	
	a=0
	c=0
	b=0

	cmt="<font color='#FF0000'>*</font>"	  
	
	if(document.getElementById("newsdate").value=="")
	{
		b=1
		document.getElementById("Snewsdate").innerHTML=cmt
	}
	else
	{
		b=0
		document.getElementById('Snewsdate').innerHTML=""
	}	

	if(document.getElementById("newstitle").value=="")
	{
		a=1
		document.getElementById("Snewstitle").innerHTML=cmt
	}
	else
	{
		a=0
		document.getElementById('Snewstitle').innerHTML=""
	}	

	if(updateRTEs()==0)
	{
		c=1
		document.getElementById("Snewsdescription").innerHTML = cmt
	}
	else
	{
		c=0
		document.getElementById("Snewsdescription").innerHTML=""
	}	
	
	
	if((a==1) || (c==1) || (b==1))//|| (e==1) || (f==1)|| (g==1)|| (k==1))
	{
		return false;
	}
	else
	{
		return true;
	}
}  

function NewsCheck()
{
var a, c, b	
	a=0
	c=0
	b=0

cmt="<font color='#FF0000'>*</font>"	  
	
	if(document.getElementById("newsdate").value=="")
	{
		b=1
		document.getElementById("Snewsdate").innerHTML=cmt
	}
	else
	{
		b=0
		document.getElementById('Snewsdate').innerHTML=""
	}	

	if(document.getElementById("newstitle").value=="")
	{
		a=1
		document.getElementById("Snewstitle").innerHTML=cmt
	}
	else
	{
		a=0
		document.getElementById('Snewstitle').innerHTML=""
	}	

	if(document.getElementById("newsdescription").value=="")
	{
		c=1
		document.getElementById("Snewsdescription").innerHTML = cmt
	}
	else
	{
		c=0
		document.getElementById("Snewsdescription").innerHTML=""
	}	
	
	if((a==1) || (c==1) || (b==1))//|| (e==1) || (f==1)|| (g==1)|| (k==1))
	{
		return false;
	}
	else
	{
		return true;
	}
}  
function modinews(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "newsid";
	Input.id = "newsid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddNews.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin --------------------------------------
   function Delete_AOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelAClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelAClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="admin.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="admin.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="admin.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="admin.asp?output=4"
			}			
			else
			{
				document.location.href="admin.asp?output=5"				
			}
	}
  } 
   //------------delete UserType --------------------------------------
   function Delete_UserTypeOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelAUserTypeOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelAUserTypeOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="usertype.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="usertype.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="usertype.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="usertype.asp?output=4"
			}			
			else
			{
				document.location.href="usertype.asp?output=5"				
			}
	}
  } 

//------------deleteProduct--------------------------------------
function Delete_ProductOnclick(Id){
var VarChoic = confirm("Are you sure!.. want to delete");
if(VarChoic)
{
	Para=GetPara() + '&Id='+Id
	//alert(Para);
	objXMLHttpRequest.onreadystatechange=DelAProductOutput;
	var Url = "DelData.asp"; 
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
	objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	objXMLHttpRequest.setRequestHeader("Content-Length","12");
	objXMLHttpRequest.send(Para);
}	
}
  
  function DelAProductOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="product-pro.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="product-pro.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="product-pro.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="product-pro.asp?output=4"
			}			
			else
			{
				document.location.href="product-pro.asp?output=5"				
			}
	}
  } 
  
//------------delete Category --------------------------------------
   function Delete_CategoryOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelCatClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelCatClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="category.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="category.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="category.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="category.asp?output=4"
			}			
			else
			{
				document.location.href="category.asp?output=5"				
			}
	}
  } 
  
  //------------delete SubCategory -----------------------------
   function Delete_SubCategoryOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelSubCatClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelSubCatClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="subcategory.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="subcategory.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="subcategory.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="subcategory.asp?output=4"
			}			
			else
			{
				document.location.href="subcategory.asp?output=5"				
			}
	}
  } 
  
    //------------delete AdsZone-----------------------------
   function Delete_AdZoneOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelAdZoneClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelAdZoneClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="adzone.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="adzone.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="adzone.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="adzone.asp?output=4"
			}			
			else
			{
				document.location.href="adzone.asp?output=5"				
			}
	}
  } 
  
  
      //------------delete AdsZone-----------------------------
   function Delete_AdsOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelAdZoneClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelAdZoneClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="AdsPage.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="AdsPage.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="AdsPage.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="AdsPage.asp?output=4"
			}			
			else
			{
				document.location.href="AdsPage.asp?output=5"				
			}
	}
  } 
  
  //===================== DelOutlet ==============
//------------delete Outlet-----------------------------
   function Delete_OutletOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelOutletClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelOutletClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="outlet.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="outlet.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="outlet.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="outlet.asp?output=4"
			}			
			else
			{
				document.location.href="outlet.asp?output=5"				
			}
	}
  } 
  
  //------------delete Outlet-----------------------------
   function Delete_ClientOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para);
  		objXMLHttpRequest.onreadystatechange=DelOfferClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelOfferClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="client.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="client.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="client.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="client.asp?output=4"
			}			
			else
			{
				document.location.href="client.asp?output=5"				
			}
	}
  } 
  
  
   function News_Delete(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id 
  		objXMLHttpRequest.onreadystatechange=News_DeleteOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function News_DeleteOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText)
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="news_events.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="news_events.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="news_events.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="news_events.asp?output=4"
			}			
			else
			{
				document.location.href="news_events.asp?output=5"				
			}
	}
  } 
  
  /////////////////////////////////////////////////////////////////////////
  // JavaScript Document
function addPrjStat()
{

Para = GetPara()
	if (Para)
	{
	
		objXMLHttpRequest.onreadystatechange=addPrjStat_output;
		var Url = "PrjStatus_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","localhost");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		document.getElementById("butSave").disabled = true;
	}
}
  
function addPrjStat_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
if(parseInt(MsgStr[1])==1)
			{
				document.location.href="prjstatus.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="prjstatus.asp?output=2"
			}
			else
			{
				document.location.href="prjstatus.asp?output=2"							
			}	
	}
}
  
 
  //-------- Modify 

function modiPrjStatus(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pstid";
	Input.id = "pstid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modiprjstatus.asp";
	Form.method="post"
	Form.submit();
}

//------------delete admin
   function Delete_PrjStatus(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_PrjStatusOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_PrjStatusOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="prjstatus.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="prjstatus.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="prjstatus.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==4)
			{
				document.location.href="prjstatus.asp?output=4"
			}			
			else
			{
				document.location.href="prjstatus.asp?output=5"				
			}

	}
  } 
  
  //------------delete admin
   function Delete_Projects(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_ProjectsOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_ProjectsOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("hhh").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="projects.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="projects.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="projects.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==4)
			{
				document.location.href="projects.asp?output=4"
			}			
			else
			{
				document.location.href="projects.asp?output=5"				
			}

	}
  } 
  
   function Delete_ProjectsLstAll(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id + "&all=all"
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_ProjectsLstAllOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_ProjectsLstAllOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("hhh").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="projects.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="projects.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="projects.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==4)
			{
				document.location.href="projects.asp?output=4"
			}			
			else
			{
				document.location.href="projects.asp?output=5"				
			}

	}
  }
  
  //---------------------------------project Type Module------------------------------------------------
  
  // JavaScript Document
function addPrjTyp()
{
	Para = GetPara()
	if (Para)
	{
	
		objXMLHttpRequest.onreadystatechange=addPrjType_output;
		var Url = "PrjType_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		document.getElementById("butSave").disabled = true;
	}
}
  
function addPrjType_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="prjtypes.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="prjtypes.asp?output=2"
			}
			else
			{
				document.location.href="prjtypes.asp?output=2"							
			}	
	}
}
  
 
  //-------- Modify 

function modiPrjType(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "prjid";
	Input.id = "prjid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modiprjType.asp";
	Form.method="post"
	Form.submit();
}

//------------delete admin
   function Delete_PrjTyp(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_PrjTypOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_PrjTypOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="prjtypes.asp?output=4"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="prjtypes.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="prjtypes.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==4)
			{
				document.location.href="prjtypes.asp?output=4"
			}			
			else
			{
				document.location.href="prjtypes.asp?output=5"				
			}

	}
  } 
  
//-------------------------------Specification Types---------------------------------------

function addSpecTyp()
{
	Para = GetPara()
	if (Para)
	{
	
		objXMLHttpRequest.onreadystatechange=addSpecTyp_output;
		var Url = "spectypes_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		document.getElementById("butSave").disabled = true;
	}
}
  
function addSpecTyp_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="spectypes.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="spectypes.asp?output=2"
			}
			else
			{
				document.location.href="spectypes.asp?output=2"							
			}	
	}
}  
 
  //-------- Modify 

function modiSpecType(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "spid";
	Input.id = "spid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modispectypes.asp";
	Form.method="post"
	Form.submit();
}

//------------delete Spec types
   function Delete_SpecType(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_SpecTypeOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_SpecTypeOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="spectypes.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="spectypes.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="spectypes.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==4)
			{
				document.location.href="spectypes.asp?output=4"
			}			
			else
			{
				document.location.href="spectypes.asp?output=5"				
			}

	}
  } 
  
//--------------------------- add/mod/del blocks-----------------------------


function addblocks()
{
	Para = GetPara()
	if (Para)
	{
	
		objXMLHttpRequest.onreadystatechange=addblocks_output;
		var Url = "blocks_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		document.getElementById("butSave").disabled = true;
	}
}
  
function addblocks_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=2"
			}
			else
			{
				document.location.href="viewprj.asp?output=2"							
			}	
	}
}  
 
  //-------- Modify 

function modiblocks(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "blkid";
	Input.id = "blkid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modiblocks.asp";
	Form.method="post"
	Form.submit();
}

//------------delete Spec types
   function Delete_Blk(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var TTabNa = "idb_block"
		var FldNa = "BlkId"
		Para= "TabNa=" + TTabNa +"&FldNa=" + FldNa +'&Id='+Id
		objXMLHttpRequest.onreadystatechange=Delete_BlkOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_BlkOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="viewprj.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==4)
			{
				document.location.href="viewprj.asp?output=4"
			}			
			else
			{
				document.location.href="viewprj.asp?output=5"				
			}

	}
  } 
  
//----------------------------specifications-----------------------------------------


function addspec()
{
	Para = GetPara()
	if (Para)
	{
		//Para = Para + "&pid=" + id
		objXMLHttpRequest.onreadystatechange=addspec_output;
		var Url = "spec_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		document.getElementById("butSave").disabled = true;
	}
}
  
function addspec_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		alert(objXMLHttpRequest.responseText)
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=2"
			}
			else
			{
				document.location.href="viewprj.asp?output=2"							
			}	
	}
}  
 
  //-------- Modify 

function modispec(Id,psid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "psid";
	Input.id = "psid";
	Input.value = psid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modispec.asp";
	Form.method="post"
	Form.submit();
}

//------------delete Spec types
   function Delete_Spec(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var TTabNa = "GVS_spec"
		var FldNa = "psid"
		Para= "TabNa=" + TTabNa +"&FldNa=" + FldNa +'&Id='+Id
		objXMLHttpRequest.onreadystatechange=Delete_SpecOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_SpecOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		alert(MsgStr[1])
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="viewprj.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==4)
			{
				document.location.href="viewprj.asp?output=4"
			}			
			else
			{
				document.location.href="viewprj.asp?output=5"				
			}
	}
  } 
//----------------------------Payment-----------------------------------------


function addPay()
{
//alert("jhgkjhk")
	Para = GetPara()
	if (Para)
	{
		//Para = Para + "&pid=" + id
		objXMLHttpRequest.onreadystatechange=addPay_output;
		var Url = "pymt_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		document.getElementById("butSave").disabled = true;
	}
}
  
function addPay_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=2"
			}
			else
			{
				document.location.href="viewprj.asp?output=2"							
			}	
	}
}    
  
function modipay(Id,pyid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pyid";
	Input.id = "pyid";
	Input.value = pyid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "modipyment.asp";
	Form.method="post"
	Form.submit();
}

//------------delete Spec types
   function Delete_Pay(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var TTabNa = "idb_pyment"
		var FldNa = "pyid"
		Para= "TabNa=" + TTabNa +"&FldNa=" + FldNa +'&Id='+Id
		objXMLHttpRequest.onreadystatechange=Delete_PayOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_PayOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="viewprj.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="viewprj.asp?output=4"
			}			
			else
			{
				document.location.href="viewprj.asp?output=5"				
			}

	}
  } 
  
  //-------------------------delete all details-----------------------
  
  function Delet_All(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		//var TTabNa = "idb_pyment"
		//var FldNa = "pyid"
		Para= "PMnId=" + Id
//		alert(Para)
		objXMLHttpRequest.onreadystatechange=Delet_AllOutput;
		var Url = "DelAllData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delet_AllOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			/*if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="viewprj.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="viewprj.asp?output=4"
			}			
			else
			{
				document.location.href="viewprj.asp?output=5"				
			}*/

	}
  } 
function avaiNew(id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "avail1.asp";
	Form.method="post"
	Form.submit();
}

function floornew(id,nfpid)
{
//alert(id)
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "nfpid";
	Input.id = "nfpid";
	Input.value = nfpid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ModiNewplan.asp";
	Form.method="post"
	Form.submit();
}

//---------------------Sub Category Creation---------------------

function avaiNewSub(id,mnid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = id;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "availSub.asp";
	Form.method="post"
	Form.submit();
}

function planNewSub(id,mnid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = id;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	//Form.action = "planSub.asp";
	Form.action = "planlSub.asp";
	Form.method="post"
	Form.submit();
}

//--------------------Add master table ----------------------------
function AddMaster()
{
Para = GetPara()
	if (Para)
	{
		//Para = Para + "&pid=" + id
//		alert(Para)
		objXMLHttpRequest.onreadystatechange=AddMaster_output;
		var Url = "avai_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		//document.getElementById("butSave").disabled = true;
	}
}
  
function AddMaster_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("divmsid").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="avail1.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="avail1.asp?output=2"
			}
			else
			{
				document.location.href="avail1.asp?output=2"							
			}
	}
} 


function AddMaster1()
{
Para = GetPara()
	if (Para)
	{
		//Para = Para + "&pid=" + id
		//alert(Para)
		objXMLHttpRequest.onreadystatechange=AddMaster1_output;
		var Url = "plan_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		//document.getElementById("butSave").disabled = true;
	}
}
  
function AddMaster1_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
	//	alert(objXMLHttpRequest.responseText)
		document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="plans.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="plans.asp?output=2"
			}
			else
			{
				document.location.href="plans.asp?output=2"							
			}
			var browser=navigator.appName
			if (browser=="Netscape")
			{
				var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
				clearTimeout(requestTimer);
			}
			else
			{
			objXMLHttpRequest.abort()
			}
	}
} 
//------------------------modify -----------------------------------
function ModiMaster()
{
Para = GetPara()
	if (Para)
	{
		//Para = Para + "&pid=" + id
//		alert(Para)
		objXMLHttpRequest.onreadystatechange=ModiMaster_output;
		var Url = "ModiTitle_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		//document.getElementById("butSave").disabled = true;
	}
}
  
function ModiMaster_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		alert(objXMLHttpRequest.responseText)
		//document.getElementById("subDiv").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=2"
			}
			else
			{
				document.location.href="viewprj.asp?output=2"							
			}
	}
} 
function AddSubLvl()
{
	Para = GetPara()
	if (Para)
	{
		//Para = Para + "&pid=" + id
//		alert(Para)
		objXMLHttpRequest.onreadystatechange=AddSubLvl_output;
		var Url = "avaiSub_srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		//document.getElementById("butSave").disabled = true;
	}
}
  
function AddSubLvl_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		//var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("divmsid").innerHTML = "Details Updated"
		/*	if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=2"
			}
			else
			{
				document.location.href="viewprj.asp?output=2"							
			}*/	
	}
}  

function getPrTypes()
{
	//Para = GetPara()
	//if (Para)
	//{	
		var cname = document.getElementById("cname").value
		Para = "cname=" + cname
//		alert(Para)
		objXMLHttpRequest.onreadystatechange=getPrtypes_output;
		var Url = "getPrType.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		//alert(Para)
		//document.getElementById("butSave").disabled = true;
	//}
}
  
function getPrtypes_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("prtyp").innerHTML = objXMLHttpRequest.responseText
		/*	if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=2"
			}
			else
			{
				document.location.href="viewprj.asp?output=2"							
			}*/	
	}
}  

function AdDivIns()
{
		var modi = document.getElementById("modi").value
		Para = modi		
		delNewRows();
		if(document.getElementById("modi").value!="All")
		{
			document.getElementById("divins").innerHTML = "<input type='button' name='btnFlat' id='btnFlat' value='Insert' onClick='javascript:AddFlats(Para)'>"		
		}
		else
		{
			document.getElementById("divins").innerHTML = ""
		}
}


function AdDivIns1()
{
	var modi = document.getElementById("modi").value
	Para = modi	
//alert(Para)
	if((document.getElementById("modi").value!="All") && (document.getElementById("modi").value!=""))
	{
		document.getElementById("divins").innerHTML = "<input type='button' name='btnFlat' id='btnFlat' value='Insert' onClick='javascript:AddPln()'>"		
	}
	else
	{
		document.getElementById("divins").innerHTML = ""
			document.getElementById("table2").style.visibility = "hidden"
	}
}

function AddPln()
{
		var modi = document.getElementById("modi").value
		Para = modi	

		if((document.getElementById("modi").value!="All") && (document.getElementById("modi").value!=""))
		{
			document.getElementById("table2").style.visibility = "visible"
		}
		else if(document.getElementById("modi").value=="")
		{
			document.getElementById("table2").style.visibility = "hidden"
		}
}

//-----------------------modify 
function modiAvai(mnid,pid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = pid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ModiAvail.asp";
	Form.method="post"
	Form.submit();
}

//---------------------Modify Titles--------------------------
//-----------------------modify 
function modiTitle(mnid,pid,stat)
{
//alert(pid)
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = pid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "stat";
	Input.id = "stat";
	Input.value = "Title";
	Form.appendChild(Input);
	
	/*Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "output";
	Input.id = "output";
	Input.value = "1";
	Form.appendChild(Input);*/

	document.body.appendChild(Form);
	Form.action = "ModiTitl.asp";
	Form.method="post"
	Form.submit();
}

function modiTitl1(mnid,pid,stat)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = pid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "stat";
	Input.id = "stat";
	Input.value = "Title";
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ModiTitl1.asp";
	Form.method="post"
	Form.submit();
}
//-----------------------View 
function ViewAvai(mnid,pid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = pid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ViewFlats.asp";
	Form.method="post"
	Form.submit();
}
  
  
function Viewplan(mnid,pid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = pid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "Viewplans.asp";
	Form.method="post"
	Form.submit();
}

function ViewplanDel(mnid,pid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mnid";
	Input.id = "mnid";
	Input.value = mnid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = pid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "Viewplans.asp";
	Form.method="post"
	Form.submit();
}
  
 //-------------------------delete all details-----------------------
  
  function DelTitl(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var TTabNa = "idb_struct"
		var FldNa = "mnid"
		Para= "Id=" + Id +"&TabNa="+ TTabNa + "&FldNa=" + FldNa
//		alert(Para)
		objXMLHttpRequest.onreadystatechange=DelTitlOutput;
		var Url = "DelDataTit.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelTitlOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="viewprj.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="viewprj.asp?output=4"
			}			
			else
			{
				document.location.href="viewprj.asp?output=5"				
			}

	}
  } 
  

  function DelTitl1(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var TTabNa = "idb_fstruct"
		var FldNa = "mnid"
		Para= "Id=" + Id +"&TabNa="+ TTabNa + "&FldNa=" + FldNa
//		alert(Para)
		objXMLHttpRequest.onreadystatechange=DelTitl1Output;
		var Url = "DelDataTit.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelTitl1Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="viewprj.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="viewprj.asp?output=4"
			}			
			else
			{
				document.location.href="viewprj.asp?output=5"				
			}

	}
  } 
 
function NwsUpdt()
{
	var a, c, b	
	a=0
	c=0
	b=0

	if(document.getElementById("ndate").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		b=1
		document.getElementById("Sndate").innerHTML=cmt
	}
	else
	{
		cmt=""
		b=0
		document.getElementById('Sndate').innerHTML=cmt
	}	
	
	if(document.getElementById("ntitle").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		a=1
		document.getElementById("Sntitle").innerHTML=cmt
	}
	else
	{
		cmt=""
		a=0
		document.getElementById('Sntitle').innerHTML=cmt
	}	

	if(updateRTEs()==0)
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		c=1
		
		document.getElementById("Sndesc").innerHTML = "<font color='#FF0000'> Should Not Be Blank</font>"
	}
	else
	{
		cmt=""
		c=0
		document.getElementById('Sndesc').innerHTML=cmt
	}	
	

	if((a==1) || (c==1) || (b==1))//|| (e==1) || (f==1)|| (g==1)|| (k==1))
	{
		return false;
	}
	else
	{
		return true;
	}
}  

 function News_Delete11(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id 
  		objXMLHttpRequest.onreadystatechange=News_DeleteOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function News_Delete11Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="news-events.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="news-events.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="news-events.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="news-events.asp?output=4"
			}			
			else
			{
				document.location.href="news-events.asp?output=5"				
			}

	}
  } 
function CWGall_Delete(Id)
{
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		objXMLHttpRequest.onreadystatechange=CWGall_DeleteOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
}
  
  function CWGall_DeleteOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("dddd").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="ConstructWorks.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="ConstructWorks.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="ConstructWorks.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="ConstructWorks.asp?output=4"
			}			
			else
			{
				document.location.href="ConstructWorks.asp?output=5"				
			}

	}
  } 
  
  function CWGallPrj_Delete(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para="TabNa=IDB_Construct &FldNa=ConGid &Id="+Id
  		objXMLHttpRequest.onreadystatechange=CWGallPrj_DeleteOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function CWGallPrj_DeleteOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("dddd").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="viewprj.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="viewprj.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="viewprj.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="viewprj.asp?output=4"
			}			
			else
			{
				document.location.href="viewprj.asp?output=5"				
			}

	}
  } 
  
function TestiMon_Delete(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=TestiMon_DeleteOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.indiabuilders.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function TestiMon_DeleteOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("dddd").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="Testimonials.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Testimonials.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Testimonials.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="Testimonials.asp?output=4"
			}			
			else
			{
				document.location.href="Testimonials.asp?output=5"				
			}

	}
  } 
 
function UpdtOrdrCompl()
{
	//Form.action = "ModiAvail.asp";
	Form.method="post"
	Form.submit();
}

function viewgallery(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pid";
	Input.id = "pid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "viewphoto.asp";
	Form.method="post"
	Form.submit();
}

//==================Sel_ondblclick

function Sel_ondblclick(srcId, destId) {
var destObj = document.getElementById(destId);
var srcObj = document.getElementById(srcId);
	for(var i=0; i<srcObj.length; i++)
	{
		if(srcObj.options[i].selected) {
		var srcTxt = srcObj.options[i].text;
		var srcVal = srcObj.options[i].value;
		var newOpt = document.createElement("OPTION");
		newOpt.text = srcTxt;
		newOpt.value = srcVal;
		destObj.options.add(newOpt);
		}
	}
	for(var j=srcObj.length-1; j>=0; j--) 
	{
		if(srcObj.options[j].selected) 
		{
			srcObj.remove(j);
		}
	}
}


 function Sel_ondblclick2(LstSrc,LstDist) {
	if(document.getElementById(LstSrc).selectedIndex==-1)
		alert("Select Properly");
	else
	{	

		var Opt = document.createElement("option");
		Opt.text = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].text; 
		Opt.value = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].value;
		document.getElementById(LstDist).options.add(Opt);
		document.getElementById(LstSrc).remove(document.getElementById(LstSrc).selectedIndex);	
	}
}
function Sel_ondblclick1(LstSrc,LstDist) {
	if(document.getElementById(LstSrc).selectedIndex==-1)
		alert("Select Properly");
	else
	{	

		var Opt = document.createElement("option");
		Opt.text = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].text; 
		Opt.value = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].value;
		document.getElementById(LstDist).options.add(Opt);
		document.getElementById(LstSrc).remove(document.getElementById(LstSrc).selectedIndex);	
	}
}

function viewProduct(Id)
{
//document.form1.job_id.value=a
//document.form1.method="post"
//document.form1.action="job_view1.asp"
//document.form1.submit()

Form = document.createElement("form");
Form.name = "frmSrch";
Form.target="_blank"
Form.id = "frmSrch";

Input = document.createElement("input");
Input.type = "hidden";
Input.name = "productid";
Input.id = "productid";
Input.value = Id;
Form.appendChild(Input);		

document.body.appendChild(Form);

Form.action = "viewproduct.asp";
//Form.target = "foobar:width={window.screen.width/2},height={myHeight},scrollbars,{(isResizable)?'':''},status"
Form.target = "foobar:width={myWid},height={myHeight},left={centerWidth},top={centerHeight},scrollbars,{(isResizable)?'':''},status"
Form.method="post"
Form.onSubmit = createTarget(Form);
Form.submit();
}

var myHeight = 300;
var myWid = 650;
var isResizable = true;
var centerWidth = (window.screen.width - myWid) / 2;
var centerHeight = (window.screen.height - myHeight) / 2;

function createTarget(form) {
//alert(form.action)
var _target = form.target;
_colon = _target.indexOf(":");
if(_colon != -1) 
{
	form.target = _target.substring(0,_colon);
	form.args = _target.substring(_colon+1);
} 
else if(typeof(form.args)=="undefined") {
	form.args = "";
}
if(form.args.indexOf("{")!=-1) {
_args = form.args.split("{");
form.args = _args[0];
for(var i = 1; i < _args.length;i++) {
_args[i] = _args[i].split("}");
form.args += eval(_args[i][0]) + _args[i][1];
   }
}
form.args = form.args.replace(/ /g,"");
_win = window.open('',form.target,form.args);
if(typeof(focus)=="function")
_win.focus();
//alert(form.args)
return true;
}
	
	
function ShowProductPage(pgid,pagename)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = pagename;
	Form.method="post"
	Form.submit();
//mypage
}

function showproduct(productid,pagename)
{
	
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "productid";
	Input.id = "productid";
	Input.value = productid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = pagename;
	Form.method="post"
	Form.submit();

}


function send_mail(Item_name,Payment)
{
Form = document.createElement("form");
	Form.name = "frm";
	Form.id = "frm";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "Item_name";
	Input.id = "Item_name";
	Input.value = Item_name;
	Form.appendChild(Input);

	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "Payment";
	Input.id = "Payment";
	Input.value = Payment;
	Form.appendChild(Input);	

	document.body.appendChild(Form);
	Form.action = "confirmation.asp";
	Form.target = "_blank";
	Form.method="post"
	Form.submit();
}
