window.onload = function(){
if(document.getElementById('s')!=null)
{
	if(document.getElementById('s').value=="")
	{
		document.getElementById('s').value="Search";
	}
}
}

function checkSearch()
{
 var errmsg="", strKey=document.getElementById('s').value;
 if(strKey=="" || strKey=="Search")
  errmsg = "Input your search keyword.";	
 if(errmsg!="")
 {
  alert(errmsg);
  return false;
 }
 document.searchform.submit();
 return true;  
}
function checkComment()
{
 var errmsg="", strComment=document.getElementById('comment').value;
 
 if(strComment=="" || strComment=="Comments / Feedback (required)")
     errmsg = "Input your comment. \n ";

 if(document.getElementById('author')!=null)
 {
	 strAuthor=document.getElementById('author').value;
     if(strAuthor=="" || strAuthor=="Name (required)")
     	errmsg = errmsg + "Input your name. \n ";	 
 }

 if(document.getElementById('email')!=null)
 {
	 strEmail=document.getElementById('email').value;
     if(strEmail=="" || strEmail=="E-mail (required)")
     	errmsg = errmsg + "Input your e-mail address. \n ";	 
 }
 
 if(errmsg!="")
 {
  alert("Unable to add your comment, please check the following: \n "+errmsg);
  return false;
 }

 document.commentform.submit();
 return true;
}