var chdata = Array( Array('test', '[TEST]'), Array('ch_form_login_pass', 'Help 4 password field'), Array('ch_form_login_username', 'HELP 4 username field'), Array('test2', '[TEST2]') ); function get_cg_value(code) { for (x=0; x<=chdata.length-1; x++) { if (chdata[x][0] == code ) {return chdata[x][1];} } } function ch_pop_html(code) { s = stripHTML(get_cg_value(code)); if (s) { document.write(''); } } function ch_help_popup(code) { alert(stripHTML(get_cg_value(code))); } function stripHTML(oldString0) { oldString = oldString0.replace(/(\') { inTag = false; i++; } if(!inTag) newString += oldString.charAt(i); } return newString; } function ml_edit(ml_id, ml_name) { window.open('http://www.getratex.ch/toolsv2//io-admin/?_action=ml_edit&_step=edit_popup_form&id='+ml_name+'&win=1', 'ml', 'width=680; height=300; resizable=1; scrollbars=1, status=1'); } //================ function focusonfirstfield() { return; doc = document.formmbt.elements; for (i=0; i<= Math.min(doc.length-1, 4000) ; i++ ) { if(document.formmbt.elements[i].type!='hidden') { document.formmbt.elements[i].focus(); return 1;} } return 1; } function select2plain(s) { var options_string = ""; var options_string0 = new Array(0); var i = -1; for (loop=0; loop < s.options.length; loop++) { if (s.options[loop].selected == true) { i++; options_string0[i] = s.options[loop].text + ""; } } options_string = options_string0.join(":"); window.status = (i+1)+' items selected: ['+options_string+']'; } var leavef = ''; function alert_rel_field(f, oryg_value) { if ((f.value=='')&&(oryg_value!='') && (leavef!=f.name)) { a = confirm('Please remember that if you change the content of this field in a significant manner, you will also need to change all the links connecting this parameter to others further down. To replace this parameter with a new one, it is recommended to click the "cancel box" and use a new field.'); if (a == false) { f.value = oryg_value; leavef = ''; } else { f.value = ''; f.focus(); } } } function clear_save(f) { document.formmbt.elements[f].value = ''; //vas2(); } function chselall() { doc = document.formmbt.elements; for (i=0; i<= doc.length-1 ; i++ ) { if(document.formmbt.elements[i].type=='checkbox') { document.formmbt.elements[i].checked=true;} }} function chinvert() { doc = document.formmbt.elements; for (i=0; i<= doc.length-1 ; i++ ) { if(document.formmbt.elements[i].type=='checkbox') { document.formmbt.elements[i].checked= !document.formmbt.elements[i].checked;} }} function chselbyarr(name, arr) { doc = document.formmbt.elements; for (x=0; x<=arr.length-1;x++) { doc.elements[name+'['+arr[x]+']'].checked=true; } } function addmove_popup() { nwin = window.open('', 'popupaddmove', 'width=810, height=400, scrollbars=1, resizable=1'); formmbt.target='popupaddmove'; formmbt._step.value='form11_addmove'; formmbt._out.value='POPUP1'; vas2(); setdefaultvalues(); } function addideas_popup(tool, problem) { nwin = window.open('', 'popupaddideas', 'width=810, height=400, scrollbars=1, resizable=1'); formmbt.target='popupaddideas'; if (tool == 'compass') { formmbt._step.value='form35a'; } if (tool == 'webwandering') { formmbt._step.value='form35a'; } if (tool == 'insideview') { formmbt._step.value='form35a'; } if (tool == 'sacredcows') { formmbt._step.value='form35a'; } if (tool == 'thelevelchain') { formmbt._step.value='form35a'; } if (tool == 'questionsrace') { formmbt._step.value='form35a'; } if (tool == 'reversal') { formmbt._step.value='form35a'; } if (tool == 'randomword') { formmbt._step.value='form35a'; } if (tool == 'twowords') { formmbt._step.value='form35a'; } if (tool == 'randompicture') { formmbt._step.value='form35a'; } if (tool == 'coolsite') { formmbt._step.value='form35a'; } if (tool == 'losethebaggage') { formmbt._step.value='form35a'; } if (tool == 'substitute') { formmbt._step.value='form35a'; } if (tool == 'lostintranslation') { formmbt._step.value='form35a'; } if (tool == 'theyarewinning') { formmbt._step.value='form35a'; } if (tool == 'components') { formmbt._step.value='form35a'; } if (tool == 'the100bid') { formmbt._step.value='form35b'; } if (tool == 'signposts') { formmbt._step.value='form35c'; } if (tool == 'hazardmarkers') { formmbt._step.value='form35c'; } formmbt._sub_step.value=tool; formmbt._out.value='POPUP1'; vas2(); setdefaultvalues(); } function clue_window(tool, word) { url = ''; url += '?fid='+document.formmbt.fid.value; url += '&fidauth='+document.formmbt.fidauth.value; url += '&_step=form35a_cluewindow'; url += '&_word='+word; url += '&_tool='+tool; url += '&_out=CLR'; window.open(url,'clue_window','status=yes, scrollbars=yes, resizable=yes, width=400, height=400'); } function moves_manag_win(_sub_step) { nwin = window.open('', 'wi', 'width=810, height=400, scrollbars=1, resizable=1'); document.formmbt.target='wi'; document.formmbt._step.value='form11k_popup'; document.formmbt._sub_step.value=_sub_step; document.formmbt._out.value='CLR'; vas2(); formmbt.target=''; setdefaultvalues(); } function put_timestamp(field_name) { document.formmbt.elements[field_name].value = '5-Feb-2012 12:24'; } function put_timestamp_str(field_name, field_str_name, str) { document.formmbt.elements[field_name].value = '5-Feb-2012 12:24'; document.formmbt.elements[field_str_name].value = str; } function re_stamp(field_name, str) { document.formmbt.elements[field_name+'[date]'].value = '5-Feb-2012 12:24'; document.formmbt.elements[field_name+'[auth]'].value = str; } /* +++++++++++++++++++++ comlpetion */ function generate_comlet_progress(f,m) { document.write('
'); document.write(''); document.write(''); document.write(''); document.write(''); for (x = 1; x <= m-1; x++) { document.write(''); } document.write(''); document.write(''); document.write('
'); document.write('
'+ ''+ ' '+ ''+ ''+ ''+ ''+ ''+ '
0255075100%
'); } function handle_comlet_draw(n,m) { e = Math.round(n/(100/m)); for (x=0; x<=m; x++) { var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1; var ns6=document.getElementById&&!document.all; var ns4=document.layers; eval('mobj=ie4? document.all.compl'+x+' : ns6? document.getElementById("compl'+x+'") : ns4? document.compl'+x+' : ""; mobj.thestyle=(ie4||ns6)? mobj.style : compl'+x+';'); if (x<=e) {mobj.thestyle.backgroundColor = "#B50D12";} else {mobj.thestyle.backgroundColor = "#666666";} } } /* +++++++++++++++++++++ comlpetion */ /* +++++++++++++++++++++ dates */ // ------------------------ //set todays date Now = new Date(); NowDay = Now.getDate(); NowMonth = Now.getMonth(); NowYear = Now.getYear(); if (NowYear < 2000) NowYear += 1900; //for Netscape //function for returning how many days there are in a month including leap years function DaysInMonth(WhichMonth, WhichYear) { var DaysInMonth = 31; if (WhichMonth == 4 || WhichMonth == 6 || WhichMonth == 9 || WhichMonth == 11) DaysInMonth = 30; if (WhichMonth == 2 && (WhichYear/4) != Math.floor(WhichYear/4)) DaysInMonth = 28; if (WhichMonth == 2 && (WhichYear/4) == Math.floor(WhichYear/4)) DaysInMonth = 29; return DaysInMonth; } function ChangeOptionDays2(Which) { eval("DaysObject = document.formmbt." + Which + "Day"); eval("MonthObject = document.formmbt." + Which + "Month"); eval("YearObject = document.formmbt." + Which + "Year"); Day = DaysObject[DaysObject.selectedIndex].value; Month = MonthObject[MonthObject.selectedIndex].value; Year = YearObject[YearObject.selectedIndex].value; if (YearObject[YearObject.selectedIndex].value == '') { MonthObject.selectedIndex = 0; } if (MonthObject[MonthObject.selectedIndex].value == '') { DaysObject.selectedIndex = 0; } if (Day == '' || Month == '' || Year == '') { return 1; } return ChangeOptionDays(Which); } function ChangeOptionDays(Which) { eval("DaysObject = document.formmbt." + Which + "Day"); eval("MonthObject = document.formmbt." + Which + "Month"); eval("YearObject = document.formmbt." + Which + "Year"); Month = MonthObject[MonthObject.selectedIndex].value; Year = YearObject[YearObject.selectedIndex].value; DaysForThisSelection = DaysInMonth(Month, Year); CurrentDaysInSelection = DaysObject.length; if (CurrentDaysInSelection > DaysForThisSelection) { for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++) { DaysObject.options[DaysObject.options.length - 1] = null } } if (DaysForThisSelection > CurrentDaysInSelection) { for (i=0; i<(DaysForThisSelection-CurrentDaysInSelection); i++) { NewOption = new Option(DaysObject.options.length + 1); DaysObject.add(NewOption); } } if (DaysObject.selectedIndex < 0) DaysObject.selectedIndex == 0; } //function to set options to today function SetToToday(Which) { DaysObject = eval("document.formmbt." + Which + "Day"); MonthObject = eval("document.formmbt." + Which + "Month"); YearObject = eval("document.formmbt." + Which + "Year"); YearObject[NowYear-2000].selected = true; MonthObject[NowMonth].selected = true; ChangeOptionDays(Which); DaysObject[NowDay-1].selected = true; } //function to write option years plus x function WriteYearOptions(y) { line = ""; // nyi = NowYear + i; sy = 2000; for (i=sy; i<=sy+20; i++) { if (i==y) {line += "