// JavaScript Document

function onlynos()
{
var a=window.event.keyCode;
if((a<48 || a>57) && (a!=45) && (a!=32) && (a!=46))
{
	window.event.keyCode =0;
}
}

  
//===============================  Admin ======================================
 //---------------add / modify 
   function addadmin()
  {	
	Para = GetPara()

if((form1.adstat[0].checked==false) && (form1.adstat[1].checked==false))
{
document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
}
else
{
document.getElementById("Sadstat").innerHTML = ""
	
	if (Para)
	{
if(form1.adstat[0].checked==true)
Para=Para + "&as=1"
else
Para=Para + "&as=0"

if(form1.AdAuthor[0].checked==true)
Para=Para + "&AdAuth=1"
else
Para=Para + "&AdAuth=0"

		//alert(Para)
	
		objXMLHttpRequest.onreadystatechange=addadmin_output;
		var Url = "Admin_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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" )	
	{
		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=5"				
			}	
	}
}

 //-----------------modify 
  //-------- Modify 

function modiadmin(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "AdId";
	Input.id = "AdId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddAdmin.asp";
	Form.method="post"
	Form.submit();
}


function catalog(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pdtid";
	Input.id = "pdtid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "upload_catalog.asp";
	Form.method="post"
	Form.submit();
}
function DeskImg(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pdtid";
	Input.id = "pdtid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "upload_Desk.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.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelAClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		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"				
			}

	}
  } 
  
 
 //===============================  Admin ======================================
 //---------------add / modify 
   function AddBranch()
  {	
	Para = GetPara()
	if (Para)
	{
	//	alert(Para)
		objXMLHttpRequest.onreadystatechange=addbranch_output;
		var Url = "Branch_SrvPg_N.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 addbranch_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="branch.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="branch.asp?output=2"
		}	
		else
		{
			document.location.href="branch.asp?output=5"				
		}	
	}
  }
  
  //---------------add / modify 
   function AddAlias()
  {	
	Para = GetPara()
	if (Para)
	{		
		objXMLHttpRequest.onreadystatechange=AddAlias_output;
		var Url = "Alias_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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("butSaveA").disabled = true;
	}
  }
  
  function AddAlias_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("AlisDet").innerHTML = objXMLHttpRequest.responseText

			if(parseInt(MsgStr[1])==1)
			{
				document.getElementById("AlisDet").innerHTML = objXMLHttpRequest.responseText
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.getElementById("AlisDet").innerHTML = objXMLHttpRequest.responseText
			}
		
			else
			{
				document.getElementById("AlisDet").innerHTML = objXMLHttpRequest.responseText				
			}	
	
	}
  }
  
  //---------------add / modify 
   function AddTranProd()
  {	
	Para = GetPara()
	if (Para)
	{
	//alert(Para)		
		objXMLHttpRequest.onreadystatechange=AddTranProd_output;
		var Url = "TranProd_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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("butSaveA").disabled = true;
	}
  }
  
  function AddTranProd_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("AlisDet").innerHTML = objXMLHttpRequest.responseText

			if(parseInt(MsgStr[1])==1)
			{
				document.getElementById("ProdDet").innerHTML = objXMLHttpRequest.responseText
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.getElementById("ProdDet").innerHTML = objXMLHttpRequest.responseText
			}
		
			else
			{
				document.getElementById("ProdDet").innerHTML = objXMLHttpRequest.responseText				
			}	
	
	}
  }
  
  //AddTranClient
  
  function AddTranClient()
  {	
	Para = GetPara()
	if (Para)
	{
	//alert(Para)		
		objXMLHttpRequest.onreadystatechange=AddTranClient_output;
		var Url = "TranClient_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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("butSaveA").disabled = true;
	}
  }
  
  function AddTranClient_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("AlisDet").innerHTML = objXMLHttpRequest.responseText

			if(parseInt(MsgStr[1])==1)
			{
				document.getElementById("ClientDet").innerHTML = objXMLHttpRequest.responseText
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.getElementById("ClientDet").innerHTML = objXMLHttpRequest.responseText
			}
		
			else
			{
				document.getElementById("ClientDet").innerHTML = objXMLHttpRequest.responseText				
			}	
	
	}
  }
  
 //-----------------modify 
  //-------- Modify 

function modibr(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "branchid";
	Input.id = "branchid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddBranch.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_brhOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=brhOnclickClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function brhOnclickClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="branch.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="branch.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="branch.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="branch.asp?output=4"
			}			
			else
			{
				document.location.href="branch.asp?output=5"				
			}

	}
  } 
  
  
  //---------------------------- Admin Category -------------------------------
  
  //----------------------add / modify  
  function AddCategory()
  {	

var abcd
abcd=0
	for(i=0;i<form1.document.getElementById("LstPgDis").options.length;i++)
	{
		form1.document.getElementById("LstPgDis").options[i].selected=true;
		abcd = abcd + "-" + form1.document.getElementById("LstPgDis").options[i].value;
		form1.page.value=abcd
	}


  	Para = GetPara()		
		if (Para) 
		{
//		alert(Para)
				objXMLHttpRequest.onreadystatechange=addcategory_output;
				var Url = "Category_SrvPg_N.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);		
				objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
				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" )	
	{
		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 if(parseInt(MsgStr[1])==8)
			{
				document.location.href="category.asp?output=8"
			}			
			else
			{
				document.location.href="category.asp?output=2"
			}		
	}
  }
  

 //-------- Modify 

function modicat(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "AdCatId";
	Input.id = "AdCatId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddCategory.asp";
	Form.method="post"
	Form.submit();
}


//------------DELETE
   function AdmCat_Delete(Id){
		Para=GetPara() + '&Id='+Id
	var VarChoic = confirm("Are you sure!.. want to proceed");
	if(VarChoic)
	{		
  		objXMLHttpRequest.onreadystatechange=AdmCat_DeleteOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
}	
  }
  
  function AdmCat_DeleteOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{//alert(objXMLHttpRequest.responseText)
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="category.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="category.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="category.asp?output=4"
			}			
			else
			{
				document.location.href="category.asp?output=5"				
			}

	}
  } 
//===============================  Admin ======================================
 //---------------add / modify 
   function addcity()
  {	
	Para = GetPara()
	if (Para)
	{
		objXMLHttpRequest.onreadystatechange=addcity_output;
		var Url = "states_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 addcity_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="states.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="states.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="states.asp?output=3"
			}			
			else
			{
				document.location.href="states.asp?output=2"							
			}	
	}
  }
  
 //-----------------modify 
  //-------- Modify 

function modistate(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "cid";
	Input.id = "cid";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addstates.asp";
	Form.method="post"
	Form.submit();
}


 //------------delete admin
   function Delete_CityOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var TabNa, FldNa
		TabNa = "LKM_City"
		FldNa = "CityId"
		Para = "TabNa=" + TabNa + "&FldNa=" + FldNa ;
		//Para=GetPara() + '&Id='+Id
		Para= Para + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=DelCClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DelCClientOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="states.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="states.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="states.asp?output=4"
			}			
			else
			{
				document.location.href="states.asp?output=5"				
			}


	}
  } 

//----------------------add / modify  
  function addcontrol()
  {	
		Para = GetPara()
		if (Para) 
		{
			//alert(Para)
			objXMLHttpRequest.onreadystatechange=addcontrol_output;
			var Url = "ctrl_SrvPg_N.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);		
			objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
			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;
		}
		else
		document.location.href="CntrlPanel.asp?output=9"
  }
  
  function addcontrol_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var		MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
			document.location.href="CntrlPanel.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="CntrlPanel.asp?output=2"
			}
			else
			{
				document.location.href="CntrlPanel.asp?output=2"
			}		
	}
  }
  

 //-------- Modify 

function modicontrol(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CtrlId";
	Input.id = "CtrlId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddCtrlPanel.asp";
	Form.method="post"
	Form.submit();
}	


//===============================  Control Panel ======================================

//------------DELETE
   function Delete_CPOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_CPOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_CPOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="CntrlPanel.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="CntrlPanel.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="CntrlPanel.asp?output=4"
			}			
			else
			{
				document.location.href="CntrlPanel.asp?output=5"				
			}

	}
  } 
  
//----------------------add / modify  
    function addpermission()
  {	
var abcd
abcd=0
	for(i=0;i<form1.document.getElementById("LstPgDis").options.length;i++)
	{
	//alert(form1.document.getElementById("LstPgDis").options[i].value)
		form1.document.getElementById("LstPgDis").options[i].selected=true;
		abcd = abcd + "-" + form1.document.getElementById("LstPgDis").options[i].value;
		form1.page.value=abcd
	}
//alert(form1.page.value)	  
		Para = GetPara()
		if (Para) {
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=addpermission_output;
		var Url = "per_SrvPg_N.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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" )	
	{
		var		MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			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 

function modipermission(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PermId";
	Input.id = "PermId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddPermission.asp";
	Form.method="post"
	Form.submit();
}	

//------------delete admin
   function Delete_PermOnclick(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_PermOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_PermOnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="Permission.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Permission.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Permission.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="Permission.asp?output=4"
			}			
			else
			{
				document.location.href="Permission.asp?output=5"				
			}

	}
  } 


//-----------------------City---------------------------------------------------
 //---------------add / modify 
 /*  function addcity()
  {	
	Para = GetPara()
	if (Para)
	{
		objXMLHttpRequest.onreadystatechange=addcity_output;
		var Url = "cities_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 addcity_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="City.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="City.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="City.asp?output=3"
			}			
			else
			{
				document.location.href="City.asp?output=2"							
			}	
	}
  }
  
 //-----------------modify 
  //-------- Modify 

function modicity(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddCity.asp";
	Form.method="post"
	Form.submit();
}

//------------DELETE
   function Delete_CityOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_CityOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_CityOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="City.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="City.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="City.asp?output=4"
			}			
			else
			{
				document.location.href="City.asp?output=5"				
			}

	}
  }*/ 
  
  //------------------------------ Region -------------------------------------
  
 //---------------add / modify 
  function addRegion()
  {	
  //if(document.getElementById("RegId").value != "")
  //{
	 	var abcd
		abcd=0
		for(i=0;i<document.getElementById("LstPgDis").options.length;i++)
		{
			//alert(form1.document.getElementById("LstPgDis").options[i].value)
			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=addRegion_output;
		var Url = "Region_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 addRegion_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="States.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="States.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="States.asp?output=3"
			}			
			else
			{
				document.location.href="States.asp?output=2"							
			}	
	}
  }
  
 //-----------------modify 
  //-------- Modify 

function modiregion(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "RegId";
	Input.id = "RegId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddRegion.asp";
	Form.method="post"
	Form.submit();
}

//------------DELETE
   function Delete_RegOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		//Para=GetPara() + '&Id='+Id
		//alert(Para)
		var TabNa, FldNa
		TabNa = "LKM_Region"
		FldNa = "RegId"
		Para = "TabNa=" + TabNa + "&FldNa=" + FldNa ;
		//Para=GetPara() + '&Id='+Id
		Para= Para + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_RegOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_RegOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("aaa").innerHTML =  objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="States.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="States.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="States.asp?output=4"
			}			
			else
			{
				document.location.href="States.asp?output=5"				
			}

	}
  } 
  
  
  //------------------------------ Brand -------------------------------------
  
 //---------------add / modify 
   function AddBrand()
  {	
	Para = GetPara()
	if (Para)
	{
		objXMLHttpRequest.onreadystatechange=AddBrand_output;
		var Url = "Brand_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddBrand_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="Brand.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Brand.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Brand.asp?output=3"
			}			
			else
			{
				document.location.href="Brand.asp?output=2"							
			}	
	}
  }
  
   //-------- Modify 

function modiBrand(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "BrandId";
	Input.id = "BrandId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddBrand.asp";
	Form.method="post"
	Form.submit();
}

//------------DELETE
   function Delete_BndgOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_BndgOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_BndgOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="Brand.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="Brand.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="Brand.asp?output=4"
			}			
			else
			{
				document.location.href="Brand.asp?output=5"				
			}

	}
  } 


 //------------------------------ Discount -------------------------------------
  
 //---------------add / modify 
   function AddDiscount()
  {	
	Para = GetPara()
	if (Para)
	{

if(form1.DiscType[0].checked==true)
Para=Para + "&dt=P"
else
Para=Para + "&dt=N"
	
		objXMLHttpRequest.onreadystatechange=AddDiscount_output;
		var Url = "Discount_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddDiscount_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="Discount.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Discount.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Discount.asp?output=3"
			}			
			else
			{
				document.location.href="Discount.asp?output=2"							
			}	
	}
  }
  
   //-------- Modify 

function modiDisc(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DiscId";
	Input.id = "DiscId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddDiscount.asp";
	Form.method="post"
	Form.submit();
}

//------------DELETE
   function Delete_DiscOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_DiscOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_DiscOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="Discount.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="Discount.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="Discount.asp?output=4"
			}			
			else
			{
				document.location.href="Discount.asp?output=5"				
			}

	}
  } 
  
  function Sel_ondblclick(LstSrc,LstDist) {
 // alert(document.getElementById("LstPgDis").value)
	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_ondblclickSS(LstSrc,LstDist) {
//alert(document.getElementById("LstPgDis").value)
	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_ondblclickPdts(LstSrc,LstDist) {
//alert(document.getElementById("LstPgSrc").value)
var pgeVal = document.getElementById("LstPgSrc").value
//alert(pgeVal)
	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);
		//alert()
		AddTd(Opt.text,pgeVal)	
	}
	
}



//--------------------------------Add/Modify Sub Category--------------------------------
function AddSubCat(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddSubCat.asp";
	Form.method="post"
	Form.submit();
}
//ModiSubCat
function ModiSubCat(Id,Sub)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SubCatId";
	Input.id = "SubCatId";
	Input.value = Id;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = Sub;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddSubCat.asp";
	Form.method="post"
	Form.submit();
}
 function AddSubCategory()
  {	
	Para = GetPara()
	if (Para)
	{
	//alert(Para)
		objXMLHttpRequest.onreadystatechange=AddSubCat_output;
		var Url = "SubCat_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddSubCat_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="PCategory.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="PCategory.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="PCategory.asp?output=3"
			}			
			else
			{
				document.location.href="PCategory.asp?output=2"							
			}
	}
  }
  
  function pCat_DeleteSub(Id){
 	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var PTabNa = "LKM_ProdCategory"
		var PFldNa = "CatId"
		var PSubTable = "LKM_SubCategory"
		Para = "TabNa=" + PTabNa + "&FldNa=" + PFldNa + '&Id='+ Id + "&SubTable=" + PSubTable
//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=PCat_DeleteSubOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function PCat_DeleteSubOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{//alert(objXMLHttpRequest.responseText)
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="pcategory.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="pcategory.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="pcategory.asp?output=4"
			}			
			else
			{
				document.location.href="pcategory.asp?output=5"				
			}

	}
  } 
  
  function EditCat()
  {
  	document.getElementById("edOrg").innerHTML = document.getElementById("edDum").innerHTML
  }
  
  //ChkSubCat
  
  function ChkSubCat()
	{
	//alert(document.getElementById("CatId").value)
		try{	
		var CatId=escape(document.getElementById("CatId").value);
		//alert(cou)
  		objXMLHttpRequest.onreadystatechange=ChkSubCat_Output;
		var Url = "getSubCat.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('CatId=' + CatId); //Data - to be sent to the server......
		}catch(e)
		{
			//alert(e)
		}	
	}
	
		function ChkSubCat_Output()
		{
		//4 - request is completed.......
		if(objXMLHttpRequest.readyState == "4" )	
		{
		//alert(objXMLHttpRequest.responseText )
		//alert(document.getElementById("state").innerHTML)
		document.getElementById("SubCatDet").innerHTML =objXMLHttpRequest.responseText 
		objXMLHttpRequest.abort();
		}
		}
		

function Prod()
{
var a
var a1
var a2
var b
var c
var d
var e
var f
var g
var c1
var c2
var b3
var b1
var b2
var d
var b3
var b4
var d1
var g
var k,v
var z
g=0
a=0
a1=0
b=0
c=0
d=0
e=0
f=0
a1=0
a2=0
k=0
v=0
z=0
//g=0

	if(document.getElementById("CatId").value=="")
	{
		//var CatIdVal
		//CatIdVal = document.getElementById("CatId").value
		cmt="<font color='#FF0000'>Should not be blank</font>"
		a=1
		document.getElementById("SCatId").innerHTML=cmt
	}
	else
	{
		cmt=""
		a=0
		document.getElementById('SCatId').innerHTML=cmt
	}	

//alert(document.getElementById("SubCatId").value)

	if(document.getElementById("SubCatId").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		a1=1
		document.getElementById("SSubCatId").innerHTML=cmt
		//alert("inside")
	}
	else
	{
		cmt=""
		a1=0
		document.getElementById('SSubCatId').innerHTML=cmt
	}

	if(document.getElementById("BrandId").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		a2=1
		document.getElementById("SBrandId").innerHTML=cmt
	}
	else
	{
		cmt=""
		a2=0
		document.getElementById('SBrandId').innerHTML=cmt
	}
	updateRTEs1()
//alert("first")
	//if(updateRTEs1()==0)
	//{
	if(document.getElementById("PdtFeatures").value=="")
	{
//	alert("if")
		cmt="<font color='#FF0000'>Should not be blank</font>"
		b=1	
		document.getElementById("SPdtFeatures").innerHTML = "<font color='#FF0000'> Should Not Be Blank</font>"
	}
	else
	{
//	alert("else")
		cmt=""
		b=0
		document.getElementById('SPdtFeatures').innerHTML=cmt
	}	
	
//alert("sec")
	if(document.getElementById("PdtModel").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		c=1
		document.getElementById("SPdtModel").innerHTML=cmt
	}
	else
	{
		cmt=""
		c=0
		document.getElementById('SPdtModel').innerHTML=cmt
	}
	

	if(document.getElementById("PdtName").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		d=1
		document.getElementById("SPdtName").innerHTML=cmt
	}
	else
	{
		cmt=""
		d=0
		document.getElementById('SPdtName').innerHTML=cmt
	}
	
	if(document.getElementById("PdtStatus").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		k=1
		document.getElementById("SPdtStatus").innerHTML=cmt
	}
	else
	{
		cmt=""
		k=0
		document.getElementById('SPdtStatus').innerHTML=cmt
	}
	
	/*if((prds.PdtExpStat[0].checked==false) && (prds.PdtExpStat[1].checked==false))
	{
		cmt="<font color='#FF0000'>Please choose the option</font>"
		v=1
		document.getElementById("SPdtExpStat").innerHTML=cmt
	}
	else
	{
		cmt=""
		v=0
		document.getElementById('SPdtExpStat').innerHTML=cmt
	}				
*/
	if(document.getElementById("Price").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		e=1
		document.getElementById("SPrice").innerHTML=cmt
	}
	else
	{
		cmt=""
		e=0
		document.getElementById('SPrice').innerHTML=cmt
	}
	
	
	if(document.getElementById("file1").value!="")
	{
		c1=document.getElementById("file1").value
		b1=c1.lastIndexOf(".");
		b2=b1+5;
		ext=c1.substring(b1,b2);
		//alert(ext)
		if((ext==".jpg")|| (ext==".JPG")||(ext==".jpeg")||(ext==".JPEG"))
	//	if((ext==".jpg")|| (ext==".JPG")||(ext==".jpeg")||(ext==".JPEG")||(ext==".gif")||(ext==".GIF"))
		{
			cmt=""
			f=0
			document.getElementById('Sfile1').innerHTML=cmt
		}
		else
		{
			cmt="<font color='#FF0000'>Only jpg files allowed</font>"
			f=1
			document.getElementById("Sfile1").innerHTML=cmt
		}
	}
	
	if(document.getElementById("file2").value!="")
	{
		c2=document.getElementById("file2").value
		b2=c2.lastIndexOf(".");
		b3=b2+5;
		ext1=c2.substring(b2,b3);
		//alert(ext)
		if((ext1==".jpg")|| (ext1==".JPG")||(ext1==".jpeg")||(ext1==".JPEG")||(ext1==".gif")||(ext1==".GIF"))
		{
			cmt=""
			g=0
			document.getElementById('Sfile2').innerHTML=cmt
		}
		else
		{
			cmt="<font color='#FF0000'>Only jpg or gif files allowed</font>"
			g=1
			document.getElementById("Sfile2").innerHTML=cmt
		}
	}
		

if((prds.pdtshow[0].checked==false) && (prds.pdtshow[1].checked==false))
	{
		cmt="<font color='#FF0000'>Please choose the option</font>"
		z=1
		document.getElementById("Spdtshow").innerHTML=cmt
	}
	else
	{
		cmt=""
		z=0
		document.getElementById('Spdtshow').innerHTML=cmt
	}	
	
/*alert(a)
alert(b)
alert(c)
alert(d)
alert(e)
alert(f)
alert(g)					*/
//var CatIdVal
//CatIdVal = document.getElementById("CatId").value

	if((a==1) || (a2==1) || (a1==1) || (b==1)|| (c==1)|| (d==1)|| (e==1) || (f==1)|| (g==1)|| (k==1)|| (z==1))
	{
		//alert(document.getElementById("hidPdtFeat").value)
		return false;
	}
	else
	{
		//alert(document.getElementById("hidPdtFeat").value)
		return true;
	}
}
 
function NwsUpdt()
{
var a
var b
var c
var d


a=0
b=0
c=0
d=0
	if(document.getElementById("NwTit").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		a=1
		document.getElementById("SNwTit").innerHTML=cmt
	}
	else
	{
		cmt=""
		a=0
		document.getElementById('SNwTit').innerHTML=cmt
	}	

	if(document.getElementById("NwDt").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		b=1
		document.getElementById("SNwDt").innerHTML=cmt
	}
	else
	{
		cmt=""
		b=0
		document.getElementById('SNwDt').innerHTML=cmt
	}
	
	if(document.getElementById("NwShtDes").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		d=1
		document.getElementById("SNwShtDes").innerHTML=cmt
	}
	else
	{
		cmt=""
		d=0
		document.getElementById('SNwShtDes').innerHTML=cmt
	}	

	if(updateRTEs4()==0)
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		c=1
		
		document.getElementById("SNwDet").innerHTML = "<font color='#FF0000'> Should Not Be Blank</font>"
	}
	else
	{
		cmt=""
		c=0
		document.getElementById('SNwDet').innerHTML=cmt
	}		

	if((a==1) || (b==1)|| (c==1)|| (d==1))//|| (e==1) || (f==1)|| (g==1)|| (k==1))
	{
		return false;
	}
	else
	{
		return true;
	}

}

function CarrUpdt()
{
var a
var b
var c
var d


a=0
b=0
c=0
d=0
	if(document.getElementById("CarrTit").value=="")
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		a=1
		document.getElementById("SCarrTit").innerHTML=cmt
	}
	else
	{
		cmt=""
		a=0
		document.getElementById('SCarrTit').innerHTML=cmt
	}	
		b=0
		d=0	

	if(updateRTEs4()==0)
	{
		cmt="<font color='#FF0000'>Should not be blank</font>"
		c=1
		
		document.getElementById("SCarrDet").innerHTML = "<font color='#FF0000'> Should Not Be Blank</font>"
	}
	else
	{
		cmt=""
		c=0
		document.getElementById('SCarrDet').innerHTML=cmt
	}		

	if((a==1) || (b==1)|| (c==1)|| (d==1))//|| (e==1) || (f==1)|| (g==1)|| (k==1))
	{
		return false;
	}
	else
	{
		return true;
	}

}



function Prod_Catalog()
{
var g
g=0

	if(document.getElementById("file").value!="")
	{
		c2=document.getElementById("file").value
		b2=c2.lastIndexOf(".");
		b3=b2+5;
		ext1=c2.substring(b2,b3);
		//alert(ext)
		if((ext1==".pdf")|| (ext1==".PDF"))
		{
			cmt=""
			g=0
			document.getElementById('Sfile').innerHTML=cmt
		}
		else
		{
			cmt="<font color='#FF0000'>Only pdf files allowed</font>"
			g=1
			document.getElementById("Sfile").innerHTML=cmt
		}
	}
	else
	{
			cmt="<font color='#FF0000'>Please attach the PDF document of the catalog</font>"
			g=1
			document.getElementById("Sfile").innerHTML=cmt
	
	}
if(g==1)
	return false;
else
	return true;
}

function Prod_DeskImg()
{
var g
g=0

	if(document.getElementById("file").value!="")
	{
		c2=document.getElementById("file").value
		b2=c2.lastIndexOf(".");
		b3=b2+5;
		ext1=c2.substring(b2,b3);
		//alert(ext)
		if((ext1==".png")|| (ext1==".PNG") || (ext1==".jpg") || (ext1==".JPG") || (ext1==".gif") || (ext1==".GIF"))
		{
			cmt=""
			g=0
			document.getElementById('Sfile').innerHTML=cmt
		}
		else
		{
			cmt="<font color='#FF0000'>Choose an Image with Width : 136; Height : 129 ;</font>"
			g=1
			document.getElementById("Sfile").innerHTML=cmt
		}
	}
	else
	{
			cmt="<font color='#FF0000'>Please attach the DeskTop Image for the Product</font>"
			g=1
			document.getElementById("Sfile").innerHTML=cmt
	
	}
if(g==1)
	return false;
else
	return true;
}
 
//----------------------------------Sales Figures-------------------------------------
//---------------add / modify 
   function AddSales()
  {	
	Para = GetPara()
	if (Para)
	{
	//alert(Para)
		objXMLHttpRequest.onreadystatechange=AddSales_output;
		var Url = "Sales_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddSales_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="Sales.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Sales.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Sales.asp?output=3"
			}			
			else
			{
				document.location.href="Sales.asp?output=2"							
			}	
	}
  }
  
//  modisales
function modisales(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SaleId";
	Input.id = "SaleId";
	Input.value = Id;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "AddSales.asp";
	Form.method="post"
	Form.submit();
}
//sale_Delete

  function sale_Delete(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var SubTable = "LKM_SalesSub"
		var TabNa = "LKM_Sales"
		var FldNa = "SaleId"
		//Para=GetPara() + '&Id='+Id
		Para='SubTable='  + SubTable + '&TabNa=' + TabNa + '&FldNa=' + FldNa + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=sale_Delete_Output;
		var Url = "DelDataOffr.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function sale_Delete_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="dealers.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="dealers.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="dealers.asp?output=4"
			}			
			else
			{
				document.location.href="dealers.asp?output=5"				
			}

	}
  } 

//AddSaleSub
//---------------------------add sales Sub --------------------------------
function AddSaleSub111(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SaleId";
	Input.id = "SaleId";
	Input.value = Id;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "AddSalesSub.asp";
	Form.method="post"
	Form.submit();
}

//AddSaleSubDet
  /* function AddSaleSubDet()
  {	
	Para = GetPara()
	if (Para)
	{
	alert(Para)
		objXMLHttpRequest.onreadystatechange=AddSaleSubDet_output;
		var Url = "SalesSubDet_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddSaleSubDet_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		/*	if(parseInt(MsgStr[1])==1)
			{
				document.location.href="Sales.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Sales.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Sales.asp?output=3"
			}			
			else
			{
				document.location.href="Sales.asp?output=2"							
			}	
	}
  }*/
  
  //--------------------------------div Content Display ----------------------------
  
  //----------------------add / modify  
  function AddSaleSubNew(delid)
  {	  
		Para = 'SaleId=' + delid
		if (Para) {
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=AddSaleSubNew_output;
		var Url = "AddSalesSub.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddSaleSubNew_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("salsDet").innerHTML = objXMLHttpRequest.responseText
		var salid
		salid = document.getElementById("SaleId").value
		//alert(salid)
		ViewSalChart(salid)	
	}
  }
  
  
  function AddSaleSubNew1(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SaleId";
	Input.id = "SaleId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddSalesSub_new.asp";
	Form.method="post"
	Form.submit();
}


  function AddSaleSubNew2(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddSalesSub_new.asp";
	Form.method="post"
	Form.submit();
}

  
/*  function AddSaleSubNew1(delid)
  {	  
		Para = 'SaleId=' + delid
		if (Para) {
		alert(Para)
  		objXMLHttpRequest.onreadystatechange=AddSaleSubNew1_output;
		var Url = "AddSalesSub_new.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddSaleSubNew1_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");		

			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="saless.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="saless.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="saless.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="saless.asp?output=4"
			}			
			else
			{
				document.location.href="saless.asp?output=5"				
			}	
	}
  }*/

 //-------- Modify 

function modiOffer(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "OffrId";
	Input.id = "OffrId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddOffer.asp";
	Form.method="post"
	Form.submit();
}	

//------------delete admin
   function Delete_OffrOnclick(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_OffrOnclickOutput;
		var Url = "DelDataOffr.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_OffrOnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="Offer.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Offer.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Offer.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="Offer.asp?output=4"
			}			
			else
			{
				document.location.href="Offer.asp?output=5"				
			}

	}
  } 
 

function ViewOffes(ofrid)
{
	Form = document.createElement("form");
	Form.name = "frmOffer";
	Form.id = "frmOffer";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "OffrId";
	Input.id = "OffrId";
	Input.value = ofrid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ViewOffer.asp";
	Form.method="post"
	Form.submit();
}

function UpdtOffr()
{
		Para = GetPara()
		if (Para) 
		{
		//	alert(Para)
			objXMLHttpRequest.onreadystatechange=addOffr_output;
			var Url = "Offr_SrvPg_N.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);		
			objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
			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 addOffr_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
	//	document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
			document.location.href="Offer.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Offer.asp?output=2"
			}
			else
			{
				document.location.href="Offer.asp?output=2"
			}
	}
  }
  
  //----------------------------News-----------------------------------------------------------------
  
  //---------------add / modify 
   function AddNews()
  {	
	Para = GetPara()
	if (Para)
	{
		//alert(Para)
		objXMLHttpRequest.onreadystatechange=AddNews_output;
		var Url = "News_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddNews_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="News.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="News.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="News.asp?output=3"
			}			
			else
			{
				document.location.href="News.asp?output=2"							
			}	
	}
  }
  
   //-------- Modify 

function modiNews(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NwId";
	Input.id = "NwId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddNews.asp";
	Form.method="post"
	Form.submit();
}

//------------DELETE
   function Delete_NewsOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_NewsOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_NewsOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		//alert(objXMLHttpRequest.responseText)
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="News.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="News.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="News.asp?output=4"
			}			
			else
			{
				document.location.href="News.asp?output=5"				
			}

	}
  } 

function ViewNews(nid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NwId";
	Input.id = "NwId";
	Input.value = nid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ViewNews.asp";
	Form.method="post"
	Form.submit();
}

function ViewCarrier(nid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CarrId";
	Input.id = "CarrId";
	Input.value = nid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ViewCareer.asp";
	Form.method="post"
	Form.submit();
}

function modiCareer(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CarrId";
	Input.id = "CarrId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddCareer.asp";
	Form.method="post"
	Form.submit();
}

//------------DELETE
   function Delete_CareerOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_CareerOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_CareerOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		//alert(objXMLHttpRequest.responseText)
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="Career.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Career.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="Career.asp?output=4"
			}			
			else
			{
				document.location.href="Career.asp?output=5"				
			}

	}
  } 

//------------------------------- Events ------------------------------------------------

//---------------add / modify 
   function AddEvents()
  {	
	Para = GetPara()
	if (Para)
	{
		objXMLHttpRequest.onreadystatechange=AddEvents_output;
		var Url = "Events_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddEvents_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
var	MsgStr = objXMLHttpRequest.responseText.split("*");
//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
				document.location.href="Events.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="Events.asp?output=2"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Events.asp?output=3"
			}			
			else
			{
				document.location.href="Events.asp?output=2"							
			}	
	}
  }
  
   //-------- Modify 

function modiEvtns(evid)
{
	Form = document.createElement("form");
	Form.name = "frmEvnts";
	Form.id = "frmEvnts";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "EventId";
	Input.id = "EventId";
	Input.value = evid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddEvents.asp";
	Form.method="post"
	Form.submit();
}

//------------DELETE
   function Delete_NewsgOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
  		objXMLHttpRequest.onreadystatechange=Delete_NewsgOnclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_NewsgOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="News.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="News.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="News.asp?output=4"
			}			
			else
			{
				document.location.href="News.asp?output=5"				
			}

	}
  } 

function ViewNews(nid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NwId";
	Input.id = "NwId";
	Input.value = nid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ViewNews.asp";
	Form.method="post"
	Form.submit();
}

//-------------------------Enquiry -------------------------------------
function Enqry(dlr,ofr,tot,cur)
{
	var dealer = dlr
	var Offer = ofr
	var i;
	Para = 'DealrId=' + dealer + '&OffrId=' + ofr
	for(i=1;i<=tot;i++)
	{
		document.getElementById("btnSave"+i).disabled = false;
	}
	if (Para)
	{
		//alert(Para)
		objXMLHttpRequest.onreadystatechange=Enqry_output;
		var Url = "EnqryRep_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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("btnSave"+cur).disabled = true;
	}
  }
  
  function Enqry_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("a").innerHTML = "<font color='#FF0000' size='+1'>" + objXMLHttpRequest.responseText + "</font>"				
	}
  }
  
function AddSubSales(nid)
{
	Form = document.createElement("form");
	Form.name = "frmSale";
	Form.id = "frmSale";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = nid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddSalesSub.asp";
	Form.method="post"
	Form.submit();
}

function ViewSalChart111(salid)
{
	Form = document.createElement("form");
	Form.name = "frmSale";
	Form.id = "frmSale";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SaleId";
	Input.id = "SaleId";
	Input.value = salid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "Chart.asp";
	Form.method="post"
	Form.submit();
}
 function ViewSalChart(delid)
  {	  
		Para = 'SaleId=' + delid
		if (Para) {
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=ViewSalChart_output;
		var Url = "Chart.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 ViewSalChart_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var		MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("chartDet").innerHTML = objXMLHttpRequest.responseText
			
	}
  }

function AddSaleSubDet()
{
	if(Validation_SpnMsg())
	{
		frmSale.method = "post"
		frmSale.action = "SalesSubDet_Srv.asp"
		frmSale.submit();
	}
	else
		return false
}


function modiproduct(pdtid,pg,brand,cat,scat)
{
	Form = document.createElement("form");
	Form.name = "frmPdt";
	Form.id = "frmPdt";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PdtId";
	Input.id = "PdtId";
	Input.value = pdtid;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ppage";
	Input.id = "ppage";
	Input.value = pg;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pbrandid";
	Input.id = "pbrandid";
	Input.value = brand;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pCatId";
	Input.id = "pCatId";
	Input.value = cat;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pSCatId";
	Input.id = "pSCatId";
	Input.value = scat;
	Form.appendChild(Input);				

	document.body.appendChild(Form);
	Form.action = "AddProduct.asp";
	Form.method="post"
	Form.submit();
}
//----------------------------delete product----------------------------------------------------------------
/* function prdtDelclick(Id,pg,brand,cat,scat){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var TabNa
		var FldNa

		TabNa = "LKM_Product";
		FldNa = "PdtId"		
		Para='TabNa=' + TabNa + '&FldNa=' + FldNa + '&Id='+Id +'&mypage=' + pg + '&brandid=' + brand + '&catid='+cat + '&scatid='+scat
alert(Para)
  		objXMLHttpRequest.onreadystatechange = prdtDelclick_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function prdtDelclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
/*			if(parseInt(MsgStr[0])==1)
			{
				document.location.href="Product.asp?output=1"
			}
			else if(parseInt(MsgStr[0])==2)
			{
				document.location.href="Product.asp?output=5"
			}
			else if(parseInt(MsgStr[0])==0)
			{
				document.location.href="Product.asp?output=4"
			}			
			else
			{
				document.location.href="Product.asp?output=5"				
			}

	}
  } */
  
 function prdtDelclick(Id,pg,brand,cat,scat)
{
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "Id";
	Input.id = "Id";
	Input.value = Id;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pg;
	Form.appendChild(Input);
	
	alert(brand)

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "brandid";
	Input.id = "brandid";
	Input.value = brand;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = cat;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SCatId";
	Input.id = "SCatId";
	Input.value = scat;
	Form.appendChild(Input);
			

	document.appendChild(Form);
	Form.action = "delprod.asp";
	Form.method="post"
	Form.submit();
	}
}	
function DskDelclick(Id)
{
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Form = document.createElement("form");
		Form.name = "frmSrch";
		Form.id = "frmSrch";
		
		Input = document.createElement("input");
		Input.type = "hidden";
		Input.name = "Id";
		Input.id = "Id";
		Input.value = Id;
		Form.appendChild(Input);						
	
		document.body.appendChild(Form);
		//alert(Id)
		Form.action = "delDesk.asp";
		Form.method="post"
		Form.submit();
		
	}
}
  
  //--------------------------add new sales details-----------------------------
  
   function AddSubSalesNNNN(delid)
  {	  
		Para = 'DealrId=' + delid
		if (Para) {
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=AddSubSalesNNNN_output;
		var Url = "AddSalesSub.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddSubSalesNNNN_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("salsDet").innerHTML = objXMLHttpRequest.responseText
//COMMENTED BY MANJU - ON 20-10-2007
	//	var salid
		//salid = document.getElementById("SaleId").value
//COMMENTED BY MANJU - ON 20-10-2007
		
		//ViewSalChart(salid)	
	}
  }
  
  //------------------------search queries-----------------------------------------
  
  function Search_Qry(PgId,DealrId,catid,scatid,BrandId)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = PgId;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = DealrId;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PdtId";
	Input.id = "PdtId";
	Input.value = catid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "Qry";
	Input.id = "Qry";
	Input.value = scatid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "BrandId";
	Input.id = "BrandId";
	Input.value = BrandId;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "report4.asp";
	Form.method="post"
	Form.submit();
}



  function Search_Suggestions(PgId,DealrId,keywords,fdate,tdate)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = PgId;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = DealrId;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "keywords";
	Input.id = "keywords";
	Input.value = keywords;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "fdate";
	Input.id = "fdate";
	Input.value = fdate;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "tdate";
	Input.id = "tdate";
	Input.value = tdate;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "report5.asp";
	Form.method="post"
	Form.submit();
}

function ClearAll(gtval)
{
//alert(gtval)
	document.getElementById("DealrId").value = ""
	document.getElementById("PdtId").value = ""
	document.getElementById("fdate").value = ""
	document.getElementById("tdate").value = ""	
	document.getElementById("BrandId").value = ""
	document.getElementById("CatId").value = ""
	if(gtval == "qry")
	{
		document.getElementById("Qry").value = "";
	}
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = "";
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PdtId";
	Input.id = "PdtId";
	Input.value = "";
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "BrandId";
	Input.id = "BrandId";
	Input.value = "";
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "report4.asp";
	Form.method="post"
	Form.submit();
}

function ClearAllSuggest()
{
//alert(gtval)
	document.getElementById("DealrId").value = ""
	document.getElementById("keywords").value = ""
	document.getElementById("fdate").value = ""
	document.getElementById("tdate").value = ""	
	
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = "";
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "keywords";
	Input.id = "keywords";
	Input.value = "";
	Form.appendChild(Input);	
		
	document.body.appendChild(Form);
	Form.action = "report5.asp";
	Form.method="post"
	Form.submit();
}
function ClearWar()
{
	document.getElementById("DealrId").value = ""
	document.getElementById("PdtId").value = ""
	document.getElementById("fdate").value = ""
	document.getElementById("tdate").value = ""	
	document.getElementById("BrandId").value = ""
	document.getElementById("CatId").value = ""
	document.getElementById("War").value = "";
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = "";
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PdtId";
	Input.id = "PdtId";
	Input.value = "";
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "BrandId";
	Input.id = "BrandId";
	Input.value = "";
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "report3.asp";
	Form.method="post"
	Form.submit();
	
}
//---------------------------------------search warranty------------------------------------
function Search_War(PgId,DealrId,catid,BrandId)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = PgId;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = DealrId;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PdtId";
	Input.id = "PdtId";
	Input.value = catid;
	Form.appendChild(Input);
	
	/*Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "Qry";
	Input.id = "Qry";
	Input.value = scatid;
	Form.appendChild(Input);*/
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "BrandId";
	Input.id = "BrandId";
	Input.value = BrandId;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "report3.asp";
	Form.method="post"
	Form.submit();
}

function ViewWar(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "WarId";
	Input.id = "WarId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "Warranty_Det.asp";
	Form.method="post"
	Form.submit();
}
 
//-----------------------------------view offer requests --------------------------
function ViewOffrSrch(Id,enq)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "OffrId";
	Input.id = "OffrId";
	Input.value = Id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "enqryid";
	Input.id = "enqryid";
	Input.value = enq;
	Form.appendChild(Input);
		

	document.body.appendChild(Form);
	Form.action = "Offer_Det.asp";
	Form.method="post"
	Form.submit();
}

//--------------------------search offers ---------------------------------------------

function Search_Offr(PgId,DealrId,OffrType,OffrId)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = PgId;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = DealrId;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "OffrType";
	Input.id = "OffrType";
	Input.value = OffrType;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "OffrId";
	Input.id = "OffrId";
	Input.value = OffrId;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "report2.asp";
	Form.method="post"
	Form.submit();
}


function Search_BrandDealer(PgId,DealrId,brandid,fdate,tdate)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = PgId;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = DealrId;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "brandid";
	Input.id = "brandid";
	Input.value = brandid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "fdate";
	Input.id = "fdate";
	Input.value = fdate;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "tdate";
	Input.id = "tdate";
	Input.value = tdate;
	Form.appendChild(Input);	
	
	document.body.appendChild(Form);
	Form.action = "report6.asp";
	Form.method="post"
	Form.submit();
}


function DSearch(PgId,ty,searchtext,page)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = PgId;
	Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ty";
	Input.id = "ty";
	Input.value = ty;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "searchtext";
	Input.id = "searchtext";
	Input.value = searchtext;
	Form.appendChild(Input);

	
	document.body.appendChild(Form);
	Form.action = page
	Form.method="post"
	Form.submit();
}



function ClearAllOffr()
{
	document.getElementById("DealrId").value = ""
	document.getElementById("OffrType").value = ""
	document.getElementById("fdate").value = ""
	document.getElementById("tdate").value = ""	
	document.getElementById("OffrId").value = ""
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	//Input = document.createElement("input");
	//Input.type = "hidden";
	//Input.name = "mypage";
	//Input.id = "mypage";
	//Input.value = PgId;
	//Form.appendChild(Input);	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = "";
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "OffrType";
	Input.id = "OffrType";
	Input.value = "";
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "OffrId";
	Input.id = "OffrId";
	Input.value = "";
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "report2.asp";
	Form.method="post"
	Form.submit();
}

//------------delete Files

function Delete_FilOnclick(Id)
{   
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=DeleteFilOnclick_Output;
		var Url = "DelDataFiles.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function DeleteFilOnclick_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="UploadedFiles.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="UploadedFiles.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="UploadedFiles.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="UploadedFiles.asp?output=4"
			}			
			else
			{
				document.location.href="UploadedFiles.asp?output=5"				
			}

	}
  } 
  
function DeClick(nid,nstat)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrId";
	Input.id = "NLtrId";
	Input.value = nid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrStat";
	Input.id = "NLtrStat";
	Input.value = nstat;
	Form.appendChild(Input);	
	
	document.body.appendChild(Form);
	Form.action = "NewsLtr_SrvAdm.asp";
	Form.method="post"
	Form.submit();
}

function NLtr_Delete(Id)
{
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=NLtr_Delete_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}
}

function NLtr_Delete_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="NwLetter.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="NwLetter.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="NwLetter.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="NwLetter.asp?output=4"
			}			
			else
			{
				document.location.href="NwLetter.asp?output=5"				
			}

	}
  } 


/*//--------------------------News Lettere Composing----------------------
function AddNewsLtr(Id)
{
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=AddNewsLtr_OutPut;
		var Url = "NewsLteMsg_Srv.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}
}

function AddNewsLtr_OutPut()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="NewNewsLetter.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="NewNewsLetter.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="NewNewsLetter.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="NewNewsLetter.asp?output=4"
			}			
			else
			{
				document.location.href="NewNewsLetter.asp?output=5"				
			}

	}
  } */
  
function SndNewsLetter_2Apr2008(sndid)
{

	Para = ","
	var the_inputs=document.getElementsByTagName("input");			
	k=0;
	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			//if(the_inputs[n].value == "")
			if(the_inputs[n].checked == true)
			{
				//alert(the_inputs[n].id)				
				Para = Para + the_inputs[n].id +","//+the_inputs[n].value									
			}
		}			
	}
	alert(Para)

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrMsgId";
	Input.id = "NLtrMsgId";
	Input.value = sndid;
	Form.appendChild(Input);
	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ParaVal";
	Input.id = "ParaVal";
	Input.value = Para;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";
	var cityval
	cityval = document.getElementById("CityId").value;
	Input.value = cityval;
	Form.appendChild(Input);	
		
	document.body.appendChild(Form);
	Form.action = "SndNewsLetter_Srv.asp";
	Form.method="post"
	Form.submit();
}

function SndNewsLetter(sndid)
{
//alert(sndid)
	ParaV = ","
	var the_inputs=document.getElementsByTagName("input");			
	k=0;
	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			//if(the_inputs[n].value == "")
			if(the_inputs[n].checked == true)
			{
				//alert(the_inputs[n].id)
				if(the_inputs[n].title == "mailSnd")
				{				
					ParaV = ParaV + the_inputs[n].id +","//+the_inputs[n].value									
				}
			}
		}			
	}
	//alert(ParaV)
	
	var cityval
	cityval = document.getElementById("CityId").value;
	var frmVal
	frmVal = document.getElementById("FrmBx").value;
	//var radCnt
	//radCnt = document.getElementById("radCnt").value;
	//Para = "NLtrMsgId=" + sndid + "&ParaVal=" + ParaV + "&CityId=" + cityval + "&FromVal=" + frmVal ;//+"&radCnt=" + radCnt;
	//alert(Para)
	
		/*objXMLHttpRequest.onreadystatechange=SndNewsLetter_output;
		var Url = "SndNewsLetter_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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;
	//}*/
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrMsgId";
	Input.id = "NLtrMsgId";
	Input.value = sndid;
	Form.appendChild(Input);
	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ParaVal";
	Input.id = "ParaVal";
	Input.value = ParaV;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";	
	Input.value = cityval;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "FromVal";
	Input.id = "FromVal";	
	Input.value = frmVal;
	Form.appendChild(Input);	
		
	document.body.appendChild(Form);
	Form.action = "SndNewsLetter_Srv.asp";
	Form.method="post"
	Form.submit();
}

function SndNewsLetter_forTst(sndid)
{
//alert(sndid)
	ParaV = ","
	var the_inputs=document.getElementsByTagName("input");			
	k=0;
	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			//if(the_inputs[n].value == "")
			if(the_inputs[n].checked == true)
			{
				//alert(the_inputs[n].id)
				if(the_inputs[n].title == "mailSnd")
				{				
					ParaV = ParaV + the_inputs[n].id +","//+the_inputs[n].value									
				}
			}
		}			
	}
	//alert(ParaV)
	
	var cityval
	cityval = document.getElementById("CityId").value;
	var frmVal
	frmVal = document.getElementById("FrmBx").value;
	//var radCnt
	//radCnt = document.getElementById("radCnt").value;
	//Para = "NLtrMsgId=" + sndid + "&ParaVal=" + ParaV + "&CityId=" + cityval + "&FromVal=" + frmVal ;//+"&radCnt=" + radCnt;
	//alert(Para)
	
		/*objXMLHttpRequest.onreadystatechange=SndNewsLetter_output;
		var Url = "SndNewsLetter_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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;
	//}*/
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrMsgId";
	Input.id = "NLtrMsgId";
	Input.value = sndid;
	Form.appendChild(Input);
	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ParaVal";
	Input.id = "ParaVal";
	Input.value = ParaV;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";	
	Input.value = cityval;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "FromVal";
	Input.id = "FromVal";	
	Input.value = frmVal;
	Form.appendChild(Input);	
		
	document.body.appendChild(Form);
	Form.action = "SndNewsLetter_forTst_Srv.asp";
	Form.method="post"
	Form.submit();
}
  
function SndNewsLetter_tst(sndid)
{
//alert(sndid)
	ParaV = ","
	var the_inputs=document.getElementsByTagName("input");			
	k=0;
	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			//if(the_inputs[n].value == "")
			if(the_inputs[n].checked == true)
			{
				//alert(the_inputs[n].id)
				if(the_inputs[n].title == "mailSnd")
				{				
					ParaV = ParaV + the_inputs[n].id +","//+the_inputs[n].value									
				}
			}
		}			
	}
	//alert(ParaV)
	
	var cityval
	cityval = document.getElementById("CityId").value;
	var frmVal
	frmVal = document.getElementById("FrmBx").value;
	//var radCnt
	//radCnt = document.getElementById("radCnt").value;
	//Para = "NLtrMsgId=" + sndid + "&ParaVal=" + ParaV + "&CityId=" + cityval + "&FromVal=" + frmVal ;//+"&radCnt=" + radCnt;
	//alert(Para)
	
		/*objXMLHttpRequest.onreadystatechange=SndNewsLetter_output;
		var Url = "SndNewsLetter_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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;
	//}*/
	
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrMsgId";
	Input.id = "NLtrMsgId";
	Input.value = sndid;
	Form.appendChild(Input);
	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ParaVal";
	Input.id = "ParaVal";
	Input.value = ParaV;
	Form.appendChild(Input);
	//alert(ParaV)
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";	
	Input.value = cityval;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "FromVal";
	Input.id = "FromVal";	
	Input.value = frmVal;
	Form.appendChild(Input);	
		
	document.body.appendChild(Form);
	Form.action = "SndNewsLetter_tst_Srv.asp";
	Form.method="post"
	Form.submit();
}
function SndSMS(sndid)
{
//alert(sndid)
	ParaV = ","
	var the_inputs=document.getElementsByTagName("input");			
	k=0;
	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			//if(the_inputs[n].value == "")
			if(the_inputs[n].checked == true)
			{
				//alert(the_inputs[n].id)
				if(the_inputs[n].title == "mailSnd")
				{				
					ParaV = ParaV + the_inputs[n].id +","//+the_inputs[n].value									
				}
			}
		}			
	}
	alert(ParaV)
	
	var cityval
	cityval = document.getElementById("CityId").value;
	var frmVal
	frmVal = document.getElementById("FrmBx").value;
		
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrMsgId";
	Input.id = "NLtrMsgId";
	Input.value = sndid;
	Form.appendChild(Input);
	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ParaVal";
	Input.id = "ParaVal";
	Input.value = ParaV;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";	
	Input.value = cityval;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "FromVal";
	Input.id = "FromVal";	
	Input.value = frmVal;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SMSSubj";
	Input.id = "SMSSubj";	
	Input.value = document.getElementById("SMSSubj").value;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SMSMsg";
	Input.id = "SMSMsg";	
	Input.value = document.getElementById("SMSMsg").value;
	Form.appendChild(Input);	
		
	document.body.appendChild(Form);
	Form.action = "SndSMS_Srv.asp";
	Form.method="post"
	Form.submit();
}
  function SndNewsLetter_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("**");
		//alert(MsgStr[2])
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(MsgStr[1]=="Mail_Snd")
			{
				document.getElementById("a").innerHTML = objXMLHttpRequest.responseText;
				alert("Mail Send To All")
				document.getElementById("butSave").disabled = true;
				//document.getElementById("radCnt").value =MsgStr[2];
				
			}						
			else
			{
				document.getElementById("a").innerHTML = objXMLHttpRequest.responseText;
				document.getElementById("butSave").disabled = true;							
			}	
	}
  }
function selCity(id)
{
	//alert(id)
	//document.getElementById("citnm").style.display = "block";	
}

function selCityNot()
{
	document.getElementById("citnm").style.display = "none";	
}

function getDelrs()
{
//alert("in")
	var city
	city = document.getElementById("CityId").value;
	Para = "city=" + city ;
	//alert(Para)
	objXMLHttpRequest.onreadystatechange=getDelrs_output;
	var Url = "getDealrs.asp"; //Url of the file in the server.......
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
	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 getDelrs_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		if (objXMLHttpRequest.status == 200)
		{	
			MsgStr = objXMLHttpRequest.responseText.split("*");
			document.getElementById("citnm").innerHTML = objXMLHttpRequest.responseText;
			document.getElementById("ShwHdiv").innerHTML = "<a href='javascript:hidthsChks()'>Hide</a>"	
		}
		else
		{
			alert("Problem with server response Try later or contact your software vendor");
			objXMLHttpRequest.abort();
		}	
		//objXMLHttpRequest.abort();
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{objXMLHttpRequest.abort()}
	}	
	
}
function SelAllLightBx()
{
	var the_inputs;
	var chkBxArr = new Array();
	the_inputs = document.getElementsByTagName("input");
	//ChkLbId_

	for(ivar=0;ivar<the_inputs.length;ivar++)
	{//alert(the_inputs[ivar].name + ' = ' +the_inputs[ivar].type)
	
		if(the_inputs[ivar].type)
		{
			if(the_inputs[ivar].type == "checkbox")
			{
				the_inputs[ivar].checked = true;
			}
		}
	}
}

function DeSelAllLightBx()
{
	var the_inputs;
	var chkBxArr = new Array();
	the_inputs = document.getElementsByTagName("input");
	for(ivar=0;ivar<the_inputs.length;ivar++)
	{
		if(the_inputs[ivar].type)
		{
			if(the_inputs[ivar].type == "checkbox")
			{
				the_inputs[ivar].checked = false;
			}
		}
	}
}
function getDelrsCrtBas()
{
		var Para = "";
		Para = "Tst = mnmnm"
		if(document.getElementById("TR_1").style.display == "block")
		{
			if((frmTrans.TranExp[0].checked==false) && (frmTrans.TranExp[1].checked==false)  && (frmTrans.TranExp[2].checked==false) && (frmTrans.TranExp[3].checked==false))
			{
				//document.getElementById("STranExp").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranExp" ;
				if(frmTrans.TranExp[0].checked==true)
					Para=Para + "&TranExp=L"
				else if(frmTrans.TranExp[1].checked==true)
					Para=Para + "&TranExp=A"
				else if(frmTrans.TranExp[2].checked==true)
					Para=Para + "&TranExp=G"
				else if(frmTrans.TranExp[3].checked==true)
					Para=Para + "&TranExp=NA"
				//document.getElementById("STranExp").innerHTML = ""
			}
		}
		
		if(document.getElementById("TR_2").style.display == "block")
		{
			if((frmTrans.TranLoyalty[0].checked==false) && (frmTrans.TranLoyalty[1].checked==false) && (frmTrans.TranLoyalty[2].checked==false) && (frmTrans.TranLoyalty[3].checked==false))
			{
				//document.getElementById("STranLoyalty").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "FldNa=TranLoyalty" ;
				if(frmTrans.TranLoyalty[0].checked==true)
					Para=Para + "&TranLoyalty=F"
				else if(frmTrans.TranLoyalty[1].checked==true)
					Para=Para + "&TranLoyalty=G"
				else if(frmTrans.TranLoyalty[2].checked==true)
					Para=Para + "&TranLoyalty=E"
				else if(frmTrans.TranLoyalty[3].checked==true)
					Para=Para + "&TranLoyalty=NA"
				//document.getElementById("STranLoyalty").innerHTML = ""
			}
		}
		
		if(document.getElementById("TR_3").style.display == "block")
		{
			if((frmTrans.TranPurchas[0].checked==false) && (frmTrans.TranPurchas[1].checked==false) && (frmTrans.TranPurchas[2].checked==false) && (frmTrans.TranPurchas[3].checked==false))
			{			
				//document.getElementById("STranPurchas").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranPurchas" ;			
				if(frmTrans.TranPurchas[0].checked==true)
					Para=Para + "&TranPurchas=L"
				else if(frmTrans.TranPurchas[1].checked==true)
					Para=Para + "&TranPurchas=A"
				else if(frmTrans.TranPurchas[2].checked==true)
					Para=Para + "&TranPurchas=G"
				else if(frmTrans.TranPurchas[3].checked==true)				
					Para=Para + "&TranPurchas=NA"
				//document.getElementById("STranPurchas").innerHTML = ""
			}
		}
		
		if(document.getElementById("TR_4").style.display == "block")
		{
			if((frmTrans.TranRapo[0].checked==false) && (frmTrans.TranRapo[1].checked==false) && (frmTrans.TranRapo[2].checked==false) && (frmTrans.TranRapo[3].checked==false))
			{
				//document.getElementById("STranRapo").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranRapo" ;				
				if(frmTrans.TranRapo[0].checked==true)
					Para=Para + "&TranRapo=F"
				else if(frmTrans.TranRapo[1].checked==true)
					Para=Para + "&TranRapo=G"
				else if(frmTrans.TranRapo[2].checked==true)
					Para=Para + "&TranRapo=E"
				else if(frmTrans.TranRapo[3].checked==true)
					Para=Para + "&TranRapo=NA"
				//document.getElementById("STranRapo").innerHTML = ""
			}
		}
		
		//if(document.getElementById("TR_5").style.display == "block")
		//{
		//	Para = "&FldNa=TranRapoWhom" ;
		//	if(document.getElementById("TranRapoWhom").value != "")
		//		Para = Para + "&TranRapoWhom=" + document.getElementById("TranRapoWhom").value;
		//}
			
		
		if(document.getElementById("TR_5").style.display == "block")
		{
			if((frmTrans.TranCredt[0].checked==false) && (frmTrans.TranCredt[1].checked==false) && (frmTrans.TranCredt[2].checked==false))
			{
				//document.getElementById("STranCredt").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranCredt" ;
				if(frmTrans.TranCredt[0].checked==true)
					Para=Para + "&TranCredt=Y" //STranRapoWhom
				else if(frmTrans.TranCredt[1].checked==true)
					Para=Para + "&TranCredt=N" //STranRapoWhom
				else if(frmTrans.TranCredt[2].checked==true)
					Para=Para + "&TranCredt=NA"
				//document.getElementById("STranCredt").innerHTML = ""
			}
		}

		
		/*if(document.getElementById("TR_6").style.display == "block")
		{
			Para = "&FldNa=TranCrDays" ;		
			if(document.getElementById("TranCrDays").value != "")
				Para=Para + "&TranCrDays=" + document.getElementById("TranCrDays").value;
			else
				Para=Para + "&TranCrDays=" + "";
		}*/
		
		if(document.getElementById("TR_6").style.display == "block")
		{	
			if((frmTrans.TranSysInt[0].checked==false) && (frmTrans.TranSysInt[1].checked==false) && (frmTrans.TranSysInt[2].checked==false) && (frmTrans.TranSysInt[3].checked==false))
			{
				//document.getElementById("STranSysInt").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranSysInt" ;
				if(frmTrans.TranSysInt[0].checked==true)
					Para=Para + "&TranSysInt=S"
				else if(frmTrans.TranSysInt[1].checked==true)
					Para=Para + "&TranSysInt=D"
				else if(frmTrans.TranSysInt[2].checked==true)
					Para=Para + "&TranSysInt=B"
				else if(frmTrans.TranSysInt[3].checked==true)
					Para=Para + "&TranSysInt=NA"
				//document.getElementById("STranSysInt").innerHTML = ""
				
			}
		}
		
		if(document.getElementById("TR_7").style.display == "block")
		{
			if((frmTrans.TranImp[0].checked==false) && (frmTrans.TranImp[1].checked==false) && (frmTrans.TranImp[2].checked==false) && (frmTrans.TranImp[3].checked==false))
			{
				//document.getElementById("STranImp").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranImp" ;
				if(frmTrans.TranImp[0].checked==true)
					Para=Para + "&TranImp=CCTV"
				else if(frmTrans.TranImp[1].checked==true)
					Para=Para + "&TranImp=POC"
				else if(frmTrans.TranImp[2].checked==true)
					Para=Para + "&TranImp=OTC"
				else if(frmTrans.TranImp[3].checked==true)
					Para=Para + "&TranImp=NA"
				//document.getElementById("STranImp").innerHTML = ""
			}
		}
		
		if(document.getElementById("TR_8").style.display == "block")
		{
			if((frmTrans.TranCompet[0].checked==false) && (frmTrans.TranCompet[1].checked==false) && (frmTrans.TranCompet[2].checked==false))
			{
				//document.getElementById("STranCompet").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranCompet" ;
				if(frmTrans.TranCompet[0].checked==true)
					Para=Para + "&TranCompet=Y"
				else if(frmTrans.TranCompet[1].checked==true)
					Para=Para + "&TranCompet=N"
				else if(frmTrans.TranCompet[2].checked==true)
					Para=Para + "&TranCompet=NA"
				//document.getElementById("STranCompet").innerHTML = ""
			}
		}	
		
		if(document.getElementById("TR_11").style.display == "block")
		{
			if((frmTrans.TranRepet[0].checked==false) && (frmTrans.TranRepet[1].checked==false) && (frmTrans.TranRepet[2].checked==false) && (frmTrans.TranRepet[3].checked==false))
			{
				//document.getElementById("STranRepet").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranRepet" ;
				if(frmTrans.TranRepet[0].checked==true)
					Para=Para + "&TranRepet=F"
				else if(frmTrans.TranRepet[1].checked==true)
					Para=Para + "&TranRepet=G"
				else if(frmTrans.TranRepet[2].checked==true)
					Para=Para + "&TranRepet=E"
				else if(frmTrans.TranRepet[3].checked==true)
					Para=Para + "&TranRepet=NA"
				//document.getElementById("STranRepet").innerHTML = ""
			}
		}
		
		if(document.getElementById("TranBranch"))
		{
			if(document.getElementById("TranBranch").value =="")
			{
				//document.getElementById("STranBranch").innerHTML = "<font color=red>Please Fill in</font>"
				//alert("Please Fill In")
			}		
			else
			{
				Para = Para + "&FldNa=TranBranch" ;
				Para=Para + "&TranBranch=" + document.getElementById("TranBranch").value
				//document.getElementById("STranBranch").innerHTML = ""
			}
		}
		var the_inputs;
		var TranClient = "" 
		the_inputs = document.getElementsByTagName("input");
		for(ivar=0;ivar<the_inputs.length;ivar++)
		{
			if(the_inputs[ivar].type == "checkbox")
			{				
				if(the_inputs[ivar].id == "TranClient")
				{
					if(the_inputs[ivar].checked == true)
					{		
						if(TranClient == "")
							TranClient = the_inputs[ivar].value;
						else
							TranClient = TranClient + "," + the_inputs[ivar].value;									
					}
				}				
			}
		}
		if(TranClient != "" )
		{
			Para = Para + "&FldNa=TranClient" ;	
			Para = Para + "&TranClient=" + encodeURIComponent(TranClient);
		}
		
		var the_inputsCl;
		var TranProd = "" 
		the_inputsCl = document.getElementsByTagName("input");
		for(ivarCl=0;ivarCl<the_inputsCl.length;ivarCl++)
		{
			if(the_inputsCl[ivarCl].type == "checkbox")
			{				
				if(the_inputsCl[ivarCl].id == "TranProd")
				{
					if(the_inputsCl[ivarCl].checked == true)
					{		
						if(TranProd == "")
							TranProd = the_inputsCl[ivarCl].value;
						else
							TranProd = TranProd + "," + the_inputsCl[ivarCl].value;
							//document.getElementById("PgId").value = TranClient								
					}
				}				
			}
		}	
		if(TranProd != "" )
		{
			Para = Para + "&FldNa=TranProd" ;
			Para = Para + "&TranProd=" + encodeURIComponent(TranProd);
		}
		
		var the_inputsBr;
		var TranBrand = "" 
		the_inputsBr = document.getElementsByTagName("input");
		for(ivarBr=0;ivarBr<the_inputsBr.length;ivarBr++)
		{
			if(the_inputsBr[ivarBr].type == "checkbox")
			{				
				if(the_inputsBr[ivarBr].id == "TranBrand")
				{
					if(the_inputsBr[ivarBr].checked == true)
					{		
						if(TranBrand == "")
							TranBrand = the_inputsBr[ivarBr].value;
						else
							TranBrand = TranBrand + "," + the_inputsBr[ivarBr].value;									
					}
				}				
			}
		}
		if(TranBrand != "" )
		{	
			Para = Para + "&FldNa=TranBrand" ;
			Para = Para + "&TranBrand=" + encodeURIComponent(TranBrand);
		}
		
		var the_inputsAli;
		var TranAliIds = "" 
		the_inputsAli = document.getElementsByTagName("input");
		for(ivarAl=0;ivarAl<the_inputsAli.length;ivarAl++)
		{
			if(the_inputsAli[ivarAl].type == "checkbox")
			{				
				if(the_inputsAli[ivarAl].id == "TranAliId")
				{
					if(the_inputsAli[ivarAl].checked == true)
					{		
						if(TranAliIds == "")
							TranAliIds = the_inputsAli[ivarAl].value;
						else
							TranAliIds = TranAliIds + "," + the_inputsAli[ivarAl].value;
							//document.getElementById("PgId").value = TranClient								
					}
				}				
			}
		}
		if(TranAliIds != "" )
		{	
			Para = Para + "&FldNa=TranAliIds" ;
			Para = Para + "&TranAliIds=" + encodeURIComponent(TranAliIds);
		}
		
		if(document.getElementById("TR_14").style.display == "block")
		{
			if((frmTrans.TranAliDeal[0].checked==false) && (frmTrans.TranAliDeal[1].checked==false) && (frmTrans.TranAliDeal[2].checked==false))
			{
				//document.getElementById("STranAliDeal").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranAliDeal" ;
				if(frmTrans.TranAliDeal[0].checked==true)
					Para=Para + "&TranAliDeal=A"
				else if(frmTrans.TranAliDeal[1].checked==true)
					Para=Para + "&TranAliDeal=D"			
				else if(frmTrans.TranAliDeal[2].checked==true)
					Para=Para + "&TranAliDeal=NA"
				//document.getElementById("STranAliDeal").innerHTML = ""
			}
		}
		
		if(document.getElementById("TR_15").style.display == "block")
		{		
			if((frmTrans.TranPricCon[0].checked==false) && (frmTrans.TranPricCon[1].checked==false) && (frmTrans.TranPricCon[2].checked==false))
			{
				//document.getElementById("STranPricCon").innerHTML = "<font color=red>Please choose any option</font>"
				//alert("Please choose any option")
			}
			else
			{
				Para = Para + "&FldNa=TranPricCon" ;
				if(frmTrans.TranPricCon[0].checked==true)
					Para=Para + "&TranPricCon=PC"
				else if(frmTrans.TranPricCon[1].checked==true)
					Para=Para + "&TranPricCon=QC"			
				else if(frmTrans.TranPricCon[2].checked==true)
					Para=Para + "&TranPricCon=NA"
				//document.getElementById("STranPricCon").innerHTML = ""
			}
		}
		
		if(document.getElementById("TranBrOthr"))
		{
			if(document.getElementById("TranBrOthr").value =="")
			{	
			//alert("Please choose any option")
			}
				//document.getElementById("STranBrOthr").innerHTML = "<font color=red>Please Fill in</font>"		
			else
			{
				Para = Para + "&FldNa=TranBrOthr" ;
				Para=Para + "&TranBrOthr=" + document.getElementById("TranBrOthr").value
				//document.getElementById("STranBrOthr").innerHTML = ""
			}
		}
		
	var city
	city = document.getElementById("CityId").value;
	Para = Para + "&city=" + city ;
	//alert(Para)
	objXMLHttpRequest.onreadystatechange=getDelrsCrtBas_output;
	var Url = "getDealrsCrtBas.asp"; //Url of the file in the server.......
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
	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 getDelrsCrtBas_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		if (objXMLHttpRequest.status == 200)
		{	
			MsgStr = objXMLHttpRequest.responseText.split("*");
			document.getElementById("citnm").innerHTML = objXMLHttpRequest.responseText;
			document.getElementById("ShwHdiv").innerHTML = "<a href='javascript:hidthsChks()'>Hide</a>"	
		}
		else
		{
			document.getElementById("citnm").innerHTML = "Loading...";
			alert("Problem with server response Try later or contact your software vendor");
			//objXMLHttpRequest.abort();
		}	
		//objXMLHttpRequest.abort();
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{objXMLHttpRequest.abort()}
	}	
	
}

function ChkValDealr()
{
	if(document.getElementById("SelEmail1").checked == true)
	//alert(document.getElementById("SelEmail1").value)
	{	
		var the_inputs=document.getElementsByTagName("input");			
		k=0;
		vin = 0;
		var the_chk = new Array()
		for(var n=0;n<the_inputs.length;n++)
		{
			if(the_inputs[n].type=="checkbox")
			{				
				//if(the_inputs[n].value == "")
				if(the_inputs[n].checked == true)
				{
					//alert(the_inputs[n].id)
					//alert(the_inputs[n].value)
					if(the_inputs[n].id != "SelEmail1")
					the_inputs[n].disabled = true
					//Para = Para + "&"+the_inputs[n].id+"="+the_inputs[n].value								
					//vin++;
								
				}
			}			
		}
	}
}
function ShowPrdt(pdtid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PdtId";
	Input.id = "PdtId";
	Input.value = pdtid;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "ViewProduct.asp";
	Form.method="post"
	Form.submit();
}

function shwthsChks()
{
	document.getElementById("citnm").style.visibility="visible";
	document.getElementById("ShwHdiv").innerHTML = "<a href='javascript:hidthsChks()'>Hide</a>"
	//document.getElementById("citnm").style.visibility="block";	
}
function hidthsChks()
{	
	document.getElementById("citnm").style.visibility="hidden";
	document.getElementById("ShwHdiv").innerHTML = "<a href='javascript:shwthsChks()'>Show</a>"
}
function EnterKeyChk(evnt)
{
	if(evnt==13)
	{
		login();
	}
}

function MkAct(pzid,stat)
{	
	if(stat == "H")
		ststs = "S"
	else
		ststs = "H"	
	Para = "nid=" + pzid + "&Stat=" + ststs ;
	
	objXMLHttpRequest.onreadystatechange=MkActive_output;
	var Url = "MkActive.asp"; //Url of the file in the server.......
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
	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 MkActive_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		if (objXMLHttpRequest.status == 200)
		{	
			MsgStr = objXMLHttpRequest.responseText.split("*");
			document.getElementById("sts_"+MsgStr[2]).innerHTML = MsgStr[1]	
		}
		else
		{
			alert("Problem with server response Try later or contact your software vendor");
			objXMLHttpRequest.abort();
		}	
		//objXMLHttpRequest.abort();
	}	
	
}

// Delete Old Letters

function DelOldLtr()
{
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		var LtrId, TabNa, FldNa
		LtrId = document.getElementById("NLtrMsgId").value;
		Tabl = "LKM_NewsLetterMsg";
		Fld = "NLtrMsgId";
		Para='Id=' + LtrId + '&TabNa=' + Tabl + '&FldNa=' + Fld;
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=DelOldLtr_Output;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
}
  
  function DelOldLtr_Output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="NewNewsLetter.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="NewNewsLetter.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="NewNewsLetter.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="NewNewsLetter.asp?output=4"
			}			
			else
			{
				document.location.href="NewNewsLetter.asp?output=5"				
			}

	}
  } 

function modify_upload(upid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "upid";
	Input.id = "upid";
	Input.value = upid;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "FileUplods.asp";
	Form.method="post"
	Form.submit();
}


function Suggestion_view(id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "sid";
	Input.id = "sid";
	Input.value = id;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "viewsuggestion.asp";
	Form.method="post"
	Form.submit();
}
/*
function stock(id,mid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "scat";
	Input.id = "scat";
	Input.value = id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pdtmodel";
	Input.id = "pdtmodel";
	Input.value = mid;
	Form.appendChild(Input);
	//alert(id)	
	//alert(mid)
	document.body.appendChild(Form);
	Form.action = "stock_update.asp";
	Form.method="post"
	Form.submit();
}*/
function stock(id,mid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	/*Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "scat";
	Input.id = "scat";
	Input.value = id;
	Form.appendChild(Input);*/

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "cat";
	Input.id = "cat";
	Input.value = id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pdtmodel";
	Input.id = "pdtmodel";
	Input.value = mid;
	Form.appendChild(Input);
	//alert(id)	
	//alert(mid)
	document.body.appendChild(Form);
	Form.action = "stock_update.asp";
	Form.method="post"
	Form.submit();
}

function NewStock(id,mid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "scat";
	Input.id = "scat";
	Input.value = id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pdtmodel";
	Input.id = "pdtmodel";
	Input.value = mid;
	Form.appendChild(Input);
	//alert(id)	
	//alert(mid)
	document.body.appendChild(Form);
	Form.action = "stock_update.asp";
	Form.method="post"
	Form.submit();
}

function update_request(id,ty)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "prid";
	Input.id = "prid";
	Input.value = id;
	Form.appendChild(Input);


	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ty";
	Input.id = "ty";
	Input.value = ty;
	Form.appendChild(Input);	
	
	document.body.appendChild(Form);
	Form.action = "product_request_reply.asp";
	Form.method="post"
	Form.submit();
}


function vwad(id,fid)
{
//alert(id)
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "branchId";
	Input.id = "branchId";
	Input.value = id;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "fid";
	Input.id = "fid";
	Input.value = fid;
	Form.appendChild(Input);		
	
	document.body.appendChild(Form);
	//Form.action = "Admin.asp";
	Form.action = "ViewAdmin.asp";
	Form.method="post"
	Form.submit();
}


function save_request()
{
if(Validation_SpnMsg())
form1.submit();
}




function requestpop(prid){
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.target="_blank"
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "prid";
	Input.id = "prid";
	Input.value = prid;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "request_view.asp";
	Form.target = "foobar:width={myWidt},height={myHeight},scrollbars,{(isResizable)?'resizable':''},status"
	
	Form.method="post"	
	Form.onSubmit = createTarget(Form);
	Form.submit();
}

///////////////////////////////////
////////////////////////////////
var myHeight = 600;
var myWidt = 700;
var isResizable = false;

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 addspack()
  {	
var abcd
abcd=0
	for(i=0;i<form1.document.getElementById("LstPgDis").options.length;i++)
	{
	//alert(form1.document.getElementById("LstPgDis").options[i].value)
		form1.document.getElementById("LstPgDis").options[i].selected=true;
		abcd = abcd + "-" + form1.document.getElementById("LstPgDis").options[i].value;
		form1.page.value=abcd
	}
//alert(form1.page.value)	  
		Para = GetPara()
		if (Para) {
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=addspack_output;
		var Url = "sp_SrvPg_N.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 addspack_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var		MsgStr = objXMLHttpRequest.responseText.split("*");
	//	document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==1)
			{
			document.location.href="state_package.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="state_package.asp?output=2"
			}
			else
			{
				document.location.href="state_package.asp?output=2"
			}	
	}
  }
  

 //-------- Modify 

function modistatepack(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SSId";
	Input.id = "SSId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addspack.asp";
	Form.method="post"
	Form.submit();
}	

//------------delete admin
   function Delete_SPOnclick(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_SPOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_SPOnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="state_package.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==2)
			{
				document.location.href="state_package.asp?output=5"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="state_package.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="state_package.asp?output=4"
			}			
			else
			{
				document.location.href="state_package.asp?output=5"				
			}

	}
  } 
function AddNewOrdr(mnctid)
  {	
	//document.getElementById("EdtUsr").innerHTML ="";
		Para = "prid=" + mnctid ;
		//alert(Para)
		objXMLHttpRequest.onreadystatechange=AddNewOrdr_output;
		var Url = "AddNewOrdr.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 AddNewOrdr_output()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("**");
		var catsval
		catsval = parseInt(MsgStr[1])
		//alert(objXMLHttpRequest.responseText)
		document.getElementById("othrpr_"+catsval).checked = true;
		//document.getElementById("EdtUsr_"+catsval).innerHTML = objXMLHttpRequest.responseText;
		document.getElementById("EdtUsr_"+catsval).innerHTML = MsgStr[0];
		//EdtUsr_		
	}
  }
  
function Vwnwordrs(Id)
{	
	Para = "prid=" + Id;
	//alert(Id)
	objXMLHttpRequest.onreadystatechange = Vwnwordrs_output;
	var Url = "VwNwOrders.asp"; //Url of the file in the server.......
	objXMLHttpRequest.open("POST",Url,true);		
	objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
	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 Vwnwordrs_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//document.getElementById("rr").innerHTML = objXMLHttpRequest.responseText
		var	MsgStr = objXMLHttpRequest.responseText.split("**");
		//alert(MsgStr[1])
		catval = MsgStr[1]		
		//document.getElementById("SbCat_"+catval).innerHTML = objXMLHttpRequest.responseText
		//document.getElementById("VwHd_"+catval).innerHTML = "<a href='javascript:HideViews("+catval+")'><font color='red'>Hide</font></a>"				
		document.getElementById("EdtUsr_"+MsgStr[1]).innerHTML = MsgStr[0];
		document.getElementById("Vw_"+MsgStr[1]).innerHTML = "<a href='javascript:clswnspl("+MsgStr[1]+")' class='bluehead'>Hide</a>";
	}
	/*
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.target="_blank"
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "prid";
	Input.id = "prid";
	Input.value = Id;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "VwNwOrders.asp";
	Form.target = "vwordrs:width={600},height={400},scrollbars,{(isResizable)?'resizable':''},status"
	
	Form.method="post"	
	Form.onSubmit = createTarget(Form);
	Form.submit();*/
}
//SubmtThsUpdt
function SubmtThsUpdt(Id)
{	
	Para = ""
	var the_inputs=document.getElementsByTagName("input");			
	k=0;	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			if(the_inputs[n].checked == true)
			{
				Para = Para + the_inputs[n].value +","//+the_inputs[n].value									
			}
		}			
	}
	document.getElementById("tryv").value = Para
	var flgv
	flgv = 0;
	
	//alert(document.getElementById("tryv").value)
	if(Validation_SpnMsg())
	{
		for(var nto=0;nto<the_inputs.length;nto++)
		{
			if(the_inputs[nto].title=="NxtDt")
			{			
				var sptid = the_inputs[nto].id
				var sptv = sptid.split("_")
				if(document.getElementById("OuNxtDt_"+sptv[1]).value!="")
				{
					if(document.getElementById("OuRmks_"+sptv[1]).value=="")
					{
						document.getElementById("SOuRmks_"+sptv[1]).innerHTML = "<font color=red >Should not be blank</font>";
						//document.getElementById("0").id = "1";
						flgv = 0;
					}
					else
						flgv = 1;				
				}
				else
					flgv = 1;
					//alert("innerflg"+flgv)									
			}
		}							
		//document.getElementById("frmordrs").submit();
	}
	else
		flgv = 0
	//alert("outerflg"+flgv)
	if (flgv == 1)
		document.getElementById("frmordrs").submit();
	else
		return false;
}  
function AddChkPr(ths)
{	
	var prdval ,pos, splitv,flgv
	flgv = 0
	prdval = document.getElementById("prid").value;
	pos = prdval.indexOf(',')
	if(pos != "-1")
	{
		splitv = prdval.split(",")
		for(i=0;i<splitv.length;i++)
		{
			if(ths == splitv[i])
			{
				//(document.getElementById("prid").value).replace(ths,)
				var xval
				xval = document.getElementById("prid").value
				repval = xval.replace(ths + ",","")				
				//document.getElementById("tryv").value = repval
				document.getElementById("prid").value = repval
				alert(repval)
			}
			else
				flgv = 1				
		}
		alert(document.getElementById("othrpr_"+ths).id)
		//if(document.getElementById("othrpr_"+ths).checked == true)
		//	document.getElementById("prid").value = document.getElementById("prid").value + "," + ths
	}
	else
		document.getElementById("prid").value = document.getElementById("prid").value + "," + ths
}
function strRep()
{ 
var text="not java"; 
var txt2=text.replace(/not java/,"javascript"); 
alert(text); 
alert(txt2); 
} 


function clswnths(prid)
{
	//document.getElementById("EdtUsr_"+prid).innerHTML = "";
	document.getElementById("EdtUsr_"+prid).innerHTML = "";
	document.getElementById("othrpr_"+prid).checked = false;
}
//chkThsChkd
function chkThsChkd(prid)
{
	if(document.getElementById("othrpr_"+prid).checked == false)
		document.getElementById("EdtUsr_"+prid).innerHTML = "";
}
function clswnspl(prid)
{
	document.getElementById("EdtUsr_"+prid).innerHTML = "";	
	document.getElementById("Vw_"+prid).innerHTML = "<a href='javascript:Vwnwordrs("+prid+")' class='bluehead'>View</a>";
}
function UpdtStatVal(Delr,dat)
{
//alert(dat)
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = Delr;
	Form.appendChild(Input);
	
	//DealrId
	
	Input = document.createElement("input");
	Input.type = "hidden";
	//Input.name = "prdate";
	//Input.id = "prdate";
	Input.name = "StDt";
	Input.id = "StDt";
	Input.value = dat;
	Form.appendChild(Input);
	
	document.getElementById("EnDt").value == "";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";
	Input.value = document.getElementById("CityId").value;
	Form.appendChild(Input);
	
	//CityId

	document.body.appendChild(Form);
	Form.action = "order_search.asp";
	Form.method="post"
	Form.submit();
}
function ResVals()
{
	document.getElementById("StDt").value = ""
	document.getElementById("EnDt").value = ""
	document.getElementById("DealrId").value = ""
	document.getElementById("CityId").value = ""			
}

function VwUpdtdOrdrs(id,prid,stdt)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = id;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "StDt";
	Input.id = "StDt";
	Input.value = stdt;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "order_search.asp";
	Form.method="post"
	Form.submit();
}

function viewlogadmin(id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DealrId";
	Input.id = "DealrId";
	Input.value = id;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "admin_log.asp";
	Form.method="post"
	Form.submit();
}

function ChkAdmCat()
{
	var admcat = document.getElementById("AdCatId").value
	if(admcat == 2)
	{
		document.getElementById("divAdmCat").style.display = "block";
		document.getElementById("divAdmCat").style.visibility = "visible";
	}		
}
function chkBrReg()
{
	var admcat = document.getElementById("AdCatId").value
	//if(admcat == 2)
	//{
		var the_inputs=document.getElementsByTagName("input");			
		k=0;
		vin = 0;
		var the_chk = new Array()
		for(var n=0;n<the_inputs.length;n++)
		{
			if(the_inputs[n].type=="radio")
			{				
				if(the_inputs[n].title == "brRe")
				{
					if(the_inputs[n].checked == true)
					{														
						var admca = the_inputs[n].value
						//alert(admca)
						if(admca == "Re")
						{
							document.getElementById("divAdmCat").style.display = "none";
							document.getElementById("divAdmCat").style.visibility = "hidden";
							
							document.getElementById("divAdmCatSec").style.display = "block";
							document.getElementById("divAdmCatSec").style.visibility = "visible";
							
							if(document.getElementById("11"))
							{
								//alert("branch")
								document.getElementById("11").id = "13"
							}
						}
						else if(admca == "Br")
						{
							document.getElementById("divAdmCat").style.display = "block";
							document.getElementById("divAdmCat").style.visibility = "visible";
							
							document.getElementById("divAdmCatSec").style.display = "none";
							document.getElementById("divAdmCatSec").style.visibility = "hidden";
							
							if(document.getElementById("12"))
							{
								//alert("region")
								document.getElementById("12").id = "14"
							}
							
						}
						else if(admca == "He")
						{
							document.getElementById("divAdmCat").style.display = "none";
							document.getElementById("divAdmCat").style.visibility = "hidden";
							
							document.getElementById("divAdmCatSec").style.display = "none";
							document.getElementById("divAdmCatSec").style.visibility = "hidden";
							
							if(document.getElementById("11"))
							{
								//alert("11")
								document.getElementById("11").id = "13"
							}
							if(document.getElementById("12"))
							{
								//alert("12")
								document.getElementById("12").id = "14"
							}
						}
						document.getElementById("brval").value = admca;									
					}
				}
			}			
		}
	//}
		
}

function GetStatDiv(Id)
{	
	Para = "RegId=" + Id;
	//alert(Para)
	if(document.getElementById("VwHd_"+Id).innerHTML == "")
	{
		objXMLHttpRequest.onreadystatechange = GetStatDiv_output;
		var Url = "GetStatValues.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server.....
	}
	else
	{
		document.getElementById("VwHd_"+Id).innerHTML = "";
		document.getElementById("Vw_"+Id).innerHTML = "View";
	}
}  
function GetStatDiv_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	//document.getElementById("mmmm").innerHTML = objXMLHttpRequest.responseText
		var	MsgStr = objXMLHttpRequest.responseText.split("***");
		catval = MsgStr[1]
		//alert(MsgStr[1])
		//document.getElementById("VwHd_"+MsgStr[1]).innerHTML = "<a href='javascript:clswnspl("+MsgStr[1]+")' class='bluehead'>Hide</a>";
		document.getElementById("VwHd_"+MsgStr[1]).innerHTML = MsgStr[2];		
		document.getElementById("Vw_"+MsgStr[1]).innerHTML = "Hide";
	}
}

function getbrid()
{
	Para = "RegId=" + document.getElementById("RegId").value;
	//alert(Para)
	
		objXMLHttpRequest.onreadystatechange = getbrid_output;
		var Url = "Getbranch.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
		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 getbrid_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	document.getElementById("brnch").innerHTML = objXMLHttpRequest.responseText
		var	MsgStr = objXMLHttpRequest.responseText.split("***");
		catval = MsgStr[1]
		
	}
}
function GetAllDetail()
{
	document.getElementById("DealrSrch").value = "";
	document.getElementById("frmqry").submit();
}

function filter_dealers()
{

	var Para, tl, tc, ts;
	Para="0=0";

	if(document.frmTrans.TranLoyalty[0].checked==true)
		tl="F"
	else if(document.frmTrans.TranLoyalty[1].checked==true)
		tl="G"
	else if(document.frmTrans.TranLoyalty[2].checked==true)
		tl="E"
	else if(document.frmTrans.TranLoyalty[3].checked==true)
		tl="NA"
	else
		tl="0"

	Para=Para + "&tl="+tl

	if(document.frmTrans.TranCompet[0].checked==true)
		tc="Y"
	else if(document.frmTrans.TranCompet[1].checked==true)
		tc="N"
	else if(document.frmTrans.TranCompet[2].checked==true)
		tc="NA"
	else 
		tc="0"
	Para=Para + "&tc="+tc
	
	var the_inputsBr;
	var TranBrand = "" 
	the_inputsBr = document.getElementsByTagName("input");
	for(ivarBr=0;ivarBr<the_inputsBr.length;ivarBr++)
	{
		if(the_inputsBr[ivarBr].type == "checkbox")
		{				
			if(the_inputsBr[ivarBr].id == "TranBrand")
			{
				if(the_inputsBr[ivarBr].checked == true)
				{		
					if(TranBrand == "")
						TranBrand = the_inputsBr[ivarBr].value;
					else
						TranBrand = TranBrand + "," + the_inputsBr[ivarBr].value;									
				}
			}				
		}
	}
	
	if(TranBrand != "" )
	{	
		Para = Para + "&TranBrand=" + encodeURIComponent(TranBrand);
	}
	

	if(document.frmTrans.TranSysInt[0].checked==true)
		ts="S"
	else if(document.frmTrans.TranSysInt[1].checked==true)
		ts="D"
	else if(document.frmTrans.TranSysInt[2].checked==true)
		ts="B"
	else if(document.frmTrans.TranSysInt[3].checked==true)
		ts="NA"
	else 
		ts="0"
	Para=Para + "&ts="+ts	
	


	var the_inputsCl;
	var TranProd = "" 
	the_inputsCl = document.getElementsByTagName("input");
	for(ivarCl=0;ivarCl<the_inputsCl.length;ivarCl++)
	{
		if(the_inputsCl[ivarCl].type == "checkbox")
		{				
			if(the_inputsCl[ivarCl].id == "TranProdId")
			{
				if(the_inputsCl[ivarCl].checked == true)
				{		
					if(TranProd == "")
						TranProd = the_inputsCl[ivarCl].value;
					else
						TranProd = TranProd + "," + the_inputsCl[ivarCl].value;					
				}
			}				
		}
	}	
	if(TranProd != "" )
	{
		Para = Para + "&TranProd=" + encodeURIComponent(TranProd);
	}	
		

	if(document.frmTrans.TranPricCon[0].checked==true)
		tp="PC"
	else if(document.frmTrans.TranPricCon[1].checked==true)
		tp="QC"
	else if(document.frmTrans.TranPricCon[2].checked==true)
		tp="BC"
	else if(document.frmTrans.TranPricCon[3].checked==true)
		tp="NA"
	else 
		tp="0"
	Para=Para + "&tp="+tp		


	if(document.frmTrans.TranImp[0].checked==true)
		ti="CCTV"
	else if(document.frmTrans.TranImp[1].checked==true)
		ti="POC"
	else if(document.frmTrans.TranImp[2].checked==true)
		ti="OTC"
	else if(document.frmTrans.TranImp[3].checked==true)
		ti="NA"
	else 
		ti="0"
	Para=Para + "&ti="+ti

	var the_inputs;
	var TranClient = "" 
	the_inputs = document.getElementsByTagName("input");
	for(ivar=0;ivar<the_inputs.length;ivar++)
	{
		if(the_inputs[ivar].type == "checkbox")
		{				
			if(the_inputs[ivar].id == "TranClientId")
			{
				if(the_inputs[ivar].checked == true)
				{		
					if(TranClient == "")
						TranClient = the_inputs[ivar].value;
					else
						TranClient = TranClient + "," + the_inputs[ivar].value;									
				}
			}				
		}
	}

	if(TranClient != "" )
	{
		Para = Para + "&TranClient=" + encodeURIComponent(TranClient);
	}
				
	var city
	city = document.getElementById("CityId").value;
	Para = Para + "&city=" + city ;
	//alert(Para)
	//objXMLHttpRequest.onreadystatechange=getDelrsCrtBas_output;		
	
	objXMLHttpRequest.onreadystatechange=filter_dealers_output;
	var Url = "dealer_cri.asp"; //Url of the file in the server.......
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.lookmansecurity.com");
	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 filter_dealers_output()
{

//document.getElementById("citnm").innerHTML = objXMLHttpRequest.responseText;

	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		if (objXMLHttpRequest.status == 200)
		{	
			//MsgStr = objXMLHttpRequest.responseText.split("*");
			document.getElementById("citnm").innerHTML = objXMLHttpRequest.responseText;
			document.getElementById("ShwHdiv").innerHTML = "<a href='javascript:hidthsChks()'>Hide</a>"	
		}
		else
		{
			document.getElementById("citnm").innerHTML = "Loading...";
			alert("Problem with server response Try later or contact your software vendor");
			//objXMLHttpRequest.abort();
		}	
		//objXMLHttpRequest.abort();
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{objXMLHttpRequest.abort()}
	}	
	
}

function SndSMSAlone()
{
//alert(sndid)
	ParaV = ","
	var the_inputs=document.getElementsByTagName("input");			
	k=0;
	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			//if(the_inputs[n].value == "")
			if(the_inputs[n].checked == true)
			{
				//alert(the_inputs[n].id)
				if(the_inputs[n].title == "mailSnd")
				{				
					ParaV = ParaV + the_inputs[n].id +","//+the_inputs[n].value									
				}
			}
		}			
	}
	
	
	var cityval
	cityval = document.getElementById("CityId").value;
	var frmVal
	frmVal = document.getElementById("FrmBx").value;
		
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrMsgId";
	Input.id = "NLtrMsgId";
	Input.value = "";
	Form.appendChild(Input);
	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ParaVal";
	Input.id = "ParaVal";
	Input.value = ParaV;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";	
	Input.value = cityval;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "FromVal";
	Input.id = "FromVal";	
	Input.value = frmVal;
	Form.appendChild(Input);
	
	//Input = document.createElement("input");
	//Input.type = "hidden";
	//Input.name = "SMSSubj";
	//Input.id = "SMSSubj";	
	//Input.value = document.getElementById("SMSSubj").value;
	//Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SMSMsg";
	Input.id = "SMSMsg";	
	Input.value = document.getElementById("SMSMsg").value;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "SMS_Srv.asp";
	Form.method="post"
	Form.submit();
		//alert("ParaV : "+ParaV)
}

function SndSMSAloneLin()
{
//alert(sndid)
	ParaV = ","
	var the_inputs=document.getElementsByTagName("input");			
	k=0;
	vin = 0;
	var the_chk = new Array()
	for(var n=0;n<the_inputs.length;n++)
	{
		if(the_inputs[n].type=="checkbox")
		{				
			//if(the_inputs[n].value == "")
			if(the_inputs[n].checked == true)
			{
				//alert(the_inputs[n].id)
				if(the_inputs[n].title == "mailSnd")
				{				
					ParaV = ParaV + the_inputs[n].id +","//+the_inputs[n].value									
				}
			}
		}			
	}
	
	
	var cityval
	cityval = document.getElementById("CityId").value;
	var frmVal
	frmVal = document.getElementById("FrmBx").value;
		
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "NLtrMsgId";
	Input.id = "NLtrMsgId";
	Input.value = "";
	Form.appendChild(Input);
	
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ParaVal";
	Input.id = "ParaVal";
	Input.value = ParaV;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CityId";
	Input.id = "CityId";	
	Input.value = cityval;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "FromVal";
	Input.id = "FromVal";	
	Input.value = frmVal;
	Form.appendChild(Input);
	
	//Input = document.createElement("input");
	//Input.type = "hidden";
	//Input.name = "SMSSubj";
	//Input.id = "SMSSubj";	
	//Input.value = document.getElementById("SMSSubj").value;
	//Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "SMSMsg";
	Input.id = "SMSMsg";	
	Input.value = document.getElementById("SMSMsg").value;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "SMS_Check_Srv.asp";
	Form.method="post"
	Form.submit();
		//alert("ParaV : "+ParaV)
}