/* Copyright: Copyright (c) 2008 http://ramui.com. All rights reserved.
This product is protected by copyright and distributed under licenses restricting copying, distribution. Permission is granted to the public to download and use this script provided that this Notice and any statement of authorship are reproduced in every page on all copies of the script. */
function generatePW()
{
var i=0;
var s="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_?/:(){}[]0123456789";
var pw="";
var c=(Math.random() * 3)+9;
for (i=0; i<c; i++)
{
pw+=s.charAt(Math.random() * 72);
}
document.frmInstall.setpassword.value=pw;}
function validateForm(o){
var errors=fw_checkuser(fw_trim(o.setname.value));
errors+=fw_checkpassword(fw_trim(o.setpassword.value));
var str=fw_trim(o.setto.value);
if (!((str.indexOf(".") > 0) && (str.indexOf("@") > 0)&&(str.length < 320))){
errors+='Enter correct email id\n'; }
str=fw_trim(o.setreply_from.value);
if ((str.indexOf(".") > 0) || (str.indexOf("@") > 0)){
errors+='Reply from: Use only alphanumeric characters\n'; }
if ((str.length <2)||(str==null)||(str>15)){
errors+='Reply from: Put value between 2 to 15 characters\n';}
if (errors){
alert('The following error(s) occurred:\n'+errors);
return false; }
return true;
}
