//  EyeCreate's Javascript code, copyright 1999
//  Meta Tag generation script 
//  Feel free to borrow and modify this javascript, 
//  but be sure leave this credit in the source!  
//                    -Ken Tuck-    
//        http://www.eyecreate.net/

function make() {
var title = document.metaForm.title.value
var description = document.metaForm.des.value
var keywords = document.metaForm.key.value
var mtf = document.metaForm
var titleopen = '<title>'
var titleclose = '</title>\n'
var de = '<meta name="description" content="' + description + '">\n'
var ke = '<meta name="keywords" content="' + keywords + '">'

if (title.length<2){
alert("Please fill out the title box");
mtf.title.focus();
return false
        }
if (title.length>121){
alert("You have over 120 characters in the title box\n\nTry to shorten your webpage title.");
mtf.title.focus();
return false
        }
if (description.length<2){
alert("Please fill out the description box");
mtf.des.focus();
return false
        }
if (description.length>255){
alert("You have over 255 characters in the description box\n\nTry to shorten the description.");
mtf.des.focus();
return false
        }
if (keywords.length<2){
alert("Please fill out the keywords box");
mtf.key.focus();
return false
        }
if (keywords.length>1000){
alert("You have over 1000 characters in the keyword box\n\nDelete the less relevant keywords and try again.");
mtf.key.focus();
return false
        }
else {
mtf.metaTag.value += (''+titleopen+''+title+''+titleclose+'')
mtf.metaTag.value += ("" + de + "");
mtf.metaTag.value += ("" + ke + "");
mtf.metaTag.focus()
mtf.metaTag.select()
       } 
return true
}

function countChar(){
strLength=document.metaForm.title.value
strLength1=document.metaForm.des.value
strLength2=document.metaForm.key.value
if(strLength!=null){
document.metaForm.countIt.value = strLength.length
    }
if(strLength!=null){
document.metaForm.countIt1.value = strLength1.length
    }
if(strLength2!=null){
document.metaForm.countIt2.value = strLength2.length
    }
}
document.onkeyup = countChar
