// JavaScript Document

function skey_valid(){
  
  /*var a=document.skey.pkeyword.value
      //a=a.trim
  var b=a.length
  if (b<3){
    alert("Please input atleast 3 alphabets")
    document.skey.pkeyword.focus()
    return false
  }else{
    return true
  }*/
  
  if(!validate_text(document.skey.pkeyword,1,"Please enter the search Keyword")){
	  return false;
  }
  
  //[exclude \ / : * ? " < > | . space]
  
  if (/^[^\\\/\:\*\?\"\<\>\|\.\+\-]+$/.test(document.skey.pkeyword.value)) {
	// no code  
  }else{
	  alert("This keyword is invalid");
	  document.skey.pkeyword.focus();
	  return false;
  }	
	
	return true;
}

function oopp() {
  var a=window.open("pass.php","Pass","width=430px, height=200px, top=10px, left=10px")
} 
function add_ct(aa,bb,cc)
	{
	  location.href="add_cart.php?id="+aa+"&pname="+bb+"&att_no="+cc
	}
function news_check(){
     
	 if(!validate_text(document.news_ff.nname,1,"Please enter your Name")){
	    return false;
	 }	 
	 
	 
	 if(!validate_email(document.news_ff.nemail,1,"Please enter your Email Address")){
	    return false;
	 }
	
     return true;
   }
   
function order_det(aa)
   {  
	var url = 'admin/order_det.php?ucode='+aa;
	var ttl = 'Order';
	var params = 'status=yes, resizable=yes ,width=650px, height=485px, top=10px, left=10px, scrollbars=yes';
	window.open(url, ttl, params);
   }   
   
function checkk(){
 
 if(!validate_text(document.dff1.t1,1,"Please enter your Username or Email")){
	 return false;
 }
 
 if(!validate_text(document.dff1.t2,1,"Please enter your Password")){
	 return false;
 } 

 return true;
}

function a_checkk(){
 
 if(!validate_text(document.a_dff1.t1,1,"Please enter your Username or Email")){
	 return false;
 }
 
 if(!validate_text(document.a_dff1.t2,1,"Please enter your Password")){
	 return false;
 } 

 return true;
}