// JavaScript Document

// <script type="text/javascript" src="password.js"></script><br />// 
// <form name=passwordForm>Type the password:<br />// 
// <input type=text name=passwd onkeyup="testPassword(document.forms.passwordForm.passwd.value)" size="30" />// 
// <div id="testpwd"></div>// 
// </form>// 
//  www.marketingtechblog.com/2007/04/16/form-validation-javascript  // 
//  www.geekwisdom.com/dyn/passwdmeter  // 


function testFinalWord(passwd)
{
		var intScore   = 0
		var strVerdict = "Venuelink"
		var strLog     = ""
		
		// PASSWORD LENGTH
		if (passwd.length<2)                         // length 4 or less
		{
			intScore = (intScore+1)
			strLog   = strLog + "Press button when ready to Send ..."
		}
		else if (passwd.length>1 && passwd.length<7) // length between 2 and 6
		{
			intScore = (intScore+5)
			strLog   = strLog + "Let us know what you have in mind \n"
		}
		else if (passwd.length>6 && passwd.length<16) // length between 7 and 15
		{
			intScore = (intScore+10)
			strLog   = strLog + "Have we your correct phone number? \n"
		}
		else if (passwd.length>15)                    // length 16 or more
		{
			intScore = (intScore+20)
			strLog   = strLog + "Press button when ready to Send ... \n"
		}
		
		
	
		if(intScore <5)
		{
		   strVerdict = "<span style='color:#ff0000'>Tell us what you are looking for</span>"
		}
		else if (intScore >4 && intScore <10)
		{
		   strVerdict = "<span style='color:#0000ff'>If you've an alternative phone number, or a preference about when to call, put it here </span>"
		}
		else if (intScore >9 && intScore <20)
		{
		   strVerdict = "<span style='color:#009900'>Thank you</span>"
		}
		else if (intScore >19 && intScore <21)
		{
		   strVerdict = "<span style='color:#781351'><font class='v'>Venue</font><font class='l'>Link</font> are waiting<br /> to hear from you</span>"
		}
		else
		{
		   strVerdict = "<span style='color:#009900'>Press the button when you are ready to send your message</span>"
		}
	document.getElementById('msgcontent').innerHTML = (strVerdict)
//  	document.getElementById('testlog').innerHTML = (strLog)  //
	document.getElementById('testpwd').innerHTML = (strLog)
}
