/**
 * Jax JavaScript Library v1.7
 *
 * 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://www.jaxjslibrary.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-2011 Moc 10 Media, LLC. (http://www.moc10media.com)
 *
 * Minified at http://fmarcia.info/jsmin/test.html
 *
 */

var _scriptTags=null;var _jaxDocRoot=null;var _lang=null;function _getVars(){_scriptTags=document.getElementsByTagName('script');for(var _i=0;_i<_scriptTags.length;_i++){if((_scriptTags[_i].src!=undefined)&&(_scriptTags[_i].src.indexOf('jax.js')!=-1)){_jaxDocRoot=_scriptTags[_i].src.substring(0,_scriptTags[_i].src.indexOf('jax.js'));}
if((_scriptTags[_i].src!=undefined)&&(_scriptTags[_i].src.indexOf('jax.min.js')!=-1)){_jaxDocRoot=_scriptTags[_i].src.substring(0,_scriptTags[_i].src.indexOf('jax.min.js'));}
if((_scriptTags[_i].src!=undefined)&&(_scriptTags[_i].src.indexOf('.js?')!=-1)){_vars=_scriptTags[_i].src.substring(_scriptTags[_i].src.indexOf('.js?')+4);_varsAry=_vars.split('&');for(var _j=0;_j<_varsAry.length;_j++){eval('window.'+_varsAry[_j].replace('=',' = "')+'"');}}}}
_getVars();addLoader(_getVars);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.trim=function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');};String.prototype.html=function(quot,strict){str=this.replace(/&/g,'&amp;');if(quot!=null){str=str.replace(/"/g,'&quot;').replace(/'/g,'&#39;');}
str=str.replace(/</g,'&lt;').replace(/>/g,'&gt;');if(strict!=null){str=str.replace(/\(/g,'&#40;').replace(/\)/g,'&#41;').replace(/\//g,'&#47;').replace(/:/g,'&#58;').replace(/\[/g,'&#91;').replace(/\]/g,'&#93;').replace(/\\/g,'&#92;').replace(/{/g,'&#123;').replace(/}/g,'&#125;');}
return str;};String.prototype.dehtml=function(quot,strict){str=this.replace(/&amp;/g,'&');if(quot!=null){str=str.replace(/&quot;/g,'"').replace(/&#39;/g,"'");}
str=str.replace(/&lt;/g,'<').replace(/&gt;/g,'>');if(strict!=null){str=str.replace(/&#40;/g,'(').replace(/&#41;/g,')').replace(/&#47;/g,'/').replace(/&#58;/g,':').replace(/&#91;/g,'[').replace(/&#93;/g,']').replace(/&#92;/g,'\\').replace(/&#123;/g,'{').replace(/&#125;/g,'}');}
return str;};String.prototype.addslashes=function(quot){str=this.replace(/\\/g,'\\\\');if(quot=='single'){str=str.replace(/\'/g,"\\'");}else if(quot=='double'){str=str.replace(/\"/g,'\\"');}else{str=str.replace(/\"/g,'\\"').replace(/\'/g,"\\'");}
return str;};String.prototype.stripslashes=function(quot){str=this.replace(/\\\\/g,'\\');if(quot=='single'){str=str.replace(/\\'/g,"'");}else if(quot=='double'){str=str.replace(/\\"/g,'"');}else{str=str.replace(/\\'/g,"'").replace(/\\"/g,'"');}
return str;};String.prototype.slug=function(sep){slg='';if(this.length>0){if(sep!=null){slgAry=[];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=[];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){len=protocolMatches.length;for(var i=0;i<len;i++){matches.push(Array(protocolMatches[i],'<a href="'+protocolMatches[i]+'"'+targ+'>'+protocolMatches[i]+'</a>'));}}
if(linkMatches[0]!=undefined){len=linkMatches.length;for(var i=0;i<len;i++){matches.push(Array(linkMatches[i],' <a href="'+linkMatches[i]+'"'+targ+'>'+linkMatches[i]+'</a>'));}}
if(mailMatches[0]!=undefined){len=mailMatches.length;for(var i=0;i<len;i++){matches.push(Array(mailMatches[i],'<a href="mailto:'+mailMatches[i]+'"'+targ+'>'+mailMatches[i]+'</a>'));}}
if(matches[0]!=undefined){len=matches.length;for(var i=0;i<len;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){if((attribs[0].constructor!=Array)&&(attribs.length==2)){newAttribs=new Array(new Array(attribs[0],attribs[1]));attribs=newAttribs;}
len=attribs.length;for(var i=0;i<len;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(';');stylen=sty.length;for(j=0;j<stylen;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';convStyLen=convertStyleAry.length;for(k=0;k<convStyLen;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){if((attribs[0].constructor!=Array)&&(attribs.length==2)){newAttribs=new Array(new Array(attribs[0],attribs[1]));attribs=newAttribs;}
len=attribs.length;for(var i=0;i<len;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(';');stylen=sty.length;for(j=0;j<stylen;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';convStyLen=convertStyleAry.length;for(k=0;k<convStyLen;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=[];this.spans=[];this.values=[];this.marked=[];this.brws=new JaxBrowser();if(vals.constructor==Array){vallen=vals.length;for(var i=0;i<vallen;i++){this.values.push(vals[i]);}}else{this.values.push(vals);}
if(mrk!=undefined){if(mrk.constructor==Array){mrklen=mrk.length;for(var i=0;i<mrklen;i++){this.marked.push(mrk[i]);}}else{this.marked.push(mrk);}}
parentFieldSet=document.createElement('fieldset');parentFieldSet.setAttribute('class','checkBoxArea');vallen=this.values.length;for(var i=0;i<vallen;i++){newElem=document.createElement('input');newElem.setAttribute('type','checkbox');if(attribs!=undefined){if((attribs[0].constructor!=Array)&&(attribs.length==2)){newAttribs=new Array(new Array(attribs[0],attribs[1]));attribs=newAttribs;}
len=attribs.length;for(var j=0;j<len;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(';');stylen=sty.length;for(k=0;k<stylen;k++){styleVal=sty[k].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';convStyLen=convertStyleAry.length;for(l=0;l<convStyLen;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]);if((this.brws.browser=='MSIE')&&(this.brws.version<8)){newElem.defaultChecked=(this.marked.indexOf(this.values[i][1])!=-1)?true:false;}else{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]);if((this.brws.browser=='MSIE')&&(this.brws.version<8)){newElem.defaultChecked=(this.marked.indexOf(this.values[i])!=-1)?true:false;}else{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(){spanslen=this.spans.length;for(var i=0;i<spanslen;i++){this.parentElem.removeChild(this.spans[i]);}};}
function JaxElementRadio(appendTo,vals,attribs,mrk){this.parentElem=document.getElementById(appendTo);this.elems=[];this.spans=[];this.values=[];this.marked=(mrk!=undefined)?mrk:null;this.brws=new JaxBrowser();if(vals.constructor==Array){vallen=vals.length;for(var i=0;i<vallen;i++){this.values.push(vals[i]);}}else{this.values.push(vals);}
parentFieldSet=document.createElement('fieldset');parentFieldSet.setAttribute('class','radioBtnArea');vallen=this.values.length;for(var i=0;i<vallen;i++){newElem=document.createElement('input');newElem.setAttribute('type','radio');if(attribs!=undefined){if((attribs[0].constructor!=Array)&&(attribs.length==2)){newAttribs=new Array(new Array(attribs[0],attribs[1]));attribs=newAttribs;}
len=attribs.length;for(var j=0;j<len;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(';');stylen=sty.length;for(k=0;k<stylen;k++){styleVal=sty[k].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';convStyLen=convertStyleAry.length;for(l=0;l<convStyLen;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]);if((this.brws.browser=='MSIE')&&(this.brws.version<8)){newElem.defaultChecked=(this.marked.indexOf(this.values[i][1])!=-1)?true:false;}else{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]);if((this.brws.browser=='MSIE')&&(this.brws.version<8)){newElem.defaultChecked=(this.marked.indexOf(this.values[i])!=-1)?true:false;}else{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(){spanslen=this.spans.length;for(var i=0;i<spanslen;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=[];this.valueSelected=(sel!=undefined)?sel:null;this.brws=new JaxBrowser();this.lg=new JaxLanguage();if(attribs!=undefined){if((attribs[0].constructor!=Array)&&(attribs.length==2)){newAttribs=new Array(new Array(attribs[0],attribs[1]));attribs=newAttribs;}
len=attribs.length;for(var i=0;i<len;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(';');stylen=sty.length;for(j=0;j<stylen;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';convStyLen=convertStyleAry.length;for(k=0;k<convStyLen;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=[];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',this.lg.translate('January')),Array('02',this.lg.translate('February')),Array('03',this.lg.translate('March')),Array('04',this.lg.translate('April')),Array('05',this.lg.translate('May')),Array('06',this.lg.translate('June')),Array('07',this.lg.translate('July')),Array('08',this.lg.translate('August')),Array('09',this.lg.translate('September')),Array('10',this.lg.translate('October')),Array('11',this.lg.translate('November')),Array('12',this.lg.translate('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':sun=this.lg.translate('Sunday');mon=this.lg.translate('Monday');tue=this.lg.translate('Tuesday');wed=this.lg.translate('Wednesday');thu=this.lg.translate('Thursday');fri=this.lg.translate('Friday');sat=this.lg.translate('Saturday');vl=new Array(Array('--','------'),Array(sun,sun),Array(mon,mon),Array(tue,tue),Array(wed,wed),Array(thu,thu),Array(fri,fri),Array(sat,sat));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){vllen=vl.length;for(var i=0;i<vllen;i++){this.values.push(vl[i]);}}else{this.values.push(vl);}
vallen=this.values.length;for(var i=0;i<vallen;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){if((attribs[0].constructor!=Array)&&(attribs.length==2)){newAttribs=new Array(new Array(attribs[0],attribs[1]));attribs=newAttribs;}
len=attribs.length;for(var i=0;i<len;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(';');stylen=sty.length;for(j=0;j<stylen;j++){styleVal=sty[j].replace(': ',':').split(':');if(styleVal[0].indexOf('-')!=-1){convertStyleAry=styleVal[0].split('-');convertStyle='';convStyLen=convertStyleAry.length;for(k=0;k<convStyLen;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{if(val!=null){taContent=val.replace(/&/g,'&amp;');taContent=taContent.replace(/</g,'&lt;');taContent=taContent.replace(/>/g,'&gt;');taContent=taContent.replace(/\'/g,'&#39;');taContent=taContent.replace(/\"/g,'&quot;');}else{taContent='';}
this.elem.innerHTML=taContent;}
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.validators=[];this.lg=new JaxLanguage();if(conds==undefined){this.conditions=null;}else if((conds[0].constructor!=Array)&&(conds[0]!=undefined)&&(conds[1]!=undefined)){this.conditions=new Array(conds);}else if(conds[0].constructor==Array){this.conditions=conds;}
if(this.conditions!=null){condslen=this.conditions.length;for(var i=0;i<condslen;i++){foElem=eval('this.fo.'+this.conditions[i][0]);foElem.setAttribute('jax',this.conditions[i][1]);}}
this.validate=function(){this.validators=[];this.parseFormElements();vallen=this.validators.length;for(var i=0;i<vallen;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(){condslen=this.conditions.length;for(var i=0;i<condslen;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<condslen;k++){if(this.conditions[k].indexOf(obj.name)!=-1){customMsg=(this.conditions[k][2]!=undefined)?this.conditions[k][2]:null;}}
objCondsLen=objConds.length;for(var j=0;j<objCondsLen;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]:this.lg.translate('The %1 field is not alphanumeric.',elem[1].replace(/_/g,' '));}
break;case'Alpha':if(!elem[2].match(/^[a-zA-Z]+$/)){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field must contain only characters of the alphabet.',elem[1].replace(/_/g,' '));}
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]:this.lg.translate('The %1 field is not between %2 and %3.',new Array(elem[1].replace(/_/g,' '),numAry[0],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]:this.lg.translate('The address in the %1 field is not a valid email.',elem[1].replace(/_/g,' '));}
break;case'Equal':if(elem[2]!=elem[4]){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field does not equal %2.',new Array(elem[1].replace(/_/g,' '),elem[4]));}
break;case'GreaterThan':if(parseInt(elem[2])<=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field is not greater than %2.',new Array(elem[1].replace(/_/g,' '),elem[4]));}
break;case'Length':if(parseInt(elem[2].length)!=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The length of the %1 field does not equal %2.',new Array(elem[1].replace(/_/g,' '),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]:this.lg.translate('The %1 field is not between %2 and %3.',new Array(elem[1].replace(/_/g,' '),numAry[0],numAry[1]));}
break;case'LengthGT':if(parseInt(elem[2].length)<=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The length of the %1 field is not greater than %2.',new Array(elem[1].replace(/_/g,' '),elem[4]));}
break;case'LengthLT':if(parseInt(elem[2].length)>=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The length of the %1 field is not less than %2.',new Array(elem[1].replace(/_/g,' '),elem[4]));}
break;case'LessThan':if(parseInt(elem[2])>=parseInt(elem[4])){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field is not less than %2.',new Array(elem[1].replace(/_/g,' '),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]:this.lg.translate('The %1 field must be checked.',elem[1].replace(/_/g,' '));}}else if(elem[0]=='checkbox'){var counter=0;foElemLen=this.fo.elements.length;for(i=0;i<foElemLen;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]:this.lg.translate('The %1 field must be checked.',elem[1].replace(/_/g,' '));}}else if(elem[2].length<1){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field is empty.',elem[1].replace(/_/g,' '));}
break;case'NotEqual':if(elem[2]==elem[4]){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field cannot equal %2.',new Array(elem[1].replace(/_/g,' '),elem[4]));}
break;case'Num':if(isNaN(elem[2])){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field is not a number.',elem[1].replace(/_/g,' '));}
break;case'RegEx':var regex=eval(elem[4]);if(!elem[2].match(regex)){msg=(elem[5]!=null)?elem[5]:this.lg.translate('The %1 field is not in the correct format.',elem[1].replace(/_/g,' '));}
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;chklen=chk.length;for(i=0;i<chklen;i++){if(chk[i].type=='checkbox'){if(chk[i].checked){counter++;}}}
if((elem!=null)&&(counter==0)){alert(this.lg.translate('Please select at least one %1.',elem));return false;}else if(conf!=null){var answer=confirm(this.lg.translate('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=[];}
chk=this.fo.elements;counter=0;if(elem==null){chklen=chk.length;for(i=0;i<chklen;i++){if((chk[i].type=='checkbox')&&(exclude.indexOf(chk[i].value)==-1)){if(!chk[i].checked){chk[i].checked=true;}}}}else{chklen=chk.length;for(i=0;i<chklen;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=[];}
chk=this.fo.elements;counter=0;if(elem==null){chklen=chk.length;for(i=0;i<chklen;i++){if((chk[i].type=='checkbox')&&(exclude.indexOf(chk[i].value)==-1)){if(chk[i].checked){chk[i].checked=false;}}}}else{chklen=chk.length;for(i=0;i<chklen;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=[];}
chk=this.fo.elements;counter=0;if(elem==null){chklen=chk.length;for(i=0;i<chklen;i++){if((chk[i].type=='checkbox')&&(exclude.indexOf(chk[i].value)==-1)){chk[i].checked=(chk[i].checked)?false:true;}}}else{chklen=chk.length;for(i=0;i<chklen;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=[];this.elems=[];this.elemSteps=[];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){parlen=params.length;for(var i=0;i<parlen;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)){parlen=params.length;for(var e=0;e<parlen;e++){this.fadeChange=null;this.widthChange=null;this.heightChange=null;this.tween=twn;this.speed=spd;this.live=true;this.elemSteps=[];elem=params[e][0];parElmLen=params[e][1].length;for(var m=0;m<parElmLen;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.elems[0]!=undefined)&&(obj.count<obj.elems[0][1][0][1].length)){objElemLen=obj.elems.length;for(var q=0;q<objElemLen;q++){objElemsLength=obj.elems[q][1].length;for(var n=0;n<objElemsLength;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{objElemLen=obj.elems.length;for(var q=0;q<objElemLen;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=[];obj.tween=null;obj.speed=null;obj.live=false;obj.elemSteps=[];this.instance=clearTimeout(this.instance);this.instance=null;}}
animateObj(this,this.speed);}};this.calcSteps=function(a,b,c,d,tween){this.steps=[];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=[];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 JaxJSON(){this.data=null;this.loadFile=function(fle){xmlhttp=new JaxXmlHttp();this.parseJSON(xmlhttp.getRequest(fle));};this.loadString=function(str){this.parseJSON(str);};this.parseJSON=function(str){eval('this.data = '+str);};}
function JaxLanguage(){this.languages=new Array('ar','de','el','en','es','fr','it','iw','ja','pt','ru','zh');this.lng=((_lang!=undefined)&&(this.languages.indexOf(_lang)!=-1))?_lang:'en';this.content=[];this.xmlhttp=new JaxXmlHttp();this.loadFile=function(fle){xmlLang=this.xmlhttp.getRequest(fle);if(xmlLang.language.nodes!=undefined){nodelen=xmlLang.language.nodes.length;for(var i=0;i<nodelen;i++){if(xmlLang.language.nodes[i]!=undefined){if((xmlLang.language.nodes[i].text.nodes[0]!=undefined)&&(xmlLang.language.nodes[i].text.nodes[1]!=undefined)){this.content[xmlLang.language.nodes[i].text.nodes[0].source.nodeValue]=xmlLang.language.nodes[i].text.nodes[1].output.nodeValue;}}}}};this.loadFile(_jaxDocRoot+'languages/'+this.lng+'.xml');this.getLanguage=function(){return this.lng;};this.translate=function(str,params){if(this.content[str]!=undefined){trans=this.content[str];}else{trans=str;}
if(params!=undefined){if(params.constructor==Array){parlen=params.length;for(var j=0;j<parlen;j++){trans=trans.replace('%'+(j+1),params[j]);}}else{trans=trans.replace('%1',params);}}
return trans;};}
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){imglen=imgs.length;for(var i=0;i<imglen;i++){imgToLoad=new Image();imgToLoad.src=imgs[i];}}else{imgToLoad=new Image();imgToLoad.src=imgs;}}
function JaxXML(){this.childNodes=[];this.output='';this.addChildren=function(chld){if(chld.constructor==Array){chldlen=chld.length;for(var i=0;i<chldlen;i++){if(chld[i].constructor==JaxXMLChild){this.childNodes.push(chld[i]);}}}else{if(chld.constructor==JaxXMLChild){this.childNodes.push(chld);}}};this.render=function(){chldNodeLen=this.childNodes.length;for(var i=0;i<chldNodeLen;i++){this.output+=this.childNodes[i].render();}
return this.output;};}
function JaxXMLChild(nme,val,first){this.nodeName=nme;this.nodeValue=(val!=null)?val:'';this.first=(first)?true:false;this.attributes=[];this.childNodes=[];this.output='';this.setAttributes=function(a,v){if(a.constructor==Array){alen=a.length;for(var j=0;j<alen;j++){this.attributes.push(new Array(a[j][0],a[j][1]));}}else{this.attributes.push(new Array(a,v));}};this.addChildren=function(chld){if(chld.constructor==Array){chldlen=chld.length;for(var k=0;k<chldlen;k++){if(chld[k].constructor==JaxXMLChild){this.childNodes.push(chld[k]);}}}else{if(chld.constructor==JaxXMLChild){this.childNodes.push(chld);}}};this.render=function(){this.output='<'+this.nodeName;if(this.attributes.length>0){attribs=[];attlen=this.attributes.length;for(var l=0;l<attlen;l++){attribs.push(this.attributes[l][0]+'="'+this.attributes[l][1]+'"');}
this.output+=' '+attribs.join(' ');}
if(this.nodeValue!=''){this.output+='>';if(this.first){this.output+=this.nodeValue;chldNodesLen=this.childNodes.length;for(var m=0;m<chldNodesLen;m++){this.output+=this.childNodes[m].render();}}else{chldNodesLen=this.childNodes.length;for(var m=0;m<chldNodesLen;m++){this.output+=this.childNodes[m].render();}
this.output+=this.nodeValue;}
this.output+='</'+this.nodeName+'>';}else{if(this.childNodes.length>0){chldNodesLen=this.childNodes.length;for(var m=0;m<chldNodesLen;m++){this.output+=this.childNodes[m].render();}
this.output+='</'+this.nodeName+'>';}else{this.output+=' />';}}
return this.output;};}
function JaxXmlHttp(){this.csvDoc=null;this.xmlDoc=null;request=(window.XMLHttpRequest)?new XMLHttpRequest():false;this.loadXMLFromString=function(str){brws=new JaxBrowser();if(brws.browser=='MSIE'){xDoc=new ActiveXObject('Microsoft.XMLDOM');xDoc.async='false';xDoc.loadXML(str);this.parseXML(xDoc,'MSIE');}else{parser=new DOMParser();xDoc=parser.parseFromString(str,'text/xml');this.parseXML(xDoc);}
return this.xmlDoc;};this.getRequest=function(url,func,delim,fields){if(func==null){request.open('GET',url,false);request.send(null);if(url.indexOf('.xml')!=-1){brws=new JaxBrowser();if(brws.browser=='MSIE'){this.parseXML(request.responseXML,'MSIE');}else{this.parseXML(request.responseXML);}
return this.xmlDoc;}else if((url.indexOf('.csv')!=-1)||(url.indexOf('.tsv')!=-1)){if((delim==null)&&(url.indexOf('.csv')!=-1)){delim=',';}else if((delim==null)&&(url.indexOf('.tsv')!=-1)){delim="\t";}else if(delim==null){delim=',';}
fields=(fields==undefined)?false:true;this.parseCSV(request.responseText,delim,fields);return this.csvDoc;}else{return request.responseText;}}else{request.open('GET',url,true);request.onreadystatechange=func;request.send(null);}};this.postRequest=function(formObj,func,act){params='';formElemLen=formObj.elements.length;for(i=0;i<formElemLen;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);};this.parseCSV=function(csvDoc,dlm,flds){start=0;csvObj='this.csvDoc = ';csvRows=[];csvAry=csvDoc.replace(/\r/g,"").split("\n");if(flds){csvFields=csvAry[0].split(dlm);start=1;}
csvAryLen=csvAry.length;for(var k=start;k<csvAryLen;k++){if(csvAry[k]!=''){if(csvAry[k].indexOf('"')!=-1){matches=csvAry[k].match(/"([^"]*)"/g);filtered=[];if(matches.length>0){matlen=matches.length;for(var m=0;m<matlen;m++){filt=matches[m].replace(/,/g,'[{c}]');filt=filt.replace(/"/g,'');filtered.push(filt);csvAry[k]=csvAry[k].replace(matches[m],filtered[m]);}}
csvRowFiltered=csvAry[k];}else{csvRowFiltered=csvAry[k];}
csvRow=csvRowFiltered.split(dlm);cRw=[];csvRowLen=csvRow.length;for(var l=0;l<csvRowLen;l++){if(csvRow[l].indexOf('[{c}]')!=-1){csvRow[l]=csvRow[l].replace(/\[{c}\]/g,',');}
if(flds){cRw.push(csvFields[l]+' : "'+csvRow[l]+'"');}else{cRw.push('"'+csvRow[l]+'"');}}
if(flds){csvRows.push('{'+cRw.join(', ')+'}');}else{csvRows.push('['+cRw.join(', ')+']');}}}
if(flds){csvObj+='['+csvRows.join(', ')+']';}else{csvObj+='['+csvRows.join(', ')+']';}
eval(csvObj);};this.parseXML=function(xDoc,brws){docObj='this.xmlDoc = ';function traverse(tree,objStr){attribs=[];attribStr='';if(tree.attributes!=undefined){for(var j=0;j<tree.attributes.length;j++){attribs.push(tree.attributes[j].nodeName+' : "'+tree.attributes[j].nodeValue.html(null,true).addslashes('double').replace(/\n/g,'\\n')+'"');}}
if(tree.hasChildNodes()){var regex=/^\s*$/;nValue='';for(var i=0;i<tree.childNodes.length;i++){if((tree.childNodes[i].nodeType==3)&&(!regex.test(tree.childNodes[i].nodeValue))){nValue+=tree.childNodes[i].nodeValue;}}
attribs.push('nodeValue : "'+nValue.html(null,true).addslashes('double').replace(/\n/g,'\\n')+'"');if(attribs.length>0){attribStr='{'+attribs.join(', ');}
objStr+='{'+tree.tagName+' : '+attribStr+', nodes : [';for(var i=0;i<tree.childNodes.length;i++){objStr+=traverse(tree.childNodes[i],'');}
objStr+=']}},';}else{if(tree.nodeValue==null){attribs.push('nodeValue : ""');if(attribs.length>0){attribStr='{'+attribs.join(', ')+'}';}
objStr+='{'+tree.tagName+' : '+attribStr+'}';}}
return objStr;}
if(xDoc.childNodes.length>0){if(brws=='MSIE'){docObj+=traverse(xDoc.documentElement,'');}else{if(xDoc.childNodes[0].nodeType==10){docObj+=traverse(xDoc.childNodes[1],'');}else{docObj+=traverse(xDoc.childNodes[0],'');}}}else{docObj+='{}';}
if(docObj.charAt(docObj.length-1)==','){docObj=docObj.substring(0,(docObj.length-1));}
eval(docObj);};}
