curImg=12;
MaxTxtLen=100;
FreeTxt="";
FID="";
if(FID!=""){fairySel(FID);}
TextLen();
function clrTxt(ta){
var patt=new RegExp("Text entered here");
if (patt.test(ta.value)==true){ ta.value=""}
TextLen();
}
function TextLen(){
//alert("Check Text Len");
frTxt=document.getElementById("freeTxt");
txln=document.getElementById("txlen");
TxtLen=frTxt.value.length;
txln.innerHTML="Freestyle Text: " +TxtLen+ " Characters (max=100)";
if(TxtLen>MaxTxtLen){
frTxt.value=FreeTxt;
}else{FreeTxt=frTxt.value;}
}
function fairyVw(){
nwin=window.open('FairyViewer.php','fryVwr',
'height=450,width=430,left=300,top=100,status=0,location=0,menubar=0,toolbar=0');
}
function fairySel(FID){
//alert (FID);
curTxt='txt' + curImg;
newTxt='txt' + FID;
curEnd='end' + curImg;
newEnd='end' + FID;
document.getElementById(curImg).className='hide';
document.getElementById(curTxt).className='hide';
document.getElementById(curEnd).className='hide';
curImg=curImg-1;
if(curImg==0){curImg=imgCnt;}
document.getElementById(FID).className='show';
document.getElementById(newTxt).className='show';
document.getElementById(newEnd).className='show';
curImg=FID;
}
function verifyRequired() {
if (document.UTFLetter["ChildName"].value == "") {
document.UTFLetter["ChildName"].focus();
alert("The ChildName field is required.");
return false;
}
if (document.UTFLetter["Email"].value == "") {
document.UTFLetter["Email"].focus();
alert("The Email field is required.");
return false;
}
if (document.UTFLetter["FirstName"].value == "") {
document.UTFLetter["FirstName"].focus();
alert("The First Name field is required.");
return false;
}
if (document.UTFLetter["LastName"].value == "") {
document.UTFLetter["LastName"].focus();
alert("The Last Name field is required.");
return false;
}
if (document.UTFLetter["Addr"].value == "") {
document.UTFLetter["Addr"].focus();
alert("The Address field is required.");
return false;
}
if (document.UTFLetter["City"].value == "") {
document.UTFLetter["City"].focus();
alert("The City field is required.");
return false;
}
if (document.UTFLetter["State"].selectedIndex == 0) {
document.UTFLetter["State"].focus();
alert("The State field is required.");
return false;
}
if (document.UTFLetter["Zip"].value == "" || isNaN(document.UTFLetter["Zip"].value) )
{
document.UTFLetter["Zip"].focus();
alert("The Zip field is required and must be numeric.");
return false;
}
return true;
}