

/*function chksearch()
{
if((frmlkmsearch.BrandId.value=="") && (frmlkmsearch.CatId.value=="") && (frmlkmsearch.PdtModel.value==""))
{
document.getElementById("Serror").innerHTML = "<font color='red'>Please choose atleast 1 search parameter</font>"
}
else
{frmlkmsearch.submit();}
}*/

function View_News(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 view_offer()
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "offer";
	Input.id = "offer";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "dealer_register.asp";
	Form.method="post"
	Form.submit();
}


function chksearch()
{
frmlkmsearch.submit();
}

/*function Dealer_Login()
{
if(Validation_SpnMsg())
frmdealerLogin.submit();
}*/

function Res_Click()
{
	var ObjNos;     //Variable to store number of labels in page
	var Obj;     //Variable to store object of label
	var ObjCnt;     //Increment value  
	var ObjErrDis    //Object used to display error message
	ObjNos = document.getElementsByTagName("LABEL").length;
	Obj = document.getElementsByTagName("LABEL");
	for(ObjCnt=0;ObjCnt<ObjNos;ObjCnt++)
	{
	  ObjCtrol = Obj[ObjCnt].htmlFor;
	  document.getElementById(ObjCtrol).value = "";
	  ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
	  ObjErrDis.innerHTML = "";  
	} 
}


function viewpdtDet(PdtId){
//window.open("ad.html","","height=400,width=430,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left=0,top=0")

//window.open("ViewProduct.asp?pdt=,Popupwin,height='360', width='420',status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no",true);
//alert(PdtId)
//window.open("ViewProduct.asp?pdt=" + PdtId + ","Popupwin","height=360, width=420,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no",true);
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.target="_blank"
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "pdt";
	Input.id = "pdt";
	Input.value = PdtId;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "ViewProduct.asp";
	//Form.target="_blank"
	//Form.target = "foobar:width={window.screen.width/2},height={myHeight},scrollbars,{(isResizable)?'resizable':''},status"
	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 = 600;
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 Rtrim(Rval)
{
	if(Rval.length == 1 || Rval.length == 0)
	{
		if(Rval==" ")
		{
			Rval="";
			return Rval;
		}
		else
		{
			return Rval;
		}
	}
	else
	{
		while(Rval.length != 0)
		{
			if(Rval.substring(Rval.length-1,Rval.length)==" ")
			{
				Rval = Rval.substring(0,Rval.length-1);
				//alert(Rval.length);
			}
			else
			{
				return Rval;
				break;
			}
		}
	}
}



function Ltrim(Lval)
{
	if(Lval.length == 1 || Lval.length == 0)
	{
		if(Lval==" ")
		{
			Lval="";
			return Lval;
		}
		else
		{
			return Lval;
		}
	}
	else
	{
		while(Lval.length != 0)
		{
			if(Lval.substring(0,1)==" ")
			{
				Lval = Lval.substring(1,Lval.length);
				//alert(Lval.length);
			}
			else
			{
				//alert(val);
				return Lval;
				break;
			}
		}
	}
}

function jsInstr(Str,Wrd)
{
	for(i=0;i<=Str.length;i++)
	{
		if(Str.substring(i, i+1) == Wrd)
		{
			return i+1;
		}
	}
	return 0;
}

function Validation_SpnMsg()

{//alert("in valid ")
	ObjNos = document.getElementsByTagName("LABEL").length 
	Obj = document.getElementsByTagName("LABEL")
	Flag = 0;

	for(ObjCnt=0;ObjCnt<ObjNos;ObjCnt++)
	{
		ObjCtrol = document.getElementById(Obj[ObjCnt].htmlFor)
		ObjCtrol.value=Rtrim(Ltrim(ObjCtrol.value));
		//alert(ObjCtrol.value)
		if(Obj[ObjCnt].id!=0)
		{
			if(ObjCtrol.value=="" && Obj[ObjCnt].id!=6 && Obj[ObjCnt].id!=7 && Obj[ObjCnt].id!=9 && Obj[ObjCnt].id!=21)
			{
				ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
				ObjErrDis.innerHTML = "<font color='red'>Should not be blank</font>";
				Flag = 1;
			}
			else
			{
				if(Obj[ObjCnt].id==2)
				{
					CntDot = jsInstr(ObjCtrol.value,".");
					CntAt = jsInstr(ObjCtrol.value,"@");
					if(CntDot==0||CntAt==0)
					{
						ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						ObjErrDis.innerHTML = "<font color='red'>Not a valid E-mail Id</font>";					
						Flag =1;
					}
					else
					{
						ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						ObjErrDis.innerHTML = "";									
					}	
				}
				else if(Obj[ObjCnt].id==3)
				{
					var obVal = ObjCtrol.value;
					//if (obVal.length == 0){alert("Please enter a value.");} 
  					//else if (chkNumeric(obVal) == false) 
	    			if(isNaN(obVal)==true)
		 			{
						 ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						 ObjErrDis.innerHTML = "<font color='red'>Non numeric value</font>";
       					 Flag=1;
	      			}
					else
					{
						ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						ObjErrDis.innerHTML = "";
					}				
				}
				
				else if(Obj[ObjCnt].id==5)
				{	
					var obVal = ObjCtrol.value;
					b=obVal.lastIndexOf(".");
					b1=b+5;
					ext=obVal.substring(b,b1);
					if((ext==".jpg")|| (ext==".JPG")||(ext==".jpeg")||(ext==".JPEG")||(ext==".gif")||(ext==".GIF"))
					{
						ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						ObjErrDis.innerHTML = "";
					}
					else
		 			{
						 ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						 ObjErrDis.innerHTML = "<font color='red'>Only jpg or gif are allowed</font>";
       					 Flag=1;
	      			}
				}

				else if(Obj[ObjCnt].id==6)
				{	
					if(ObjCtrol.value!="")
					{		
						var obVal = ObjCtrol.value;
						b=obVal.lastIndexOf(".");
						b1=b+5;
						ext=obVal.substring(b,b1);
						if((ext==".jpg")|| (ext==".JPG")||(ext==".jpeg")||(ext==".JPEG")||(ext==".gif")||(ext==".GIF"))
						{
							ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
							ObjErrDis.innerHTML = "";
						}
						else
		 				{
							 ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
							 ObjErrDis.innerHTML = "<font color='red'>Only jpg or gif or swf works are allowed</font>";
       						 Flag=1;
	    	  			}
					}
				}
				

				else if(Obj[ObjCnt].id==61)
				{	
					if(ObjCtrol.value!="")
					{		
						var obVal = ObjCtrol.value;
						b=obVal.lastIndexOf(".");
						b1=b+5;
						ext=obVal.substring(b,b1);
						if((ext==".jpg")|| (ext==".JPG")||(ext==".jpeg")||(ext==".JPEG")||(ext==".gif")||(ext==".GIF") ||(ext==".swf")||(ext==".SWF"))
						{
							ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
							ObjErrDis.innerHTML = "";
						}
						else
		 				{
							 ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
							 ObjErrDis.innerHTML = "<font color='red'>Only jpg or gif or swf or swf banners are allowed</font>";
       						 Flag=1;
	    	  			}
					}
				}
								

				else if(Obj[ObjCnt].id==7)
				{	
					if(ObjCtrol.value!="")
					{		
						var obVal = ObjCtrol.value;
						b=obVal.lastIndexOf(".");
						b1=b+5;
						ext=obVal.substring(b,b1);
						if((ext==".jpg")|| (ext==".JPG")||(ext==".jpeg")||(ext==".JPEG")||(ext==".gif")||(ext==".GIF"))
						{
							ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
							ObjErrDis.innerHTML = "";
						}
						else
		 				{
							 ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
							 ObjErrDis.innerHTML = "<font color='red'>Only jpg or gif photos allowed</font>";
       						 Flag=1;
	    	  			}
					}
				}
				

				else if(Obj[ObjCnt].id==21)
				{	
					if(ObjCtrol.value!="")
					{		
					var obVal = ObjCtrol.value;
					b=obVal.lastIndexOf(".");
					b1=b+5;
					ext=obVal.substring(b,b1);
					if((ext==".swf")|| (ext==".SWF")||(ext==".avi")||(ext==".AVI")||(ext==".mpg")||(ext==".MPG")||(ext==".mpeg")||(ext==".MPEG")||(ext==".flv")||(ext==".FLV")||(ext==".wmv")||(ext==".WMV"))
					{
						ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						ObjErrDis.innerHTML = "";
					}
					else
		 			{
						 ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						 ObjErrDis.innerHTML = "<font color='red'>Only avi or flv or mpg or swf are allowed</font>";
       					 Flag=1;
	      			}
				}
			}								
										

				else if(Obj[ObjCnt].id==22)
				{	
					var obVal = ObjCtrol.value;
					b=obVal.lastIndexOf(".");
					b1=b+5;
					ext=obVal.substring(b,b1);
					if((ext==".swf")|| (ext==".SWF")||(ext==".avi")||(ext==".AVI")||(ext==".mpg")||(ext==".MPG")||(ext==".mpeg")||(ext==".MPEG")||(ext==".flv")||(ext==".FLV") ||(ext==".wmv")||(ext==".WMV"))
					{
						ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						ObjErrDis.innerHTML = "";
					}
					else
		 			{
						 ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
						 ObjErrDis.innerHTML = "<font color='red'>Only avi or flv or mpg or swf are allowed</font>";
       					 Flag=1;
	      			}
				}

			
				else
				{			
					ObjErrDis = eval("S"+Obj[ObjCnt].htmlFor);
					ObjErrDis.innerHTML = "";				
				}
			}
		}
	}	
	if(Flag==1)
		return false;
	else
		return true;
}





/*function ChkSubCat()
{
		var cat=escape(document.getElementById("CatId").value);
		//alert(pdt)
  		objXMLHttpRequest.onreadystatechange=ChkSubCat_output;
		var Url = "../scategory.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('cat=' + cat); //Data - to be sent to the server......	
}

function ChkSubCat_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		if (objXMLHttpRequest.status == 200) 
		{
		document.getElementById("SubCatDet").innerHTML=objXMLHttpRequest.responseText
		objXMLHttpRequest.abort();
		} 
		
		else 
		{
		alert("Problem with the server response " + objXMLHttpRequest.statusText);
		}
		
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
		objXMLHttpRequest.abort()
		}		
	}
	
	else
	{
	document.getElementById("SubCatDet").innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}*/



function ChkCat()
{
		var br=escape(document.getElementById("BrandId").value);
		//alert(pdt)
		objXMLHttpRequest.onreadystatechange=ChkCat_output;
		var Url = "category.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('brand=' + br); //Data - to be sent to the server......	
}

function ChkCat_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		if (objXMLHttpRequest.status == 200) 
		{
		document.getElementById("CatDet").innerHTML=objXMLHttpRequest.responseText
		objXMLHttpRequest.abort();
		} 
		
		else 
		{
		alert("Problem with the server response " + objXMLHttpRequest.statusText);
		}
		
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
		objXMLHttpRequest.abort()
		}
		ChkMod()			
	}
	
	else
	{
	document.getElementById("CatDet").innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}


function ChkMod()
{
		var br=escape(document.getElementById("BrandId").value);
		var ca=escape(document.getElementById("CatId").value);
		if(ca=="")
		ca=""

		if(br=="")
		br=""
				
		//alert(br)
		Para = 'brand=' + br + '&category=' + ca
		//alert("Para is "+Para)
  		objXMLHttpRequest.onreadystatechange=ChkMod_output;
		var Url = "model.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('brand=' + br + '&category=' + ca); //Data - to be sent to the server......	
		objXMLHttpRequest.send(Para); //Data - to be sent 
}

function ChkMod_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
	//alert(objXMLHttpRequest.status)
		if (objXMLHttpRequest.status == 200) 
		{
		document.getElementById("ModDet").innerHTML=objXMLHttpRequest.responseText
		objXMLHttpRequest.abort();
		} 
		
		else 
		{
		alert("Problem with the server response " + objXMLHttpRequest.statusText);
		}
		
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
		objXMLHttpRequest.abort()
		}			
	}
	
	else
	{
	document.getElementById("ModDet").innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}




function ChkCat1()
{
		var br=escape(document.getElementById("BrandId1").value);
		//alert(pdt)
		objXMLHttpRequest.onreadystatechange=ChkCat1_output;
		var Url = "category1.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('brand=' + br); //Data - to be sent to the server......	
}

function ChkCat1_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		if (objXMLHttpRequest.status == 200) 
		{
			document.getElementById("CatDetinner").innerHTML=objXMLHttpRequest.responseText
			objXMLHttpRequest.abort();
		} 		
		else 
		{
			alert("Problem with the server response " + objXMLHttpRequest.statusText);
		}
		
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
		objXMLHttpRequest.abort()
		}
		ChkMod1()			
	}
	
	else
	{
	document.getElementById("CatDetinner").innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}


function ChkMod1()
{
		var br=escape(document.getElementById("BrandId1").value);
		var ca=escape(document.getElementById("CatId1").value);
		if(ca=="")
		ca=""

		if(br=="")
		br=""
				
		//alert(br)
		Para = 'brand=' + br + '&category=' + ca
		//alert("Para is "+Para)
  		objXMLHttpRequest.onreadystatechange=ChkMod1_output;
		var Url = "model1.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('brand=' + br + '&category=' + ca); //Data - to be sent to the server......	
		objXMLHttpRequest.send(Para); //Data - to be sent 
}

function ChkMod1_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
	//alert(objXMLHttpRequest.status)
		if (objXMLHttpRequest.status == 200) 
		{
		document.getElementById("ModDetinner").innerHTML=objXMLHttpRequest.responseText
		objXMLHttpRequest.abort();
		} 
		
		else 
		{
		alert("Problem with the server response " + objXMLHttpRequest.statusText);
		}
		
		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
		objXMLHttpRequest.abort()
		}			
	}
	
	else
	{
	document.getElementById("ModDetinner").innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}



function Search_Products(PgId,keywords,brandid,catid,scatid)
{
	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 = "keywords";
	Input.id = "keywords";
	Input.value = keywords;
	Form.appendChild(Input);
	//alert("hello")
	
	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 = "catid";
	Input.id = "catid";
	Input.value = catid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "scatid";
	Input.id = "scatid";
	Input.value = scatid;
	Form.appendChild(Input);
		
	document.body.appendChild(Form);
	Form.action = "pdt_search.asp";
	Form.method="post"
	Form.submit();
}


function viewquery(ty)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "qtype";
	Input.id = "qtype";
	Input.value = ty;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "query_list.asp";
	Form.method="post"
	Form.submit();
}

function UsrVal()
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "logtype";
	Input.id = "logtype";
	Input.value = 1;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "UsrVal.asp";
	Form.method="post"
	Form.submit();
}

function viewdispatch(rid)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DisRid";
	Input.id = "DisRid";
	Input.value = rid;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "view_dispatch_details.asp";
	Form.method="post"
	Form.submit();
}


function ChartBwsr()
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "logtype";
	Input.id = "logtype";
	Input.value = 0;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "UsrVal.asp";
	Form.method="post"
	Form.submit();
}

function chkPrice(pzid,dealr)
{//alert(pzid)
		if(document.getElementById("PDT_"+pzid).checked == true)
		{
			Para = "Pdt_Tmp=" + pzid + "&Dealer_tmp=" + dealr + "&pdt_stat=" + "1";
		}
		else if(document.getElementById("PDT_"+pzid).checked == false)
		{
			Para = "Pdt_Tmp=" + pzid + "&Dealer_tmp=" + dealr + "&pdt_stat=" + "0";
		}
		//alert(Para)	
		//var Pdt_Tmp = escape(pzid);
		//var Dealer_tmp = escape(Dealer_tmp);
		//Para = 'Pdt_Tmp=' + Pdt_Tmp + '&Dealer_tmp=' + Dealer_tmp + '&pdt_stat=' + pdt_stat
		objXMLHttpRequest.onreadystatechange=chkPrice_output;
		var Url = "product_priceSnd.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 chkPrice_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//alert(objXMLHttpRequest.responseText);
		if (objXMLHttpRequest.status == 200)
		{
			MsgStr = objXMLHttpRequest.responseText.split("*");
		//	alert(MsgStr[2])
			if(parseInt(MsgStr[0])==1)
			{
				//alert(MsgStr[2]);
				alert("Your Quota For Current Date Is Completed, You have to Contact Lookman For Further Details");
				document.getElementById("PDT_" + MsgStr[2]).checked = false
			}
			else if(parseInt(MsgStr[0])==2)
			{
		//		alert(MsgStr[1]);
			//	window.location.href ="Adminlog.asp"
			}
			else if(parseInt(MsgStr[0])==3)
			{
				//alert(MsgStr[1]);
				//alert(MsgStr[2])
				document.getElementById("PDT_" + MsgStr[2]).checked = false
			}
			else if(parseInt(MsgStr[0])==0)
			{
			//	alert(MsgStr[2]);							
			}
			else 
			{
				//alert(MsgStr[2]);							
			}	
		}
		else
		{
			alert("Problem with server response Try later or contact your software vendor");
		}	
		objXMLHttpRequest.abort();
	}	
	
}


function chkArr()
{
	var chkarValue
	
if(document.getElementById("chkbxArr").value != "")
	chkarValue = document.getElementById("chkbxArr").value.split(",")
	//for(i=0;i<chkarValue.length;i++)
	//alert(chkarValue[i])
}
//onClick="javascript:chkPrice('')"

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function suggest()
{
	if(Validation_SpnMsg())
		form1.submit();
}

function chkPrevYr(nid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "chkPrevYr";
	Input.id = "chkPrevYr";
	Input.value = nid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "ChartBwsr.asp";
	Form.method="post"
	Form.submit();
}

/*

		*/
function viewSelected()
{
	var mm
	mm = 1
	//Para = "mm=" + mm
	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)
				//alert(the_inputs[n].value)
				//Para = Para + "&"+the_inputs[n].id+"="+the_inputs[n].value
				Para = Para + "*,*" + the_inputs[n].id //+"="+the_inputs[n].value								
				vin++;									
			}			
		}			
	}
	//alert(Para)
	if(Para)
	{
		Form = document.createElement("form");
		Form.name = "frmSrch";
		Form.target="_blank"
		Form.id = "frmSrch";
	
		Input = document.createElement("input");
		Input.type = "hidden";
		Input.name = "Para";
		Input.id = "Para";
		Input.value = Para;
		Form.appendChild(Input);
		
		document.body.appendChild(Form);
		Form.action = "ViewAll.asp";
		//Form.target="_blank"
		//Form.target = "foobar:width={window.screen.width/2},height={myHeight},scrollbars,{(isResizable)?'resizable':''},status"
		Form.target = "foobar:width={myWidt},height={myHeight},scrollbars,{(isResizable)?'resizable':''},status"
		
		Form.method="post"	
		Form.onSubmit = createTarget(Form);
		Form.submit();
	}
	else
	{
		alert("No Items Selected")
	}
}

