var http; var html=function(id){ var obj=document.getElementById(id); return obj; }; //just a helper var htmln=function(name){var obj=document.getElementsByName(name); return obj; }; var ActiveEvent; function handleClick(cb) { // display("Clicked, new value = " + cb.checked); var objid=cb.id.split("_"); var obj; var i; var disable=false; for(i=1;i<=10;i++){ obj=html(objid[0]+"_"+i+"_"+objid[2]); if(obj!=null&&disable==false){ disable=obj.disabled; } } if(disable){ obj=html(cb.id); obj.checked=false; obj.disabled=disable; cb.checked=false; } for(i=1;i<=10;i++){ obj=html(objid[0]+"_"+i+"_"+objid[2]); if(obj!=null){ obj.checked=cb.checked; obj.disabled=disable; } } LockBox(); } function LockBox(){ var lock1=0; var lock2=0; var lock3=0; var lock4=0; var lock5=0; var lock6=0; var lock7=0; var lock8=0; var lock9=0; var lock10=0; obj = html('jas39t_1_0'); if(obj!=null){ if(obj.checked==true){ lock1++; } } else { obj= html('jas39d_1'); if(obj.innerHTML=='Bokad'){ lock1++; } } obj = html('j35jt_1_0'); if(obj!=null){ if(obj.checked==true){ lock1++; } } else { obj= html('j35jd_1'); if(obj.innerHTML=='Bokad'){ lock1++; } } obj = html('Mt_1_0'); if(obj!=null){ if(obj.checked==true){ lock1++; } } else { obj= html('Md_1'); if(obj.innerHTML=='Bokad'){ lock1++; } } obj = html('dc10t_1_0'); if(obj!=null){ if(obj.checked==true){ lock1++; } } else { obj= html('dc10d_1'); if(obj.innerHTML=='Bokad'){ lock1++; } } obj = html('a320t_1_0'); if(obj!=null){ if(obj.checked==true){ lock1++; } } else { obj= html('a320d_1'); if(obj.innerHTML=='Bokad'){ lock1++; } } obj = html('jas39t_2_1'); if(obj!=null){ if(obj.checked==true){ lock2++; } } else { obj= html('jas39d_2'); if(obj.innerHTML=='Bokad'){ lock2++; } } obj = html('j35jt_2_1'); if(obj!=null){ if(obj.checked==true){ lock2++; } } else { obj= html('j35jd_2'); if(obj.innerHTML=='Bokad'){ lock2++; } } obj = html('Mt_2_1'); if(obj!=null){ if(obj.checked==true){ lock2++; } } else { obj= html('Md_2'); if(obj.innerHTML=='Bokad'){ lock2++; } } obj = html('dc10t_2_1'); if(obj!=null){ if(obj.checked==true){ lock2++; } } else { obj= html('dc10d_2'); if(obj.innerHTML=='Bokad'){ lock2++; } } obj = html('a320t_2_0'); if(obj!=null){ if(obj.checked==true){ lock2++; } } else { obj= html('a320d_2'); if(obj.innerHTML=='Bokad'){ lock2++; } } obj = html('jas39t_3_2'); if(obj!=null){ if(obj.checked==true){ lock3++; } } else { obj= html('jas39d_3'); if(obj.innerHTML=='Bokad'){ lock3++; } } obj = html('j35jt_3_2'); if(obj!=null){ if(obj.checked==true){ lock3++; } } else { obj= html('j35jd_3'); if(obj.innerHTML=='Bokad'){ lock3++; } } obj = html('Mt_3_2'); if(obj!=null){ if(obj.checked==true){ lock3++; } } else { obj= html('Md_3'); if(obj.innerHTML=='Bokad'){ lock3++; } } obj = html('dc10t_3_2'); if(obj!=null){ if(obj.checked==true){ lock3++; } } else { obj= html('dc10d_3'); if(obj.innerHTML=='Bokad'){ lock3++; } } obj = html('a320t_3_1'); if(obj!=null){ if(obj.checked==true){ lock3++; } } else { obj= html('a320d_3'); if(obj.innerHTML=='Bokad'){ lock3++; } } obj = html('jas39t_4_3'); if(obj!=null){ if(obj.checked==true){ lock4++; } } else { obj= html('jas39d_4'); if(obj.innerHTML=='Bokad'){ lock4++; } } obj = html('j35jt_4_3'); if(obj!=null){ if(obj.checked==true){ lock4++; } } else { obj= html('j35jd_4'); if(obj.innerHTML=='Bokad'){ lock4++; } } obj = html('Mt_4_3'); if(obj!=null){ if(obj.checked==true){ lock4++; } } else { obj= html('Md_4'); if(obj.innerHTML=='Bokad'){ lock4++; } } obj = html('dc10t_4_3'); if(obj!=null){ if(obj.checked==true){ lock4++; } } else { obj= html('dc10d_4'); if(obj.innerHTML=='Bokad'){ lock4++; } } obj = html('a320t_4_1'); if(obj!=null){ if(obj.checked==true){ lock4++; } } else { obj= html('a320d_4'); if(obj.innerHTML=='Bokad'){ lock4++; } } obj = html('jas39t_5_4'); if(obj!=null){ if(obj.checked==true){ lock5++; } } else { obj= html('jas39d_5'); if(obj.innerHTML=='Bokad'){ lock5++; } } obj = html('j35jt_5_4'); if(obj!=null){ if(obj.checked==true){ lock5++; } } else { obj= html('j35jd_5'); if(obj.innerHTML=='Bokad'){ lock5++; } } obj = html('Mt_5_4'); if(obj!=null){ if(obj.checked==true){ lock5++; } } else { obj= html('Md_5'); if(obj.innerHTML=='Bokad'){ lock5++; } } obj = html('dc10t_5_4'); if(obj!=null){ if(obj.checked==true){ lock5++; } } else { obj= html('dc10d_5'); if(obj.innerHTML=='Bokad'){ lock5++; } } obj = html('a320t_5_2'); if(obj!=null){ if(obj.checked==true){ lock5++; } } else { obj= html('a320d_5'); if(obj.innerHTML=='Bokad'){ lock5++; } } obj = html('jas39t_6_5'); if(obj!=null){ if(obj.checked==true){ lock6++; } } else { obj= html('jas39d_6'); if(obj.innerHTML=='Bokad'){ lock6++; } } obj = html('j35jt_6_5'); if(obj!=null){ if(obj.checked==true){ lock6++; } } else { obj= html('j35jd_6'); if(obj.innerHTML=='Bokad'){ lock6++; } } obj = html('Mt_6_5'); if(obj!=null){ if(obj.checked==true){ lock6++; } } else { obj= html('Md_6'); if(obj.innerHTML=='Bokad'){ lock6++; } } obj = html('dc10t_6_5'); if(obj!=null){ if(obj.checked==true){ lock6++; } } else { obj= html('dc10d_6'); if(obj.innerHTML=='Bokad'){ lock6++; } } obj = html('a320t_6_2'); if(obj!=null){ if(obj.checked==true){ lock6++; } } else { obj= html('a320d_6'); if(obj.innerHTML=='Bokad'){ lock6++; } } obj = html('jas39t_7_6'); if(obj!=null){ if(obj.checked==true){ lock7++; } } else { obj= html('jas39d_7'); if(obj.innerHTML=='Bokad'){ lock7++; } } obj = html('j35jt_7_6'); if(obj!=null){ if(obj.checked==true){ lock7++; } } else { obj= html('j35jd_7'); if(obj.innerHTML=='Bokad'){ lock7++; } } obj = html('Mt_7_6'); if(obj!=null){ if(obj.checked==true){ lock7++; } } else { obj= html('Md_7'); if(obj.innerHTML=='Bokad'){ lock7++; } } obj = html('dc10t_7_6'); if(obj!=null){ if(obj.checked==true){ lock7++; } } else { obj= html('dc10d_7'); if(obj.innerHTML=='Bokad'){ lock7++; } } obj = html('a320t_7_3'); if(obj!=null){ if(obj.checked==true){ lock7++; } } else { obj= html('a320d_7'); if(obj.innerHTML=='Bokad'){ lock7++; } } obj = html('jas39t_8_7'); if(obj!=null){ if(obj.checked==true){ lock8++; } } else { obj= html('jas39d_8'); if(obj.innerHTML=='Bokad'){ lock8++; } } obj = html('j35jt_8_7'); if(obj!=null){ if(obj.checked==true){ lock8++; } } else { obj= html('j35jd_8'); if(obj.innerHTML=='Bokad'){ lock8++; } } obj = html('Mt_8_7'); if(obj!=null){ if(obj.checked==true){ lock8++; } } else { obj= html('Md_8'); if(obj.innerHTML=='Bokad'){ lock8++; } } obj = html('dc10t_8_7'); if(obj!=null){ if(obj.checked==true){ lock8++; } } else { obj= html('dc10d_8'); if(obj.innerHTML=='Bokad'){ lock8++; } } obj = html('a320t_8_3'); if(obj!=null){ if(obj.checked==true){ lock8++; } } else { obj= html('a320d_8'); if(obj.innerHTML=='Bokad'){ lock8++; } } obj = html('jas39t_9_8'); if(obj!=null){ if(obj.checked==true){ lock9++; } } else { obj= html('jas39d_9'); if(obj.innerHTML=='Bokad'){ lock9++; } } obj = html('j35jt_9_8'); if(obj!=null){ if(obj.checked==true){ lock9++; } } else { obj= html('j35jd_9'); if(obj.innerHTML=='Bokad'){ lock9++; } } obj = html('Mt_9_8'); if(obj!=null){ if(obj.checked==true){ lock9++; } } else { obj= html('Md_9'); if(obj.innerHTML=='Bokad'){ lock9++; } } obj = html('dc10t_9_8'); if(obj!=null){ if(obj.checked==true){ lock9++; } } else { obj= html('dc10d_9'); if(obj.innerHTML=='Bokad'){ lock9++; } } obj = html('a320t_9_4'); if(obj!=null){ if(obj.checked==true){ lock9++; } } else { obj= html('a320d_9'); if(obj.innerHTML=='Bokad'){ lock9++; } } obj = html('jas39t_10_9'); if(obj!=null){ if(obj.checked==true){ lock10++; } } else { obj= html('jas39d_10'); if(obj.innerHTML=='Bokad'){ lock10++; } } obj = html('j35jt_10_9'); if(obj!=null){ if(obj.checked==true){ lock10++; } } else { obj= html('j35jd_10'); if(obj.innerHTML=='Bokad'){ lock10++; } } obj = html('Mt_10_9'); if(obj!=null){ if(obj.checked==true){ lock10++; } } else { obj= html('Md_10'); if(obj.innerHTML=='Bokad'){ lock10++; } } obj = html('dc10t_10_9'); if(obj!=null){ if(obj.checked==true){ lock10++; } } else { obj= html('dc10d_10'); if(obj.innerHTML=='Bokad'){ lock10++; } } obj = html('a320t_10_4'); if(obj!=null){ if(obj.checked==true){ lock10++; } } else { obj= html('a320d_10'); if(obj.innerHTML=='Bokad'){ lock10++; } } obj = html('jas39t_1_0'); if(obj!=null){ if(obj.checked==false&& lock1>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_1_0'); if(obj!=null){ if(obj.checked==false&& lock1>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_1_0'); if(obj!=null){ if(obj.checked==false&& lock1>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_1_0'); if(obj!=null){ if(obj.checked==false&& lock1>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_1_0'); if(obj!=null){ if(obj.checked==false&& lock1>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_2_1'); if(obj!=null){ if(obj.checked==false&& lock2>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_2_1'); if(obj!=null){ if(obj.checked==false&& lock2>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_2_1'); if(obj!=null){ if(obj.checked==false&& lock2>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_2_1'); if(obj!=null){ if(obj.checked==false&& lock2>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_2_0'); if(obj!=null){ if(obj.checked==false&& lock2>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_3_2'); if(obj!=null){ if(obj.checked==false&& lock3>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_3_2'); if(obj!=null){ if(obj.checked==false&& lock3>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_3_2'); if(obj!=null){ if(obj.checked==false&& lock3>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_3_2'); if(obj!=null){ if(obj.checked==false&& lock3>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_3_1'); if(obj!=null){ if(obj.checked==false&& lock3>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_4_3'); if(obj!=null){ if(obj.checked==false&& lock4>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_4_3'); if(obj!=null){ if(obj.checked==false&& lock4>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_4_3'); if(obj!=null){ if(obj.checked==false&& lock4>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_4_3'); if(obj!=null){ if(obj.checked==false&& lock4>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_4_1'); if(obj!=null){ if(obj.checked==false&& lock4>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_5_4'); if(obj!=null){ if(obj.checked==false&& lock5>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_5_4'); if(obj!=null){ if(obj.checked==false&& lock5>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_5_4'); if(obj!=null){ if(obj.checked==false&& lock5>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_5_4'); if(obj!=null){ if(obj.checked==false&& lock5>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_5_2'); if(obj!=null){ if(obj.checked==false&& lock5>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_6_5'); if(obj!=null){ if(obj.checked==false&& lock6>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_6_5'); if(obj!=null){ if(obj.checked==false&& lock6>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_6_5'); if(obj!=null){ if(obj.checked==false&& lock6>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_6_5'); if(obj!=null){ if(obj.checked==false&& lock6>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_6_2'); if(obj!=null){ if(obj.checked==false&& lock6>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_7_6'); if(obj!=null){ if(obj.checked==false&& lock7>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_7_6'); if(obj!=null){ if(obj.checked==false&& lock7>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_7_6'); if(obj!=null){ if(obj.checked==false&& lock7>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_7_6'); if(obj!=null){ if(obj.checked==false&& lock7>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_7_3'); if(obj!=null){ if(obj.checked==false&& lock7>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_8_7'); if(obj!=null){ if(obj.checked==false&& lock8>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_8_7'); if(obj!=null){ if(obj.checked==false&& lock8>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_8_7'); if(obj!=null){ if(obj.checked==false&& lock8>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_8_7'); if(obj!=null){ if(obj.checked==false&& lock8>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_8_3'); if(obj!=null){ if(obj.checked==false&& lock8>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_9_8'); if(obj!=null){ if(obj.checked==false&& lock9>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_9_8'); if(obj!=null){ if(obj.checked==false&& lock9>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_9_8'); if(obj!=null){ if(obj.checked==false&& lock9>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_9_8'); if(obj!=null){ if(obj.checked==false&& lock9>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_9_4'); if(obj!=null){ if(obj.checked==false&& lock9>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('jas39t_10_9'); if(obj!=null){ if(obj.checked==false&& lock10>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('j35jt_10_9'); if(obj!=null){ if(obj.checked==false&& lock10>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('Mt_10_9'); if(obj!=null){ if(obj.checked==false&& lock10>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('dc10t_10_9'); if(obj!=null){ if(obj.checked==false&& lock10>1){ obj.disabled=true; } else { obj.disabled=false; } } obj = html('a320t_10_4'); if(obj!=null){ if(obj.checked==false&& lock10>1){ obj.disabled=true; } else { obj.disabled=false; } } } function randomString(length) { var text = ""; var possible = "0123456789"; for(var i = 0; i < length; i++) { text += possible.charAt(Math.floor(Math.random() * possible.length)); } return text; } function get_html_translation_table (table, quote_style) { // Returns the internal translation table used by htmlspecialchars and htmlentities // // version: 1109.2015 // discuss at: http://phpjs.org/functions/get_html_translation_table // + original by: Philip Peterson // + revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: noname // + bugfixed by: Alex // + bugfixed by: Marco // + bugfixed by: madipta // + improved by: KELAN // + improved by: Brett Zamir (http://brett-zamir.me) // + bugfixed by: Brett Zamir (http://brett-zamir.me) // + input by: Frank Forte // + bugfixed by: T.Wild // + input by: Ratheous // % note: It has been decided that we're not going to add global // % note: dependencies to php.js, meaning the constants are not // % note: real constants, but strings instead. Integers are also supported if someone // % note: chooses to create the constants themselves. // * example 1: get_html_translation_table('HTML_SPECIALCHARS'); // * returns 1: {'"': '"', '&': '&', '<': '<', '>': '>'} var entities = {}, hash_map = {}, decimal; var constMappingTable = {}, constMappingQuoteStyle = {}; var useTable = {}, useQuoteStyle = {}; // Translate arguments constMappingTable[0] = 'HTML_SPECIALCHARS'; constMappingTable[1] = 'HTML_ENTITIES'; constMappingQuoteStyle[0] = 'ENT_NOQUOTES'; constMappingQuoteStyle[2] = 'ENT_COMPAT'; constMappingQuoteStyle[3] = 'ENT_QUOTES'; useTable = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS'; useQuoteStyle = !isNaN(quote_style) ? constMappingQuoteStyle[quote_style] : quote_style ? quote_style.toUpperCase() : 'ENT_COMPAT'; if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') { throw new Error("Table: " + useTable + ' not supported'); // return false; } entities['38'] = '&'; if (useTable === 'HTML_ENTITIES') { entities['160'] = ' '; entities['161'] = '¡'; entities['162'] = '¢'; entities['163'] = '£'; entities['164'] = '¤'; entities['165'] = '¥'; entities['166'] = '¦'; entities['167'] = '§'; entities['168'] = '¨'; entities['169'] = '©'; entities['170'] = 'ª'; entities['171'] = '«'; entities['172'] = '¬'; entities['173'] = '­'; entities['174'] = '®'; entities['175'] = '¯'; entities['176'] = '°'; entities['177'] = '±'; entities['178'] = '²'; entities['179'] = '³'; entities['180'] = '´'; entities['181'] = 'µ'; entities['182'] = '¶'; entities['183'] = '·'; entities['184'] = '¸'; entities['185'] = '¹'; entities['186'] = 'º'; entities['187'] = '»'; entities['188'] = '¼'; entities['189'] = '½'; entities['190'] = '¾'; entities['191'] = '¿'; entities['192'] = 'À'; entities['193'] = 'Á'; entities['194'] = 'Â'; entities['195'] = 'Ã'; entities['196'] = 'Ä'; entities['197'] = 'Å'; entities['198'] = 'Æ'; entities['199'] = 'Ç'; entities['200'] = 'È'; entities['201'] = 'É'; entities['202'] = 'Ê'; entities['203'] = 'Ë'; entities['204'] = 'Ì'; entities['205'] = 'Í'; entities['206'] = 'Î'; entities['207'] = 'Ï'; entities['208'] = 'Ð'; entities['209'] = 'Ñ'; entities['210'] = 'Ò'; entities['211'] = 'Ó'; entities['212'] = 'Ô'; entities['213'] = 'Õ'; entities['214'] = 'Ö'; entities['215'] = '×'; entities['216'] = 'Ø'; entities['217'] = 'Ù'; entities['218'] = 'Ú'; entities['219'] = 'Û'; entities['220'] = 'Ü'; entities['221'] = 'Ý'; entities['222'] = 'Þ'; entities['223'] = 'ß'; entities['224'] = 'à'; entities['225'] = 'á'; entities['226'] = 'â'; entities['227'] = 'ã'; entities['228'] = 'ä'; entities['229'] = 'å'; entities['230'] = 'æ'; entities['231'] = 'ç'; entities['232'] = 'è'; entities['233'] = 'é'; entities['234'] = 'ê'; entities['235'] = 'ë'; entities['236'] = 'ì'; entities['237'] = 'í'; entities['238'] = 'î'; entities['239'] = 'ï'; entities['240'] = 'ð'; entities['241'] = 'ñ'; entities['242'] = 'ò'; entities['243'] = 'ó'; entities['244'] = 'ô'; entities['245'] = 'õ'; entities['246'] = 'ö'; entities['247'] = '÷'; entities['248'] = 'ø'; entities['249'] = 'ù'; entities['250'] = 'ú'; entities['251'] = 'û'; entities['252'] = 'ü'; entities['253'] = 'ý'; entities['254'] = 'þ'; entities['255'] = 'ÿ'; } if (useQuoteStyle !== 'ENT_NOQUOTES') { entities['34'] = '"'; } if (useQuoteStyle === 'ENT_QUOTES') { entities['39'] = '''; } entities['60'] = '<'; entities['62'] = '>'; // ascii decimals to real symbols for (decimal in entities) { if (entities.hasOwnProperty(decimal)) { hash_map[String.fromCharCode(decimal)] = entities[decimal]; } } return hash_map; } function html_entity_decode (string, quote_style) { // Convert all HTML entities to their applicable characters // // version: 1109.2015 // discuss at: http://phpjs.org/functions/html_entity_decode // + original by: john (http://www.jd-tech.net) // + input by: ger // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + improved by: marc andreu // + revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + input by: Ratheous // + bugfixed by: Brett Zamir (http://brett-zamir.me) // + input by: Nick Kolosov (http://sammy.ru) // + bugfixed by: Fox // - depends on: get_html_translation_table // * example 1: html_entity_decode('Kevin & van Zonneveld'); // * returns 1: 'Kevin & van Zonneveld' // * example 2: html_entity_decode('&lt;'); // * returns 2: '<' var hash_map = {}, symbol = '', tmp_str = '', entity = ''; if(string===undefined){ return ""; } tmp_str = string.toString(); if (false === (hash_map = this.get_html_translation_table('HTML_ENTITIES', quote_style))) { return ""; } // fix & problem // http://phpjs.org/functions/get_html_translation_table:416#comment_97660 delete(hash_map['&']); hash_map['&'] = '&'; for (symbol in hash_map) { entity = hash_map[symbol]; tmp_str = tmp_str.split(entity).join(symbol); } tmp_str = tmp_str.split(''').join("'"); return tmp_str; } function init() { if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari http=new XMLHttpRequest(); } else{// code for IE6, IE5 http=new ActiveXObject("Microsoft.XMLHTTP"); } http.onreadystatechange=function(){ if (http.readyState==4 && http.status==200){ var n=http.response.indexOf("ERROR") if(n>0){ alert("Database update ERROR!!!!"); } else { // alert("OK!"); } } } scheduler.config.icons_select=['icon_details','icon_delete']; scheduler.config.mark_now=true; scheduler.config.first_hour=7; scheduler.config.last_hour=22; scheduler.config.xml_date="%Y-%m-%d %H:%i"; scheduler.config.details_on_dblclick=true; scheduler.config.details_on_create = true; scheduler.config.time_step=15; scheduler.config.server_utc=false; scheduler.config.multi_day = true; scheduler.locale.labels.timeline_tab = "Timeline"; scheduler.locale.labels.section_custom="Section"; dhtmlXTooltip.config.className = 'dhtmlXTooltip tooltip'; // sets the CSS classname of the tooltip window dhtmlXTooltip.config.timeout_to_display = 50; // delay of the rendering dhtmlXTooltip.config.delta_x = 15; // X position relative to the cursor (positive - margin to the right, negative - to the left) dhtmlXTooltip.config.delta_y = -20; // Y position relative to the cursor (positive - above the cursor, negative - below) scheduler.init('scheduler_here',new Date(),"week"); // scheduler.load("../common/events2010.xml"); scheduler.setLoadMode("week"); scheduler.load("data.php?data=week"); scheduler.attachEvent("onClick", function (id, e){ //any custom logic here scheduler.showLightbox(id); return false; }); scheduler.attachEvent("onBeforeDrag", function (id, mode, e){ //any custom logic here return false; }); scheduler.attachEvent("onBeforeEventCreated", function (e){ //any custom logic here return false; }); }; /* save event */ function save_form() { } var EVDate; scheduler.showLightbox = function(id){ var ev = scheduler.getEvent(id); document.getElementById('printer').innerHTML=''; ActiveEvent=ev; EVDate=""; GetSelectedItem(); switch ( ev.type ){ case "0": return; case "1": // html("titel").value=html_entity_decode(ev.text); html("jas39d_1").innerHTML=html_entity_decode(ev.jas39n_1); html("j35jd_1").innerHTML=html_entity_decode(ev.j35jn_1); html("Md_1").innerHTML=html_entity_decode(ev.Mn_1); html("dc10d_1").innerHTML=html_entity_decode(ev.dc10n_1); html("a320d_1").innerHTML=html_entity_decode(ev.a320n_1); html("jas39d_2").innerHTML=html_entity_decode(ev.jas39n_2); html("j35jd_2").innerHTML=html_entity_decode(ev.j35jn_2); html("Md_2").innerHTML=html_entity_decode(ev.Mn_2); html("dc10d_2").innerHTML=html_entity_decode(ev.dc10n_2); html("a320d_2").innerHTML=html_entity_decode(ev.a320n_2); html("jas39d_3").innerHTML=html_entity_decode(ev.jas39n_3); html("j35jd_3").innerHTML=html_entity_decode(ev.j35jn_3); html("Md_3").innerHTML=html_entity_decode(ev.Mn_3); html("dc10d_3").innerHTML=html_entity_decode(ev.dc10n_3); html("a320d_3").innerHTML=html_entity_decode(ev.a320n_3); html("jas39d_4").innerHTML=html_entity_decode(ev.jas39n_4); html("j35jd_4").innerHTML=html_entity_decode(ev.j35jn_4); html("Md_4").innerHTML=html_entity_decode(ev.Mn_4); html("dc10d_4").innerHTML=html_entity_decode(ev.dc10n_4); html("a320d_4").innerHTML=html_entity_decode(ev.a320n_4); html("jas39d_5").innerHTML=html_entity_decode(ev.jas39n_5); html("j35jd_5").innerHTML=html_entity_decode(ev.j35jn_5); html("Md_5").innerHTML=html_entity_decode(ev.Mn_5); html("dc10d_5").innerHTML=html_entity_decode(ev.dc10n_5); html("a320d_5").innerHTML=html_entity_decode(ev.a320n_5); html("jas39d_6").innerHTML=html_entity_decode(ev.jas39n_6); html("j35jd_6").innerHTML=html_entity_decode(ev.j35jn_6); html("Md_6").innerHTML=html_entity_decode(ev.Mn_6); html("dc10d_6").innerHTML=html_entity_decode(ev.dc10n_6); html("a320d_6").innerHTML=html_entity_decode(ev.a320n_6); html("jas39d_7").innerHTML=html_entity_decode(ev.jas39n_7); html("j35jd_7").innerHTML=html_entity_decode(ev.j35jn_7); html("Md_7").innerHTML=html_entity_decode(ev.Mn_7); html("dc10d_7").innerHTML=html_entity_decode(ev.dc10n_7); html("a320d_7").innerHTML=html_entity_decode(ev.a320n_7); html("jas39d_8").innerHTML=html_entity_decode(ev.jas39n_8); html("j35jd_8").innerHTML=html_entity_decode(ev.j35jn_8); html("Md_8").innerHTML=html_entity_decode(ev.Mn_8); html("dc10d_8").innerHTML=html_entity_decode(ev.dc10n_8); html("a320d_8").innerHTML=html_entity_decode(ev.a320n_8); html("jas39d_9").innerHTML=html_entity_decode(ev.jas39n_9); html("j35jd_9").innerHTML=html_entity_decode(ev.j35jn_9); html("Md_9").innerHTML=html_entity_decode(ev.Mn_9); html("dc10d_9").innerHTML=html_entity_decode(ev.dc10n_9); html("a320d_9").innerHTML=html_entity_decode(ev.a320n_9); html("jas39d_10").innerHTML=html_entity_decode(ev.jas39n_10); html("j35jd_10").innerHTML=html_entity_decode(ev.j35jn_10); html("Md_10").innerHTML=html_entity_decode(ev.Mn_10); html("dc10d_10").innerHTML=html_entity_decode(ev.dc10n_10); html("a320d_10").innerHTML=html_entity_decode(ev.a320n_10); LockBox(); break; case "2": GetSelectedItem(); html("titel").value=html_entity_decode(ev.text); break; case "3": break; case "4": break; case "5": break; case "6": break; } html("boknr").value=ev.id.toString() + randomString(10); html("eid").value=ev.id; scheduler.startLightbox(id, html("my_form") ); var start_date = new Date(ev.start_date); var end_date = new Date(ev.end_date); var month=('0'+( ev.start_date.getMonth()+1)).slice(-2) EVDate = ev.start_date.getFullYear() + "-" + month + "-" + ev.start_date.getDate(); showhide2('topdiv',0); } function close_form(argument) { document.getElementById('printer').innerHTML=' '; scheduler.endLightbox(false, html("my_form")); } scheduler.templates.event_class=function(start,end,event){ switch ( event.type ){ case "1" : return "son"; case "2" : return "bok"; case "3" : return "mot"; case "4" : return "jobb"; case "5" : return "Ovrigt"; case "6" : return "Ovning"; } return ""; } function ShowConfirm(){ confirm='

Du är på väg att boka simulatortiderna:

'; confirm+=EVDate+"
"; var obj; var kostnad=120; var antalpass=0; confirm+=""; objn=html('jas39t_1_0'); obj=htmln('jas39t_1'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_1_0'); obj=htmln('j35jt_1'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_1_0'); obj=htmln('Mt_1'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_1_0'); obj=htmln('dc10t_1'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_1_0'); obj=htmln('a320t_1'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_2_1'); obj=htmln('jas39t_2'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_2_1'); obj=htmln('j35jt_2'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_2_1'); obj=htmln('Mt_2'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_2_1'); obj=htmln('dc10t_2'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_2_0'); obj=htmln('a320t_2'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_3_2'); obj=htmln('jas39t_3'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_3_2'); obj=htmln('j35jt_3'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_3_2'); obj=htmln('Mt_3'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_3_2'); obj=htmln('dc10t_3'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_3_1'); obj=htmln('a320t_3'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_4_3'); obj=htmln('jas39t_4'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_4_3'); obj=htmln('j35jt_4'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_4_3'); obj=htmln('Mt_4'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_4_3'); obj=htmln('dc10t_4'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_4_1'); obj=htmln('a320t_4'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_5_4'); obj=htmln('jas39t_5'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_5_4'); obj=htmln('j35jt_5'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_5_4'); obj=htmln('Mt_5'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_5_4'); obj=htmln('dc10t_5'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_5_2'); obj=htmln('a320t_5'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_6_5'); obj=htmln('jas39t_6'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_6_5'); obj=htmln('j35jt_6'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_6_5'); obj=htmln('Mt_6'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_6_5'); obj=htmln('dc10t_6'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_6_2'); obj=htmln('a320t_6'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_7_6'); obj=htmln('jas39t_7'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_7_6'); obj=htmln('j35jt_7'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_7_6'); obj=htmln('Mt_7'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_7_6'); obj=htmln('dc10t_7'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_7_3'); obj=htmln('a320t_7'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_8_7'); obj=htmln('jas39t_8'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_8_7'); obj=htmln('j35jt_8'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_8_7'); obj=htmln('Mt_8'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_8_7'); obj=htmln('dc10t_8'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_8_3'); obj=htmln('a320t_8'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_9_8'); obj=htmln('jas39t_9'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_9_8'); obj=htmln('j35jt_9'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_9_8'); obj=htmln('Mt_9'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_9_8'); obj=htmln('dc10t_9'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_9_4'); obj=htmln('a320t_9'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } objn=html('jas39t_10_9'); obj=htmln('jas39t_10'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('j35jt_10_9'); obj=htmln('j35jt_10'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('Mt_10_9'); obj=htmln('Mt_10'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('dc10t_10_9'); obj=htmln('dc10t_10'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=400; antalpass+=1; } } objn=html('a320t_10_4'); obj=htmln('a320t_10'); if(objn!=null){ if(objn.checked==true){ confirm+=""; kostnad+=600; antalpass+=1; } } confirm+="
Simulator:JAS39A tid 11:00-11:30
Simulator:J35J Draken tid 11:00-11:30
Simulator:Metro tid 11:00-11:30
Simulator:DC10 tid 11:00-11:30
Simulator:A320 tid 11:00-11:30
Simulator:JAS39A tid 11:30-12:00
Simulator:J35J Draken tid 11:30-12:00
Simulator:Metro tid 11:30-12:00
Simulator:DC10 tid 11:30-12:00
Simulator:A320 tid 11:30-12:00
Simulator:JAS39A tid 12:00-12:30
Simulator:J35J Draken tid 12:00-12:30
Simulator:Metro tid 12:00-12:30
Simulator:DC10 tid 12:00-12:30
Simulator:A320 tid 12:00-12:30
Simulator:JAS39A tid 12:30-13:00
Simulator:J35J Draken tid 12:30-13:00
Simulator:Metro tid 12:30-13:00
Simulator:DC10 tid 12:30-13:00
Simulator:A320 tid 12:30-13:00
Simulator:JAS39A tid 13:00-13:30
Simulator:J35J Draken tid 13:00-13:30
Simulator:Metro tid 13:00-13:30
Simulator:DC10 tid 13:00-13:30
Simulator:A320 tid 13:00-13:30
Simulator:JAS39A tid 13:30-14:00
Simulator:J35J Draken tid 13:30-14:00
Simulator:Metro tid 13:30-14:00
Simulator:DC10 tid 13:30-14:00
Simulator:A320 tid 13:30-14:00
Simulator:JAS39A tid 14:00-14:30
Simulator:J35J Draken tid 14:00-14:30
Simulator:Metro tid 14:00-14:30
Simulator:DC10 tid 14:00-14:30
Simulator:A320 tid 14:00-14:30
Simulator:JAS39A tid 14:30-15:00
Simulator:J35J Draken tid 14:30-15:00
Simulator:Metro tid 14:30-15:00
Simulator:DC10 tid 14:30-15:00
Simulator:A320 tid 14:30-15:00
Simulator:JAS39A tid 15:00-15:30
Simulator:J35J Draken tid 15:00-15:30
Simulator:Metro tid 15:00-15:30
Simulator:DC10 tid 15:00-15:30
Simulator:A320 tid 15:00-15:30
Simulator:JAS39A tid 15:30-16:00
Simulator:J35J Draken tid 15:30-16:00
Simulator:Metro tid 15:30-16:00
Simulator:DC10 tid 15:30-16:00
Simulator:A320 tid 15:30-16:00
"; if(html('villkor').checked==false ||antalpass==0 || html('name').value==""||html('name').value.length < 3 || html('mobil').value==""||html('mobil').value.length < 7 || html('email').value==""||html('email').value.length < 5 || html('email').value.indexOf("@")<1 ) { return; } confirm+=""; confirm+=""; confirm+=""; confirm+=""; confirm+="
Namn:" + html('name').value + "
Email:" + html('email').value + "
Mobil:" + html('mobil').value + "
Total kostnad:"+kostnad; confirm+="

"; confirm+="Klicka \”boka\” för att fullfölja bokningen
"; document.getElementById('confirm').innerHTML=confirm; showhide2('topdiv',1); } function GetSelectedItem() { switch ( ActiveEvent.type ){ case "0": return; case "1": document.getElementById('formbody').innerHTML = 'Simulatorbokning
\
\ \
\ \ \ \ \ \
Namn:*
Email:*
Telefon:*
Jag accepterar villkoren *
Kommentar:
\
\
\ Pris:
\ 30min i simulator 400kr (JAS 39, J 35, Metropolitan, DC-10, ej A320)
\ 60min i A320 simulator 1200kr (går endast att boka heltimmar).
\ Entreavgift till museet tillkommer: 120kr
\
\ Villkor:
\ Bokningen är bindande men du kan avboka senast ett dygn före bokad tid.
\ Om du uteblir utan att ha avbokat debiteras du kostnaden för din bokning.
\ vår kapacitet är bara 2 bokade simulatorer/tidslott.
\ * fälten är obligatoriska fält.
\ Dina kontaktuppgifter sparas i vår databas för bokningar och används enbart när vi vill kontakta dig agående den aktuella bokningen.\
\
\ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
Tider JAS39A J35J Draken Metro DC10 A320
11:00-11:30
11:30-12:00
12:00-12:30
12:30-13:00
13:00-13:30
13:30-14:00
14:00-14:30
14:30-15:00
15:00-15:30
15:30-16:00
\
'; return; case "2": document.getElementById('formbody').innerHTML ='Titel:
\
\
\
\ ' return; } }