function lTrim(x) {while(x.charAt(0)==" ") x=x.substring(1,x.length) return x} function rTrim(x) {while(x.charAt(x.length-1)==" ") x=x.substring(0,x.length-1) return x} function allTrim(x) {x = rTrim(lTrim(x)) return x} function isDate(dateStr) { var strDate = allTrim(dateStr) if (strDate.length < 6) { return false } var dateArray = strDate.split("/") for (var j = 0; j < dateArray.length; j++) { if (!isDigit(dateArray[j])) { return false } if (j == 0) { if (dateArray[j] < 1 || dateArray[j] > 12) { return false } } if (j == 1) { if (dateArray[0] == 4 || dateArray[0] == 6 || dateArray[0] == 9 || dateArray[0] == 11) { if (dateArray[j] < 1 || dateArray[j] > 30) { return false } } else if (dateArray[0] == 2) { if (dateArray[j] < 1 || dateArray[j] > 29) { return false } } else { if (dateArray[j] < 1 || dateArray[j] > 31) { return false } } } } return true } function isDigit(digitStr) { var dg = allTrim(digitStr) if (dg.length == 0) { return false } else { for (var i=0; i < dg.length; i++) { var digit = dg.charAt(i) if (digit < "0" || digit > "9") { if (digit == "," || digit == "$" || digit == "-" || digit == "." || digit == "(" || digit == ")") { } else { return false } } } return true } } function javSubmit() { if (document.frmPlug.Contact_First_Name.value.length == 0) { alert("First name required.") document.frmPlug.Contact_First_Name.focus() return } if (document.frmPlug.Contact_Last_Name.value.length == 0) { alert("Last name required.") document.frmPlug.Contact_Last_Name.focus() return } if (document.frmPlug.State.options[document.frmPlug.State.selectedIndex].value.length == 0) { alert("State required.") document.frmPlug.State.focus() return } if (document.frmPlug.Internet_Address.value.length == 0) { alert("Email required.") document.frmPlug.Internet_Address.focus() return } if (document.frmPlug.Internet_Address.value.length > 0) { var iem=false,gotAt=0,posAt=0,gotPeriod=0,posPeriod=0,Email=document.frmPlug.Internet_Address.value for (i = 0; i < Email.length; i++) { ltr = Email.charAt(i); if (ltr=="@") { gotAt = gotAt + 1 posAt = i } if (ltr==".") { gotPeriod = gotPeriod + 1 posPeriod = i } } if (gotAt != 1) {iem = true} if (gotPeriod == 0) {iem = true} if (posAt >= posPeriod) {iem = true} if (posAt <= 0) {iem = true} posAt = posAt + 1 if (posAt == posPeriod || Email.charAt(posAt)==".") {iem = true} posAt = Email.length - 2 if (posAt <= posPeriod) {iem = true} if (Email.indexOf("\\") > -1) {iem = true} if (Email.indexOf("/") > -1) {iem = true} if (iem == true) { alert("You have entered an invalid email address.") document.frmPlug.Internet_Address.select() return } } var emptySet = true lt = document.frmPlug.Q5433.length for(i=0; i 4000) { alert("Comment is limited to 4,000 characters for this question:\r\nIf you speak or study more than one additional language or one that isn't on the list above, please add it here:") document.frmPlug.Q2636.focus() return } if (document.frmPlug.Q2665.value.length > 4000) { alert("Comment is limited to 4,000 characters for this question:\r\nAdditional comments:") document.frmPlug.Q2665.focus() return } document.frmPlug.submit() } function javSpelling() { if (document.frmPlug.CheckSpelling.value=="T") { document.frmPlug.CheckSpelling.value="F" document.images.Spell.src = "button_spellOFF.gif" document.images.Spell.alt = "Click to turn ON" } else { document.frmPlug.CheckSpelling.value="T" document.images.Spell.src = "button_spellON.gif" document.images.Spell.alt = "Click to turn OFF" } } function javChange() { document.frmPlug.Changed.value = "T" } function javSetDate() { var today = new Date() thisYear = today.getYear() thisMinute = today.getMinutes() thisTime = today.getTime() if (thisYear < 100) { thisYear = "19" + thisYear } if ((thisYear >= 100) && (thisYear < 1000)) { thisYear = parseInt(thisYear) + 1900 thisYear = thisYear.toString() } if (thisMinute < 10) { thisMinute = "0" + thisMinute } document.frmPlug.LocalDate.value = (today.getMonth() + 1) + "/" + today.getDate() + "/" + thisYear + " " + today.getHours() + ":" + thisMinute } function javUpload() { window.open("http://www.crmtool.net/cf_AttachFile.asp?cid=2907&FormID=222&RECDNO=31345448","up1","top=50,left=50,width=500,height=500,menubar=no,scrollbars=yes,resizable=yes") } function javDate(fld) { var now_month; var now_day; var now_year; var now_daytime; var now_datetime; now_datetime = new Date(); now_month = now_datetime.getMonth() + 1; now_day = now_datetime.getDate(); now_year = now_datetime.getYear(); if (now_year < 100) { now_year = '19' + now_year; } if ((now_year >= 100) && (now_year < 1000)) { now_year = parseInt(now_year) + 1900; now_year = now_year.toString(); } LocalDate = now_month + '/' + now_day + '/' + now_year; window.open("dlgDate.asp?DateSetting=1&fld=" + fld + "&LocalDate=" + LocalDate,"dlgDate","resizable=yes,scrollbars=no,statusbar=no,top=300,left=300,width=270,height=190") } function showForm(){ var formHTML = "
 
Fields marked in red are required.
First Name:
Last Name:
Address 1:
Address 2:
City:
State:
Zip:
Country:
Home Phone:  
Cell Phone:  
Student Email:
Parent Email:


Additional information about you
 I am a:
 StudentParent
 School CounselorTeacher
 Independent Counselor  
 Counselor/Teacher E-Mail address:
 
 Primary additional language I've studied:
 
 If you speak or study more than one additional language or one that isn't on the list above, please add it here:
 
 My current year in school:
 89101112
 12+     
  Month I will graduate: 
  Year I will graduate: 
 
Tell us about your school
 Name of my high school:
 
 My Guidance Counselor's name:
 
 
I'm interested in High School Abroad . . .
(I'm in High School now.)
 I'd like to travel to: (I can change my mind later.)
 
 I'd like to go for:
 SemesterAcademic Year
 Summer  
 I'd like to start:
 Jan/Feb 2010Summer 2010
 Aug/Sept 2010Jan/Feb 2011
 Summer 2011Aug/Sept 2011
 Jan/Feb 2012Aug/Sep 2012
 
I am interested in Gap Year Abroad . . .
(I will have graduated before I go abroad.)
 I'd like to travel to: (This is my first choice.)
 
 I'd like to go for: (Semesters range from 2.5 to 4 months, Academic Years range from 8 to 10 months.)
 SemesterAcademic Year
 I'd like to start:
 Jan/Feb 2010Aug/Sept 2010
 Jan/Feb 2011Aug/Sept 2011
 Jan/Feb 2012Aug/Sep 2012
 
How did you hear about CIEE?
 How did you hear about us?
 Parent / FriendExchange Student
 School Counselor / TeacherOther
 CIEE visited my schoolGoogle
 YahooFacebook
 Email from CIEE  
  If Other, please specify: 
 
Questions or comments?
 Additional comments:
 
 
 
" if(!formShown){ document.writeln(formHTML); } formShown=true; } var formShown = false; showForm();