snoopJJdAr,#zE Log on to WebCT
Logo Check Browser | BB\Ar,#zE4X@<墂ߺð PN R )#TAr#z,E@@ðߺP DNPC )#T Help     
Institution Listing
  Click the name of the Institution you want to access.
Ar#z,E@@ðߺP NPS )#T
  eLab - Svizzera Italiana
  ETH Zürich
  FH ZHW
  FHBB
  FHSO
  HESSO
  SWITCH
  Uni Basel BB\Ar,#zE4X@<堂ߺð PND-@3) )#TAr#z,E@@ðߺP ,NPC )#T
  Uni Bern
  Uni Fribourg
  Uni Lausanne
  Uni Zürich
  vi Test Institution
  For further assistance, visit WebCT Help.
BB\Ar,#zE4X@<埂ߺð PN܀8#@ )#TBB\Ar,#zE4X@<垂ߺð PNCH )#TBB\Ar,#zE4X@<坂ߺð PN,O0P )#TBB\Ar,#zE4X@<圂ߺð PNĀZg )#TBB\Ar,#zE4X@<囂ߺð PN leo )#TBB\Ar,#zE4X@<嚂ߺð PNwq  )#TAr,#zEtX@<Yߺð PNwq } )#TGET /webct/libraryjs.dowebct?JSESSIONID=BryTrASVEcnT20GF8tt8OxLTtbaBtjd3QK7OPO3RnLNWayoFz07w!1543354448?locale=en-US HTTP/1.1 Host: athena.virtualcampus.ch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Accept: */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://athena.virtualcampus.ch/webct/entryPageIns.dowebct Cookie: JSESSIONID=BryTrASVEcnT20GF8tt8OxLTtbaBtjd3QK7OPO3RnLNWayoFz07w!1543354448 BB\Ar#z,E4@@$)ðߺP w䎀 )#TAr#z,E@@#qðߺP w䎀b )#THTTP/1.1 200 OK Date: Mon, 17 Jan 2005 08:06:43 GMT Content-Type: text/javascript; charset=utf-8 Transfer-Encoding: chunked Cache-Control: max-age=43200 Cache-Control: public Ars#z,E@@ðߺP .䎀S )#T0fe8 //DATE FUNCTIONS var clientTzOffset = new Date().getTimezoneOffset() * 60 * 1000; var clientServerTimeDiff = 3600000 + clientTzOffset; var now = new Date() var mm="" var dd="" var yy="" //get today's date and set variables function todayDate(){ mm=now.getMonth()+1 dd=now.getDate() yy=now.getFullYear() } var detectableWithVB = false; var pluginFound = false; var popupFlag=false; function closeDo(flag) { popupFlag = flag; } function getMacOS(){ var plat_NotMac=false; var platform=navigator.platform; if(platform.indexOf('Mac') == -1) plat_NotMac=true; else plat_NotMac=false; return plat_NotMac; } function detectJava() { if(!getMacOS()) return true; var appletObj; if ( top.APPLICATION_FRAME ) appletObj=top.APPLICATION_FRAME.APPLET_FRAME; if(appletObj) return appletObj.detectJava(); var w = window; while (w != null) { var frame = w.top.APPLICATION_FRAME; if (frame != null && frame.APPLET_FRAME) return frame.APPLET_FRAME.detectJava(); w = w.opener; } // This should not happen, we should eventually find the original // window containing the frame, but just in case ... return false; } function updateDetectJava() { var appletObj; if ( top.APPLICATION_FRAME ) appletObj=top.APPLICATION_FRAME.APPLET_FRAME; if(appletObj) { appletObj.reloadDetectJava(); } else { var w = window; if (w != null) Ar}#z,E@@~ðߺP 䎀S )#T { if(window.opener) { var frame = w.top.APPLICATION_FRAME; if (frame != null && frame.APPLET_FRAME) { appletObj=frame.APPLET_FRAME.reloadDetectJava(); } } } } } //set dates in standard date layout function setDates(form, dateorder, daysahead){ if (daysahead==0) todayDate(); else futureDates(daysahead); var dayfield=("date_day_" + dateorder); var monthfield="date_month_" + dateorder; var yearfield="date_year_" + dateorder; form.elements[monthfield].selectedIndex=mm-1 form.elements[dayfield].selectedIndex=dd-1 form.elements[yearfield].selectedIndex=yy-2000 } //set dates in standard date layout to future date function futureDates(days) { var later = new Date(now.getTime() + days*24*60*60*1000); mm=later.getMonth()+1 dd=later.getDate() yy=later.getFullYear() } //open the standard calender day picker function openCalendar(form, dateseq) { dateForm=form; datelist=dateseq; openBox('minicalendar.html','Calendar',600,440); } //set date from popped-up calendar function popDates(popmonth, popday, popyear){ datenumber=datelist; form=dateForm; mm=popmonth; dd=popday; yy=popyear; var dayfield=("date_day_" + datenumber); var monthfield="date_month_" + datenumber; var yearfield="date_year_" + datenumber; form.elements[monthfield].selectedIndex=mm-1 form.elements[dayfieAr#z,E@@ðߺP ~䎀K )#Tld].selectedIndex=dd-1 form.elements[yearfield].selectedIndex=yy-2000 } //functions for comparing 2 dates and times for sequentiality function padout(number) { return (number < 10) ? '0' + number : number; } function y2k(number) { return (number < 1000) ? number + 1900 : number; } function compareDates(form, startdateseq, enddateseq, timecheck) { var start_day_field="date_day_" + startdateseq; var start_month_field="date_month_" + startdateseq; var start_year_field="date_year_" + startdateseq; var start_hour_field="date_hour_" + startdateseq; var start_minute_field="date_minute_" + startdateseq; var end_day_field="date_day_" + enddateseq; var end_month_field="date_month_" + enddateseq; var end_year_field="date_year_" + enddateseq; var end_hour_field="date_hour_" + enddateseq; var end_minute_field="date_minute_" + enddateseq; var startday = form.elements[start_day_field].options[form.elements[start_day_field].selectedIndex].value; var startmonth = form.elements[start_month_field].options[form.elements[start_month_field].selectedIndex].value; var startyear = form.elements[start_year_field].options[form.eleme Ar#z,E@@|ðߺP 䎀S )#T0fe8 nts[start_year_field].selectedIndex].text; var starthour = form.elements[start_hour_field].options[form.elements[start_hour_field].selectedIndex].text; var startminute = form.elements[start_minute_field].options[form.elements[start_minute_field].selectedIndex].text; var endday = form.elements[end_day_field].options[form.elements[end_day_field].selectedIndex].value; var endmonth = form.elements[end_month_field].options[form.elements[end_month_field].selectedIndex].value; var endyear = form.elements[end_year_field].options[form.elements[end_year_field].selectedIndex].text; var endhour = form.elements[end_hour_field].options[form.elements[end_hour_field].selectedIndex].text; var endminute = form.elements[end_minute_field].options[form.elements[end_minute_field].selectedIndex].text; var startdate = new Date(startyear-0,startmonth-1,startday-0); var enddate = new Date(endyear-0,endmonth-1,endday-0); if (!isDate(form, startdateseq)){ alert("Start date is not a valid date"); form.elements[start_day_field].focus(); return false } if (!isDate(form, enddateseq)) { alert("End date is not a valid date"); document.location="#date_" + startdateseq; form.elements[end_day_field].focus(); return false } starttime = Date.UTC(y2k(startdate.getYear()),startdate.getMonth(),startdate.getDate(),0,0,0); endtime = Date.UTC(y2k(eAr#z,E@@{ðߺP $䎀S )#Tnddate.getYear()),enddate.getMonth(),enddate.getDate(),0,0,0); if (starttime <= endtime) { //valid } else { alert("Start Date is not less than End Date"); form.elements[start_month_field].focus(); return false } if (timecheck==true && starttime==endtime){ if((endhour+endminute)<=(starthour+startminute)){ alert("Your end time is before your start time"); form.elements[end_hour_field].focus(); return false } } currentdate = new Date(); currenttime = Date.UTC(y2k(currentdate.getYear()),currentdate.getMonth(),currentdate.getDate(),0,0,0); if (endtime > currenttime) { //valid } else { alert("End Date is before todays date"); form.elements[end_day_field].focus(); return false } return true } //function for changing the time when the "All Day Event" box is checked function allDayEvent(form, startdateseq, enddateseq){ var sthourfield="date_hour_" + startdateseq; var stminutefield="date_minute_" + startdateseq; var edhourfield="date_hour_" + enddateseq; var edminutefield="date_minute_" + enddateseq; var starthour = form.elements[sthourfield].selectedIndex=0; var startminute = form.elements[stminutefield].selectedIndex=0; var endhour = form.elements[edhourfield].selectedIndex=23; var endminute = form.elements[edminutefield].selectedIndex=3; } /Ar#z,E@@ðߺP *n䎀K )#T/check for valid date function isDate (form, dateseq) { var day_field="date_day_" + dateseq; var month_field="date_month_" + dateseq; var year_field="date_year_" + dateseq; var dayval = form.elements[day_field].options[form.elements[day_field].selectedIndex].value; var monthval = form.elements[month_field].options[form.elements[month_field].selectedIndex].value; var yearval = form.elements[year_field].options[form.elements[year_field].selectedIndex].text; var today = new Date(); yearval = ((!yearval) ? y2k(today.getYear()):yearval); monthval = ((!monthval) ? today.getMonth():monthval-1); if (!dayval) return false var test = new Date(yearval,monthval,dayval); if ( (y2k(test.getYear()) == yearval) && (monthval == test.getMonth()) && (dayval == test.getDate()) ) return true; else alert("You are using an invalid date in a date form"); form.elements[day_field].focus(); return false } //helper function for i18n:date tag var oldMonth = "-1"; var oldDay = "-1"; var oldYear = "-1"; var oldHour = "-1"; var oldMinute = "-1"; function rebuildDate(elname,form) { var monthFiel Ar,#z,E@@yðߺP /䎀S )#T0fe8 d = elname + "Month"; var dayField = elname + "Day"; var yearField = elname + "Year"; var hourField = elname + "Hour"; var minuteField = elname + "Minute"; var am_pmField = elname + "AM_PM"; var allowBlankSelectionField = elname + "AllowBlankSelection"; var now = new Date(); var hideDayField = "hideDay"; var bLoadDay = "true"; var dateFieldNulled = checkForNulledField(elname, form); eval ( "if (form." + hideDayField + " != null) bLoadDay = false;"); if (bLoadDay == "true") { eval ( "rbLoadDay(form." + yearField + ", form." + monthField + ", form." + dayField + ", form." + allowBlankSelectionField + ".value );"); } eval ( "var month = (form." + monthField + " != null) ? (form." + monthField + ".options[form." + monthField + ".selectedIndex].value) : now.getMonth();" ); eval ( "var year = (form." + yearField + " != null) ? (form." + yearField + ".options[form." + yearField + ".selectedIndex].value) : now.getFullYear();" ); if (bLoadDay == "true") { eval ( "var day = (form." + dayField + " != null) ? (form." + dayField + ".options[form." + dayField + ".selectedIndex].value) : now.getDate();" ); eval ( "var hour = (form." + hourField + " != null) ? (form." + hourField + ".options[form." + hourField + ".selectedIndex].value) : now.getHours();" ); eval ( "var minute = (form." + minuteField + " != null) ? (form." + minuteField + ".optioAr4#z,E @@xðߺP 4䎀S )#Tns[form." + minuteField + ".selectedIndex].value) : now.getMinutes();" ); eval ( "var am_pm = (form." + am_pmField + " != null) ? (form." + am_pmField + ".options[form." + am_pmField + ".selectedIndex].value) : null;" ); } else { var day = 1; var hour =0; var minute = 0; var am_pm = null; } var date = ""; if((month != "-1") && (day != "-1") && (year != "-1") && (hour != "-1") && (minute != "-1") ) { if ((am_pm != null) && (am_pm == "PM")) { hour = parseInt(hour) + 12; } date = new Date(year,month,day,hour,minute).getTime(); date = date - clientServerTimeDiff; eval( "form." + elname + ".value = " + date + ";" ); } else { if (dateFieldNulled){ eval ( "if (form." + monthField + " != null) form." + monthField + ".selectedIndex = 0;"); eval ( "if (form." + dayField + " != null) form." + dayField + ".selectedIndex = 0;"); eval ( "if (form." + yearField + " != null) form." + yearField + ".selectedIndex = 0;"); eval ( "if (form." + hourField + " != null) form." + hourField + ".selectedIndex = 0;"); eval ( "if (form." + minuteField + " != null) form." + minuteField + ".selectedIndex = 0;"); } eval( "form." + elname + ".value = \"\";"); } eval( "oldMonth = (form." + monthField + " != null) ? form." + monthField + ".options[form." + monthField + ".selectedIndex].value : null;"ArU#z,E!@@ðߺP :^䎀K )#T); eval( "oldDay = (form." + dayField + " != null) ? form." + dayField + ".options[form." + dayField + ".selectedIndex].value : null;"); eval( "oldYear = (form." + yearField + " != null) ? form." + yearField + ".options[form." + yearField + ".selectedIndex].value : null;"); eval( "oldHour = (form." + hourField + " != null) ? form." + hourField + ".options[form." + hourField + ".selectedIndex].value : null;"); eval( "oldMinute = (form." + minuteField + " != null) ? form." + minuteField + ".options[form." + minuteField + ".selectedIndex].value : null;"); } //util function used by rebuildDate function rbLoadDay(yearSel,monthSel,daySel,allowBlankSelection) { // compute # days in current month by going to first day of next month and subtract one day var month = parseInt( monthSel.options[monthSel.selectedIndex].value ) + 1; if( month == 13 ) { month = 0; } timeA = new Date( yearSel.options[yearSel.selectedIndex].value, month, 1 ); timeDifference = timeA - 86400000; timeB = new Date(timeDifference); var daysInMonth = timeB.getDate(); var selectedIndex = daySel.selectedIndex; var day = daySel[selectedIndex] Ar#z,E"@@vðߺP >䎀S )#T0fe8 .value; // clear old days while( daySel.length > 0 ) { daySel.options[0] = null; } // add new days if( allowBlankSelection == "true" ) { daySel.options[0] = new Option( " ", "-1" ); } for (var i = 1; i <= daysInMonth; i++) { daySel.options[daySel.length] = new Option(i,i); } // reset selection if out of new bounds if ( (selectedIndex) <= daySel.length - 1) { for( var i = 0; i < daySel.options.length; i++ ) { if( daySel[i].value == day ) { daySel.options[i].selected = true; break; } } } else { daySel.options[0].selected = true; } } //util function used by rebuilDate function checkForNulledField(elname, form) { eval( "var newMonth = (form." + elname + "Month != null) ? form." + elname + "Month.options[form." + elname + "Month.selectedIndex].value : null;" ); eval( "var newDay = (form." + elname + "Day != null) ? form." + elname + "Day.options[form." + elname + "Day.selectedIndex].value : null;" ); eval( "var newYear = (form." + elname + "Year != null) ? form." + elname + "Year.options[form." + elname + "Year.selectedIndex].value : null;" ); eval( "var newHour = (form." + elname + "Hour != null) ? form." + elname + "Hour.options[form." + elname + "Hour.selectedIndex].value : null;" ); eval( "var newMinute = (form." + elname + "Minute != null) ? formAr#z,E#@@uðߺP D䎀S )#T." + elname + "Minute.options[form." + elname + "Minute.selectedIndex].value : null;" ); return ((oldMonth != newMonth && newMonth == "-1") || (oldDay != newDay && newDay == "-1") || (oldYear != newYear && newYear == "-1") || (oldHour != newHour && newHour == "-1") || (oldMinute != newMinute && newMinute == "-1")); } //FORM FUNCTIONS //standard form check for required fields of any type //all required fields must be noted in the field name with "req_" as part of the name function requiredCheck(form){ var ttypes=""; var error=0; for (i =0; i < form.elements.length; i++){ ttypes= ttypes + form.elements[i].type + "\t"; if ((form.elements[i].name.indexOf('req_')>-1)){ //check textfields if (form.elements[i].type=="text"){ if(form.elements[i].value==""){ alert("You have left a required field blank, please fill it in") form.elements[i].focus(); form.elements[i].select; //not sure if we should do this document.location="#" + form.elements[i].name; error="1"; break; } } //check textareas if (form.elements[i].type=="textarea"){ if(form.elements[i].value==""){ alert("You have left a required field blank, please fill it in") form.elements[i].focus(); form.elements[i].select; Ar#z,E$@@|ðߺP JN䎀K )#T //not sure if we should do this document.location="#" + form.elements[i].name; error="1"; break; } } //check single selection fields if (form.elements[i].type=="select-one"){ if((form.elements[i].selectedIndex<0||form.elements[i].options[form.elements[i].selectedIndex].text.indexOf('--')>-1)){ alert("You have not selected from a required drop-down list, please select now") form.elements[i].focus(); form.elements[i].select; error="1"; break; } } //check multiple selection fields if (form.elements[i].type=="select-multiple"){ if(form.elements[i].selectedIndex<0){ alert("You have not selected from a required drop-down list, please select now") form.elements[i].focus(); form.elements[i].select; error="1"; break; } } //check checkboxes if (form.elements[i].type=="checkbox"){ checknum=(form.elements[i].name.substring(0,2 BB\Ar G,#zE4X@<嘂ߺð Pր|p )#TAr #z,E%@@sðߺP N䎀S )#T0fe8 )-0); checkstart=i; checkend=checkstart+checknum; selected="false"; for (j =checkstart; j < checkend; j++){ if (form.elements[j].checked) selected="true" } if(selected!="true"){ alert("You have not checked a box in a group of required checkboxes") form.elements[checkstart].focus(); error="1"; break; } i=i+checknum-1; } } if ((form.elements[i].name.indexOf('subrq_')>-1)){ var suberror=0; if (((form.elements[i].type=="text") && (form.elements[i].value!="")) || ((form.elements[i].type=="textarea")&&(form.elements[i].value!=""))||((form.elements[i].type=="radio")&&(form.elements[i].checked))){ checknum=((form.elements[i].name.charAt(1)+form.elements[i].name.charAt(2))); for (j =0; j < form.elements.length; j++){ if((form.elements[j].name.substring(0,2))==checknum){ if ((form.elements[j].type=="select-one"&&form.elements[j].options[form.elements[j].selectedIndex].text.indexOf('--')>-1)||(form.elements[j].type=="text" && form.elements[j].value=="")||(form.elements[j].type=="textarea"&&form.elements[j].value=="")||(form.elements[j].type=="radio"&&form.elements[j].checked!="true")){ alert("You have chosen an option that reqAr #z,E&@@rðߺP T䎀S )#Tuires you to fill in another field"); form.elements[j].focus(); suberror="1"; break; } } } } } if (suberror==1)break; } if (error==0 && suberror==0) return true; else return false; } //CHECKBOX LISTS //these functions assume that the checkboxes are the only things in the form //and that the first checkbox is the select all/select none box //to see if any of the boxes are selected function isSelectedAny(form, boxid) { for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type=="checkbox" && (form.elements[i].name.indexOf(boxid)!=-1)){ if (form.elements[i].checked == true) { return true; } } } alert("You did not select anything to perform this action on"); return false; } //to see if only one box is selected function isSelectedOne(form, boxid) { if (isSelectedAny(form, boxid)){ var numSelected = 0; for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type=="checkbox" && (form.elements[i].name.indexOf(boxid)!=-1)){ if (form.elements[i].checked == true) { numSelected++; } if (numSelected > 1) { alert("please only select one"); return false; BB\Ar! ,#zE4X@<嗂ߺð P|p )#TAr!^#z,E'@@yðߺP Z>䎀K )#T } } } } else return false; return true; } //turn on or off all check boxes when the first one is clicked function toggleSelectAll(form, master, boxid, prerow) { if (form.elements[master].checked==false) { for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type=="checkbox" && (form.elements[i].name.indexOf(boxid)!=-1)){ therow=form.elements[i].parentNode for(x=0; x<=10; x++){ if (therow.nodeName!="TR"){ therow=therow.parentNode; } else { therow.bgColor="#ffffff"; break } } form.elements[i].checked = false; } } } else { for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type=="checkbox" && (form.elements[i].name.indexOf(boxid)!=-1)){ therow=form.elements[i].parentNode for(x=0; x<=10; x++){ if (therow.nodeName!="TR"){ therow=therow.parentNode; Ar!m#z,E(@@pðߺP ^䎀S )#T0fe8 } else { therow.bgColor="#efefef"; break } } form.elements[i].checked = true; } } } } //turn on the first checkbox if all others are clicked or turn it off if any of them are not function toggleSelect(form, master, boxid) { if (form.elements[master].checked == false) { for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type=="checkbox" && (form.elements[i].name.indexOf(boxid)!=-1)){ if (form.elements[i].checked == false) { return; } } } form.elements[master].checked = true; } else { for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type=="checkbox" && (form.elements[i].name.indexOf(boxid)!=-1)){ if (form.elements[i].checked == false) { form.elements[master].checked = false; return; } } } } } //WORKING WITH NUMBERS //check to make sure 1 number is greater than another function numSeqValidate(num1, num2){ if (num1>=num2)return true; else return false; } //Checks for a valid number function validateNumber (form, inField) { var strCurAmt = form.elements[inField].value; alert(strCurAmt); if (isNotNuAr!s#z,E)@@oðߺP d䎀S )#Tmber(strCurAmt, "FLOAT", false)) { alert("You have entered an invalid number"); form.elements[inField].focus(); form.elements[inField].select; return false; } return true; } //WORKING WITH STRINGS //shorten a string to a specified length function writetext(txt, txtlength){ if(!txtlength)txtlength=24 if (txt.length>txtlength) document.write(txt.substring(0,txtlength)+"…"); else document.write(txt); } //validate a URL by making sure there is an http:// present //check for script tags function scriptCheck(str){ str=str.toUpperCase(); if((str.indexOf(" maxval){ alert(messageFormat('Field length must be less than or equal to |0| characters.', [maxval])); form.elements[inField].focus(); form.elements[inField].select(); return false; } for (var i=0; i < str.length; i++){ temp=str.substring(i,i+1); switch(temp){ case ' ':{ alert("Input should not contain blank spaces"); form.elements[inField].focus(); form.elements[inField].select(); return false; } break; } } return true; } //check an ema BB\Ar",#zE4X@<啂ߺð P4|p> )#TBB\Ar",#zE4X@<唂ߺð P>|p )#TAr#U#z,E+@@mðߺP n䎀S )#T0fe8 il for valid format function emailCheck(form,inField) { var emailStr=form.elements[inField].value; if(!emailCheck(emailStr)) { form.elements[inField].focus(); form.elements[inField].select(); return false; } return true; } function emailCheck(emailStr) { var emailPat=/^(.+)@(.+)$/ var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]" var validChars="\[^\\s" + specialChars + "\]" var quotedUser="(\"[^\"]*\")" var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/ var atom=validChars + '+' var word="(" + atom + "|" + quotedUser + ")" var userPat=new RegExp("^" + word + "(\\." + word + ")*$") var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$") var matchArray=emailStr.match(emailPat) if (matchArray==null){ alert("Email address seems incorrect (check @ and .\'s)") return false } var user=matchArray[1] var domain=matchArray[2] if (user.match(userPat)==null){ alert("The username doesn\'t seem to be valid.") return false } var IPArray=domain.match(ipDomainPat) if (IPArray!=null){ for (var i=1;i<=4;i++){ if (IPArray[i]>255){ alert("Destination IP address is invalid!") return false } } return true } var domainArray=domain.match(domainPat) if (domainArray==null){ alert("The domain Ar#\#z,E,@@lðߺP tv䎀S )#Tname doesn\'t seem to be valid.") return false } var atomPat=new RegExp(atom,"g") var domArr=domain.match(atomPat) var len=domArr.length if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3){ alert("The address must end in a three-letter domain, or two letter country.") return false } if (len<2){ var errStr="This address is missing a hostname!" alert(errStr) return false } return true; } //implements string.split() fnctionality. Use for javascript1.0 support. function splitString(string,separator) { var splitIndex = 0; var splitArray = new Array(); while ((string.length > 0) && (separator.length > 0)) { var i = string.indexOf(separator); if ((!i) && (separator != string.substring(0,separator.length))) break; if (i == -1) { splitArray[splitIndex++] = string; break; } splitArray[splitIndex++] = string.substring(0,i); string = string.substring(i+separator.length,string.length); } return splitArray; } //compare 2 string to make sure they are the same function compareStrings(str1,str2){ if (str1 != str2){ alert ("The 2 strings must match") return false; } else return true; } // RANDOM FUNCTIONS function registerPopupWindow(popup) { var frameset = top.APPLICATION_FRAME; if (frameset == null) return; var popups = frameset.vista_popups; if (pAr##z,E-@@sðߺP z䎀K )#Topups == null) { popups = new Array(); frameset.vista_popups = popups; } popups[popups.length] = popup; } function openWindow(url,title,width,height,retval) { var plugin=detectJava(); var useros = navigator.platform; var newURL; if(plugin==true) { newURL=url+"&applet=true&userOs="+useros; } else { if(popupFlag==false){ newURL =url+"&applet=true&NOTIFY_PARENT=true&userOs="+useros; } else { newURL=url+"&applet=false"; } } browseBox(newURL,title,width,height,retval); } function browseBox(url,title,width,height,retval) { var allcookies=document.cookie; var cookiepos=allcookies.indexOf("uid2"); if (cookiepos>=0){ var uid=allcookies.substring(cookiepos+7, cookiepos+20); title = title+uid; } var screenX=Math.floor((screen.width)/2)-Math.floor(width/2); var screenY=Math.floor((screen.height)/2)-Math.floor(height/2)-20; var top=screenY; var left=screenX; var features="'"+'toolbar=no, scrollbars=yes, status=yes, resizable=yes, height='+ height+', width='+ width+', top='+ top+', left='+ left+', screenX='+ screenX+', screenY='+ screenY+"'"; newWindow= Ar##z,E.@@jðߺP ~䎀S )#T0fe8 window.open(url,title,features); newWindow.focus(); if(retval=="ret")return newWindow; } // open a small window, center it function openBox(url,title,width,height,retval) { var allcookies=document.cookie; var cookiepos=allcookies.indexOf("uid2"); var cookiepos2=allcookies.indexOf("SESSIONID"); var j=url.indexOf("browseFrameset.jsp"); var i=url.indexOf("displayFileBrowser.dowebct"); if(i>0 || j>0 ) {url=openWindow(url,title,width,height,retval); return;} if (cookiepos>=0 && cookiepos2>10){ var uid=allcookies.substring(cookiepos+7, cookiepos+20); title = title+uid; } var screenX=Math.floor((screen.width)/2)-Math.floor(width/2); var screenY=Math.floor((screen.height)/2)-Math.floor(height/2)-20; var top=screenY; var left=screenX; var features="'"+'toolbar=no, scrollbars=yes, status=yes, resizable=yes, height='+ height+', width='+ width+', top='+ top+', left='+ left+', screenX='+ screenX+', screenY='+ screenY+"'"; newWindow=window.open(url,title,features); newWindow.focus(); if(retval=="ret")return newWindow; } function openPopupBox(url,title,showFeature) { var allcookies=document.cookie; var cookiepos=allcookies.indexOf("uid2"); var cookiepos2=allcookies.indexOf("SESSIONID"); if (cookiepos>=0 && cookiepos2>10){ var uid=allcookies.substring(cookiepos+7, cookiepos+20); title = title+uid; } var features; if (showFeature=="true") { feAr##z,E/@@iðߺP f䎀S )#Tatures="toolbar=no,scrollbars=yes,status=yes,resizable=yes"; newWindow=window.open(url,title,features); } else { newWindow=window.open(url,title); } newWindow.focus(); } //confirm the deletion of an object function confirmDelete(){ if (confirm("Are you sure you want to delete this item?"))return true; else return false; } // Netscape 4.x resize bug fix function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //Popup window for Icon Legend var allview=0; function iconLegend(){ var url='/webct/urw/lc19507.tp0/viewLegend.dowebct'; openBox(url, 'legend',250,350); } //open Help window function openHelp(screenID,tool) { var url='/webct/help.dowebct'; if ((screenID>0) && (tool!="")) url+="?screenid="+screenID+"&tool="+tool; openBox(url,"HelpWin",650,450); } //open Help window with the InstitutionID function openHelpWithInsId(screenID,tool,insId) { var url='/webct/help.dowebct'; if ((screenID>0) && (tool!="")) url+="?screenid="+screenID+"&tool="+tool +"&insId="+insId; openBox(url,"HelpWin",650,450); } function messageFormat(message, params) { var tempStr1 = meAr##z,E0@@pðߺP 䎀K )#Tssage, tempStr2; for (var i = 0; i < params.length; i++) { tempStr2 = tempStr1; var markerString = "|" + i + "|"; var leftIndex = tempStr2.indexOf(markerString); var rightIndex = leftIndex + markerString.length; tempStr1 = tempStr2.substring(0, leftIndex) + params[i] + tempStr2.substring(rightIndex, tempStr2.length); } return tempStr1; } function getValidFileName(message) { // ifs {'/', '\\', ':', '*', '?', '<', '>', '|', ';', '"'} // webdav {'@', '&', '=', '+', '$', '^', ',', '\''} var illegalFileNameCharactersRE = /^\.|\.$|[\/\\:\*\?<>\|;"@&=\+$\^,']/; var fileName = prompt(message, "" ); if (fileName == "") { getValidFileName(message); } if (fileName != null && fileName != "") { var invalidName = illegalFileNameCharactersRE.test(fileName); if (invalidName) { alert("The filename cannot start or end with a . (dot) or contain any of the following characters: /:*?<>|;@&=+$^, or a single or double quote.") return null; } else { return fileName; } } else { return null; } } function bandIt() { // adds alternating sha Ar$#z,E1@@gðߺP 䎀S )#T0d76 des to table rows. // to use, give table and id of "data", // and add "bandIt()" to the onload attribute of the BODY. if (document.getElementById('data')) { var cc,rr; var nr=document.getElementById('data').tBodies[0].rows.length; if (nr>0) for (i=0;i