// JavaScript Document

<!--delete Confirmations start-->
			function confirm_delete(){
			// alert("nsdhjsdfjskdsk");
			var input=confirm(" Are you sure you want to delete");
			if(input==true){
			return true;
			 }else{ 
			return false;
			}
			 }
	
<!--delete Confirmations end-->		


//newsletter validation start 

function newslettercheck()
{
	with(window.document.newsletter){
		if(name.value=="")		
		    {
			alert("Enter Your Name !");
			name.focus();
			return(false);
			}

		if(email.value=="")		
		    {
			alert("Enter Your Email !");
			email.focus();
			return(false);
			}
	   		
  var str = new String(email.value);
  var isOK = true;
  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
  if( rExp.test(str) )
    isOK = false;
  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
    isOK = false;
  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
    isOK = false;
  if( str.slice(0,str.indexOf('@')).length < 1 )
    isOK = false;
  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
    isOK = false;

  if( !isOK ){    alert( "Invalid Email" );
  email.value="";
email.focus();

  return isOK;
  return false;
  }

	   }
}
   
	//newsletter validation end
	
	
	
//addblog validation start 

function blogcheck()
{
	with(window.document.frm1){
		if(title.value=="")		
		    {
			alert("Enter Blog Title !");
			title.focus();
			return(false);
			}
		if(details.value=="")		
		    {
			alert("Enter Blog Details !");
			details.focus();
			return(false);
			}	
			if(name.value=="")		
		    {
			alert("Enter Your Name !");
			name.focus();
			return(false);
			}	
		if(contact.value=="")		
		    {
			alert("Enter Your Contact No. !");
			contact.focus();
			return(false);
			}		

		if(email.value=="")		
		    {
			alert("Enter Your Email !");
			email.focus();
			return(false);
			}
	   		
  var str = new String(email.value);
  var isOK = true;
  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
  if( rExp.test(str) )
    isOK = false;
  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
    isOK = false;
  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
    isOK = false;
  if( str.slice(0,str.indexOf('@')).length < 1 )
    isOK = false;
  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
    isOK = false;

  if( !isOK ){    alert( "Invalid Email" );
  email.value="";
email.focus();

  return isOK;
  return false;
  }

	   }
}
   
	//addblog validation end
	
	
	
//addcomments validation start 

function commentscheck()
{
	with(window.document.frm_comments){
		if(name.value=="")		
		    {
			alert("Enter Your Name !");
			name.focus();
			return(false);
			}
		if(contact.value=="")		
		    {
			alert("Enter Your Contact No. !");
			contact.focus();
			return(false);
			}
		if(email.value=="")		
		    {
			alert("Enter Your Email !");
			email.focus();
			return(false);
			}
	   		
  var str = new String(email.value);
  var isOK = true;
  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
  if( rExp.test(str) )
    isOK = false;
  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
    isOK = false;
  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
    isOK = false;
  if( str.slice(0,str.indexOf('@')).length < 1 )
    isOK = false;
  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
    isOK = false;

  if( !isOK ){    alert( "Invalid Email" );
  email.value="";
email.focus();

  return isOK;
  return false;
  }
if(comment.value=="")		
		    {
			alert("Enter Your Comments !");
			comment.focus();
			return(false);
			}
	   }
}
   
	//addcomments validation end

//contactus validation start 

function contactuscheck()
{
	with(window.document.contactus){
		if(name.value=="")		
		    {
			alert("Enter Your Name !");
			name.focus();
			return(false);
			}

		if(email.value=="")		
		    {
			alert("Enter Your Email !");
			email.focus();
			return(false);
			}
	   		
  var str = new String(email.value);
  var isOK = true;
  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
  if( rExp.test(str) )
    isOK = false;
  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
    isOK = false;
  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
    isOK = false;
  if( str.slice(0,str.indexOf('@')).length < 1 )
    isOK = false;
  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
    isOK = false;

  if( !isOK ){    alert( "Invalid Email" );
  email.value="";
email.focus();

  return isOK;
  return false;
  }

if(contactno.value=="")		
		    {
			alert("Enter Your Contact No !");
			contactno.focus();
			return(false);
			}
	if(query.value=="")		
		    {
			alert("Enter Your Query !");
			query.focus();
			return(false);
			}		
	   }
}
   
	//contactus validation end

