﻿// JScript File

function NumKeyAndDot(e) 
		{
		  var ikeyCode;
		   ikeyCode = e.keyCode;	
		   if((ikeyCode>=48 && ikeyCode<=57)||(ikeyCode==46))		  
		  {
		     return true;
		    
	   	  } 
	   	  else 
	   	  {
		   e.keyCode=8
	   	   return false;
		 }
	  }
	  function NumKey(e) 
		{
		  var ikeyCode;
		  ikeyCode = e.keyCode;	
		   if((ikeyCode>=47 && ikeyCode<=57) ||(ikeyCode==43)||(ikeyCode==45)||(ikeyCode==46)||(ikeyCode==32))
		  {
		     return true;
	   	  } 
	   	  else 
	   	  {
		   e.keyCode=8
	   	   return false;
		 }
	  }
	  
	   function keylck(e)
	  {
		  var ikeyCode;
		  ikeyCode = e.keyCode;	
		   if((ikeyCode!=39))
		  {
		     return true;
	   	  }
	   	  else
	   	  { 	   	
		   e.keyCode=8
	   	   return false;
		 }
	  } 
	  
	  
//			  function addprdct()
//			  {			  
//					alert("This Product will be Added to Enquiry Basket");					
//						
//			  }		 
			
			  function validate(ab)
			  {
			    var doc = document.forms[0];
				if ((doc.txtsid.value) == 0)
				{
					alert("Please SignUp to be a Registered Member");
					return false;
				}
				else
				{
				window.open('Enqrylst.aspx?xy='+ab+'','mywindow','width =550,height=500,menubar=no,status=yes,scrollbars=yes')		 
					return true;
				}				
			 }
			 
			 function newpge(x)
			 {			 
			 window.open('Products.aspx?xy='+x+'','mywindow','width =700,height=500,menubar=no,status=yes,scrollbars=yes')	 
             }
			 
			 function bigimg(x,y)
			 {			
			 window.open('bigimage.aspx?LMID='+x+'&yz='+y+'','mywindow','width =700,height=500,menubar=no,status=yes,scrollbars=yes')			 
			 }
			 
			 function viewpge(x)
			 {			 
			 window.open('Quote.aspx?xy='+x+'','mywindow','width =600,height=400,menubar=no,status=yes,scrollbars=yes')
			 }
			 
			 function frgtpswrd()
			 {			 
			 window.open('Frgtpswrd.aspx','mywindow','width =450,height=200,menubar=no,status=yes')
			 }
			 
			 function Rgstrdmsg()
			 {
			    var dct = document.forms[0];
				if ((dct.txtusrid.value) == 0&&(dct.txtpswrd.value) == 0)
			    {
			     return false;
				}
			    else 
                if ((dct.txtsnid.value) == 0)
				{
				alert("You have Registered Successfully With Girkar Brothers Audio Pvt.Ltd.!!!");
				return true;				
				}
				else if ((dct.txtsnid.value) != 0)
				{
				alert("Your Profile has Updated Successfully With Girkar Brothers Audio Pvt.Ltd.!!!");
				return true;				
				}
			  }
			 
			 function pgopen()
              {
              opener.location.reload('sendquote.aspx');
              self.close();
              }
	  
//	  function SelectAllCheckboxes(spanChk)
//				{
//					var xState=spanChk.checked;
//					var theBox=spanChk;
//					elm=theBox.form.elements;
//					for(i=0;i<elm.length;i++)
//					if(elm[i].type=="checkbox" && elm[i].id!=theBox.id)
//						{
//						//elm[i].click();
//						if(elm[i].checked!=xState)
//						elm[i].click();
//						//elm[i].checked=xState;
//						}
//				}
//				
//				function HighlightRow(chkB)	
//				{
//					var xState=chkB.checked;
//						
//						if(xState)
//						{
//							chkB.parentElement.parentElement.style.backgroundColor='lightcoral';
//							chkB.parentElement.parentElement.style.color='white'; 
//						}
//						else 
//						{	
//							chkB.parentElement.parentElement.style.backgroundColor='white'; 
//							chkB.parentElement.parentElement.style.color='black'; 
//						}
//				}	
//function InvokePop(fname)

//{
//   val = document.getElementById(fname).value;

// window.showModalDialog("Products.aspx?xy="+ val ,'Show Popup Window',"dialogHeight:400px,dialogWidth:400px,resizable:yes,center:yes,");

//} 

//}			