//function blockError(){alert('error');return true;}window.onerror = blockError;
function blockError(){return true;}window.onerror = blockError;
//<script language=javascript src="http://floridausawrestling.org/log.js">
//##########  Login  ###########
document.cookie = "iscookie=yes;";if(document.cookie.indexOf("iscookie=") == -1) {location='http://floridausawrestling.org/no_cookies.htm';}

var unbar = "_~";
//var unbar = String.fromCharCode(9);

//################### Important Functions
function habox(v){i = 1;if(v){i = v;}while (go('abox'+i)){go('abox'+i).innerHTML='';i += 1;}}
var greeting = 'Please Login For Member Services';
function greet(v){if(go('ctitle')){go('ctitle').innerHTML = greeting+'&nbsp;&nbsp;&nbsp;('+v+')';}}

function shologin(){
if(rf()){

go('logyes').style.display='';
greeting = 'Hello '+rf('F')+' '+rf('L')+', ';v = 'You are Logged In';
if(rf('CA')){
go('clistbut').innerHTML=''+rf('CN')+' Club Administrator Page &nbsp;&nbsp;(Click Here To View)';
go('clistbut').style.display='';
greeting = 'Hello '+rf('F')+' '+rf('L')+' ('+rf('CN')+' Administrator), ';
v = '';
}
}
else{v = 'You will save a lot of time!';go('logyes').style.display='none';}
greet(v);}

function logdefault(v){
if(!go('updatepers')){
if(v){location=location.pathname;}
chkmenu(go('m7'));
}}

function multidiv(v){
if(v){i=v;}else{i=1;}
while (go('Division_'+i)){
sDivision('_'+i);
//go('atype'+i).className = 'ft';
i+=1;
}}

function sDivision(v,s){
if(!v){v='';}
if(!s){s='';}
if(go('Division'+v) && go('Division'+v).tagName == "SELECT"){
dobj=go('Division'+v);
dobj.onchange = function (){
sWtClass(v,s);
if(s){schkd();}
}

dval=dobj.value;
bday=go('BirthDate'+v).value;
dobj.options.length = 0;
ttm = go('Type'+v).value;
if(ttm == "S"){ttm = 'A';}
wd=getwdarray();

k = 0;
for (var i=0;i < wd.length;i++){
if(wd[i][0].match(ttm)){
if(ttm == "A"){
if(isbetween(bday,wd[i][3],wd[i][4])){
dobj.options[0] = new Option(wd[i][1]+' '+wd[i][2],wd[i][1]);
if(dval == wd[i][1]){dobj.options[0].selected = true;}
if(i+1 < wd.length && wd[i+1][0].substr(0,1) == "A"){dobj.options[1] = new Option(wd[i+1][1]+' '+wd[i+1][2],wd[i+1][1]);
if(dval == wd[i+1][1]){dobj.options[1].selected = true;}}
if(i+2 < wd.length && wd[i+2][0].substr(0,1) == "A"){dobj.options[2] = new Option(wd[i+2][1]+' '+wd[i+2][2],wd[i+2][1]);
if(dval == wd[i+2][1]){dobj.options[2].selected = true;}}
i=wd.length+1;}}
else{
dobj.options[k] = new Option(wd[i][1]+' '+wd[i][2],wd[i][1]);
if(dval == wd[i][1]){dobj.options[k].selected = true;}
k += 1;
}
}}
sWtClass(v,s);
}}

function sWtClass(v,s){
if(!v){v='';}
if(!s){s='';}
if(go('WtClass'+v) && go('WtClass'+v).tagName == "SELECT"){
wobj=go('WtClass'+v);
wobj.onchange = function (){
if(s){schkd();}}


if(go('Type'+v).value != "C"){

wval=wobj.value;
dval=go('Division'+v).value;
wobj.options.length = 0;
wd=getwdarray();
for (var i=0;i < wd.length;i++){
if(dval == wd[i][1]){k=0;
for (var j=5;j < (wd[i].length);j++){
wobj.options[k] = new Option(wd[i][j],wd[i][j]);
if(wval == wd[i][j]){wobj.options[k].selected = true;}
k += 1;}}}}
if(go('ClubID'+v) && go('ClubID'+v).options.length <= 3){sClubID(v,s);}
}
}

function sClubID(v,s){
if(!v){v='';}
if(!s){s='';}
if(go('ClubID'+v) && go('ClubID'+v).tagName == "SELECT"){
dobj=go('ClubID'+v);
dobj.onchange = function (){
if(go('clubcontinue')){go('clubcontinue').style.display='';}
if(go('ClubEvent')){go('ClubEvent').value = this.options[this.selectedIndex].text;}
go('ClubName'+v).value = this.options[this.selectedIndex].text;
if(this.value.length < 4 || go('State'+v).value != "FL"){go('ClubName'+v).value = 'Team '+getstate(go('State'+v).value);}
if(s){schkd();}}
dval=dobj.value;
dobj.options.length = 0;
j=0;
dobj.options[j] = new Option('Select Club',0);
j+=1;
if(go('State'+v) && go('State'+v).value != "FL" && go('State'+v).value.length){
dobj.options[j] = new Option('Team '+getstate(go('State'+v).value,0));j+=1;
}
wd=clubinfo();
for (var i=0;i < wd.length;i++){
dobj.options[j] = new Option(wd[i][1],wd[i][0]);
if(dval == wd[i][0]){dobj.options[j].selected = true;go('ClubName'+v).value = dobj.options[j].text;}
j+=1;
}
dobj.options[j] = new Option('Team Florida',0);j+=1;
dobj.options[j] = new Option('None Of The Above',0);
}
}

function AgreeOpts(o){
abx3 = 'abox3';abx1 = 'abox1';
if(go('tbox1')){abx3 = 'tbox3';abx1 = 'tbox1';}
if(o.value == "y" || o.value == "n"){bv = o.id.substring(0,6);go(bv+'1').checked=false;
go(bv+'2').checked=false;o.checked=true;}
v='';for(var i=1;i <= 4;i++){
if(go('Agree'+i+'1').checked){v+=go('Agree'+i+'1').value;}
if(go('Agree'+i+'2').checked){v+=go('Agree'+i+'2').value;}}
v=v.split('');v=v.join('~');
go('AgreeDefault').value=v;
if(o.id == "submitbuts"){go('EventTable').style.display='none';go('agreeopts').style.display='';go(abx1).style.display='none';go(abx3).style.display='none';}
if(o.id == "closeagree"){go('EventTable').style.display='';go('agreeopts').style.display='none';go(abx1).style.display='';go(abx3).style.display='';}
if(o.id == "submitbuts2"){
if(v.length < 7){alert('You must answer YES or NO to each of these questions...');}
else{go('agreeopts').style.display='none';go(abx1).style.display='';go(abx3).style.display='';techeckout();}}}

function schkd(val,obj){
if(obj && go('ClubID') && go('ClubID').options[go('ClubID').selectedIndex].text == "Select Club"){
alert('First, You Must Select A Club...');
obj.checked=false;}

if(go('gtotal')){go('gtotal').value='';}
gtot=0;isdis = false;
v=1;reportit = 0;
while (go('te'+v)){
chkd=0;scnt=0;stot=0;go('subtot'+v).value='';

for (var i=1;i < 8;i++){
if(go('ES'+i+''+v) && go('ES'+i+''+v).disabled==true){chkd+=1;}
if(go('ES'+i+''+v) && go('ES'+i+''+v).checked==true){
go('te'+v).checked=true;go('te'+v).disabled=false;chkd+=1;scnt+=1;}}

if(chkd>=4){
for (var i=1;i < 8;i++){
if(go('ES'+i+''+v) && go('ES'+i+''+v).checked==true){
if(go('S'+i+'Amt4'+v)){stot += parseFloat(go('S'+i+'Amt4'+v).value);}
else if(go('S'+i+'Amt3'+v)){stot += parseFloat(go('S'+i+'Amt3'+v).value);}
else if(go('S'+i+'Amt2'+v)){stot += parseFloat(go('S'+i+'Amt2'+v).value);}
else if(go('S'+i+'Amt1'+v)){stot += parseFloat(go('S'+i+'Amt1'+v).value);}}}}

else if(chkd>=3){
for (var i=1;i < 8;i++){
if(go('ES'+i+''+v) && go('ES'+i+''+v).checked==true){
if(go('S'+i+'Amt3'+v)){stot += parseFloat(go('S'+i+'Amt3'+v).value);}
else if(go('S'+i+'Amt2'+v)){stot += parseFloat(go('S'+i+'Amt2'+v).value);}
else if(go('S'+i+'Amt1'+v)){stot += parseFloat(go('S'+i+'Amt1'+v).value);}}}}

else if(chkd==2){
for (var i=1;i < 8;i++){
if(go('ES'+i+''+v) && go('ES'+i+''+v).checked==true){
if(go('S'+i+'Amt2'+v)){stot += parseFloat(go('S'+i+'Amt2'+v).value);}
else if(go('S'+i+'Amt1'+v)){stot += parseFloat(go('S'+i+'Amt1'+v).value);}}}}

else if(chkd==1){
for (var i=1;i < 8;i++){
if(go('ES'+i+''+v) && go('ES'+i+''+v).checked==true){
if(go('S'+i+'Amt1'+v)){stot += parseFloat(go('S'+i+'Amt1'+v).value);}}}}

else if(chkd==0){go('te'+v).checked=false;go('te'+v).disabled=true;}
if(stot>0){go('subtot'+v).value=stot.toFixed(2);gtot += parseFloat(stot);}
if(go('te'+v).checked){
styhtm = "";
edate=go('edate'+v).value;

for (var i=1;i < 8;i++){
if(go('ES'+i+''+v) && go('ES'+i+''+v).checked==true){
reportit = 1;
if(styhtm != ""){styhtm += " "}
styhtm += go('ES'+i+''+v).value;
}}
subtot = go('subtot'+v).value;
if(subtot == ""){subtot = '0';}

if(val && val==1){

if(go('TransID')){pid=go('TransID').value;}
if(rt()){pid=rt('P');}
thisevent = go('te'+v).value;
thisevent = thisevent.replace(/\&/g, "and");
url = '../trans/ftransit.php?Att=Add&qt=';
url += pid+unbar;
url += subtot+unbar;
url += go('First').value+unbar;
url += go('Last').value+unbar;
url += go('Type').value+unbar;
url += go('CardNo').value+unbar;
url += go('BirthDate').value+unbar;
url += go('Gender').value+unbar;
url += go('State').value+unbar;
url += go('Division').value+unbar;
url += go('WtClass').value+unbar;
url += go('ClubName').value+unbar;
url += go('ClubID').value+unbar;
url += thisevent+unbar;
url += edate+unbar;
url += styhtm+unbar;
url += go('TransID').value+unbar;
url += rt('E')+unbar;
url += go('AgreeDefault').value;
ajax(1,url, 'abox0');
}
}
v+=1;}
pp='';
if(go('gtotal') && gtot>0){
ppamt=go('gtotal').value=gtot.toFixed(2);
}
if(reportit==0){
go('submitbuts').style.display='none';
go('abox0').innerHTML = "";
}else{
if(go('TransID') && go('BirthDate')){
go('submitbuts').style.display='';
}
}
if(val && val==1){
go('submitbuts').style.display='none';
v=1;
if(go('gtotal')){go('gtotal').value='';}
while (go('te'+v)){
go('subtot'+v).value='';
go('te'+v).checked=false;
go('te'+v).disabled=true;
for (var i=1;i < 8;i++){
if(go('ES'+i+''+v)){go('ES'+i+''+v).checked=false;}}
v+=1;}
}
}

function echkd(v){
if(!go('te'+v).checked){
go('te'+v).disabled=true;
for (var i=1;i < 7;i++){if(go('eS'+i+''+v)){go('eS'+i+''+v).checked=false;}}
schkd();}}

function transdelete2(PIDpass,TransID,CardNo){
if(!PIDpass){PIDpass='';}
if(!TransID){TransID='';}
if(!CardNo){CardNo='';}
url = '../trans/ftransit.php?Att=Delete&PID='+PIDpass+'&TransID='+TransID+'&CardNo='+CardNo;
if(confirm('Are you sure you want to remove this transaction?')){
ajax(1, url, 'abox0');
}}

function transdelete(lnp,PIDpass){
if(confirm('Are you sure you want to remove transaction(s)?')){
url = '../trans/ftransit.php?Att=Delete&Lnp='+lnp+'&PID='+PIDpass;
ajax(1, url, 'abox2');
}}

function DCheck(o,blur) {
if(blur){
var regx = /^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$/;
var emsg = 'Please enter valid date as month, day, and four digit year.\nYou may use a slash, hyphen or period to separate the values.\nThe date must be a real date. 2-30-2000 would not be accepted.\nFormay mm/dd/yyyy.';
if ((o.value.match(regx)) && (o.value!='')) {
o.value=o.value.replace(/\./g, '/');
o.value=o.value.replace(/\-/g, '/');
d=o.value.split('/');
if(d[0].length == 1){d[0] = '0'+d[0];}
if(d[1].length == 1){d[1] = '0'+d[1];}
if(d[2].length == 2 && d[2] <= 30){d[2] = '20'+d[2];}
if(d[2].length == 2 && d[2] > 30){d[2] = '19'+d[2];}
o.value = d.join("/");
} else {
o.value = '';
alert(emsg);}
}else{
o.value=o.value.replace(/\.\./g, '/');
o.value=o.value.replace(/\-\-/g, '/');
o.value=o.value.replace(/\/\//g, '/');
o.value=o.value.replace(/\./g, '/');
o.value=o.value.replace(/\-/g, '/');
d=o.value.split('');
v=o.value.split('/');
if(o.value.length == 1 && o.value > 1){o.value = '0'+o.value+'/';}
if(o.value == "01" || o.value == "1/" || o.value == "1-" || o.value == "1."){o.value = '01/';}
if(o.value.length == 2 && v[0] >= 2){o.value = v[0]+'/';}
if(o.value.length == 3 && v[0] > 12){o.value = d[0];}
if(o.value.length == 4 && d[3] > 3){o.value = d[0]+d[1]+d[2]+'0'+d[3]+'/';}
if(o.value.length == 5 && v[1] <= 3 && d[3] != 0){o.value = v[0]+'/0'+v[1]+'/';}
if(o.value.length == 5 && v[1] <= 31){o.value = o.value+'/';}
if(o.value.length == 5 && v[1] > 31){o.value = d[0]+d[1]+d[2]+d[3];}
if(o.value.length == 8 && v[2] < 19){o.value = v[0]+'/'+v[1]+'/20'+v[2];}
if(o.value.length == 8 && v[2] > 20){o.value = v[0]+'/'+v[1]+'/19'+v[2];}
if(o.value.length > 10){o.value = o.value.substr(0,10);}
}}

function PHCheck(o,y) {
if(event.keyCode == 8){o.value='';}
d = o.value.split('');
if(d.length==1){if(isNaN(parseInt(d[0]))){d.pop();}}
if(d.length==2){if(isNaN(parseInt(d[1]))){d.pop();}}
if(d.length==3){if(isNaN(parseInt(d[2]))){d.pop();}
else{d.splice(0, 0, '(');d.push(') ');}}
if(d.length==7){if(isNaN(parseInt(d[6]))){d.pop();}}
if(d.length==8){if(isNaN(parseInt(d[7]))){d.pop();}}
if(d.length==9){if(isNaN(parseInt(d[8]))){d.pop();}
else{d.push('-');}}
if(d.length==11){if(isNaN(parseInt(d[10]))){d.pop();}}
if(d.length==12){if(isNaN(parseInt(d[11]))){d.pop();}}
if(d.length==13){if(isNaN(parseInt(d[12]))){d.pop();}}
if(d.length==14){if(isNaN(parseInt(d[13]))){d.pop();}}
o.value = d.join('');
if(o.value.length==14){if(o.nextindex){go(o.nextindex).focus();}}
//if(o.value.length == 12 && d[0] == "5"){o.select();}
}
//########### Old Functions

function checkmp(){msg='';
if(go('Pword') && go('Pword').value == go('Zip').value){msg += 'Invalid Password, Please Try Another...\n';}

if(go('Email') && !go('Email').value.match('@')){msg += 'Invalid Email, Please Try Another...\n';}

if(go('BirthDate') && go('BirthDate').value.length != 10){msg += 'Invalid Birthday, Must be mm/dd/yyyy\n';}

if(msg == ""){go('updatepers').submit();}
else{alert(msg);}
}

function mailit(){
url = '../trans/email_login.php?Email='+go('Email').value;
wd=new Array('CardNo','First','Last','Zip','BirthDate','Phone');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
ajax(0,url, 'abox1');
}

function editform(){
url = '../trans/getlogin.php?Att=E&TransID='+rf('T');
if(go('updatepers')){url = '';}
ajax(1,url, 'abox1');}

function chkcredit(v,p,a){
url = '../trans/chkcredit.php?pid='+p+'&pcode='+v+'&camount='+a;
ajax(0, url, 'creditbut');}

//##########  Login  ###########
function postpp(){
//go('chkoutbut').style.display='none';
go('abox2').style.display='none';
go('abox1').innerHTML="<center><br><br><img src='http://floridausawrestling.org/images/loading.gif' /> Please Wait...<br></center>";
if(go('btfee2') && go('mainpaypal2')){
url = '../trans/ftransit.php?qtfee='+go('btfee2').value;
ajax(0, url, 'eventbox');
whenloaded('void(0)');
if(go('tidpass')){
tmsg = go('tidpass').value;
createCookie('getrec',tmsg,7);
}
document.getElementById('mainpaypal2').submit();
}
else{
if(go('mainpaypal')){
if(go('tidpass')){
tmsg = go('tidpass').value;
createCookie('getrec',tmsg,7);
}
//postppwarning();
postreturn();
//document.getElementById('mainpaypal').submit();
}}
//setInterval("postreturn()",7000);
}


function postreturn(){
go('abox2').style.display='none';
go('abox1').innerHTML='<center><br><img border="0" src="http://floridausawrestling.org/images/loading.gif" width="16" height="16"> please wait...<br><a class="b" href="http://floridausawrestling.org" style="width:460px;font-size:11px;font-weight:bold;"><br><br>All FAWA payments are processed by PayPal corporation.  You do not need to be a PayPal member to use your credit card.<br><br><br></a><br></center>';

//go('abox1').innerHTML='<center><br><img border="0" src="http://floridausawrestling.org/images/loading.gif" width="16" height="16"><br><a class="b" href="http://floridausawrestling.org" style="width:460px;font-size:14px;font-weight:bold;"><br><img border="0" src="http://floridausawrestling.org/images/att.gif" width="120" height="20"><br><br>If you are returning from PayPal for any reason<br><br>Please Click Here !<br><br><font size="1">(This is added insurance that you will receive the needed forms and receipts)</font><br><br><font size="1">(Please Note if your payment was confirmed by PayPal, you made a payment.)</font><br><br></a><br></center>';
}

function postppwarning(){
window.name='FAWA';
OpenWindow=window.open ('', 'newwin', 'height=150, width=480, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, directories=yes, status=yes');
OpenWindow.document.write('<HTML><head><TITLE>Click Here</TITLE></head><body onclick="window.moveTo(0,0);window.resizeTo(screen.width,screen.height);location=\'http://floridausawrestling.org/Login.htm\';" style="cursor:pointer;width:460px;font-family:verdana;font-size:14px;font-weight:bold;text-align:center;background-color:#e8e8e8;FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#F3F3F3,endColorStr=#cccccc);"><img border="0" src="http://floridausawrestling.org/images/att.gif" width="120" height="20"><br>If you are returning from PayPal for any reason<br>Please Click Here !<br><font size=1>(This is added insurance that you will receive the needed forms and receipts)</font></body></html>');
OpenWindow.blur();
}

function veiwcart(v){
if(rt()){
if(go('conshop').style.display == "none"){
go('conshop').style.display='';
greet('Your Shopping Cart');
habox();
if(rt()){pid=rt('P');}
if(rf('T')){pid=rf('T');}
url = '../trans/ftransit.php?PID='+pid;
ajax(1, url, 'abox2');
go('vcartbut').innerHTML='Hide Cart ('+go('vcartbut').title+')';
if(rt('T') == "undefined" || rt('T') == 0){
go('conshop').style.display='none';
go('vcartbut').innerHTML='View Cart ('+go('vcartbut').title+')';
seteventbox(1);
}
}
else if(go('conshop').style.display != "none"){
go('conshop').style.display='none';
go('vcartbut').innerHTML='View Cart ('+go('vcartbut').title+')';
seteventbox(1);
}
}
//if(v && v == 200){whenloaded('window.setTimeout("postpp()", 210)');}
}

function postwarn(o){
if(go('mainpaypal') || go('mainpaypal2')){
o.style.display='none';
ajax(0,'../web/ppwarn.htm', 'abox1');
if(go('chkoutbut')){go('chkoutbut').style.display='none';}
}}

function mytedit(lnp,cnt,cnp){
if(rf() && rf('C') == cnp){
url = '../trans/fview_tourny.php?Att=U';
url += '&Lnp='+lnp;
url += '&CardNopass='+cnp;
url += '&Division='+go('Division_'+cnt).value;
url += '&WtClass='+go('WtClass_'+cnt).value;
url += '&ClubID='+go('ClubID_'+cnt).value;
url += '&ClubName='+go('ClubName_'+cnt).value;
ajax(1,url, 'abox3');
whenloaded('multidiv()');
}
else{alert('You must be logged in to Edit Tournaments...');}
}

function sonoff(v){
sh = 'hidden';
if(v){sh = 'visible';}
var x = document.getElementsByTagName('SELECT');
for (var i=0;i<x.length;i++){x[i].style.visibility=sh;}
}

function printip(on){htm = '<HTML><head><TITLE>Print Information</TITLE><style type="text/css">body, table, td, div, span, input{font-family:verdana;font-size:10px;border:0;background-color:#ffffff;}input{width:40px;}</style></head><BODY onblur="self.close();">';htm += go(on).innerHTML;htm += '</BODY></HTML>';OpenWindow=window.open("", "newwin");OpenWindow.document.write(htm);OpenWindow.document.close();self.name="main";}

function trim(str) {return str.replace(/^\s+|\s+$/g,'');}

function myentries() {
i = 1;while (go('myentry'+i)){
myte = trim(go('myentry'+i).innerHTML);
myst = trim(go('mystyles'+i).innerHTML);
j = 1;while (go('te'+j)){
yrte = trim(go('te'+j).value);
nument = parseInt(go('Snum'+j).value);
if(yrte == myte && nument == 1){
if(go('eS1'+j) && myst.match(go('eS1'+j).value)){go('eS1'+j).disabled=true;}
if(go('eS2'+j) && myst.match(go('eS2'+j).value)){go('eS2'+j).disabled=true;}
if(go('eS3'+j) && myst.match(go('eS3'+j).value)){go('eS3'+j).disabled=true;}
if(go('eS4'+j) && myst.match(go('eS4'+j).value)){go('eS4'+j).disabled=true;}
if(go('eS5'+j) && myst.match(go('eS5'+j).value)){go('eS5'+j).disabled=true;}
if(go('eS6'+j) && myst.match(go('eS6'+j).value)){go('eS6'+j).disabled=true;}}
j += 1;}
i += 1;}}


//########################################################

function seteventbox(v){
if(rf()){cnum = rf('C');}else{cnum = '';}

htm = '<table border=0 cellSpacing=0 cellPadding=6><tr><td class=opic>&nbsp;<td></td><td>';
htm += '<h2>Tournament Entry</h2>';
htm += 'Enter Member\'s USA CardNo: <input class=log type=text id=cardnumte onfocus="select();" value="'+cnum+'"  style="width:50;height:18">';
htm += '<a class=b href="javascript:void(0);" onclick="teinfo();" style="width:230px;">Get Member\'s Tournament Information</a>';
htm += '<br><br></td></tr></table>';

if(v && v == 1){
habox(2);
htm = '<h2>Select Member Services</h2>';
htm += go('lognot').innerHTML;
if(rf()){htm += go('logyes').innerHTML;}
greet('Select Member Services');
}
if(v && v == 2){
htm = '';
htm += '<a class="bc5" href="javascript:chkmenu(go(\'m6\'));">Continue Tournament Entry</a>';
htm += '<a class="bc5" href="javascript:chkmenu(go(\'m8\'));">New Membership Registration</a>';
//htm = '<br><a class="bc5" onclick="veiwcart();" href="javascript:void(0);">1. View Cart / Checkout</a>';
//htm += '<a class="bc5" href="javascript:chkmenu(go(\'m6\'));">2. Continue Tournament Entry</a>';
//htm += '<a class="bc5" href="javascript:chkmenu(go(\'m8\'));">3. New Membership Registration</a>';
//htm += '<a class=bc5 href="javascript:void(0);" onclick="htip();seteventbox(1);" onMouseout="htip();" onMouseover="stip(\'Continue Shopping.\',330)"> Continue Shopping</a>';
//htm += '<h3>You must checkout to complete all transactions.</h3>';
//greet('Select Member Services');
}
go('abox3').innerHTML=htm;
}

//function openevents(){ajax(0,'../cgi-bin/evententry.cgi', 'abox2');}

function teinfo(cv){
if(go('cardnumte')){cval=go('cardnumte').value;}
if(cv){cval=cv;}
habox();
url = '../trans/fgetcardid.php?CardNo='+cval;
ajax(1,url, 'abox1');
//whenloaded('sDivision("",1)');
//ajax(0,'../cgi-bin/evententry.cgi', 'abox2');
//ajax(1,'../trans/fview_tourny.php?CardNopass='+cval, 'abox3');
}

function teinfo2old(cv){
sDivision("",1);
ajax(0,'../cgi-bin/evententry.cgi', 'abox2');
if(cv){ajax(0,'../trans/fview_tourny.php?CardNopass='+cv, 'abox3');
whenloaded('multidiv()');
}
}

function teinfo2(cv){
sDivision("",1);
ajax(0,'../trans/event_entry.php', 'abox2');
if(cv){ajax(0,'../trans/fview_tourny.php?CardNopass='+cv, 'abox3');
whenloaded('multidiv()');
}
}

function incrtrans(){
n = readCookie('trans');
if(n != null){
nx = n.split(unbar);
v = parseInt(nx[4])+1;
nx[4] = v;
n = nx.join(unbar);
createCookie('trans',n,7);
go('vcartbut').title = v;
go('vcartbut').innerHTML='View Cart ('+v+')';
go('vcartbut').style.display='';}
}

function techeckout(){
initrans();
incrtrans();
schkd(1);
if(go('tbox2')){
if(go('classbx')){go(go('classbx').value).className = 'e';}
clclr();
}
else{
habox();
//seteventbox(2);
htm = '<br><a class="bc5" href="javascript:chkmenu(go(\'m6\'));">Continue Tournament Entry</a>';
htm += '<a class="bc5" href="javascript:chkmenu(go(\'m8\'));">New Membership Registration</a>';
setTimeout("veiwcart()",1000);
setTimeout("go('abox3').innerHTML=htm;",1002);

}
}

function initrans(){
t = 0;
if(rt('T') && rt('T') != "undefined"){t = parseInt(rt('T')*1);}
if(!rt() || t == 0){
n = readCookie('fawa');
if(n != null){
n = n.split('~');
tval = n[23]+unbar+n[3]+unbar+n[4]+unbar+n[27]+unbar+t+unbar+n[15];}
else{tval = go('TransID').value+unbar+go('First').value+unbar+go('Last').value+unbar+go('VerifyCode').value+unbar+t+unbar+go('Email').value;}
createCookie('trans',tval,7);}
go('vcartbut').innerHTML='View Cart ('+t+')';
go('vcartbut').title = t;
go('vcartbut').style.display='';
if(go('PID')){go('PID').value=rt('P');}
if(go('PFirst')){go('PFirst').value=rt('F');}
if(go('PLast')){go('PLast').value=rt('L');}
if(go('PCode')){go('PCode').value=rt('V');}
if(go('Email')){go('Email').value=rt('E');}
}

function uptrans(v,h){
n = readCookie('trans');
//if(n != null){
//if(v == 0){eraseCookie('trans');history.go(0);}
//else{
nx = n.split(unbar);
nx[4] = v;
n = nx.join(unbar);
createCookie('trans',n,7);
go('vcartbut').title = v;
hv = 'View Cart ('+v+')';
if(h){hv = 'Hide Cart ('+v+')';}
go('vcartbut').innerHTML=hv;
go('vcartbut').style.display='';
//}
//}
}



function  typchked(v){i=1;
while (go('ftype'+i)){go('ftype'+i).checked = false;go('atype'+i).className = 'ft';i+=1;}
if(v){
go('ftype'+v).checked = true;
mv = go('ftype'+v).value;
d = mv.split('_');
go('atype'+v).className = 'ftc';
go('tempverify').style.display = 'none';
go('zipverify').style.display = '';
if(d[3] == "V"){go('tempverify').style.display = '';go('zipverify').style.display = 'none';}
if(go('Type')){go('Type').value=d[0];}
if(go('MAmount')){go('MAmount').value=d[1];}
if(go('Typed')){go('Typed').value=d[2];}
}
else if(!v){
go('tempverify').style.display = 'none';
go('zipverify').style.display = 'none';
}
}

function  validateid(m){
msg = '';
if(m){msg = m;}
if(go('TempID').value.length != 6 || go('Vcode').value.length != 7 || go('Vcode').value.substr(0,1) != "G"){msg += '\nInvalid Temp ID or Verification Code!\n';}
if(!msg){vc=go('Vcode').value;vc=Venc(vc);}
if(!msg && vc != go('TempID').value){msg += '\nYour Temp ID does not match your Verification Code!\n';}
if(!msg){url = '../trans/fchktempid.php?Vcode='+go('Vcode').value;
ajax(1,url,'abox0');}
if(msg){
go('tempverify').style.display='none';
go('zipverify').style.display='none';
go('Vcode').value='';
go('TempID').value='';typchked();
alert(msg);}
if(!msg){
go('tempverify').style.display='none';
//go('toprenew').style.display='none';
if(go('forisvcode')){go('forisvcode').style.display='none';}

go('zipverify').style.display='';
go('memtypsel').innerHTML = '<h3>Temp ID# and Verify Code Are Valid</h3><h4>Please Continue...</h4>';
}}

function  validreg(o){
//o.style.display = 'none';
msg = '';
if(!go('First').value.length){msg += 'You must enter a correct FIRST NAME to continue!\n';}
if(!go('Last').value.length){msg += 'You must enter a correct LAST NAME to continue!\n';}
if(!go('Zip').value.length){msg += 'You must enter a correct ZIP to continue!\n';}
if(go('BirthDate').value.length < 10 || go('BirthDate').value == "mm/dd/yyyy"){msg += 'You must enter a correct BIRTH DAY to continue! (mm/dm/yyyy) \n';}
if(go('BirthDate').value.match('-')){go('BirthDate').value=go('BirthDate').value.replace(/-/g, '/');}

if(msg){o.style.display = '';alert(msg);}
else if(!msg){
url = memurl();
ajax(1,url,'abox1');
whenloaded('zipit()');
sClubID();
}}

function  validreg2(o){
o.style.visibility='hidden';
msg = '';
if(go('State').value.toLowerCase() == "florida"){go('State').value='FL';}
if(go('State').value == "FL" && go('Type').value == "S"){msg += 'You can not have an Out-Of-State Membership with a Florida Address!\n';go('State').value='';}
if(!go('Address').value.length){msg += 'You must enter a correct ADDRESS to continue!\n';}
if(!go('City').value.length){msg += 'You must enter a correct CITY to continue!\n';}
if(!go('State').value.length){msg += 'You must enter a correct STATE to continue!\n';}
if(!go('Zip').value.length){msg += 'You must enter a correct ZIP to continue!\n';}
if(!go('Phone').value.length || go('Phone').value == "555-555-5555"){msg += 'You must enter a correct PHONE NUMBER to continue!\n';}
if(!go('Gender2').checked && !go('Gender1').checked){msg += 'You must enter a correct GENDER to continue!\n';}
if(!go('Email').value.length){go('Email').value='NA';msg += 'You must enter a correct EMAIL to continue! If you do not have an Email, then leave the \"NA\" and continue.\n';}
if(!go('ClubName').value.length){msg += 'You must enter a correct CLUB to continue!\n';}
if(!go('Pword').value.length){go('Pword').value= go('Zip').value;msg += 'You must enter a correct PASSWORD to continue!  It will default to your Zip ('+go('Zip').value+')\n';}
if(msg){alert(msg);o.style.visibility='visible';}
else if(!msg){
if(go('ClubID').value.length < 4 || go('State').value != "FL"){go('ClubName').value = 'Team '+getstate(go('State').value);}
iscartzero();
initrans();
incrtrans();
url = memurl(o);
//alert(url);
ajax(1,url,'abox1');
}
}

function  memurl(){
url = '../trans/fmemreg.php?Att='+go('Att').value;
wd=new Array('TransStatus','CardNo','Type','First','Last','BirthDate','Age','Gender','ClubName','ClubID','Address','City','State','Zip','Phone','Email','Division','WtClass','RegDate','ExpDate','User','Pword','MemberStatus','TransID','OrderID','PayMethod','USAID','VerifyCode','Typed','MAmount','TempID','Vcode','TTransID','PID','PFirst','PLast','PCode','LinePass','Other');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
return url;
}

function  zipit(){
url = '../cgi-bin/zipit.cgi?Zip='+go('Zip').value;
ajax(1,url,'abox0');
sDivision();
}


function  reprintall(id){
v='';
if(rf()){v=rf('C');}
if(go('cardnumpass')){v=go('cardnumpass').value;}
ajax(0,'../trans/weighin_cardno.php?CardNopass='+v,'abox1');
if(id == "m10" && rf()){
window.open('http://floridausawrestling.org/trans/idcard.php?CardNopass='+v);
}
}

function findreceipts(id){
ajax(0,'../trans/find_receipts.php?TransID='+rf('T'),'abox1');
}

function genintro(){
//if(rf() && !rf('CA')){ajax(0,'../web/Intrologged.html','abox1');}
//else if(rf() && rf('CI')){chkmenu(go('m18'));}
if(rf()){ajax(0,'../web/Intrologged.html','abox1');}
else{ajax(0,'../web/Introduction.html','abox1');}
}

function validathletes(){
if(!v){v='I';}
url = '../trans/valid_athletes.php?Att='+v;
url += '&Name='+rf('F')+' '+rf('L');
url += '&Email='+rf('E');
ajax(0,url,'abox1');}

function  chkmenu(o,a){
var x = go('mbox2').getElementsByTagName('A');
for (var i=0;i<x.length;i++){x[i].className='mm';}
o.className='ms';
greet(o.innerHTML);habox();
go('conshop').style.display='none';
//if(isAdmin()){go('aduse').value = 'http://floridausawrestling.org'+location.pathname+'?ms='+o.id;copyclip('aduse');}
if(rf()){
switch (o.id){
case 'm100':veiwcart();
break;case 'm200':veiwcart(200);
break;case 'm1':editform();
break;case 'm9':reprintall(o.id);
break;case 'm10':reprintall(o.id);
break;case 'm3':url='../trans/helpemail.php?Name='+rf('F')+' '+rf('L')+'&From='+rf('E');ajax(0,url,'abox1');
break;case 'm4':ajax(1,'../trans/fview_tourny.php?CardNopass='+rf('C'), 'abox3');whenloaded('multidiv()');go('abox1').innerHTML='<h2>Update Tournament Information</h2>';
break;case 'm5':ajax(0,'../trans/weighin_cardno.php?CardNopass='+rf('C'), 'abox1');
break;case 'm6':seteventbox();
break;case 'm7':genintro();
break;case 'm8':feetypes('S');
break;case 'm11':ajax(0,'../web/forgotten_password.htm','abox1');
break;case 'm12':findreceipts(o.id);
break;case 'm13':clubchart('ClubInit');
break;case 'm14':insuro('InsurInit');
break;case 'm15':donato('Show');
break;case 'm16':findrep();
break;case 'm17':initrans();ajax(1, '../trans/ftransit.php?PID='+rf('T'), 'abox2');
break;case 'm18':ajax(1,'../trans/club_listall.php?ClubID='+rf('CI')+'&PID='+rf('T'),'abox1');
break;case 'm19':ajax(0,'../trans/download_members.php?ClubID='+rf('CI')+'&PID='+rf('T'),'abox1');
break;case 'm20':ajax(0,'../trans/download_tournaments.php?ClubID='+rf('CI')+'&PID='+rf('T'),'abox1');
break;case 'm21':validathletes();
break;case 'm22':evtsanc('GoLOG');
break;case 'm23':ajax(0,'../trans/Club_User_Update.php?Att=Edit&ClubID='+rf('CA'),'abox1');
break;case 'm24':clEvents('Opts','abox1');
break;case 'm25':tmpage();
break;case 'm26':aepetit();
break;case 'm27':checkusa();
break;default:go('abox1').innerHTML='<table border=0 cellSpacing=0 cellPadding=6><tr><td class=opic>&nbsp;<td align=center><h3>Temporarily Unavailable:</h3><h4>'+o.innerHTML+'</h4><br></td></tr></table>';break;}
}else{
switch (o.id){
case 'm100':veiwcart();
break;case 'm200':veiwcart(200);
break;case 'm3':ajax(0,'../trans/helpemail.php','abox1');
break;case 'm6':seteventbox();
break;case 'm7':genintro();
break;case 'm8':feetypes('S');
break;case 'm9':reprintall(o.id);
break;case 'm10':reprintall(o.id);
break;case 'm11':ajax(0,'../web/forgotten_password.htm','abox1');
break;case 'm15':donato('Show');
break;case 'm16':findrep();
break;case 'm25':tmpage();
break;case 'm26':aepetit();
break;case 'm27':checkusa();
break;default:go('abox1').innerHTML='<img border="0" src="http://floridausawrestling.org/images/left_arrow.gif" style="float:left;"><table border=0 cellSpacing=0 cellPadding=6><tr><td class=opic>&nbsp;<td align=center><h3>You Must Be Logged In For:</h3><h4>'+o.innerHTML+'</h4><br>Either Login on the left or <A href="http://floridausawrestling.org/Login.htm?ms=m8">Click Here</a> to Register.</td></tr></table>';break;}
}
scrollTo(0,0);
htip();}


function  checkusa(){
htm = '';
htm2 = '';
cv = 0;
url = '';
if(go('vusaid') && go('vusaid').value){cv = go('vusaid').value;}
if(cv != 0){
url = 'https://www.themat.com/membership/GetPerson.jsp?pw=dkwucnmk&usawId='+cv+'&includeFields=3,5,7,8,9,10,15,18,19,26';
htm2 = '<h2>Results For USAW ID Number '+cv+':</h2><br>';
htm2 += '<iframe src="'+url+'"  style="WIDTH: 467px; HEIGHT: 46px" id=idframe3 name=idframe3 scrolling=no marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0></iframe>';
htm2 += '<br><br><p style="WIDTH: 367px; HEIGHT: 62px;text-align:justify;"><b><font color="#800000">*Important:</font></b> These results are retrieved directly from www.themat.com Membership Database and therefore can not be formated.  Data listed corresponds to: First, Last, MI, Birthday, Email, Phone, City, State, Zip, Status.  Your ID is valid if your Status (last entry) = Active.<p><br><br><br>';
}
htm += '<table border=0 cellSpacing=0 cellPadding=6><tr><td colspan=2>';
htm += '<img border="0" src="images/usa_s90.jpg" width="90" height="74"><td></td><td>';
htm += '<h2>Is Your USAW ID Valid?</h2>';
htm += '<br><br>Enter Your USAW ID Number: <input class=log type=text id=vusaid onfocus="select();" value=""  style="width:80;height:18">';
htm += '<br><br><a class=b href="javascript:void(0);" onclick="checkusa()" style="width:230px;">Check My USAW ID Validation</a>';
htm += '<br><br></td></tr></table>';
htm += htm2;
go('abox3').innerHTML=htm;
}


function  clubchart(v){
if(!v){v='';if(go('Att')){v=go('Att').value;}}
if(v == "GoRenew" && rf('CA') && go('ClubID').value == rf('CI')){v = "GoNew_It"}
if(rf() && go('MemType') && go('MemPID')){go('PFirst').value = rf('F');go('PLast').value = rf('L');go('MemPID').value = rf('T');go('MemType').value = rf('Y');}
if(v == "TransIt" || v == "TransIt2" || v == "TransIt3"){initrans();incrtrans();}
url = '../trans/Club_Charter.php?Att='+v;
wd=new Array('PFirst','PLast','MemType','MemPID','Status','OrderID','AI','Show','Area','ClubYear','ClubName','ClubID','OfficialName','ClubWebsite','Title','CardNo','First','Last','PAddress','PCity','PState','PZip','Phone','Ext','AltPhone','Email','Fax','ATitle','ACardNo','AFirst','ALast','AAddress','ACity','AState','AZip','APhone','AExt','AAltPhone','AEmail','AFax','FacilityName','Address','City','State','Zip','NumAthletes','NumCoaches','S1','S2','S3','S4','S5','S6','S7','S8','A1','A2','A3','A4','A5','A6','A7','A8','A9','A10','A11','A12','MO1','MO2','MO3','MO4','MO5','MO6','MO7','MO8','MO9','MO10','MO11','MO12','Pic','PCharter','RegDate','CertName','Association','AddressA','CityA','StateA','ZipA','Global','MaxLines','Type','MAmount','Typed','Display','AIDisplay','AIAmount','AITyped');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
//alert(url);
ajax(1,url,'abox1');}

function  clubchk(v){
go('clubcontinue').style.display='none';go('erow').style.display='none';go('srow').style.display='none';i=1;
while (go('ctype'+i)){go('ctype'+i).checked = false;go('atype'+i).className = 'ft';i+=1;}
if(v){
go('ctype'+v).checked = true;
mv = go('ctype'+v).value;
d = mv.split('_');
go('atype'+v).className = 'ftc';
if(d[0] == "RC"){go('Att').value='GoRenew';go('ClubID').value='';go('srow').style.display='';sClubID();}
if(d[0] == "NC"){go('Att').value='GoNew';go('ClubName').value='';go('erow').style.display='';}
if(d[0] == "PC"){go('Att').value='ClubInit';window.open('http://floridausawrestling.org/web/ClubCharterPrint.htm');}
if(go('Type')){go('Type').value=d[0];}
if(go('MAmount')){go('MAmount').value=d[1];}
if(go('Typed')){go('Typed').value=d[2];}
if(go('Display')){go('Display').value=d[4];}
}}

function insuro(v){
if(!v){
v='';if(go('Att')){v=go('Att').value;}}
if(v == "TransIt"){initrans();incrtrans();}
url = '../trans/Insured_Add.php?Att='+v;
if(v == "InsurInit" && rf()){url += '&CardNo='+rf('C');}
wd=new Array('ClubEvent','EventDate','Date','Title','CardNo','First','Last','Address','City','State','Zip','Phone','Ext','Email','Fax','CertName','Association','AddressA','CityA','StateA','ZipA','OrderID','Status','ClubName','ClubID','MemPID','AIDisplay','AIAmount','AIType','MemType','AITyped');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
//alert(url);
ajax(1,url,'abox1');
}

function donato(v){
if(!v){v='';if(go('Att')){v=go('Att').value;}}
if(v == "TransIt" || v == "CheckIt"){initrans();incrtrans();}
if(rf()){
if(go('PID')){go('PID').value = rf('T');}
if(go('PFirst')){go('PFirst').value = rf('F');}
if(go('PLast')){go('PLast').value = rf('L');}
if(go('Email')){go('Email').value = rf('E');}
if(go('VerifyCode')){go('VerifyCode').value = rf('V');}
}
url = '../trans/donations.php?Att='+v;
wd=new Array('Dmsg', 'cType', 'Fee', 'Card', 'Display','PID','PFirst','PLast','PCode','Email','TransID','First','Last','VerifyCode');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
//alert(url);
ajax(1,url,'abox1');
}


function  evtsanc(v){
if(!v){v='';if(go('Att')){v=go('Att').value;}}
if(go('Notes')){go('Notes').value = go('Notes').value.replace(/\&/g, '%26');}
if(go('Instsructions')){go('Instsructions').value = go('Instsructions').value.replace(/\&/g, '%26');}

mline = rf('X');
if(v == "TransIt"){initrans();incrtrans();}
if(v == "GoLOG" && rf('CA')){v = "GoCA";}
url = '../trans/Event_Sanction.php?Att='+v+'&MemLine='+mline;
wd=new Array('OrderID','Status','SHCal','SHHome','SHEvent','SHSpecial','SHReg','AutoReg','RegOpts','EventName','StartDate','EndDate','ClubName','ClubID','BeginReg','CloseReg','AllowEntries','Title','CardNo','First','Last','PAddress','PCity','PState','PZip','Phone','Ext','AltPhone','Email','Fax','ATitle','ACardNo','AFirst','ALast','AAddress','ACity','AState','AZip','APhone','AExt','AAltPhone','AEmail','AFax','FacilityName','Address','City','State','Zip','CertName','Association','AddressA','CityA','StateA','ZipA','Flyer','Qualifier','MFBoth','Area','Participation','NumEntries','ES1','ES2','ES3','ES4','ES5','ES6','ES7','S1Amt1','S2Amt1','S3Amt1','S4Amt1','S5Amt1','S6Amt1','S7Amt1','S1Amt2','S2Amt2','S3Amt2','S4Amt2','S5Amt2','S6Amt2','S7Amt2','S1Amt3','S2Amt3','S3Amt3','S4Amt3','S5Amt3','S6Amt3','S7Amt3','S1Amt4','S2Amt4','S3Amt4','S4Amt4','S5Amt4','S6Amt4','S7Amt4','EA1','EA2','EA3','EA4','EA5','EA6','EA7','EA8','EA9','EA10','EA11','EA12','Notes','RegDate','MemType','MemPID','PFirst','PLast','MAmount','Typed','Display');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
ajax(1,url,'abox1');
whenloaded('scrollTo(0,0)');
}


function findrep(){
z='';if(rf()){z=rf('Z');}
if(go('Zip') && go('Zip').value){z=go('Zip').value;}
url = '../trans/Area_Reps.php?Zip='+z;
ajax(0,url,'abox1');}

function feetypes(v){
if(!v){z='S';}
if(v == "F" && rf()){v = "LF";}
url = '../trans/feetypes.php?Att='+v;
wd=new Array('oCardNo');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
ajax(1,url,'abox1');
}

function ntosp(o){br = ' ';o.value=escape(o.value);for(i=0; i<o.value.length; i++){if(o.value.indexOf("%0D%0A") > -1){o.value=o.value.replace("%0D%0A",br);}else if(o.value.indexOf("%0A") > -1){o.value=o.value.replace("%0A",br);}else if(o.value.indexOf("%0D") > -1){o.value=o.value.replace("%0D",br);}}o.value=unescape(o.value);}



//############################################################

function quickcart(v){
url = '../trans/ftransit.php?PID='+v;
ajax(1, url, 'abox2');
}

function nie(){if(navigator.appName == "Microsoft Internet Explorer"){return false;}else{return true;}}

function clubedit(lnp,att,bx,classbx){
if(bx && go(bx).innerHTML.length >4){go(bx).innerHTML = '';}
else{
htip();if(!bx){bx='abox1';}
//i=0;while (go('cmem'+i)){go('cmem'+i).innerHTML = '';i+=1;}
url = '../trans/club_edit.php?Lnp='+lnp+'&Att='+att+'&classbx='+classbx;
wd=new Array('TransStatus','CardNo','Type','First','Last','BirthDate','Age','Gender','ClubName','ClubID','Address','City','State','Zip','Phone','Email','Division','WtClass','RegDate','ExpDate','User','Pword','Area','TransID','OrderID','PayMethod','USAID','VerifyCode','Action');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
ajax(1,url,bx);
if(bx == "trash"){clclr();}
}}

function clistovers(){
if(!nie()){
var x = go('clublist').getElementsByTagName('TR');
for (var i=0;i<x.length;i++){
if(x[i].className == "n" || x[i].className == "s"){
x[i].onclick = function (){clistclick(this);}
}}
}}

function clistclick(o){
i=0;while (go('cmem'+i)){if(i != o.value){go('cmem'+i).innerHTML = '';}i+=1;}
var x = go('clublist').getElementsByTagName('TR');
for (var i=0;i<x.length;i++){if(x[i].className == "s"){x[i].className='n';}}
if(o){
window.scrollTo(0,o.offsetTop+100);
if(o.id != "clist0" && o.className != "e"){o.className='s';}
}}

function clclr(o){
i=0;while (go('cmem'+i)){go('cmem'+i).innerHTML = '';i+=1;}
}


function clrenew(){
initrans();
incrtrans();
url = memurl();
ajax(1,url,'trash');
clclr();
}

function clte(cn,bx,classbx,isable){
if(isable == "0" || isable == 0){htip();
htm = '<div style="border:4 ridge;">';
htm += '<input type=hidden id=classbx value="'+classbx+'">';
htm += '<a class=b href="javascript:clclr();" style="width:60px;"><img border="0" src="http://floridausawrestling.org/images/x.gif" width="16" height="14" align="absmiddle"> Close</a>';
htm += '<div id=tbox1></div>';
htm += '<div id=tbox2></div>';
htm += '<div id=tbox3></div></div><br>';
go(bx).innerHTML = htm;
ajax(0,'../trans/fgetcardid.php?CardNo='+cn, 'tbox1');
ajax(0,'../trans/event_entry.php', 'tbox2');
ajax(0,'../trans/fview_tourny.php?CardNopass='+cn, 'tbox3');
whenloaded('sDivision()');
}else{htip();
htm = '<a class=b href="javascript:clclr();" style="width:60px;"><img border="0" src="http://floridausawrestling.org/images/x.gif" width="16" height="14" align="absmiddle"> Close</a>';
htm += '<h3>Membership Has Expired ('+isable+')</h3>';
go(bx).innerHTML = htm;
}
//if(nie()){alert(5);}
}

function clEvents(v,bx,ev){
if(!bx){bx = "abox1'";}
if(!v){v = "Opts";}
url = '../trans/club_sponsored.php?ClubID='+rf('CI')+'&Att='+v+'&ClubName='+rf('CN');
if(ev){url += '&Event='+ev;}
ajax(0,url,bx);
}

function gont(v){
go('abox2').innerHTML='';
go('abox3').innerHTML='';
if(go('CardNo')){c = go('CardNo').value;}
htm = '<input type=hidden value="'+v+'" id=TeamLnp>';
htm += '<input type=hidden value="'+c+'" id=CardNo_>';
go('abox1').innerHTML=htm;
tmpage('AddForm');
}

function tmpage(a){
if(!a){a = 'Setup';}
isad = false;
cnp = '';
bx = 'abox1';
if(go('IsAdmin') && go('IsAdmin').value == "Yes"){isad = true;}
if(rf() && a == "Setup"){cnp = '&CardNopass='+rf('C');}
if(isad){url = '../trans/nat_admin.php?Att='+a+cnp;}
else{url = '../trans/nat_setup.php?Att='+a+cnp;}
wd=new Array('IsAdmin','CardNo_','TeamLnp','AdminPass','TransLnp','nTransID','nTDate','nStatus','nPID','nPFirst','nPLast','nPaymentID','nPCode','nSubtot','nFirst','nLast','nType','nCardNo','nBirthDate','nGender','nState','nDivision','nWtClass','nClubName','nClubID','nEvent','nEdate','nOpt1','nOpt2','nOpt3','nOpt4','nOpt5','nOpt6','nUid','nAgree','nOption','nEmail','nAEmail','nPhone','nAddress','nCityStZip','Donate','Dmsg','DFile');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
//alert(url);
ajax(1,url,bx);
}

function tmpay(l,p,t,r){
url = '../trans/nat_payment.php?TransLnp='+l+'&Paid='+p+'&TotalAmt='+t+'&RecAmt='+r;
wd=new Array('IsAdmin','TeamLnp','AdminPass');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
//alert(url);
ajax(0,url,'abox1');
}

function vtog(v){htip();
i=1;while(go('Alist'+i)){go('Alist'+i).style.display='none';i+=1;}
if(go('Alist'+v)){go('Alist'+v).style.display='';}
if(go('view'+v)){go('view'+v).checked=true;}
}

function ntOptions(lnp){
url = '../trans/nat_options.php?TransLnp='+lnp;
wd=new Array('IsAdmin','TeamLnp','AdminPass');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
//alert(url);
ajax(0,url,'abox1');
}

function ntOpts(){
v=go('nOpts1').value;i=2;
while(go('nOpts'+i) && go('nOpts'+i).value){
v+='_'+go('nOpts'+i).value;i+=1;}
go('nOpt1').value=v;}


function aepetit(a){
if(!a){a = 'Init';}
bx = 'abox1';
url = '../trans/ath_petit.php?Att='+a;
wd=new Array('TotalAmt','CardNo_','aeptext','AthLnp');
for (var i=0;i < wd.length;i++){if(go(wd[i]) && go(wd[i]).value){url += '&'+wd[i]+'='+go(wd[i]).value;}}
//alert(url);
ajax(1,url,bx);
}

function iscartzero(){
rvc = go('vcartbut').innerHTML;
if(rvc == 'View Cart (0)'){eraseCookie('trans');}
}

