/**
 * Jax JavaScript Library v1.5
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.TXT.
 * It is also available through the world-wide-web at this URL:
 * http://jax.moc10media.com/LICENSE.TXT
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to info@moc10media.com so we can send you a copy immediately.
 *
 * Nick Sagona, III <nick@moc10media.com>
 * Copyright (c) 2009-2010 Moc 10 Media, a division of The Working Man Group, LLC. (http://www.moc10media.com)
 *
 * Minified at http://fmarcia.info/jsmin/test.html
 *
 */

if(!Array.indexOf){Array.prototype.indexOf=function(obj){for(var i=0;i<this.length;i++){if(this[i]==obj){return i;}}
return-1;}}
String.prototype.slug=function(sep){slg='';if(this.length>0){if(sep!=null){slgAry=new Array();urlAry=this.split(sep);for(var i=0;i<urlAry.length;i++){tmpSlg=urlAry[i].toLowerCase();tmpSlg=tmpSlg.replace(/\&/g,'and');tmpSlg=tmpSlg.replace(/([^a-zA-Z0-9 \-\/])/g,'');tmpSlg=tmpSlg.replace(/ /g,'-');tmpSlg=tmpSlg.replace(/-*-/g,'-');slgAry.push(tmpSlg);}
tmpSlg=slgAry.join('/');tmpSlg=tmpSlg.replace(/-\/-/g,'/');tmpSlg=tmpSlg.replace(/\/-/g,'/');tmpSlg=tmpSlg.replace(/-\//g,'/');slg+='/'+tmpSlg;}else{tmpSlg=this.toLowerCase();tmpSlg=tmpSlg.replace(/\&/g,'and');tmpSlg=tmpSlg.replace(/([^a-zA-Z0-9 \-\/])/g,'');tmpSlg=tmpSlg.replace(/ /g,'-');tmpSlg=tmpSlg.replace(/-*-/g,'-')
slg+='/'+tmpSlg;slg=slg.replace(/\/-/g,'/');}
if(slg.lastIndexOf('-')==(slg.length-1)){slg=slg.substring(0,slg.lastIndexOf('-'));}}
return slg;}
String.prototype.rand=function(len,caps){var str='';var chars='23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';for(var i=0;i<len;i++){num=(Math.floor(Math.random()*chars.length));str+=(caps!=null)?chars.charAt(num).toUpperCase():chars.charAt(num);}
return str;}
String.prototype.links=function(tar){var str=this;var matches=new Array();var protocolMatches=this.match(/[f|ht]+tp:\/\/[^\s]*/g);var linkMatches=this.match(/\s[\w]+[a-zA-Z0-9\.\-\_]+(\.[a-zA-Z]{2,4})/g);var mailMatches=this.match(/[a-zA-Z0-9\.\-\_+%]+@[a-zA-Z0-9\-\_\.]+\.[a-zA-Z]{2,4}/g);targ=(tar!=null)?' target="_blank"':'';if(protocolMatches[0]!=undefined){for(var i=0;i<protocolMatches.length;i++){matches.push(Array(protocolMatches[i],'<a href="'+protocolMatches[i]+'"'+targ+'>'+protocolMatches[i]+'</a>'));}}
if(linkMatches[0]!=undefined){for(var i=0;i<linkMatches.length;i++){matches.push(Array(linkMatches[i],' <a href="'+linkMatches[i]+'"'+targ+'>'+linkMatches[i]+'</a>'));}}
if(mailMatches[0]!=undefined){for(var i=0;i<mailMatches.length;i++){matches.push(Array(mailMatches[i],'<a href="mailto:'+mailMatches[i]+'"'+targ+'>'+mailMatches[i]+'</a>'));}}
if(matches[0]!=undefined){for(var i=0;i<matches.length;i++){str=str.replace(matches[i][0],matches[i][1]);}}
str=str.replace(/href="http:\/\/ /g,'href="http://');str=str.replace(/href=" /g,'href="');str=str.replace(/href="w/g,'href="http://w');str=str.replace(/href="f/g,'href="ftp://f');str=str.replace(/"> /g,'">');return str;}
function JaxBrowser(){this.ua=navigator.userAgent;this.platform=null;this.os=null;this.browser=null;this.version=null;if(this.ua.indexOf('Windows')!=-1){this.platform='Windows';this.os=(this.ua.indexOf('Windows NT')!=-1)?this.ua.substring(this.ua.indexOf('Windows NT'),this.ua.indexOf('Windows NT')+14):'Windows';}else if(this.ua.indexOf('Macintosh')!=-1){this.platform='Macintosh';if(this.ua.indexOf('Intel')!=-1){this.os=this.ua.substring(this.ua.indexOf('Intel'));this.os=this.os.substring(0,this.os.indexOf(';'));}else if(this.ua.indexOf('PPC')!=-1){this.os=this.ua.substring(this.ua.indexOf('PPC'));this.os=this.os.substring(0,this.os.indexOf(';'));}else{this.os='Macintosh';}}else if(this.ua.indexOf('Linux')!=-1){this.platform='Linux';if(this.ua.indexOf('Linux ')!=-1){this.os=this.ua.substring(this.ua.indexOf('Linux '));this.os=this.os.substring(0,this.os.indexOf(';'));}else{this.os='Linux';}}else if(this.ua.indexOf('SunOS')!=-1){this.platform='SunOS';if(this.ua.indexOf('SunOS ')!=-1){this.os=this.ua.substring(this.ua.indexOf('SunOS '));this.os=this.os.substring(0,this.os.indexOf(';'));}else{this.os='SunOS';}}else if(this.ua.indexOf('OpenBSD')!=-1){this.platform='OpenBSD';if(this.ua.indexOf('OpenBSD ')!=-1){this.os=this.ua.substring(this.ua.indexOf('OpenBSD '));this.os=this.os.substring(0,this.os.indexOf(';'));}else{this.os='OpenBSD';}}else if(this.ua.indexOf('NetBSD')!=-1){this.platform='NetBSD';if(this.ua.indexOf('NetBSD ')!=-1){this.os=this.ua.substring(this.ua.indexOf('NetBSD '));this.os=this.os.substring(0,this.os.indexOf(';'));}else{this.os='NetBSD';}}else if(this.ua.indexOf('FreeBSD')!=-1){this.platform='FreeBSD';if(this.ua.indexOf('FreeBSD ')!=-1){this.os=this.ua.substring(this.ua.indexOf('FreeBSD '));this.os=this.os.substring(0,this.os.indexOf(';'));}else{this.os='FreeBSD';}}
if(this.ua.indexOf('Camino')!=-1){this.browser='Camino';this.version=this.ua.substring(this.ua.indexOf('Camino/')+7);}else if(this.ua.indexOf('Chrome')!=-1){this.browser='Chrome';this.version=this.ua.substring(this.ua.indexOf('Chrome/')+7);this.version=this.version.substring(0,this.version.indexOf(' '));}else if(this.ua.indexOf('Firefox')!=-1){this.browser='Firefox';this.version=this.ua.substring(this.ua.indexOf('Firefox/')+8);}else if(this.ua.indexOf('MSIE')!=-1){this.browser='MSIE';this.version=this.ua.substring(this.ua.indexOf('MSIE ')+5,this.ua.indexOf('MSIE ')+8);}else if(this.ua.indexOf('Konqueror')!=-1){this.browser='Konqueror';this.version=this.ua.substring(this.ua.indexOf('Konqueror/')+10);this.version=this.version.substring(0,this.version.indexOf(';'));}else if(this.ua.indexOf('Navigator')!=-1){this.browser='Navigator';this.version=this.ua.substring(this.ua.indexOf('Navigator/')+10);}else if(this.ua.indexOf('Opera')!=-1){this.browser='Opera';this.version=this.ua.substring(this.ua.indexOf('Opera/')+6);this.version=this.version.substring(0,this.version.indexOf(' '));}else if(this.ua.indexOf('Safari')!=-1){this.browser='Safari';this.version=this.ua.substring(this.ua.indexOf('Version/')+8);this.version=this.version.substring(0,this.version.indexOf(' '));}
this.newWindow=function(url,name,wid,hgt,scr,res,stat,loc,mnu,tool,x,y){if(screen){widthOfScreen=screen.width;heightOfScreen=screen.height;}
if((x==null)||(y==null)){midX=widthOfScreen/2;midY=heightOfScreen/2;midWid=wid/2;midHgt=hgt/2;x=midX-midWid;y=midY-midHgt;}
windowOpts='width='+wid+',height='+hgt+',scrollbars='+scr+',resizable='+res+',status='+stat+',location='+loc+',menubar='+mnu+',toolbar='+tool+',left='+x+',top='+y;popUpWindow=window.open(url,name,windowOpts);}}
function JaxCookie(){this.setCookie=function(name,value,expire){var exdate=new Date();exdate.setDate(exdate.getDate()+expire);document.cookie=name+'='+escape(value)+((expire==null)?'':';expires='+exdate.toGMTString());}
this.getCookie=function(name){if(document.cookie.length>0){start=document.cookie.indexOf(name+'=');if(start!=-1){start=start+name.length+1;end=document.cookie.indexOf(';',start);if(end==-1){end=document.cookie.length;}
return unescape(document.cookie.substring(start,end));}else{return'';}}else{return'';}}
this.delCookie=function(name){this.setCookie(name,'',-1);}}
function JaxElement(elemType,appendTo,attribs,html){this.parentElem=document.getElementById(appendTo);this.elem=document.createElement(elemType);this.brws=new JaxBrowser();if(attribs!=undefined){for(var i=0;i<attribs.length;i++){if((attribs[i][0]=='style')&&(this.brws.browser=='MSIE')&&(this.brws.version<8)){styles=(attribs[i][1].lastIndexOf(';')==(attribs[i][1].length-1))?attribs[i][1].substring(0,(attribs[i][1].length-1)):attribs[i][1];sty=styles.replace('; ',';').split(';');for(j=0;j<sty.length;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';for(k=0;k<convertStyleAry.length;k++){convertStyle=(k==0)?convertStyleAry[k]:convertStyle+convertStyleAry[k].substring(0,1).toUpperCase()+convertStyleAry[k].substring(1);}}else if((styleVal[0]=='float')||(styleVal[0]==' float')){convertStyle='styleFloat';}else{convertStyle=styleVal[0];}
eval("this.elem.style."+convertStyle+" = '"+styleVal[1]+"';");}}else{this.elem.setAttribute(attribs[i][0],attribs[i][1]);}}}
if(html!=undefined){this.elem.innerHTML=html;}
this.parentElem.appendChild(this.elem);this.remove=function(){this.parentElem.removeChild(this.elem);}}
function JaxElementInput(inputType,appendTo,attribs){this.parentElem=document.getElementById(appendTo);this.elem=document.createElement('input');this.elem.setAttribute('type',inputType);this.brws=new JaxBrowser();if(attribs!=undefined){for(var i=0;i<attribs.length;i++){if((attribs[i][0]=='style')&&(this.brws.browser=='MSIE')&&(this.brws.version<8)){styles=(attribs[i][1].lastIndexOf(';')==(attribs[i][1].length-1))?attribs[i][1].substring(0,(attribs[i][1].length-1)):attribs[i][1];sty=styles.replace('; ',';').split(';');for(j=0;j<sty.length;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';for(k=0;k<convertStyleAry.length;k++){convertStyle=(k==0)?convertStyleAry[k]:convertStyle+convertStyleAry[k].substring(0,1).toUpperCase()+convertStyleAry[k].substring(1);}}else if((styleVal[0]=='float')||(styleVal[0]==' float')){convertStyle='styleFloat';}else{convertStyle=styleVal[0];}
eval("this.elem.style."+convertStyle+" = '"+styleVal[1]+"';");}}else{this.elem.setAttribute(attribs[i][0],attribs[i][1]);}}}
this.parentElem.appendChild(this.elem);this.remove=function(){this.parentElem.removeChild(this.elem);}}
function JaxElementCheckbox(appendTo,vals,attribs,mrk){this.parentElem=document.getElementById(appendTo);this.elems=new Array();this.spans=new Array();this.values=new Array();this.marked=new Array();this.brws=new JaxBrowser();if(vals.constructor==Array){for(var i=0;i<vals.length;i++){this.values.push(vals[i]);}}else{this.values.push(vals);}
if(mrk!=undefined){if(mrk.constructor==Array){for(var i=0;i<mrk.length;i++){this.marked.push(mrk[i]);}}else{this.marked.push(mrk);}}
parentFieldSet=document.createElement('fieldset');parentFieldSet.setAttribute('class','checkBoxArea');for(var i=0;i<this.values.length;i++){newElem=document.createElement('input');newElem.setAttribute('type','checkbox');if(attribs!=undefined){for(var j=0;j<attribs.length;j++){att=((attribs[j][0]=='id')&&(i>0))?attribs[j][1]+i:attribs[j][1];if((attribs[i][0]=='style')&&(this.brws.browser=='MSIE')&&(this.brws.version<8)){styles=(att.lastIndexOf(';')==(att.length-1))?att.substring(0,(att.length-1)):att;sty=styles.replace('; ',';').split(';');for(k=0;k<sty.length;k++){styleVal=sty[k].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';for(l=0;l<convertStyleAry.length;l++){convertStyle=(l==0)?convertStyleAry[l]:convertStyle+convertStyleAry[l].substring(0,1).toUpperCase()+convertStyleAry[l].substring(1);}}else if((styleVal[0]=='float')||(styleVal[0]==' float')){convertStyle='styleFloat';}else{convertStyle=styleVal[0];}
eval("newElem.style."+convertStyle+" = '"+styleVal[1]+"';");}}else{newElem.setAttribute(attribs[j][0],att);}}}
if(this.values[i].constructor==Array){newElem.setAttribute('value',this.values[i][0]);newElem.checked=(this.marked.indexOf(this.values[i][1])!=-1)?true:false;parentFieldSet.appendChild(newElem);spanElem=document.createElement('span');spanElem.setAttribute('class','checkPad');spanElem.innerHTML=this.values[i][1];}else{newElem.setAttribute('value',this.values[i]);newElem.checked=(this.marked.indexOf(this.values[i])!=-1)?true:false;parentFieldSet.appendChild(newElem);spanElem=document.createElement('span');spanElem.setAttribute('class','checkPad');spanElem.innerHTML=this.values[i];}
parentFieldSet.appendChild(spanElem);this.spans.push(parentFieldSet);this.parentElem.appendChild(parentFieldSet);}
this.remove=function(){for(var i=0;i<this.spans.length;i++){this.parentElem.removeChild(this.spans[i]);}}}
function JaxElementRadio(appendTo,vals,attribs,mrk){this.parentElem=document.getElementById(appendTo);this.elems=new Array();this.spans=new Array();this.values=new Array();this.marked=(mrk!=undefined)?mrk:null;this.brws=new JaxBrowser();if(vals.constructor==Array){for(var i=0;i<vals.length;i++){this.values.push(vals[i]);}}else{this.values.push(vals);}
parentFieldSet=document.createElement('fieldset');parentFieldSet.setAttribute('class','radioBtnArea');for(var i=0;i<this.values.length;i++){newElem=document.createElement('input');newElem.setAttribute('type','radio');if(attribs!=undefined){for(var j=0;j<attribs.length;j++){att=((attribs[j][0]=='id')&&(i>0))?attribs[j][1]+i:attribs[j][1];if((attribs[i][0]=='style')&&(this.brws.browser=='MSIE')&&(this.brws.version<8)){styles=(att.lastIndexOf(';')==(att.length-1))?att.substring(0,(att.length-1)):att;sty=styles.replace('; ',';').split(';');for(k=0;k<sty.length;k++){styleVal=sty[k].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';for(l=0;l<convertStyleAry.length;l++){convertStyle=(l==0)?convertStyleAry[l]:convertStyle+convertStyleAry[l].substring(0,1).toUpperCase()+convertStyleAry[l].substring(1);}}else if((styleVal[0]=='float')||(styleVal[0]==' float')){convertStyle='styleFloat';}else{convertStyle=styleVal[0];}
eval("newElem.style."+convertStyle+" = '"+styleVal[1]+"';");}}else{newElem.setAttribute(attribs[j][0],att);}}}
if(this.values[i].constructor==Array){newElem.setAttribute('value',this.values[i][0]);newElem.checked=(this.marked==this.values[i][1])?true:false;parentFieldSet.appendChild(newElem);spanElem=document.createElement('span');spanElem.setAttribute('class','radioPad');spanElem.innerHTML=this.values[i][1];}else{newElem.setAttribute('value',this.values[i]);newElem.checked=(this.marked==this.values[i])?true:false;parentFieldSet.appendChild(newElem);spanElem=document.createElement('span');spanElem.setAttribute('class','radioPad');spanElem.innerHTML=this.values[i];}
parentFieldSet.appendChild(spanElem);this.spans.push(parentFieldSet);this.parentElem.appendChild(parentFieldSet);}
this.remove=function(){for(var i=0;i<this.spans.length;i++){this.parentElem.removeChild(this.spans[i]);}}}
function JaxElementSelect(appendTo,vals,attribs,sel){this.parentElem=document.getElementById(appendTo);this.elem=document.createElement('select');this.values=new Array();this.valueSelected=(sel!=undefined)?sel:null;this.brws=new JaxBrowser();if(attribs!=undefined){for(var i=0;i<attribs.length;i++){if((attribs[i][0]=='style')&&(this.brws.browser=='MSIE')&&(this.brws.version<8)){styles=(attribs[i][1].lastIndexOf(';')==(attribs[i][1].length-1))?attribs[i][1].substring(0,(attribs[i][1].length-1)):attribs[i][1];sty=styles.replace('; ',';').split(';');for(j=0;j<sty.length;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';for(k=0;k<convertStyleAry.length;k++){convertStyle=(k==0)?convertStyleAry[k]:convertStyle+convertStyleAry[k].substring(0,1).toUpperCase()+convertStyleAry[k].substring(1);}}else if((styleVal[0]=='float')||(styleVal[0]==' float')){convertStyle='styleFloat';}else{convertStyle=styleVal[0];}
eval("this.elem.style."+convertStyle+" = '"+styleVal[1]+"';");}}else{this.elem.setAttribute(attribs[i][0],attribs[i][1]);}}}
if(vals.indexOf('YEAR')!=-1){var years=new Array();var yearAry=vals.split('_');if((yearAry[1]!=undefined)&&(yearAry[2]!=undefined)){if(yearAry[1]<yearAry[2]){for(var i=yearAry[1];i<=yearAry[2];i++){years.push(i);}}else{for(var i=yearAry[1];i>=yearAry[2];i--){years.push(i);}}}else if(yearAry[1]!=undefined){var d=new Date();var year=d.getFullYear()
if(year<yearAry[1]){for(var i=year;i<=yearAry[1];i++){years.push(i);}}else{for(var i=year;i>=yearAry[1];i--){years.push(i);}}}else{var d=new Date();var year=d.getFullYear();for(var i=year;i<=(year+10);i++){years.push(i);}}
vl=years;}else{switch(vals){case'MONTHS_SHORT':vl=new Array(Array('--','--'),Array('01','01'),Array('02','02'),Array('03','03'),Array('04','04'),Array('05','05'),Array('06','06'),Array('07','07'),Array('08','08'),Array('09','09'),Array('10','10'),Array('11','11'),Array('12','12'));break;case'MONTHS_LONG':vl=new Array(Array('--','------'),Array('01','January'),Array('02','February'),Array('03','March'),Array('04','April'),Array('05','May'),Array('06','June'),Array('07','July'),Array('08','August'),Array('09','September'),Array('10','October'),Array('11','November'),Array('12','December'));break;case'DAYS_OF_MONTH':vl=new Array(Array('--','--'),Array('01','01'),Array('02','02'),Array('03','03'),Array('04','04'),Array('05','05'),Array('06','06'),Array('07','07'),Array('08','08'),Array('09','09'),Array('10','10'),Array('11','11'),Array('12','12'),Array('13','13'),Array('14','14'),Array('15','15'),Array('16','16'),Array('17','17'),Array('18','18'),Array('19','19'),Array('20','20'),Array('21','21'),Array('22','22'),Array('23','23'),Array('24','24'),Array('25','25'),Array('26','26'),Array('27','27'),Array('28','28'),Array('29','29'),Array('30','30'),Array('31','31'));break;case'DAYS_OF_WEEK':vl=new Array(Array('--','------'),Array('Sunday','Sunday'),Array('Monday','Monday'),Array('Tuesday','Tuesday'),Array('Wednesday','Wednesday'),Array('Thursday','Thursday'),Array('Friday','Friday'),Array('Saturday','Saturday'));break;case'HOURS':vl=new Array(Array('--','--'),Array('01','01'),Array('02','02'),Array('03','03'),Array('04','04'),Array('05','05'),Array('06','06'),Array('07','07'),Array('08','08'),Array('09','09'),Array('10','10'),Array('11','11'),Array('12','12'));break;case'MILITARY_HOURS':vl=new Array(Array('--','--'),Array('00','00'),Array('01','01'),Array('02','02'),Array('03','03'),Array('04','04'),Array('05','05'),Array('06','06'),Array('07','07'),Array('08','08'),Array('09','09'),Array('10','10'),Array('11','11'),Array('12','12'),Array('13','13'),Array('14','14'),Array('15','15'),Array('16','16'),Array('17','17'),Array('18','18'),Array('19','19'),Array('20','20'),Array('21','21'),Array('22','22'),Array('23','23'));break;case'MINUTES':vl=new Array(Array('--','--'),Array('00','00'),Array('01','01'),Array('02','02'),Array('03','03'),Array('04','04'),Array('05','05'),Array('06','06'),Array('07','07'),Array('08','08'),Array('09','09'),Array('10','10'),Array('11','11'),Array('12','12'),Array('13','13'),Array('14','14'),Array('15','15'),Array('16','16'),Array('17','17'),Array('18','18'),Array('19','19'),Array('20','20'),Array('21','21'),Array('22','22'),Array('23','23'),Array('24','24'),Array('25','25'),Array('26','26'),Array('27','27'),Array('28','28'),Array('29','29'),Array('30','30'),Array('31','31'),Array('32','32'),Array('33','33'),Array('34','34'),Array('35','35'),Array('36','36'),Array('37','37'),Array('38','38'),Array('39','39'),Array('40','40'),Array('41','41'),Array('42','42'),Array('43','43'),Array('44','44'),Array('45','45'),Array('46','46'),Array('47','47'),Array('48','48'),Array('49','49'),Array('50','50'),Array('51','51'),Array('52','52'),Array('53','53'),Array('54','54'),Array('55','55'),Array('56','56'),Array('57','57'),Array('58','58'),Array('59','59'));break;case'MINUTES_BY_5':vl=new Array(Array('--','--'),Array('00','00'),Array('05','05'),Array('10','10'),Array('15','15'),Array('20','20'),Array('25','25'),Array('30','30'),Array('35','35'),Array('40','40'),Array('45','45'),Array('50','50'),Array('55','55'));break;case'MINUTES_BY_15':vl=new Array(Array('--','--'),Array('00','00'),Array('15','15'),Array('30','30'),Array('45','45'));break;case'US_STATES_SHORT':vl=new Array(Array('--','--'),Array('AK','AK'),Array('AL','AL'),Array('AR','AR'),Array('AZ','AZ'),Array('CA','CA'),Array('CO','CO'),Array('CT','CT'),Array('DC','DC'),Array('DE','DE'),Array('FL','FL'),Array('GA','GA'),Array('HI','HI'),Array('IA','IA'),Array('ID','ID'),Array('IL','IL'),Array('IN','IN'),Array('KS','KS'),Array('KY','KY'),Array('LA','LA'),Array('MA','MA'),Array('MD','MD'),Array('ME','ME'),Array('MI','MI'),Array('MN','MN'),Array('MO','MO'),Array('MS','MS'),Array('MT','MT'),Array('NC','NC'),Array('ND','ND'),Array('NE','NE'),Array('NH','NH'),Array('NJ','NJ'),Array('NM','NM'),Array('NV','NV'),Array('NY','NY'),Array('OH','OH'),Array('OK','OK'),Array('OR','OR'),Array('PA','PA'),Array('RI','RI'),Array('SC','SC'),Array('SD','SD'),Array('TN','TN'),Array('TX','TX'),Array('UT','UT'),Array('VA','VA'),Array('VT','VT'),Array('WA','WA'),Array('WI','WI'),Array('WV','WV'),Array('WY','WY'));break;case'US_STATES_LONG':vl=new Array(Array('--','------'),Array('AL','Alabama'),Array('AK','Alaska'),Array('AZ','Arizona'),Array('AR','Arkansas'),Array('CA','California'),Array('CO','Colorado'),Array('CT','Connecticut'),Array('DC','District of Columbia'),Array('DE','Delaware'),Array('FL','Florida'),Array('GA','Georgia'),Array('HI','Hawaii'),Array('ID','Idaho'),Array('IL','Illinois'),Array('IN','Indiana'),Array('IA','Iowa'),Array('KS','Kansas'),Array('KY','Kentucky'),Array('LA','Louisiana'),Array('ME','Maine'),Array('MD','Maryland'),Array('MA','Massachusetts'),Array('MI','Michigan'),Array('MN','Minnesota'),Array('MS','Mississippi'),Array('MO','Missouri'),Array('MT','Montana'),Array('NE','Nebraska'),Array('NV','Nevada'),Array('NH','New Hampshire'),Array('NJ','New Jersey'),Array('NM','New Mexico'),Array('NY','New York'),Array('NC','North Carolina'),Array('ND','North Dakota'),Array('OH','Ohio'),Array('OK','Oklahoma'),Array('OR','Oregon'),Array('PA','Pennsylvania'),Array('RI','Rhode Island'),Array('SC','South Carolina'),Array('SD','South Dakota'),Array('TN','Tennessee'),Array('TX','Texas'),Array('UT','Utah'),Array('VT','Vermont'),Array('VA','Virginia'),Array('WA','Washington'),Array('WV','West Virginia'),Array('WI','Wisconsin'),Array('WY','Wyoming'));break;case'US_TERR_SHORT':vl=new Array(Array('--','--'),Array('AS','AS'),Array('FM','FM'),Array('GU','GU'),Array('MH','MH'),Array('MP','MP'),Array('PW','PW'),Array('PR','PR'),Array('VI','VI'),Array('AE','AE'),Array('AA','AA'),Array('AP','AP'));break;case'US_TERR_LONG':vl=new Array(Array('--','------'),Array('AS','American Samoa'),Array('FM','Federated States of Micronesia'),Array('GU','Guam'),Array('MH','Marshall Islands'),Array('MP','Northern Mariana Islands'),Array('PW','Palau'),Array('PR','Puerto Rico'),Array('VI','Virgin Islands'),Array('AE','Armed Forces'),Array('AA','Armed Forces Americas'),Array('AP','Armed Forces Pacific'));break;case'CA_PROVINCES_SHORT':vl=new Array(Array('--','--'),Array('AB','AB'),Array('BC','BC'),Array('MB','MB'),Array('NB','NB'),Array('NL','NL'),Array('NT','NT'),Array('NS','NS'),Array('NU','NU'),Array('ON','ON'),Array('PE','PE'),Array('QC','QC'),Array('SK','SK'),Array('YT','YT'));break;case'CA_PROVINCES_LONG':vl=new Array(Array('--','------'),Array('AB','Alberta'),Array('BC','British Columbia'),Array('MB','Manitoba'),Array('NB','New Brunswick'),Array('NL','Newfoundland and Labrador'),Array('NT','Northwest Territories'),Array('NS','Nova Scotia'),Array('NU','Nunavut'),Array('ON','Ontario'),Array('PE','Prince Edward Island'),Array('QC','Quebec'),Array('SK','Saskatchewan'),Array('YT','Yukon'));break;case'MEX_STATES_SHORT':vl=new Array(Array('--','--'),Array('AG','AG'),Array('BC','BC'),Array('BS','BS'),Array('CM','CM'),Array('CS','CS'),Array('CH','CH'),Array('CO','CO'),Array('CL','CL'),Array('DF','DF'),Array('DG','DG'),Array('GT','GT'),Array('GR','GR'),Array('HG','HG'),Array('JA','JA'),Array('ME','ME'),Array('MI','MI'),Array('MO','MO'),Array('NA','NA'),Array('NL','NL'),Array('OA','OA'),Array('PB','PB'),Array('QE','QE'),Array('QR','QR'),Array('SL','SL'),Array('SI','SI'),Array('SO','SO'),Array('TB','TB'),Array('TM','TM'),Array('TL','TL'),Array('VE','VE'),Array('YU','YU'),Array('ZA','ZA'));break;case'MEX_STATES_LONG':vl=new Array(Array('--','------'),Array('AG','Aguascalientes'),Array('BC','Baja California'),Array('BS','Baja California Sur'),Array('CM','Campeche'),Array('CS','Chiapas'),Array('CH','Chihuahua'),Array('CO','Coahuila'),Array('CL','Colima'),Array('DF','Federal District'),Array('DG','Durango'),Array('GT','Guanajuato'),Array('GR','Guerrero'),Array('HG','Hidalgo'),Array('JA','Jalisco'),Array('ME','Mexico State'),Array('MI','Michoac&#225;n'),Array('MO','Morelos'),Array('NA','Nayarit'),Array('NL','Nuevo Le&#243;n'),Array('OA','Oaxaca'),Array('PB','Puebla'),Array('QE','Quer&#233;taro'),Array('QR','Quintana Roo'),Array('SL','San Luis Potos&#237;'),Array('SI','Sinaloa'),Array('SO','Sonora'),Array('TB','Tabasco'),Array('TM','Tamaulipas'),Array('TL','Tlaxcala'),Array('VE','Veracruz'),Array('YU','Yucat&#225;n'),Array('ZA','Zacatecas'));break;case'UK_COUNTIES':vl=new Array(Array('--','------'),Array('Aberdeenshire','Aberdeenshire'),Array('Alderney','Alderney'),Array('Angus/Forfarshire','Angus/Forfarshire'),Array('Argyllshire','Argyllshire'),Array('Avon','Avon'),Array('Ayrshire','Ayrshire'),Array('Banffshire','Banffshire'),Array('Bedfordshire','Bedfordshire'),Array('Berkshire','Berkshire'),Array('Berwickshire','Berwickshire'),Array('Buckinghamshire','Buckinghamshire'),Array('Buteshire','Buteshire'),Array('Caithness','Caithness'),Array('Cambridgeshire','Cambridgeshire'),Array('Cheshire','Cheshire'),Array('Clackmannanshire','Clackmannanshire'),Array('Clwyd','Clwyd'),Array('Cornwall','Cornwall'),Array('County Antrim','County Antrim'),Array('County Armagh','County Armagh'),Array('County Down','County Down'),Array('County Fermanagh','County Fermanagh'),Array('County Londonderry','County Londonderry'),Array('County Tyrone','County Tyrone'),Array('Cumbria','Cumbria'),Array('Derbyshire','Derbyshire'),Array('Devon','Devon'),Array('Dorset','Dorset'),Array('Dumbartonshire','Dumbartonshire'),Array('Dumfriesshire','Dumfriesshire'),Array('Durham','Durham'),Array('Dyfed','Dyfed'),Array('East Lothian','East Lothian'),Array('East Sussex','East Sussex'),Array('East Yorkshire','East Yorkshire'),Array('Essex','Essex'),Array('Fair Isle','Fair Isle'),Array('Fife','Fife'),Array('Gloucestershire','Gloucestershire'),Array('Greater London','Greater London'),Array('Greater Manchester','Greater Manchester'),Array('Guernsey','Guernsey'),Array('Gwent','Gwent'),Array('Gwynedd','Gwynedd'),Array('Hampshire','Hampshire'),Array('Herefordshire','Herefordshire'),Array('Herm','Herm'),Array('Hertfordshire','Hertfordshire'),Array('Huntingdonshire','Huntingdonshire'),Array('Inner Hebrides','Inner Hebrides'),Array('Inverness-shire','Inverness-shire'),Array('Isle of Man','Isle of Man'),Array('Isle of Wight','Isle of Wight'),Array('Isles of Scilly','Isles of Scilly'),Array('Jersey','Jersey'),Array('Kent','Kent'),Array('Kincardineshire','Kincardineshire'),Array('Kinross-shire','Kinross-shire'),Array('Kirkcudbrightshire','Kirkcudbrightshire'),Array('Lanarkshire','Lanarkshire'),Array('Lancashire','Lancashire'),Array('Leicestershire','Leicestershire'),Array('Lincolnshire','Lincolnshire'),Array('Merseyside','Merseyside'),Array('Mid Glamorgan','Mid Glamorgan'),Array('Middlesex','Middlesex'),Array('Midlothian/Edinburghshire','Midlothian/Edinburghshire'),Array('Morayshire','Morayshire'),Array('Nairnshire','Nairnshire'),Array('Norfolk','Norfolk'),Array('North Yorkshire','North Yorkshire'),Array('Northamptonshire','Northamptonshire'),Array('Northumberland','Northumberland'),Array('Nottinghamshire','Nottinghamshire'),Array('Orkney','Orkney'),Array('Outer Hebrides','Outer Hebrides'),Array('Oxfordshire','Oxfordshire'),Array('Peeblesshire','Peeblesshire'),Array('Perthshire','Perthshire'),Array('Powys','Powys'),Array('Renfrewshire','Renfrewshire'),Array('Ross-shire','Ross-shire'),Array('Roxburghshire','Roxburghshire'),Array('Rutland','Rutland'),Array('Sark','Sark'),Array('Selkirkshire','Selkirkshire'),Array('Shetland','Shetland'),Array('Shropshire','Shropshire'),Array('Somerset','Somerset'),Array('South Glamorgan','South Glamorgan'),Array('South Yorkshire','South Yorkshire'),Array('Staffordshire','Staffordshire'),Array('Stirlingshire','Stirlingshire'),Array('Suffolk','Suffolk'),Array('Surrey','Surrey'),Array('Sutherland','Sutherland'),Array('Tyne and Wear','Tyne and Wear'),Array('Warwickshire','Warwickshire'),Array('West Glamorgan','West Glamorgan'),Array('West Lothian/Linlithgowshire','West Lothian/Linlithgowshire'),Array('West Midlands','West Midlands'),Array('West Sussex','West Sussex'),Array('West Yorkshire','West Yorkshire'),Array('Wigtownshire','Wigtownshire'),Array('Wiltshire','Wiltshire'),Array('Worcestershire','Worcestershire'));break;case'IRELAND_COUNTIES':vl=new Array(Array('--','------'),Array('Carlow','Carlow'),Array('Cavan','Cavan'),Array('Clare','Clare'),Array('Cork','Cork'),Array('Donegal','Donegal'),Array('Dublin','Dublin'),Array('Galway','Galway'),Array('Kerry','Kerry'),Array('Kildare','Kildare'),Array('Kilkenny','Kilkenny'),Array('Laois','Laois'),Array('Leitrim','Leitrim'),Array('Limerick','Limerick'),Array('Longford','Longford'),Array('Louth','Louth'),Array('Mayo','Mayo'),Array('Meath','Meath'),Array('Monaghan','Monaghan'),Array('Offaly','Offaly'),Array('Roscommon','Roscommon'),Array('Sligo','Sligo'),Array('Tipperary','Tipperary'),Array('Waterford','Waterford'),Array('Westmeath','Westmeath'),Array('Wexford','Wexford'),Array('Wicklow','Wicklow'));break;case'COUNTRIES':vl=new Array(Array('--','------'),Array('AF','Afghanistan'),Array('AL','Albania'),Array('DZ','Algeria'),Array('AS','American Samoa'),Array('AD','Andorra'),Array('AO','Angola'),Array('AI','Anguilla'),Array('AQ','Antarctica'),Array('AG','Antigua and Barbuda'),Array('AR','Argentina'),Array('AM','Armenia'),Array('AW','Aruba'),Array('AU','Australia'),Array('AT','Austria'),Array('AZ','Azerbaijan'),Array('BS','Bahamas'),Array('BH','Bahrain'),Array('BD','Bangladesh'),Array('BB','Barbados'),Array('BY','Belarus'),Array('BE','Belgium'),Array('BZ','Belize'),Array('BJ','Benin'),Array('BM','Bermuda'),Array('BT','Bhutan'),Array('BO','Bolivia'),Array('BA','Bosnia and Herzegowina'),Array('BW','Botswana'),Array('BV','Bouvet Island'),Array('BR','Brazil'),Array('IO','British Indian Ocean Territory'),Array('BN','Brunei Darussalam'),Array('BG','Bulgaria'),Array('BF','Burkina Faso'),Array('BI','Burundi'),Array('KH','Cambodia'),Array('CM','Cameroon'),Array('CA','Canada'),Array('CV','Cape Verde'),Array('KY','Cayman Islands'),Array('CF','Central African Republic'),Array('TD','Chad'),Array('CL','Chile'),Array('CN','China'),Array('CX','Christmas Island'),Array('CC','Cocos (Keeling) Islands'),Array('CO','Colombia'),Array('KM','Comoros'),Array('CG','Congo'),Array('CD','Congo), Array(the Democratic Republic of the'),Array('CK','Cook Islands'),Array('CR','Costa Rica'),Array('CI','Cote d&#39;Ivoire'),Array('HR','Croatia (Hrvatska)'),Array('CU','Cuba'),Array('CY','Cyprus'),Array('CZ','Czech Republic'),Array('DK','Denmark'),Array('DJ','Djibouti'),Array('DM','Dominica'),Array('DO','Dominican Republic'),Array('TP','East Timor'),Array('EC','Ecuador'),Array('EG','Egypt'),Array('SV','El Salvador'),Array('GQ','Equatorial Guinea'),Array('ER','Eritrea'),Array('EE','Estonia'),Array('ET','Ethiopia'),Array('FK','Falkland Islands (Malvinas)'),Array('FO','Faroe Islands'),Array('FJ','Fiji'),Array('FI','Finland'),Array('FR','France'),Array('FX','France), Array(Metropolitan'),Array('GF','French Guiana'),Array('PF','French Polynesia'),Array('TF','French Southern Territories'),Array('GA','Gabon'),Array('GM','Gambia'),Array('GE','Georgia'),Array('DE','Germany'),Array('GH','Ghana'),Array('GI','Gibraltar'),Array('GB','Great Britain'),Array('GR','Greece'),Array('GL','Greenland'),Array('GD','Grenada'),Array('GP','Guadeloupe'),Array('GU','Guam'),Array('GT','Guatemala'),Array('GN','Guinea'),Array('GW','Guinea-Bissau'),Array('GY','Guyana'),Array('HT','Haiti'),Array('HM','Heard and Mc Donald Islands'),Array('VA','Holy See (Vatican City State)'),Array('HN','Honduras'),Array('HK','Hong Kong'),Array('HU','Hungary'),Array('IS','Iceland'),Array('IN','India'),Array('ID','Indonesia'),Array('IR','Iran (Islamic Republic of)'),Array('IQ','Iraq'),Array('IE','Ireland'),Array('IL','Israel'),Array('IT','Italy'),Array('JM','Jamaica'),Array('JP','Japan'),Array('JO','Jordan'),Array('KZ','Kazakhstan'),Array('KE','Kenya'),Array('KI','Kiribati'),Array('KP','Korea), Array(Democratic People&#39;s Republic of'),Array('KR','Korea), Array(Republic of'),Array('KW','Kuwait'),Array('KG','Kyrgyzstan'),Array('LA','Lao People&#39;s Democratic Republic'),Array('LV','Latvia'),Array('LB','Lebanon'),Array('LS','Lesotho'),Array('LR','Liberia'),Array('LY','Libyan Arab Jamahiriya'),Array('LI','Liechtenstein'),Array('LT','Lithuania'),Array('LU','Luxembourg'),Array('MO','Macau'),Array('MK','Macedonia), Array(The Former Yugoslav Republic of'),Array('MG','Madagascar'),Array('MW','Malawi'),Array('MY','Malaysia'),Array('MV','Maldives'),Array('ML','Mali'),Array('MT','Malta'),Array('MH','Marshall Islands'),Array('MQ','Martinique'),Array('MR','Mauritania'),Array('MU','Mauritius'),Array('YT','Mayotte'),Array('MX','Mexico'),Array('FM','Micronesia), Array(Federated States of'),Array('MD','Moldova), Array(Republic of'),Array('MC','Monaco'),Array('MN','Mongolia'),Array('MS','Montserrat'),Array('MA','Morocco'),Array('MZ','Mozambique'),Array('MM','Myanmar'),Array('NA','Namibia'),Array('NR','Nauru'),Array('NP','Nepal'),Array('NL','Netherlands'),Array('AN','Netherlands Antilles'),Array('NC','New Caledonia'),Array('NZ','New Zealand'),Array('NI','Nicaragua'),Array('NE','Niger'),Array('NG','Nigeria'),Array('NU','Niue'),Array('NF','Norfolk Island'),Array('MP','Northern Mariana Islands'),Array('NO','Norway'),Array('OM','Oman'),Array('PK','Pakistan'),Array('PW','Palau'),Array('PA','Panama'),Array('PG','Papua New Guinea'),Array('PY','Paraguay'),Array('PE','Peru'),Array('PH','Philippines'),Array('PN','Pitcairn'),Array('PL','Poland'),Array('PT','Portugal'),Array('PR','Puerto Rico'),Array('QA','Qatar'),Array('RE','Reunion'),Array('RO','Romania'),Array('RU','Russian Federation'),Array('RW','Rwanda'),Array('KN','Saint Kitts and Nevis'),Array('LC','Saint LUCIA'),Array('VC','Saint Vincent and the Grenadines'),Array('WS','Samoa'),Array('SM','San Marino'),Array('ST','Sao Tome and Principe'),Array('SA','Saudi Arabia'),Array('SN','Senegal'),Array('SC','Seychelles'),Array('SL','Sierra Leone'),Array('SG','Singapore'),Array('SK','Slovakia (Slovak Republic)'),Array('SI','Slovenia'),Array('SB','Solomon Islands'),Array('SO','Somalia'),Array('ZA','South Africa'),Array('GS','South Georgia and the South Sandwich Islands'),Array('ES','Spain'),Array('LK','Sri Lanka'),Array('SH','St. Helena'),Array('PM','St. Pierre and Miquelon'),Array('SD','Sudan'),Array('SR','Suriname'),Array('SJ','Svalbard and Jan Mayen Islands'),Array('SZ','Swaziland'),Array('SE','Sweden'),Array('CH','Switzerland'),Array('SY','Syrian Arab Republic'),Array('TW','Taiwan), Array(Province of China'),Array('TJ','Tajikistan'),Array('TZ','Tanzania), Array(United Republic of'),Array('TH','Thailand'),Array('TG','Togo'),Array('TK','Tokelau'),Array('TO','Tonga'),Array('TT','Trinidad and Tobago'),Array('TN','Tunisia'),Array('TR','Turkey'),Array('TM','Turkmenistan'),Array('TC','Turks and Caicos Islands'),Array('TV','Tuvalu'),Array('UG','Uganda'),Array('UA','Ukraine'),Array('AE','United Arab Emirates'),Array('UK','United Kingdom'),Array('US','United States'),Array('UM','United States Minor Outlying Islands'),Array('UY','Uruguay'),Array('UZ','Uzbekistan'),Array('VU','Vanuatu'),Array('VE','Venezuela'),Array('VN','Viet Nam'),Array('VG','Virgin Islands (British)'),Array('VI','Virgin Islands (U.S.)'),Array('WF','Wallis and Futuna Islands'),Array('EH','Western Sahara'),Array('YE','Yemen'),Array('YU','Yugoslavia'),Array('ZM','Zambia'),Array('ZW','Zimbabwe'));break;default:vl=vals;}}
if(vl.constructor==Array){for(var i=0;i<vl.length;i++){this.values.push(vl[i]);}}else{this.values.push(vl);}
for(var i=0;i<this.values.length;i++){newOpt=document.createElement('option');if(this.values[i].constructor==Array){newOpt.setAttribute('value',this.values[i][0]);newOpt.selected=(this.valueSelected==this.values[i][1])?true:false;newOpt.innerHTML=this.values[i][1];}else{newOpt.setAttribute('value',this.values[i]);newOpt.selected=(this.valueSelected==this.values[i])?true:false;newOpt.innerHTML=this.values[i];}
this.elem.appendChild(newOpt);}
this.parentElem.appendChild(this.elem);this.remove=function(){this.parentElem.removeChild(this.elem);}}
function JaxElementTextarea(appendTo,attribs,val){this.parentElem=document.getElementById(appendTo);this.elem=document.createElement('textarea');this.brws=new JaxBrowser();if(attribs!=undefined){for(var i=0;i<attribs.length;i++){if((attribs[i][0]=='style')&&(this.brws.browser=='MSIE')&&(this.brws.version<8)){styles=(attribs[i][1].lastIndexOf(';')==(attribs[i][1].length-1))?attribs[i][1].substring(0,(attribs[i][1].length-1)):attribs[i][1];sty=styles.replace('; ',';').split(';');for(j=0;j<sty.length;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';for(k=0;k<convertStyleAry.length;k++){convertStyle=(k==0)?convertStyleAry[k]:convertStyle+convertStyleAry[k].substring(0,1).toUpperCase()+convertStyleAry[k].substring(1);}}else if((styleVal[0]=='float')||(styleVal[0]==' float')){convertStyle='styleFloat';}else{convertStyle=styleVal[0];}
eval("this.elem.style."+convertStyle+" = '"+styleVal[1]+"';");}}else{this.elem.setAttribute(attribs[i][0],attribs[i][1]);}}}
brw=new JaxBrowser();if(brw.browser=='MSIE'){this.elem.innerText=(val!=null)?val:'';}else{this.elem.innerHTML=(val!=null)?val:'';}
this.parentElem.appendChild(this.elem);this.remove=function(){this.parentElem.removeChild(this.elem);}}
function addEvent(evt,func){obj=((evt=='scroll')||(evt=='resize'))?window:document;brw=new JaxBrowser();if(brw.browser=='MSIE'){obj.attachEvent('on'+evt,func);}else{obj.addEventListener(evt,func,true);}}
function JaxFlash(){this.flashMovie=function(url,nm,wid,hgt,bgcolor,wmode,ver){if(bgcolor==null){bgcolor='#ffffff';}
if(wmode==null){wmode='window';}
if(ver==null){ver=9;}
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver+',0,0,0" width="'+wid+'" height="'+hgt+'" id="'+nm+'" align="middle">');document.write('    <param name="allowScriptAccess" value="sameDomain" />');document.write('    <param name="movie" value="'+url+'" />');document.write('    <param name="quality" value="high" />');document.write('    <param name="bgcolor" value="'+bgcolor+'" />');document.write('    <param name="wmode" value="'+wmode+'" />');document.write('    <embed src="'+url+'" quality="high" bgcolor="'+bgcolor+'" wmode="'+wmode+'" width="'+wid+'" height="'+hgt+'" name="'+nm+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/flashplayer/" />');document.write('    </embed>');document.write('</object>');}
this.loadFlashVar=function(nm,tar,val){if(eval('window.'+nm)){windowName=eval("window.document['"+nm+"']");windowName.SetVariable(tar,val);}else if(eval('document.'+nm)){docName=eval('document.'+nm);docName.SetVariable(tar,val);}}}
function JaxForm(formId,conds){this.id=formId;this.fo=document.getElementById(this.id);this.conditions=conds;this.validators=new Array();if(this.conditions!=null){for(var i=0;i<this.conditions.length;i++){foElem=eval('this.fo.'+this.conditions[i][0]);foElem.setAttribute('jax',this.conditions[i][1]);}}
this.validate=function(){this.validators=new Array();this.parseFormElements();for(var i=0;i<this.validators.length;i++){error=this.formElementIsValid(this.validators[i]);if(error!=null){alert(error);if(this.validators[i][0]=='radio'){fo=eval('this.fo.'+this.validators[i][1]+'[0]');}else if(this.validators[i][0]=='checkbox'){fo=eval('this.fo.'+this.validators[i][1].substring(0,this.validators[i][1].indexOf('[')));}else{fo=eval('this.fo.'+this.validators[i][1]);}
fo.focus();if(this.validators[i][0].indexOf('select')==-1){fo.select();}
return false;}}
return true;}
this.parseFormElements=function(){for(var i=0;i<this.conditions.length;i++){var obj=eval('this.fo.'+this.conditions[i][0]);if(obj.getAttribute('jax')){objConds=(obj.getAttribute('jax').indexOf('&')!=-1)?obj.getAttribute('jax').split('&'):new Array(obj.getAttribute('jax'));customMsg=null;for(var k=0;k<this.conditions.length;k++){if(this.conditions[k].indexOf(obj.name)!=-1){customMsg=(this.conditions[k][2]!=undefined)?this.conditions[k][2]:null;}}
for(var j=0;j<objConds.length;j++){if(objConds[j].indexOf('|')!=-1){cond=objConds[j].substring(0,objConds[j].indexOf('|'));condVal=objConds[j].substring(objConds[j].indexOf('|')+1);}else{cond=objConds[j];condVal=null;}
this.validators.push(Array(obj.type,obj.name,obj.value,cond,condVal,customMsg));}}}}
this.formElementIsValid=function(elem){var msg=null;switch(elem[3]){case'AlphaNum':if(!elem[2].match(/^\w+$/)){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is not alphanumeric.';}
break;case'Alpha':if(!elem[2].match(/^[a-zA-Z]+$/)){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field must contain only characters of the alphabet.';}
break;case'Between':var numAry=elem[4].split('|');if((parseInt(elem[2])<=parseInt(numAry[0]))||(parseInt(elem[2])>=parseInt(numAry[1]))){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is not between '+numAry[0]+' and '+numAry[1];}
break;case'Email':if(!elem[2].match(/[a-zA-Z0-9\.\-\_+%]+@[a-zA-Z0-9\-\_\.]+\.[a-zA-Z]{2,4}/)){msg=(elem[5]!=null)?elem[5]:'The address in the '+elem[1].replace(/_/g,' ')+' field is not a valid email.';}
break;case'Equal':if(elem[2]!=elem[4]){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field does not equal '+elem[4];}
break;case'GreaterThan':if(parseInt(elem[2])<=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is not greater than '+elem[4];}
break;case'Length':if(parseInt(elem[2].length)!=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:'The length of the '+elem[1].replace(/_/g,' ')+' field does not equal '+elem[4];}
break;case'LengthBet':var numAry=elem[4].split('|');if((parseInt(elem[2].length)<=parseInt(numAry[0]))||(parseInt(elem[2].length)>=parseInt(numAry[1]))){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is not between '+numAry[0]+' and '+numAry[1];}
break;case'LengthGT':if(parseInt(elem[2].length)<=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:'The length of the '+elem[1].replace(/_/g,' ')+' field is not greater than '+elem[4];}
break;case'LengthLT':if(parseInt(elem[2].length)>=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:'The length of the '+elem[1].replace(/_/g,' ')+' field is not less than '+elem[4];}
break;case'LessThan':if(parseInt(elem[2])>=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is not less than '+elem[4];}
break;case'NotEmpty':if(elem[0]=='radio'){var counter=0;for(i=0;i<this.fo.elements.length;i++){if((this.fo.elements[i].name==elem[1])&&(this.fo.elements[i].checked)){counter++;}}
if(counter==0){elemName=(elem[1].indexOf('[')!=-1)?elem[1].substring(0,elem[1].indexOf('[')):elem[1];msg=(elem[5]!=null)?elem[5]:'The '+elemName.replace(/_/g,' ')+' field must be checked.';}}else if(elem[0]=='checkbox'){var counter=0;for(i=0;i<this.fo.elements.length;i++){if((this.fo.elements[i].name==elem[1])&&(this.fo.elements[i].checked)){counter++;}}
if(counter==0){elemName=(elem[1].indexOf('[')!=-1)?elem[1].substring(0,elem[1].indexOf('[')):elem[1];msg=(elem[5]!=null)?elem[5]:'The '+elemName.replace(/_/g,' ')+' field must be checked.';}}else if(elem[2].length<1){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is empty.';}
break;case'NotEqual':if(elem[2]==elem[4]){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field cannot equal '+elem[4];}
break;case'Num':if(isNaN(elem[2])){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is not a number.';}
break;case'RegEx':var regex=eval(elem[4]);if(!elem[2].match(regex)){msg=(elem[5]!=null)?elem[5]:'The '+elem[1].replace(/_/g,' ')+' field is not in the correct format.';}
break;default:msg=null;}
return msg;}
this.checkLength=function(obj){if(obj.value.length==obj.maxLength){var next=obj.tabIndex;if(next<this.fo.length){this.fo.elements[next].focus();}}}
this.convertURL=function(subj,targ,sep){sub=eval('this.fo.'+subj);tar=eval('this.fo.'+targ);tar.value=sub.value.slug(sep);}
this.checkValidate=function(elem,conf){chk=this.fo.elements;counter=0;for(i=0;i<chk.length;i++){if(chk[i].type=='checkbox'){if(chk[i].checked){counter++;}}}
if((elem!=null)&&(counter==0)){alert('Please select at least one '+elem+'.');return false;}else if(conf!=null){var answer=confirm('This action cannot be undone. Are you sure?');if(answer){return true;}else{return false;}}else{return true;}}
this.checkAll=function(elem,exclude){if(exclude!=null){if(exclude.constructor!=Array){exclude=new Array(exclude);}}else{exclude=new Array();}
chk=this.fo.elements;counter=0;if(elem==null){for(i=0;i<chk.length;i++){if((chk[i].type=='checkbox')&&(exclude.indexOf(chk[i].value)==-1)){if(!chk[i].checked){chk[i].checked=true;}}}}else{for(i=0;i<chk.length;i++){if((chk[i].id.indexOf(elem)!=-1)&&(exclude.indexOf(chk[i].value)==-1)){if(!chk[i].checked){chk[i].checked=true;}}}}}
this.uncheckAll=function(elem,exclude){if(exclude!=null){if(exclude.constructor!=Array){exclude=new Array(exclude);}}else{exclude=new Array();}
chk=this.fo.elements;counter=0;if(elem==null){for(i=0;i<chk.length;i++){if((chk[i].type=='checkbox')&&(exclude.indexOf(chk[i].value)==-1)){if(chk[i].checked){chk[i].checked=false;}}}}else{for(i=0;i<chk.length;i++){if((chk[i].id.indexOf(elem)!=-1)&&(exclude.indexOf(chk[i].value)==-1)){if(chk[i].checked){chk[i].checked=false;}}}}}
this.checkInverse=function(elem,exclude){if(exclude!=null){if(exclude.constructor!=Array){exclude=new Array(exclude);}}else{exclude=new Array();}
chk=this.fo.elements;counter=0;if(elem==null){for(i=0;i<chk.length;i++){if((chk[i].type=='checkbox')&&(exclude.indexOf(chk[i].value)==-1)){chk[i].checked=(chk[i].checked)?false:true;}}}else{for(i=0;i<chk.length;i++){if((chk[i].id.indexOf(elem)!=-1)&&(exclude.indexOf(chk[i].value)==-1)){chk[i].checked=(chk[i].checked)?false:true;}}}}}
function JaxFx(){this.count=0;this.tween=null;this.speed=null;this.live=false;this.steps=new Array();this.elems=new Array();this.elemSteps=Array();this.instance=null;this.addStyle=function(elem,sty,param){switch(sty){case'opacity':brw=new JaxBrowser();if(brw.browser=='MSIE'){document.getElementById(elem).style.filter='alpha(opacity='+param+')';}else{document.getElementById(elem).style.opacity=param/100;}
break;default:eval("document.getElementById(elem).style."+sty+" = '"+param+"';");}}
this.addStyles=function(elem,params){for(var i=0;i<params.length;i++){this.addStyle(elem,params[i][0],params[i][1]);}}
this.show=function(elem){document.getElementById(elem).style.display='block';}
this.hide=function(elem){document.getElementById(elem).style.display='none';}
this.move=function(elem,x,y,twn,spd){if((twn!=null)&&(spd!=null)){this.animate(Array(Array(elem,Array(Array('move',x,y)))),twn,spd);}else{document.getElementById(elem).style.left=x+'px';document.getElementById(elem).style.top=y+'px';}}
this.resize=function(elem,w,h,twn,spd){if((twn!=null)&&(spd!=null)){this.animate(Array(Array(elem,Array(Array('resize',w,h)))),twn,spd);}else{document.getElementById(elem).style.width=w+'px';document.getElementById(elem).style.height=h+'px';}}
this.fade=function(elem,f,twn,spd){if((twn!=null)&&(spd!=null)){this.animate(Array(Array(elem,Array(Array('fade',f)))),twn,spd);}else{if(brw.browser=='MSIE'){document.getElementById(elem).style.filter='alpha(opacity='+f+')';}else{document.getElementById(elem).style.opacity=f/100;}
if(f==0){document.getElementById(elem).style.display='none';}}}
this.wipeOff=function(elem,w,twn,spd){if((twn!=null)&&(spd!=null)){this.animate(Array(Array(elem,Array(Array('wipeOff',w)))),twn,spd);}else{document.getElementById(elem).style.width=w+'px';if(w==0){document.getElementById(elem).style.display='none';}}}
this.wipeUp=function(elem,h,twn,spd){if((twn!=null)&&(spd!=null)){this.animate(Array(Array(elem,Array(Array('wipeUp',h)))),twn,spd);}else{document.getElementById(elem).style.height=h+'px';if(h==0){document.getElementById(elem).style.display='none';}}}
this.slide=function(elem,x,y,twn,spd){if((twn!=null)&&(spd!=null)){this.animate(Array(Array(elem,Array(Array('slide',x,y)))),twn,spd);}else{document.getElementById(elem).style.backgroundPosition=x+'px '+y+'px';}}
this.animate=function(params,twn,spd){if((twn!=null)&&(spd!=null)){for(var e=0;e<params.length;e++){this.fadeChange=null;this.widthChange=null;this.heightChange=null;this.tween=twn;this.speed=spd;this.live=true;this.elemSteps=new Array();elem=params[e][0];for(var m=0;m<params[e][1].length;m++){switch(params[e][1][m][0]){case'move':this.calcSteps(params[e][1][m][1],params[e][1][m][2],parseInt(document.getElementById(elem).style.left),parseInt(document.getElementById(elem).style.top),this.tween);break;case'resize':this.calcSteps(params[e][1][m][1],params[e][1][m][2],parseInt(document.getElementById(elem).style.width),parseInt(document.getElementById(elem).style.height),this.tween);break;case'fade':this.fadeChange=params[e][1][m][1];if(this.fadeChange!=0){document.getElementById(elem).style.display='block';}
brw=new JaxBrowser();op=(brw.browser=='MSIE')?document.getElementById(elem).style.filter.substring(document.getElementById(elem).style.filter.indexOf('=')+1,document.getElementById(elem).style.filter.indexOf(')')):(document.getElementById(elem).style.opacity*100);this.calcStep(op,params[e][1][m][1],this.tween);break;case'wipeOff':this.widthChange=params[e][1][m][1];if(this.widthChange!=0){document.getElementById(elem).style.display='block';}
this.calcStep(parseInt(document.getElementById(elem).style.width),params[e][1][m][1],this.tween);break;case'wipeUp':this.heightChange=params[e][1][m][1];if(this.heightChange!=0){document.getElementById(elem).style.display='block';}
this.calcStep(parseInt(document.getElementById(elem).style.height),params[e][1][m][1],this.tween);break;case'slide':backPos=document.getElementById(elem).style.backgroundPosition;if(backPos.indexOf('px')!=-1){backPos=backPos.split(' ');orgX=parseInt(backPos[0]);orgY=parseInt(backPos[1]);}else{orgX=0;orgY=0;}
this.calcSteps(params[e][1][m][1],params[e][1][m][2],orgX,orgY,this.tween);break;}
this.elemSteps.push(Array(params[e][1][m][0],this.steps));}
this.elems.push(Array(elem,this.elemSteps,Array(this.fadeChange,this.widthChange,this.heightChange)));}
function animateObj(obj,sp){if(obj.count<obj.elems[0][1][0][1].length){for(var q=0;q<obj.elems.length;q++){for(var n=0;n<obj.elems[q][1].length;n++){switch(obj.elems[q][1][n][0]){case'move':document.getElementById(obj.elems[q][0]).style.left=obj.elems[q][1][n][1][obj.count][0]+'px';document.getElementById(obj.elems[q][0]).style.top=obj.elems[q][1][n][1][obj.count][1]+'px';break;case'resize':document.getElementById(obj.elems[q][0]).style.width=obj.elems[q][1][n][1][obj.count][0]+'px';document.getElementById(obj.elems[q][0]).style.height=obj.elems[q][1][n][1][obj.count][1]+'px';break;case'fade':brw=new JaxBrowser();if(brw.browser=='MSIE'){document.getElementById(obj.elems[q][0]).style.filter='alpha(opacity='+obj.elems[q][1][n][1][obj.count]+')';}else{document.getElementById(obj.elems[q][0]).style.opacity=obj.elems[q][1][n][1][obj.count]/100;}
break;case'wipeOff':document.getElementById(obj.elems[q][0]).style.width=obj.elems[q][1][n][1][obj.count]+'px';break;case'wipeUp':document.getElementById(obj.elems[q][0]).style.height=obj.elems[q][1][n][1][obj.count]+'px';break;case'slide':document.getElementById(obj.elems[q][0]).style.backgroundPosition=obj.elems[q][1][n][1][obj.count][0]+'px '+obj.elems[q][1][n][1][obj.count][1]+'px';break;}}}
obj.count++;o=obj;this.instance=setTimeout(function(){animateObj(o,o.speed)},o.speed);}else{for(var q=0;q<obj.elems.length;q++){if(obj.elems[q][2][0]!=null){if(obj.elems[q][2][0]==0){document.getElementById(obj.elems[q][0]).style.display='none';}else{brw=new JaxBrowser();if(brw.browser=='MSIE'){document.getElementById(obj.elems[q][0]).style.filter='alpha(opacity='+obj.elems[q][2][0]+')';}else{document.getElementById(obj.elems[q][0]).style.opacity=obj.elems[q][2][0]/100;}}}else if(obj.elems[q][2][1]!=null){if(obj.elems[q][2][1]==0){document.getElementById(obj.elems[q][0]).style.display='none';}else{document.getElementById(obj.elems[q][0]).style.width=obj.elems[q][2][1]+'px';}}else if(obj.elems[q][2][2]!=null){if(obj.elems[q][2][2]==0){document.getElementById(obj.elems[q][0]).style.display='none';}else{document.getElementById(obj.elems[q][0]).style.height=obj.elems[q][2][2]+'px';}}}
obj.count=0;obj.elems=new Array();obj.tween=null;obj.speed=null;obj.live=false;obj.elemSteps=new Array();this.instance=clearTimeout(this.instance);this.instance=null;}}
animateObj(this,this.speed);}}
this.calcSteps=function(a,b,c,d,tween){this.steps=new Array();arem=(a-c)%tween;brem=(b-d)%tween;astep=(arem!=0)?((a-c-arem)/tween):((a-c)/tween);bstep=(brem!=0)?((b-d-brem)/tween):((b-d)/tween);for(i=0;i<=tween;i++){curA=c+(astep*i);curB=d+(bstep*i);this.steps.push(Array(curA,curB));}
lastA=(arem!=0)?(curA+arem):curA;lastB=(brem!=0)?(curB+brem):curB;this.steps.push(Array(lastA,lastB));}
this.calcStep=function(a,b,tween){this.steps=new Array();arem=(a-b)%tween;astep=(arem!=0)?(Math.abs((a-b-arem)/tween)):(Math.abs((a-b)/tween));for(i=0;i<=tween;i++){curA=(b<a)?(parseInt(a)-(astep*i)):(parseInt(a)+(astep*i));this.steps.push(curA);}
if(arem!=0){lastA=(b<a)?(curA-arem):(curA+arem);}else{lastA=curA;}
this.steps.push(lastA);}}
function addLoader(func){var oldOnLoad=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldOnLoad){oldOnLoad();}
func();}}}
function imageLoader(imgs){if(imgs.constructor==Array){for(var i=0;i<imgs.length;i++){imgToLoad=new Image();imgToLoad.src=imgs[i];}}else{imgToLoad=new Image();imgToLoad.src=imgs;}}
function JaxXmlHttp(){request=(window.XMLHttpRequest)?new XMLHttpRequest():false;this.getRequest=function(url,func){request.open('GET',url,true);request.onreadystatechange=func;request.send(null);}
this.postRequest=function(formObj,func,act){params='';for(i=0;i<formObj.elements.length;i++){params+=(i==0)?formObj.elements[i].name+'='+formObj.elements[i].value:'&'+formObj.elements[i].name+'='+formObj.elements[i].value;}
if(act==null){act=formObj.action;}
request.open('POST',act,true);request.setRequestHeader('Content-type','application/x-www-form-urlencoded');request.setRequestHeader('Content-length',params.length);request.setRequestHeader('Connection','close');request.onreadystatechange=func;request.send(params);}}
