//javascript Document //

 function show(val)
{
  
  	var dis=document.getElementById(val).style.display;
  	//alert(dis);
	if(dis=="none")
	{
  		document.getElementById(val).style.display="block";
		document.getElementById("showif").style.display="none";
	}
	else
		document.getElementById(val).style.display="none";	
}
function show1(val)
{
  show('plug');
  	var dis=document.getElementById(val).style.display;
  	//alert(dis);
	if(dis=="none")
  		document.getElementById(val).style.display="block";
	else
		document.getElementById(val).style.display="none";	
}
function validation(valu)
{
   if (valu != "loading")
{
 var name;
 var email;
 var comments;
 //name validation
 name=document.commentform.author.value;
 if(name == "")
 {
 alert("name should not be blank");
 document.commentform.author.focus(); 
 return false;
 }
 
// emaill-valdation --section
 email=document.commentform.email.value;
if(email == "")
 {
 alert("Email should not be blank");
 document.commentform.email.focus();  return false;
 }
   if(email != "")

 {



	if (email.length < 1 || email.length > 8000)



	{



		alert ("E-mail Address should be between 1 to 8000 number of digits. ");



		document.commentform.email.focus();  return false;



	}
	if (email.indexOf('@',0)  == -1 || email.indexOf('.',0)  == -1  )
	{
		alert ("E-mail Address should contain \'@\' and \'.\' characters. ");
		document.commentform.email.focus();  return false;
	}
	for(i=0; i<email.length; i++)
	{
		ch = email.substring(i,i+1);
		if((ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z') && (ch < '0' || ch > '9') && (ch !='_') && (ch !='-') && (ch !='@') && (ch  != '.') && (ch  != ',') && (ch  != ' '))
		{
		alert ("E-mail Address could be Alphanumeric only with \'@\', \'.\',hyphen, comma and underscore characters. ");
			document.commentform.email.focus();  return false;
		}
	}

  }

// comments -valdation
 comments=document.commentform.comment.value;
if(comments == "")
 {
 alert("Comments should not be blank");
 document.commentform.comment.focus();  return false;
 }
  }
return true;
}

