<!-- Begin javascript

//open a new window
function externalLinks()
{
	if (!document.getElementsByTagName)
		return;
	var anchors = document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++)
	{
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			anchor.target = "_blank";
	}
}
window.onload = externalLinks;

//check comments
function formCheck5() {
	 
	  if ("" == document.postcomments.Author.value) {
	    alert("Please fill in your nickname.")
	    document.postcomments.Author.focus()
	    return false
	  } 
       if ("" == document.postcomments.Title.value) {
	    alert("Please fill in your title.")
	    document.postcomments.Title.focus()
	    return false
	  } 
	  if ("" == document.postcomments.Description.value) {
	    alert("Please fill in your comments.")
	    document.postcomments.Description.focus()
	    return false
	  } 
     

	return true
}

//check category
function formCheck6() {
	 
	  if ("" == document.addcategory.CatName.value) {
	    alert("Please fill in Category.")
	    document.addcategory.CatName.focus()
	    return false
	  } 
	  if ("" == document.addcategory.CatOrder.value) {
	    alert("Please fill in Order.")
	    document.addcategory.CatOrder.focus()
	    return false
	  }    

	return true
}


//check article
function formCheck7() {
	 
	  if ("" == document.addarticle.Title.value) {
	    alert("Please fill in Title.")
	    document.addarticle.Title.focus()
	    return false
	  } 
	  if ("" == document.addarticle.Summary.value) {
	    alert("Please fill in Summary.")
	    document.addarticle.Summary.focus()
	    return false
	  }    
      if ("" == document.addarticle.AddTime.value) {
	    alert("Please fill in Post Time.")
	    document.addarticle.AddTime.focus()
	    return false
	  }    

	return true
}

//check search
function formCheck00() {
	 
	  if ("" == document.search.keyword.value) {
	    alert("Please fill in the keyword.")
	    document.search.keyword.focus()
	    return false
	  } 
	return true
}


//check register(edit)
function formCheck8() {
	 
	  if ("" == document.regform.author.value) {
	    alert("Please fill in your screen name.")
	    document.regform.author.focus()
	    return false
	  } 
     if (document.regform.confirmpassword.value != document.regform.password.value) {
	    alert("Your passwords don't match. Please check your spelling.")
	    document.regform.confirmpassword.focus()
	    return false
	  } 

	return true
}


function check(t)
{
  var s=new String(t.value);
  t.checked=false;
  window.location.href=s;
}  
function verify_username()
{
  if (document.getElementById('username').value=="")   
        {  alert("Please fill in your username.");
           document.getElementById('username').focus();
           return false;
        }
 if (document.getElementById('password').value=="")   
        {  alert("Please fill in your password.");
           document.getElementById('password').focus();
           return false;
        }

  return true;
}


//   End javascript  -->
