var iCols = 2, cols = 3, z=0, disp = '';

function interestArr (k,v) { this.k = k; this.v = v; }
var interest = new Array();
interest[interest.length] = new interestArr("Pastors","Reports & information FOR Pastors.");
interest[interest.length] = new interestArr("Music Pastors & Worship Leaders","News and information FOR Music Pastors and Worship Leaders.");
interest[interest.length] = new interestArr("Youth Leaders","Reports and information FOR Youth Leaders.");
interest[interest.length] = new interestArr("Artists & Songwriters","Reports and tips FOR Christian songwriters and recording/performing artists.");
interest[interest.length] = new interestArr("Guitar & Bass","For people who play guitar and bass.");
interest[interest.length] = new interestArr("Keyboards","News and tips for people who play keyboards.");
interest[interest.length] = new interestArr("Drums & Percussion","News and tips for people who play drums and percussion.");
interest[interest.length] = new interestArr("Teachers","News and information for Christian Teachers.");
interest[interest.length] = new interestArr("Colleges & Universities","News and information for colleges, universities and their faculty and staff.");
interest[interest.length] = new interestArr("Record Companies","Newsletter for people working at Christian music companies.");
interest[interest.length] = new interestArr("Promoters","For concert promoters and producers of other Christian events.");
interest[interest.length] = new interestArr("Retail","For Christian bookstores and other Christian retail stores.");
interest[interest.length] = new interestArr("Sound & Lights (Production)","For people who use sound and lighting for performances, services, etc.");
interest[interest.length] = new interestArr("Recording","News, tips and information for people who record music.");
interest[interest.length] = new interestArr("Producers & Arrangers","News and information for Christian producers & arrangers.");
interest[interest.length] = new interestArr("Booking Agents","Newsletter for agents who book Christian artists and/or speakers.");
interest[interest.length] = new interestArr("Radio","News and information FOR Christian radio stations & radio programmers.");
interest[interest.length] = new interestArr("Television & Video","News and information for producers, editors and people working in other video and television roles.");
interest[interest.length] = new interestArr("Media","For Christian broadcasters, newspapers, magazines and other media who want press releases and other news and information.");
interest[interest.length] = new interestArr("Personal Web Publishers","For people who produce their own web sites or personal sites about their interests.");
interest[interest.length] = new interestArr("Programmers","For people who currently program web content using Java, PERL, MySQL, ASP, DHTML, Active X, C and other Internet protocols.");
interest[interest.length] = new interestArr("Children In Need","For Christians who care about children in need.");
interest[interest.length] = new interestArr("Charities","For employees of Christian non-profit and charitible organizations.");

function artistArr (k,v) { this.k = k; this.v = v; }
var artist = new Array();
artist[artist.length] = new artistArr("YOLANDA ADAMS","GOSPEL");
artist[artist.length] = new artistArr("AUDIO ADRENALINE","CHR");
artist[artist.length] = new artistArr("TODD AGNEW","AC");
artist[artist.length] = new artistArr("PAUL BALOCHE","W");
artist[artist.length] = new artistArr("BARLOWGIRL","CHR");
artist[artist.length] = new artistArr("BUILDING 429","AC");
artist[artist.length] = new artistArr("SHIRLEY CASESAR","GOSPEL");
artist[artist.length] = new artistArr("JEREMY CAMP","CHR");
artist[artist.length] = new artistArr("MICHAEL CARD","INSPO");
artist[artist.length] = new artistArr("CASTING CROWNS","AC");
artist[artist.length] = new artistArr("DORINDA CLARK COLE","GOSPEL");
artist[artist.length] = new artistArr("THE CRABB FAMILY","SG");
artist[artist.length] = new artistArr("DAVID CROWDER","W");
artist[artist.length] = new artistArr("STEVEN CURTIS CHAPMAN","AC");
artist[artist.length] = new artistArr("BILLY RAY CYRUS","COUNTRY");
artist[artist.length] = new artistArr("BRYAN DUNCAN","AC");
artist[artist.length] = new artistArr("DOWNHERE","CHR");
artist[artist.length] = new artistArr("FFH","AC");
artist[artist.length] = new artistArr("BILL GAITHER","SG");
artist[artist.length] = new artistArr("AMY GRANT","AC");
artist[artist.length] = new artistArr("NATALIE GRANT","AC");
artist[artist.length] = new artistArr("FRED HAMMOND","GOSPEL");
artist[artist.length] = new artistArr("DARWIN HOBBS","GOSPEL");
artist[artist.length] = new artistArr("GEORGE HUFF","GOSPEL");
artist[artist.length] = new artistArr("HILLSONG UNITED","W");
artist[artist.length] = new artistArr("ISRAEL & NEW BREED","GOSPEL");
artist[artist.length] = new artistArr("JARS OF CLAY","CHR");
artist[artist.length] = new artistArr("JOHN RUBEN","RAP");
artist[artist.length] = new artistArr("JOY WILLIAMS","CHR");
artist[artist.length] = new artistArr("KIRK FRANKLIN","GOSPEL");
artist[artist.length] = new artistArr("KJ-52","RAP");
artist[artist.length] = new artistArr("KURT CARR SINGERS","GOSPEL");
artist[artist.length] = new artistArr("KUTLESS","ROCK");
artist[artist.length] = new artistArr("RACHAEL LAMPA","CHR");
artist[artist.length] = new artistArr("LECRAE","RAP");
artist[artist.length] = new artistArr("TAMELA MANN","GOSPEL");
artist[artist.length] = new artistArr("THE MARTINS","SG");
artist[artist.length] = new artistArr("MARY MARY","GOSPEL");
artist[artist.length] = new artistArr("DONNIE MCCLURKIN","GOSPEL");
artist[artist.length] = new artistArr("MERCY ME","AC");
artist[artist.length] = new artistArr("J MOSS","GOSPEL");
artist[artist.length] = new artistArr("MUTEMATH","ROCK");
artist[artist.length] = new artistArr("NEWSBOYS","CHR");
artist[artist.length] = new artistArr("OAK RIDGE BOYS","COUNTRY");
artist[artist.length] = new artistArr("FERNANDO ORTEGA","INSPO");
artist[artist.length] = new artistArr("OUT OF EDEN","CHR");
artist[artist.length] = new artistArr("TWILA PARIS","INSPO");
artist[artist.length] = new artistArr("DAVID PHELPS","SG");
artist[artist.length] = new artistArr("PHILLIPS, CRAIG & DEAN","W");
artist[artist.length] = new artistArr("PLUMB","ROCK");
artist[artist.length] = new artistArr("POINT OF GRACE","INSPO");
artist[artist.length] = new artistArr("LYNDA RANDLE","SG");
artist[artist.length] = new artistArr("MATT REDMAN","W");
artist[artist.length] = new artistArr("RELIENT K","CHR");
artist[artist.length] = new artistArr("SANCTUS REAL","CHR");
artist[artist.length] = new artistArr("MARCK SCHULTZ","AC");
artist[artist.length] = new artistArr("SELAH","AC");
artist[artist.length] = new artistArr("SIXPENCE NONE THE RICHER","CHR");
artist[artist.length] = new artistArr("SMOKIE NORFUL","GOSPEL");
artist[artist.length] = new artistArr("SONICFLOOD","W");
artist[artist.length] = new artistArr("MICHAEL W. SMITH","AC");
artist[artist.length] = new artistArr("REBECCA ST. JAMES","CHR");
artist[artist.length] = new artistArr("MICHAH STAMPLEY","GOSPEL");
artist[artist.length] = new artistArr("SWITCHFOOT","ROCK");
artist[artist.length] = new artistArr("CHRIS TOMLIN","W");
artist[artist.length] = new artistArr("THIRD DAY","ROCK");
artist[artist.length] = new artistArr("THOUSAND FOOT KRUTCH","ROCK");
artist[artist.length] = new artistArr("TOBYMAC","CHR");
artist[artist.length] = new artistArr("RANDY TRAVIS","COUNTRY");
artist[artist.length] = new artistArr("HEZEKIAH WALKER","GOSPEL");
artist[artist.length] = new artistArr("CECE WINANS","AC");
artist[artist.length] = new artistArr("VICKI YOHE","GOSPEL");

function stateArr (k,v) { this.k = k; this.v = v; }
var state = new Array();
state[state.length] = new stateArr("--","Not Applicable");
state[state.length] = new stateArr("AL","Alabama");
state[state.length] = new stateArr("AK","Alaska");
state[state.length] = new stateArr("AZ","Arizona");
state[state.length] = new stateArr("AR","Arkansas");
state[state.length] = new stateArr("CA","California");
state[state.length] = new stateArr("CO","Colorado");
state[state.length] = new stateArr("CT","Connecticut");
state[state.length] = new stateArr("DE","Delaware");
state[state.length] = new stateArr("DC","District Of Columbia");
state[state.length] = new stateArr("FL","Florida");
state[state.length] = new stateArr("GA","Georgia");
state[state.length] = new stateArr("HI","Hawaii");
state[state.length] = new stateArr("ID","Idaho");
state[state.length] = new stateArr("IL","Illinois");
state[state.length] = new stateArr("IN","Indiana");
state[state.length] = new stateArr("IA","Iowa");
state[state.length] = new stateArr("KS","Kansas");
state[state.length] = new stateArr("KY","Kentucky");
state[state.length] = new stateArr("LA","Louisiana");
state[state.length] = new stateArr("ME","Maine");
state[state.length] = new stateArr("MD","Maryland");
state[state.length] = new stateArr("MA","Massachusetts");
state[state.length] = new stateArr("MI","Michigan");
state[state.length] = new stateArr("MN","Minnesota");
state[state.length] = new stateArr("MS","Mississippi");
state[state.length] = new stateArr("MO","Missouri");
state[state.length] = new stateArr("MT","Montana");
state[state.length] = new stateArr("NE","Nebraska");
state[state.length] = new stateArr("NV","Nevada");
state[state.length] = new stateArr("NH","New Hampshire");
state[state.length] = new stateArr("NJ","New Jersey");
state[state.length] = new stateArr("NM","New Mexico");
state[state.length] = new stateArr("NY","New York");
state[state.length] = new stateArr("NC","North Carolina");
state[state.length] = new stateArr("ND","North Dakota");
state[state.length] = new stateArr("OH","Ohio");
state[state.length] = new stateArr("OK","Oklahoma");
state[state.length] = new stateArr("OR","Oregon");
state[state.length] = new stateArr("PA","Pennsylvania");
state[state.length] = new stateArr("RI","Rhode Island");
state[state.length] = new stateArr("SC","South Carolina");
state[state.length] = new stateArr("SD","South Dakota");
state[state.length] = new stateArr("TN","Tennessee");
state[state.length] = new stateArr("TX","Texas");
state[state.length] = new stateArr("UT","Utah");
state[state.length] = new stateArr("VT","Vermont");
state[state.length] = new stateArr("VA","Virginia");
state[state.length] = new stateArr("WA","Washington");
state[state.length] = new stateArr("WV","West Virginia");
state[state.length] = new stateArr("WI","Wisconsin");
state[state.length] = new stateArr("WY","Wyoming");
state[state.length] = new stateArr("PR","Puerto Rico");
state[state.length] = new stateArr("VI","US Virgin Islands");
state[state.length] = new stateArr("AS","US American Samoa");
state[state.length] = new stateArr("GU","US Guam");
state[state.length] = new stateArr("AB","Canada, Alberta");
state[state.length] = new stateArr("BC","Canada, British Columbia");
state[state.length] = new stateArr("MB","Canada, Manitoba");
state[state.length] = new stateArr("NB","Canada, New Brunswick");
state[state.length] = new stateArr("NF","Canada, Newfoundland and Labrador");
state[state.length] = new stateArr("NT","Canada, Northwest Territories");
state[state.length] = new stateArr("NS","Canada, Nova Scotia");
state[state.length] = new stateArr("NU","Canada, Nunavut");
state[state.length] = new stateArr("ON","Canada, Ontario");
state[state.length] = new stateArr("PE","Canada, Prince Edward Island");
state[state.length] = new stateArr("PQ","Canada, Quebec");
state[state.length] = new stateArr("SK","Canada, Saskatchewan");
state[state.length] = new stateArr("YT","Canada, Yukon");

function echeck(str)
 {
 if ((str==null)||(str=="")) { return false; }
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);
	if (str.indexOf(at)==-1) { return false; }
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) { return false; }
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ return false;	}
 if (str.indexOf(at,(lat+1))!=-1){ return false; }
 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ return false; }
 if (str.indexOf(dot,(lat+2))==-1){ return false; }
	if (str.indexOf(" ")!=-1){ return false; }
 return true;
	}

function intMap ()
 {
 var err = "Invalid E-mail Address";
 if (document.form.newuser_emailaddress)
  {
  emailFld = document.form.newuser_emailaddress;
  if (!echeck (emailFld.value)) { alert (err); emailFld.focus(); emailFld.select; return false; }
  }
 stateSel = document.form.state.value;
 document.form.state.value = '';
 var disp='', art='', ctgy='';
 for (var i=0; i<document.form.elements.length; i++)
  {
  if (document.form.elements[i].name.indexOf ("interests") != -1 && document.form.elements[i].checked == 1)
   {
   disp = disp + document.form.elements[i].value+"|";
   document.form.elements[i].checked = 0;
   }
  if (document.form.elements[i].name.indexOf ("artists") != -1 && document.form.elements[i].checked == 1)
   {
   var ac = new Array();
   ac = document.form.elements[i].value.split('||');
   if (ctgy.indexOf (ac[1]) == -1) { ctgy = ctgy + ac[1]+"|"; }
   art = art + ac[0]+"|";
   document.form.elements[i].checked = 0;
   }
  }
 var postArr = new Array();
 document.form.newuser_interests.value = disp.substring(0,disp.length-1);
 document.form.newuser_artists.value = art.substring(0,art.length-1);
 document.form.newuser_categories.value = ctgy.substring(0,ctgy.length-1);

 for (var i=0; i<state.length; i++)
  {
  if (stateSel == state[i].k)
   {
   if (i==0) { document.form.newuser_country2.value = '--'; }
   else if (i>0 && i<=55) { document.form.newuser_country2.value = 'US'; }
   else { document.form.newuser_country2.value = 'CA'; }
   break;
   }
  }
 document.form.newuser_state2.value = stateSel;
 return true;
 }