function verifyTips(f) { ref=document.forms[f].elements; snamn_h3=document.getElementById('snamnh3'); semail_h3=document.getElementById('semailh3'); rnamn_h3=document.getElementById('rnamnh3'); remail_h3=document.getElementById('remailh3'); snamn_h3.style.color = semail_h3.style.color = rnamn_h3.style.color = remail_h3.style.color = '#7d7d7c'; if ( (ref['Snamn'].value.length<3)) { snamn_h3.style.color = 'red'; ref['Snamn'].focus(); alert('Your name is to short.'); return false; } if ( (ref['Snamn'].value.length>20)) { snamn_h3.style.color = 'red'; ref['Snamn'].focus(); alert('Your name is to long.'); return false; } if (ref['Semail'].value.length<6) { semail_h3.style.color = 'red'; ref['Semail'].focus(); alert('Your email is to short.'); return false; } if (ref['Semail'].value.length>100) { semail_h3.style.color = 'red'; ref['Semail'].focus(); alert('Your email is to long.'); return false; } if (ref['Semail'].value.indexOf('@')<0) { semail_h3.style.color = 'red'; ref['Semail'].focus(); alert('Your email has no @-sign in it.'); return false; } if (ref['Semail'].value.indexOf('.')<0) { semail_h3.style.color = 'red'; ref['Semail'].focus(); alert('Your email has no dot in it.'); return false; } if ( (ref['Rnamn'].value.length<3)) { rnamn_h3.style.color = 'red'; ref['Rnamn'].focus(); alert('Your friends name is to short.'); return false; } if ( (ref['Rnamn'].value.length>20)) { rnamn_h3.style.color = 'red'; ref['Rnamn'].focus(); alert('Your friends name is to long.'); return false; } if (ref['Remail'].value.length<6) { remail_h3.style.color = 'red'; ref['Remail'].focus(); alert('Your friends email is to short.'); return false; } if (ref['Remail'].value.length>100) { remail_h3.style.color = 'red'; ref['Remail'].focus(); alert('Your friends email is to long.'); return false; } if (ref['Remail'].value.indexOf('@')<0) { remail_h3.style.color = 'red'; ref['Remail'].focus(); alert('Your email has no @-sign in it.'); return false; } if (ref['Remail'].value.indexOf('.')<0) { remail_h3.style.color = 'red'; ref['Remail'].focus(); alert('Your email has no dot in it.'); return false; } return true; } function verifyNewUser(f) { ref=document.forms[f].elements; h3lref=document.getElementById('h3l'); h3eref=document.getElementById('h3e'); h3p1ref=document.getElementById('h3p1'); h3p2ref=document.getElementById('h3p2'); h3lref.style.color = h3eref.style.color = h3p1ref.style.color = h3p2ref.style.color = '#7d7d7c'; if ( (ref['nick'].value.length<3)) { h3lref.style.color = 'red'; ref['nick'].focus(); alert('Your login is to short.'); return false; } if ( (ref['nick'].value.length>20)) { h3lref.style.color = 'red'; ref['nick'].focus(); alert('Your login is to long.'); return false; } if (ref['email'].value.length<6) { h3eref.style.color = 'red'; ref['email'].focus(); alert('Your email is to short.'); return false; } if (ref['email'].value.length>100) { h3eref.style.color = 'red'; ref['email'].focus(); alert('Your email is to long.'); return false; } if (ref['email'].value.indexOf('@')<0) { h3eref.style.color = 'red'; ref['email'].focus(); alert('Your email has no @-sign in it.'); return false; } if (ref['email'].value.indexOf('.')<0) { h3eref.style.color = 'red'; ref['email'].focus(); alert('Your email has no dot in it.'); return false; } if (ref['password1'].value.length<4) { h3p1ref.style.color = 'red'; ref['password1'].focus(); alert('Your password is to short.'); return false; } if (ref['password1'].value.length>15) { h3p1ref.style.color = 'red'; ref['password1'].focus(); alert('Your password is to long.'); return false; } if (ref['password1'].value != ref['password2'].value) { h3p1ref.style.color = 'red'; h3p2ref.style.color = 'red'; ref['password1'].focus(); alert('Your passwords are different.'); return false; } alert('Your account is being made.'); return true; }