
function poporder(URL)
{

day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=yes,width=490,height=300,left = 0,top = 0');");
}
function openwindow(field,value){
	//alert(document.viewcart.chk_list.length);
	//var len;
	len = document.frm_cart.chk_list.length;
	//len=len+1;
	len2=0;
	//alert(len);
	for (i = 0; i < len; i++) 
			{
				var chkname	=	document.frm_cart.chk_list[i].checked;
				//alert(chkname);
					//alert(len2);
					if (chkname == false) 
						{
							len2 = len2 + 1;
						}
						
			}
			if(len == len2)
			{
				//alert(len2);
				alert("Please Select Atleast one");
				return false;
			}
			
document.frm_cart.action="viewcart.php?fun=del";
document.frm_cart.submit();

}

function opencart(rows)
{
		var len=document.frm_cart.ONE.length;
		
	   if(rows == 1)
	   {
			quantity = document.frm_cart.ONE.value;
			stockvalue = document.frm_cart.STOCK.value;
			original = document.frm_cart.STOCK1.value;
				if( (quantity == ""))
				{
					alert("Type the valid quantity");
						document.frm_cart.ONE.focus();
						document.frm_cart.ONE.value=document.frm_cart.STOCK1.value;
						return false;
				}
				else if((quantity == 0))
				{
					alert("Type the valid quantity");
						document.frm_cart.ONE.focus();
						document.frm_cart.ONE.value=document.frm_cart.STOCK1.value;
						return false;
				}
				
				else if(isNaN(quantity))
				{
					alert("Type the valid quantity");
							document.frm_cart.ONE.focus();
						document.frm_cart.ONE.value=document.frm_cart.STOCK1.value;
							return false;
				}
				else if((quantity.indexOf("-") >= 0))
				{
					alert("Type the valid quantity");
							document.frm_cart.ONE.focus();
						document.frm_cart.ONE.value=document.frm_cart.STOCK1.value;
							return false;
				}
				else if((quantity.indexOf(".") >= 0))
				{
					alert("Type the valid quantity");
							document.frm_cart.ONE.focus();
						document.frm_cart.ONE.value=document.frm_cart.STOCK1.value;
							return false;
				}
				else if((quantity > 65535))
				{
					alert("Type the valid quantity");
							document.frm_cart.ONE.focus();
						document.frm_cart.ONE.value=document.frm_cart.STOCK1.value;
							return false;
				}
/*				if(parseInt(quantity) > parseInt(stockvalue)){
					alert("Quantity is out of stock");
					document.frm_cart.ONE.focus();
						document.frm_cart.ONE.value=document.frm_cart.STOCK1.value;
					return false;
			}		 
*/	   }
		   else
		   {
			   var flag=0;
		  	for(var index=0;index<rows;index++)
			{
				
			quantity = document.frm_cart.ONE[index].value;
			stockvalue = document.frm_cart.STOCK[index].value;
			original = document.frm_cart.STOCK1[index].value;
			
				if( (quantity == ""))
				{
					alert("Type the valid quantity");
						document.frm_cart.ONE[index].focus();
						document.frm_cart.ONE[index].value=document.frm_cart.STOCK1[index].value;
						return false;
				}
				else if((quantity == 0))
				{
					alert("Type the valid quantity");
						document.frm_cart.ONE[index].focus();
						document.frm_cart.ONE[index].value=document.frm_cart.STOCK1[index].value;
						return false;
				}
				
				else if(isNaN(quantity))
				{
					alert("Type the valid quantity");
							document.frm_cart.ONE[index].focus();
						document.frm_cart.ONE[index].value=document.frm_cart.STOCK1[index].value;
							return false;
				}
				else if((quantity.indexOf("-") >= 0))
				{
					alert("Type the valid quantity");
							document.frm_cart.ONE[index].focus();
						document.frm_cart.ONE[index].value=document.frm_cart.STOCK1[index].value;
							return false;
				}
				else if((quantity.indexOf(".") >= 0))
				{
					alert("Type the valid quantity");
							document.frm_cart.ONE[index].focus();
						document.frm_cart.ONE[index].value=document.frm_cart.STOCK1[index].value;
							return false;
				}
				else if((quantity > 65535))
				{
						alert("Type the valid quantity");
						document.frm_cart.ONE[index].focus();
						document.frm_cart.ONE[index].value=document.frm_cart.STOCK1[index].value;
						return false;
				}
/*				if(parseInt(quantity) > parseInt(stockvalue)){
						alert("Quantity is out of stock");
						document.frm_cart.ONE[index].focus();
					document.frm_cart.ONE[index].value=document.frm_cart.STOCK1[index].value;
					return false;
				}
*/						
			}
		   }

}

function checkout_validation()
{

	if(document.checkout_frm.varEmail.value == "")
	{
		alert("Please enter the Email Address");
		document.checkout_frm.varEmail.focus();
		return false;
	}
	if (!validateEmail(document.checkout_frm.varEmail.value,1,1)) 
	 {
	 document.checkout_frm.varEmail.focus();
	 return false;
	 }
	if(document.checkout_frm.ConfirmEmail.value == "")
	{
		alert("Please enter the Confirm - Email Address");
		document.checkout_frm.ConfirmEmail.focus();
		return false;
	}
	if(document.checkout_frm.varEmail.value!= document.checkout_frm.ConfirmEmail.value)
	{
		alert("Please enter correct Confirm - Email Address");
		document.checkout_frm.ConfirmEmail.focus();
		return false;
	}
//------script for billing address --------------------------//
	if(document.checkout_frm.varFirstName.value == "")
	{
		alert("Please enter the First Name");
		document.checkout_frm.varFirstName.focus();
		return false;
	}
 	 	if(document.checkout_frm.CompanyName.value == "")
 	{
 		alert("Please enter the Company Name");
 		document.checkout_frm.CompanyName.focus();
 		return false;
 	}
	if(document.checkout_frm.varAddress.value == "")
	{
		alert("Please enter the Shipping Address");
		document.checkout_frm.varAddress.focus();
		return false;
	}
	if(document.checkout_frm.varCity.value == "")
	{
		alert("Please enter the City");
		document.checkout_frm.varCity.focus();
		return false;
	}
	if(document.checkout_frm.varState.value == "")
	{
		alert("Please enter the State");
		document.checkout_frm.varState.focus();
		return false;
	}
	if(document.checkout_frm.varCountry.value =="")
	{
		alert("Please enter the Country");
		document.checkout_frm.varCountry.focus();
		return false;
	}
	
	if(document.checkout_frm.varPostcode.value =="")
	{
		alert("Please enter the Post code");
		document.checkout_frm.varPostcode.focus();
		return false;
	}	
	if(isNaN(document.checkout_frm.varPostcode.value))
	{
		alert("Post Code Must be Numeric");
		document.checkout_frm.varPostcode.focus();
		return false;
	}
	if(document.checkout_frm.varPhoneNo.value == "")
	{
		alert("Please enter the Phone Number");
		document.checkout_frm.varPhoneNo.focus();
		return false;
	}
// 	if(isNaN(document.checkout_frm.varPhoneNo.value))
// 	{
// 		alert("Phone Number Must ber Numeric");
// 		document.checkout_frm.varPhoneNo.focus();
// 		return false;
// 	}
//--------------Code for shipping address section-------------------//
	if(document.checkout_frm.varShipFirstName.value == "")
	{
		alert("Please enter the First Name");
		document.checkout_frm.varShipFirstName.focus();
		return false;
	}
	
 	 	if(document.checkout_frm.varShipCompanyName.value == "")
 	{
 		alert("Please enter the company Name");
 		document.checkout_frm.varShipCompanyName.focus();
 		return false;
 	}
	if(document.checkout_frm.varShipAddress.value == "")
	{
		alert("Please enter the Shipping Address");
		document.checkout_frm.varShipAddress.focus();
		return false;
	}
	if(document.checkout_frm.varShipCity.value == "")
	{
		alert("Please enter the City");
		document.checkout_frm.varShipCity.focus();
		return false;
	}
	if(document.checkout_frm.varShipState.value == "")
	{
		alert("Please enter the State");
		document.checkout_frm.varShipState.focus();
		return false;
	}
	if(document.checkout_frm.varShipCountry.value =="")
	{
		alert("Please enter the Country");
		document.checkout_frm.varShipCountry.focus();
		return false;
	}
	
	if(document.checkout_frm.varShipZip.value =="")
	{
		alert("Please enter the Post code");
		document.checkout_frm.varShipZip.focus();
		return false;
	}	
	if(isNaN(document.checkout_frm.varShipZip.value))
	{
		alert("Post Code Must be Numeric");
		document.checkout_frm.varShipZip.focus();
		return false;
	}
	if(document.checkout_frm.varShipPhone.value == "")
	{
		alert("Please enter the Phone Number");
		document.checkout_frm.varShipPhone.focus();
		return false;
	}
// 	if(isNaN(document.checkout_frm.varShipPhone.value))
// 	{
// 		alert("Phone Number Must ber Numeric");
// 		document.checkout_frm.varShipPhone.focus();
// 		return false;
// 	}
if(document.checkoutformout_frm.payment_check[0].checked)
{
	if(document.checkoutformout_frm.card_type.value == "")
	{
		alert("Please choose the card type");
		document.checkoutformout_frm.card_type.focus();
		return false;
	}
	if(document.checkoutformout_frm.card_name.value == "")
	{
		alert("Please enter the name on card");
		document.checkoutformout_frm.card_name.focus();
		return false;
	}
	
	if(document.checkoutformout_frm.card_no.value == "")
	{
		alert("Please enter the card number");
		document.checkoutformout_frm.card_no.focus();
		return false;
	}
	if(isNaN(document.checkoutformout_frm.card_no.value))
	{
		alert("Card Number Must ber Numeric");
		document.checkoutformout_frm.card_no.focus();
		return false;
	}
	if(document.checkoutformout_frm.expiremnth.value == "")
	{
		alert("Please select the month");
		document.checkoutformout_frm.expiremnth.focus();
		return false;
	}
	if(document.checkoutformout_frm.expireyear.value == "")
	{
		alert("Please select the expiry year");
		document.checkoutformout_frm.expireyear.focus();
		return false;
	}
	if(document.checkoutformout_frm.cvv_code.value == "")
	{
		alert("Please enter the CVV Number");
		document.checkoutformout_frm.cvv_code.focus();
		return false;
	}
	if(isNaN(document.checkoutformout_frm.cvv_code.value))
	{
		alert("CVV Number Must ber Numeric");
		document.checkoutformout_frm.cvv_code.focus();
		return false;
	}
}
}

function validateEmail(addr,man,db) {
	if (addr == '' && man) {
	   if (db) alert('Email address is mandatory');
	   return false;
	}
	var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
	for (i=0; i<invalidChars.length; i++) {
	   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
		  if (db) alert('Email address contains invalid characters');
		  return false;
	   }
	}
	for (i=0; i<addr.length; i++) {
	   if (addr.charCodeAt(i)>127) {
		  if (db) alert("Email address contains non ascii characters.");
		  return false;
	   }
	}

	var atPos = addr.indexOf('@',0);
	if (atPos == -1) {
	   if (db) alert('Email address must contain an @');
	   return false;
	}
	if (atPos == 0) {
	   if (db) alert('Email address must not start with @');
	   return false;
	}
	if (addr.indexOf('@', atPos + 1) > - 1) {
	   if (db) alert('Email address must contain only one @');
	   return false;
	}
	if (addr.indexOf('.', atPos) == -1) {
	   if (db) alert('Email address must contain a period in the domain name');
	   return false;
	}
	if (addr.indexOf('@.',0) != -1) {
	   if (db) alert('period must not immediately follow @ in email address');
	   return false;
	}
	if (addr.indexOf('.@',0) != -1){
	   if (db) alert('period must not immediately precede @ in email address');
	   return false;
	}
	if (addr.indexOf('..',0) != -1) {
	   if (db) alert('two periods must not be adjacent in email address');
	   return false;
	}
	var suffix = addr.substring(addr.lastIndexOf('.')+1);
	if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
	   if (db) alert('invalid primary domain in email address');
	   return false;
	}
return true;
}
function subscriberfront_validation() {
	 if (document.Customersform.txt_name.value== "" )
		 { 
			 alert ("Please Enter your Name");
			 document.Customersform.txt_name.focus();
			 return false;
		 }
		 if (document.Customersform.txt_email.value== "" )
		 { 
			 alert ("Please Enter Your E-mail Address");
			 document.Customersform.txt_email.focus();
			 return false;
		 }
		  if (!validateEmail(document.Customersform.txt_email.value,1,1)) 
		 {
		 document.Customersform.txt_email.focus();
		 return false;
		 }
	
}

function tellfriendvalidate(){
	
	 if (document.frm_tell.fromname.value== "" )
		 { 
			 alert ("Please Enter your Name");
			 document.frm_tell.fromname.focus();
			 return false;
		 }
		 
		  if (document.frm_tell.frommail.value== "" )
		 { 
			 alert ("Please Enter Your E-mail Address");
			 document.frm_tell.frommail.focus();
			 return false;
		 }
		  if (!validateEmail(document.frm_tell.frommail.value,1,1)) 
		 {
		 document.frm_tell.frommail.focus();
		 return false;
		 }
		 
		 
	 if (document.frm_tell.name1.value== "" )
		 { 
			 alert ("Please Enter To Name");
			 document.frm_tell.name1.focus();
			 return false;
		 }
		 
		  if (document.frm_tell.email1.value== "" )
		 { 
			 alert ("Please Enter To E-mail Address");
			 document.frm_tell.email1.focus();
			 return false;
		 }
		  if (!validateEmail(document.frm_tell.email1.value,1,1)) 
		 {
		 document.frm_tell.email1.focus();
		 return false;
		 }
		 
		   if (document.frm_tell.Comments.value== "" )
		 { 
			 alert ("Please Enter Your Comments");
			 document.frm_tell.Comments.focus();
			 return false;
		 }
}





function checkoutformout_validation()
{

if(document.checkoutformout_frm.varEmail.value == "")
	{
		alert("Please enter the Email Address");
		document.checkoutformout_frm.varEmail.focus();
		return false;
	}
	if (!validateEmail(document.checkoutformout_frm.varEmail.value,1,1)) 
	 {
	 document.checkoutformout_frm.varEmail.focus();
	 return false;
	 }
	if(document.checkoutformout_frm.ConfirmEmail.value == "")
	{
		alert("Please enter the Confirm - Email Address");
		document.checkoutformout_frm.ConfirmEmail.focus();
		return false;
	}
	if(document.checkoutformout_frm.varEmail.value!= document.checkoutformout_frm.ConfirmEmail.value)
	{
		alert("Please enter correct Confirm - Email Address");
		document.checkoutformout_frm.ConfirmEmail.focus();
		return false;
	}
//------script for billing address --------------------------//
	if(document.checkoutformout_frm.varFirstName.value == "")
	{
		alert("Please enter the First Name");
		document.checkoutformout_frm.varFirstName.focus();
		return false;
	}
	if(document.checkoutformout_frm.varLastName.value == "")
	{
		alert("Please enter the Last Name");
		document.checkoutformout_frm.varLastName.focus();
		return false;
	}
	if(document.checkoutformout_frm.varAddress.value == "")
	{
		alert("Please enter the  Address");
		document.checkoutformout_frm.varAddress.focus();
		return false;
	}
	if(document.checkoutformout_frm.varCity.value == "")
	{
		alert("Please enter the City");
		document.checkoutformout_frm.varCity.focus();
		return false;
	}
/*		if(document.checkoutformout_frm.varState.value == "")
	{
		alert("Please select the State");
		document.checkoutformout_frm.varState.focus();
		return false;
	}
*/
	if(document.checkoutformout_frm.varCountry.value =="")
	{
		alert("Please Select your country");
		document.checkoutformout_frm.varCountry.focus();
		return false;
	}	
	
	if(document.checkoutformout_frm.varPostcode.value =="")
	{
		alert("Please enter the Zip Code");
		document.checkoutformout_frm.varPostcode.focus();
		return false;
	}	
	
	
	if(document.checkoutformout_frm.varPhoneNo.value == "")
	{
		alert("Please enter the Phone Number");
		document.checkoutformout_frm.varPhoneNo.focus();
		return false;
	}
/*	if(isNaN(document.checkoutformout_frm.varPhoneNo.value))
	{
		alert("Phone Number Must ber Numeric");
		document.checkoutformout_frm.varPhoneNo.focus();
		return false;
	}
*/	
	
	//--------------Code for shipping address section-------------------//
	if(document.checkoutformout_frm.varShipFirstName.value == "")
	{
		alert("Please enter the Shipping First Name");
		document.checkoutformout_frm.varShipFirstName.focus();
		return false;
	}
	
	if(document.checkoutformout_frm.varShipLastName.value == "")
	{
		alert("Please enter the Last Name");
		document.checkoutformout_frm.varShipLastName.focus();
		return false;
	}

	if(document.checkoutformout_frm.varShipAddress.value == "")
	{
		alert("Please enter the Shipping Address");
		document.checkoutformout_frm.varShipAddress.focus();
		return false;
	}
	if(document.checkoutformout_frm.varShipCity.value == "")
	{
		alert("Please enter the Shipping City");
		document.checkoutformout_frm.varShipCity.focus();
		return false;
	}
/*		if(document.checkoutformout_frm.varShipState.value == "")
	{
		alert("Please enter the Shipping State");
		document.checkoutformout_frm.varShipState.focus();
		return false;
	}
*/
	if(document.checkoutformout_frm.varCountry.value =="")
	{
		alert("Please Select your Shipping country");
		document.checkoutformout_frm.varCountry.focus();
		return false;
	}	
	
	if(document.checkoutformout_frm.varShipZip.value =="")
	{
		alert("Please enter the Shipping Zip Code");
		document.checkoutformout_frm.varShipZip.focus();
		return false;
	}	
	
	if(document.checkoutformout_frm.varShipPhone.value == "")
	{
		alert("Please enter the Shipping Phone Number");
		document.checkoutformout_frm.varShipPhone.focus();
		return false;
	}
/*	if(isNaN(document.checkoutformout_frm.varShipPhone.value))
	{
		alert("Shipping Phone Number Must ber Numeric");
		document.checkoutformout_frm.varShipPhone.focus();
		return false;
	}
*/	//--------------Code for Credit Card Information section-------------------//
	
	/*if(document.checkoutformout_frm.card_type.value == "")
	{
		alert("Please choose the card type");
		document.checkoutformout_frm.card_type.focus();
		return false;
	}
	if(document.checkoutformout_frm.card_name.value == "")
	{
		alert("Please enter the name on card");
		document.checkoutformout_frm.card_name.focus();
		return false;
	}
	
	if(document.checkoutformout_frm.card_no.value == "")
	{
		alert("Please enter the card number");
		document.checkoutformout_frm.card_no.focus();
		return false;
	}
	if(isNaN(document.checkoutformout_frm.card_no.value))
	{
		alert("Card Number Must ber Numeric");
		document.checkoutformout_frm.card_no.focus();
		return false;
	}
	if(document.checkoutformout_frm.expiremnth.value == "")
	{
		alert("Please select the month");
		document.checkoutformout_frm.expiremnth.focus();
		return false;
	}
	if(document.checkoutformout_frm.expireyear.value == "")
	{
		alert("Please select the expiry year");
		document.checkoutformout_frm.expireyear.focus();
		return false;
	}
	if(document.checkoutformout_frm.cvv_code.value == "")
	{
		alert("Please enter the CVV Number");
		document.checkoutformout_frm.cvv_code.focus();
		return false;
	}
	if(isNaN(document.checkoutformout_frm.cvv_code.value))
	{
		alert("CVV Number Must ber Numeric");
		document.checkoutformout_frm.cvv_code.focus();
		return false;
	}*/
	
	


}

function contactvalidation(){
	 var first= document.contact.firstname.value;
		 if (first== "" )
		 { 
			 alert ("Please enter Your  Name");
			 document.contact.firstname.focus();
			 return false;
		 }
/*		  var lastname= document.contact.lastname.value;
		 if (lastname== "" )
		 { 
			 alert ("Please enter Your Last name");
			 document.contact.lastname.focus();
			 return false;
		 }
*/	   var Email= document.contact.email.value;
		 if (Email== "" )
		 { 
			 alert ("Please enter Your Email Address");
			 document.contact.email.focus();
			 return false;
		 }
		 if (!validateEmail(document.contact.email.value,1,1)) 
		 {
		 document.contact.email.focus();
		 return false;
		 }
	/*	 var Phone= document.contact.phone.value;
		 if (Phone== "" )
		 { 
			 alert ("Please enter Your Phone Number");
			 document.contact.phone.focus();
			 return false;
		 }
	 if (isNaN(document.contact.phone.value))
		 { 
			 alert ("Phone Number must be Numeric");
			 document.contact.phone.focus();
			 return false;
		 }
*/		
		 var Message= document.contact.comments.value;
		 if (Message== "" )
		 { 
			 alert ("Please enter Your Message");
			 document.contact.comments.focus();
			 return false;
		 }
}
function member_reg(type)
{	
	 var firstname = document.CustomersForm.firstname.value;
	 if (firstname == "" )
	 { 
	 alert ("Please enter the First Name");
	 document.CustomersForm.firstname.focus();
	 return false;
	 }
	 var lastname = document.CustomersForm.lastname.value; 
	 if (lastname == "")
	 { 
	 alert ("Please enter the Last Name");
	 document.CustomersForm.lastname.focus();
	 return false;
	 }
	 var emailid = document.CustomersForm.emailid.value;
	 if (emailid == "")
	 { 
	 alert ("Please enter the Email Address");
	 document.CustomersForm.emailid.focus();
	 return false;
	 }	
	 if (!validateEmail(document.CustomersForm.emailid.value,1,1)) 
	 {
	 document.CustomersForm.emailid.focus();
	 return false;
	 }
	 var address1 = document.CustomersForm.address.value;
	 if (address1 == "" )
	 { 
	 alert ("Please enter the Address");
	 document.CustomersForm.address.focus();
	 return false;
	 }
	 var city=document.CustomersForm.city.value;
	 if (city=="" )
	 { 
	 alert ("Please enter the City Name");
	 document.CustomersForm.city.focus();
	 return false;
	 }
/*	 var state = document.CustomersForm.state.value;
	 if (state == "")
	 { 
	 alert ("Please Enter the State Name");
	 document.CustomersForm.state.focus();
	 return false;
	 }
*/	 	 var zipcode = document.CustomersForm.zipcode.value;
	 if (zipcode == "" )
	 { 
	 alert ("Please enter the Post Code");
	 document.CustomersForm.zipcode.focus();
	 return false;
	 }	
/*	 if (isNaN(document.CustomersForm.zipcode.value))
	 { 
	 alert ("Post Code must be numeric");
	 document.CustomersForm.zipcode.focus();
	 return false;
	 }	
*/	 var country=document.CustomersForm.country.value;
	 if (country == "")
	 { 
	 alert ("Please Choose Country");
	 document.CustomersForm.country.focus();
	 return false;
	 }
	 var phoneno = document.CustomersForm.phoneno.value;
	 if (phoneno == "")
	 { 
	 alert ("Please enter the Phone Number");
	 document.CustomersForm.phoneno.focus();
	 return false;
	 }	
/*	 if (isNaN(document.CustomersForm.phoneno.value))
	 { 
	 alert ("Phone Number must be numeric");
	 document.CustomersForm.phoneno.focus();
	 return false;
	 }	
*/	 
	 if(type != "edit")
	 {
		 var  Username= document.CustomersForm.username.value;
		 if (Username == "")
		 { 
		 alert ("Please enter the User Name");
		 document.CustomersForm.username.focus();
		 return false;
		 }	
		 var  password= document.CustomersForm.password.value;
		 if (password == "")
		 { 
		 alert ("Please enter the password");
		 document.CustomersForm.password.focus();
		 return false;
		 }	
		 var  confirmpass= document.CustomersForm.confirmpass.value;
		 if (confirmpass == "")
		 { 
		 alert ("Please enter the Confirm Password");
		 document.CustomersForm.confirmpass.focus();
		 return false;
		 }	
		 if (password != confirmpass)
		 { 
		 alert ("Password and Confirm Password must be the same");
		 document.CustomersForm.confirmpass.focus();
		 return false;
		 }	
	 }
		 
}
function login1_validation_left()
{
	//alert();
	var user = document.login_login.txtname.value;
	if( user == "" )
	{
		alert("Please enter the Username");
		document.login_login.txtname.focus();
		return false;
	}
	var pass = document.login_login.txtpass.value;
	if( pass == "" )
	{
		alert("Please enter the Password");
		document.login_login.txtpass.focus();
		return false;
	}
}
function pass_validate()
{
	     var Old = document.frm_change.Old.value;
		 if (Old == "" )
		 { 
			 alert ("Please enter Your Old Password");
			 document.frm_change.Old.focus();
			 return false;
		 }
		 var Password = document.frm_change.Password.value;
		 if (Password == "" )
		 { 
			 alert ("Please enter Your New Password");
			 document.frm_change.Password.focus();
			 return false;
		 }
		 var Conpassword = document.frm_change.Conpassword.value;
		 if (Conpassword == "" )
		 { 
			 alert ("Please enter Your Confirm Password");
			 document.frm_change.Conpassword.focus();
			 return false;
		 }
		 var Conpassword = document.frm_change.Conpassword.value;
		 if (document.frm_change.Conpassword.value != document.frm_change.Password.value)
		 { 
			 alert ("Paasword and Confirm Password must be same");
			 document.frm_change.Conpassword.focus();
			 return false;
		 }
}
