/* FILE ARCHIVED ON 18:30:26 Jan 18, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 17:49:42 Jun 28, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ function parseCookie(myCookie) { var myVariables = myCookie.split(";"); var returnvalue = new Array(); for(var i = 0; i <= myVariables.length; i++) { if (myVariables[i]) { thisValues = myVariables[i].split("="); thisVar = trim(thisValues[0].toLowerCase()); thisVal = trim(thisValues[1]); returnvalue[thisVar]= thisVal; } } return returnvalue; } var ccErrorNo = 0; var ccErrors = new Array () ccErrors [0] = "Unknown card type"; ccErrors [1] = "No card number provided"; ccErrors [2] = "Credit card number is in invalid format"; ccErrors [3] = "Credit card number is invalid"; ccErrors [4] = "Credit card number has an inappropriate number of digits"; function checkCreditCard (cardnumber, cardname) { // Array to hold the permitted card characteristics var cards = new Array(); // Define the cards we support. You may add addtional card types. // Name: As in the selection box of the form - must be same as user's // Length: List of possible valid lengths of the card number for the card // prefixes: List of possible prefixes for the card // checkdigit Boolean to say whether there is a check digit cards [0] = {name: "Visa", length: "13,16", prefixes: "4", checkdigit: true}; cards [1] = {name: "MasterCard", length: "16", prefixes: "51,52,53,54,55", checkdigit: true}; cards [2] = {name: "DinersClub", length: "14,16", prefixes: "300,301,302,303,304,305,36,38,55", checkdigit: true}; cards [3] = {name: "CarteBlanche", length: "14", prefixes: "300,301,302,303,304,305,36,38", checkdigit: true}; cards [4] = {name: "AmEx", length: "15", prefixes: "34,37", checkdigit: true}; cards [5] = {name: "Discover", length: "16", prefixes: "6011,650", checkdigit: true}; cards [6] = {name: "JCB", length: "15,16", prefixes: "3,1800,2131", checkdigit: true}; cards [7] = {name: "enRoute", length: "15", prefixes: "2014,2149", checkdigit: true}; cards [8] = {name: "Solo", length: "16,18,19", prefixes: "6334, 6767", checkdigit: true}; cards [9] = {name: "Switch", length: "16,18,19", prefixes: "4903,4905,4911,4936,564182,633110,6333,6759", checkdigit: true}; cards [10] = {name: "Maestro", length: "16", prefixes: "5020,6", checkdigit: true}; cards [11] = {name: "VisaElectron", length: "16", prefixes: "417500,4917,4913", checkdigit: true}; // Establish card type var cardType = -1; for (var i=0; i= 0; i--) { // Extract the next digit and multiply by 1 or 2 on alternative digits. calc = Number(cardNo.charAt(i)) * j; // If the result is in two digits add 1 to the checksum total if (calc > 9) { checksum = checksum + 1; calc = calc - 10; } // Add the units element to the checksum total checksum = checksum + calc; // Switch the value of j if (j ==1) {j = 2} else {j = 1}; } // All done - if checksum is divisible by 10, it is a valid modulus 10. // If not, report an error. if (checksum % 10 != 0) { ccErrorNo = 3; return false; } } // The following are the card-specific checks we undertake. var LengthValid = false; var PrefixValid = false; var undefined; // We use these for holding the valid lengths and prefixes of a card type var prefix = new Array (); var lengths = new Array (); // Load an array with the valid prefixes for this card prefix = cards[cardType].prefixes.split(","); // Now see if any of them match what we have in the card number for (i=0; i 0) { try { parent.frames.pageinfo.location.href="/admin/cms/modCms.cfm?action=pageinfo&page=" + pageId; parent.frames.footer.location.href="/cms/cmsAdmin/system/openEditModeElementFooter.cfm?page=" + pageId; } catch (e) {} } } function updateWMTT(e) { try { x=(document.all) ? window.event.x + document.documentElement.scrollLeft + document.getElementsByTagName("div")[1].scrollLeft: e.pageX; y=(document.all) ? window.event.y + document.documentElement.scrollTop + document.getElementsByTagName("div")[1].scrollTop: e.pageY; if (wmtt != null) { wmtt.style.left=(x - 150) + "px"; wmtt.style.top=(y + 20) + "px"; } } catch(e) { } } function showTT(id) { wmtt=document.getElementById(id); wmtt.style.display="block" } function hideTT() { wmtt.style.display="none"; } function cms_showpic(file,width,height,scrollbar) { var scroll = "no"; if(!cms_showpic.arguments[1]) { width=""; } if(!cms_showpic.arguments[2]) { height=""; } if(cms_showpic.arguments[1] || cms_showpic.arguments[2]) { scroll="yes"; } //Scrollbars "yes" OR "no" if(cms_showpic.arguments[3]) { var scroll = scrollbar; } //Bildgrösse bekannt lenWidth = width.replace(/\r/g, " "); lenHeight = height.replace(/\r/g, " "); //Bildpfad speichern path = "https://webarchive.library.unt.edu/eot2008/20090118183026/http://www.nagra.ch/cms/cmsAdmin/modules/popup.cfm?picfile="+file; //Breite und Höhe wird übergeben, sofern vorhanden if (lenWidth != '' && lenHeight != '') { path = path+"&width="+width+"&height="+height; } var picwindow=window.open(path, "picwindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scroll + ",resizable=yes,top=50,left=50"); picwindow.focus(); } function trim(item) { item = item.replace(/\r/g, " "); item = item.replace(/[^ A-Za-z0-9`~!@#\$%\^&\*\(\)-_=\+\\\|\]\[\}\{'";:\?\/\.>,<]/g, ""); item = item.replace(/'/g, ""); item = item.replace(/ +/g, " "); item = item.replace(/^\s/g, ""); item = item.replace(/\s$/g, ""); if (item.value == ' ') { item.value = ''; } return item } function isdate(datum) { date = trim(datum); if (date.length > 0) { if (date.search(/\d\d.\d\d.\d\d/) != -1 || date.search(/\d\d.\d\d.\d\d\d\d/) != -1 || date.search(/\d.\d.\d\d/) != -1 || date.search(/\d.\d.\d\d\d\d/) != -1 || date.search(/\d\d.\d.\d\d/) != -1 || date.search(/\d\d.\d.\d\d\d\d/) != -1 || date.search(/\d.\d\d.\d\d/) != -1 || date.search(/\d.\d\d.\d\d\d\d/) != -1) { aDate = date.split("."); iDay = 1 * aDate[0]; iMonth = 1 * aDate[1]; iYear = 1 * aDate[2]; sYear = "" + iYear; if (sYear.length != 4 && iYear >= 51 && iYear <= 99) { iYear = 1900 + iYear; } else if (sYear.length != 4 && iYear >= 0 && iYear <= 50) { iYear = 2000 + iYear; } else if (sYear.length != 4 && iYear > 99) { iDay = 99; iMonth = 99; } else if (sYear.length == 4 && iYear < 1951) { iDay = 99; iMonth = 99; } if (iYear == "2000") { isLeapyear = false; } else { leapyear = Math.ceil(iYear / 4); calc = 4 * leapyear; if (calc == iYear) { isLeapyear = true; } else { isLeapyear = false; } } iDayCount = 0; switch(iMonth) { case 1: iDayCount = 31; break; case 2: if (isLeapyear == true) { iDayCount = 29; } else { iDayCount = 28; } break; case 3: iDayCount = 31; break; case 4: iDayCount = 30; break; case 5: iDayCount = 31; break; case 6: iDayCount = 30; break; case 7: iDayCount = 31; break; case 8: iDayCount = 31; break; case 9: iDayCount = 30; break; case 10: iDayCount = 31; break; case 11: iDayCount = 30; break; case 12: iDayCount = 31; break; } if (iDay >= 1 && iDay <= iDayCount) { return true; } else { return false; } } else { return false; } } else { return false; } } function ismail(mail) { var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (filter.test(mail)) { return true; } else { return false; } } function cms_reload() { location.reload(); } function cms_popup(Ziel,Breite,Hoehe,Status,Toolbar,Location,Menu) { popup=window.open(Ziel,"PopUp","status=" + Status + ",toolbar=" + Toolbar + ",location=" + Location + ",menu=" + Menu + ",width=" + Breite + ",height=" + Hoehe + ",left=" + (screen.width - Breite) / 2 + ",top=" + (screen.height - Hoehe) / 2); popup.focus(); } function cm_bwcheck(){ this.ver=navigator.appVersion this.agent=navigator.userAgent.toLowerCase() this.dom=document.getElementById?1:0 this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1) && window.opera this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1) && window.opera this.ie5 = (this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6) this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1) this.ie6 = (this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6) this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5&&!this.ie6) this.ie = (this.ie4 || this.ie5 || this.ie6) this.mac=(this.agent.indexOf("mac")>-1) this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar) this.ns4=(!this.dom && document.layers)?1:0; this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6) this.usedom= this.ns6//Use dom creation this.reuse = this.ie||this.usedom //Reuse layers this.px=this.dom&&!this.op5?"px":"" return this } var bw=new cm_bwcheck(); // start: cffenster für glossar function nagraCfWindowCreate(Ereignis,layoutType,myRecordId) { myWidth = 500; myHeight = 210; if (!Ereignis) var Ereignis = window.event; //alert(Ereignis.type); myDirection="left"; if (Ereignis.pageX) { //alert('FF'); myx = Ereignis.pageX; if (myx-myWidth > 0) { myx = myx-myWidth; myDirection="right"; } myy = Ereignis.pageY; if (myy-myHeight > 0) { myy = myy-myHeight; } else { myy = 0; } } else if (Ereignis.clientY) { //alert('IE'); myx = Ereignis.clientX; if (myx-myWidth > 0) { myx = myx-myWidth+document.documentElement.scrollLeft; myDirection="right"; } myy = Ereignis.clientY; if (myy-myHeight > 0) { myy = myy-myHeight+document.documentElement.scrollTop; } else { myy = 0; } } else { myx = 100; myy = 100; myDirection="right"; } if (layoutType == 'glossarEinleitung') { var windowOptions = new Object(); windowOptions.x=myx; windowOptions.y=myy; windowOptions.height=myHeight+1; windowOptions.draggable=false; windowOptions.resizable=false; windowOptions.initshow=true; windowOptions.closable=true; windowOptions.bodystyle = 'background: none;'; } if (layoutType == 'glossarDetail') { var windowOptions = new Object(); windowOptions.center=true; windowOptions.height=myHeight+1; windowOptions.draggable=true; windowOptions.resizable=false; windowOptions.initshow=true; windowOptions.closable=true; windowOptions.bodystyle = 'background: none;'; } /* try { var myTest = ColdFusion.Window.getWindowObject('nagraCfWindow_' + layoutType + '_' + myRecordId); ColdFusion.Window.hide('nagraCfWindow_' + layoutType + '_' + myRecordId); alert(ColdFusion.Window.getWindowObject('nagraCfWindow_' + layoutType + '_' + myRecordId).x); ColdFusion.Window.getWindowObject('nagraCfWindow_' + layoutType + '_' + myRecordId).x = myx; alert(ColdFusion.Window.getWindowObject('nagraCfWindow_' + layoutType + '_' + myRecordId).x); ColdFusion.Window.getWindowObject('nagraCfWindow_' + layoutType + '_' + myRecordId).y = myy; ColdFusion.Window.show('nagraCfWindow_' + layoutType + '_' + myRecordId); } catch (e) { } */ ColdFusion.Window.create('nagraCfWindow_' + Math.random().toString().substring(5, 10) + '_' +layoutType + '_' + myRecordId, 'Glossar', 'https://webarchive.library.unt.edu/eot2008/20090118183026/http://www.nagra.ch/action.cfm/action/popup/elementfile/nagraCfWindow/elementversion/1.0.0/doaction/display/layoutType/' + layoutType + '/myRecordId/' + myRecordId + '/myDirection/' + myDirection, windowOptions); } // end: cffenster für glossar ---> /* -------------------------------------------------------------------------------------------------------------- * API: JSMX (JavaScript MX) - Universal Ajax API for ColdFusion, PHP, .NET, or any other language. * AUTHOR: Todd Kingham [todd@lalabird.com] with contributions by Jan Jannek [jan.jannek@Cetecom.de] and Yin Zhao [bugz_podder@yahoo.com] * CREATED: 8.21.2005 * UPDATED: 2.10.2008 * VERSION: 2.6.4 * DESCRIPTION: This API uses XMLHttpRequest to post/get data from a ColdFusion interface. * The CFC's/CFM's will return a string representation of a JS variable: response_param. * The "onreadystatechange event handler" will eval() the string into a JS variable * and pass the value back to the "return function". To Download a full copy of the sample * application visit: https://webarchive.library.unt.edu/eot2008/20090118183026/http://www.lalabird.com/JSMX/?fa=JSMX.downloads * * LICENSE: THIS IS AN OPEN SOURCE API. YOU ARE FREE TO USE THIS API IN ANY APPLICATION, * TO COPY IT OR MODIFY THE FUNCTIONS FOR YOUR OWN NEEDS, AS LONG THIS HEADER INFORMATION * REMAINS IN TACT AND YOU DON'T CHARGE ANY MONEY FOR IT. USE THIS API AT YOUR OWN * RISK. NO WARRANTY IS EXPRESSED OR IMPLIED, AND NO LIABILITY ASSUMED FOR THE RESULT OF * USING THIS API. * * THIS API IS LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION-SHAREALIKE LICENSE. * FOR THE FULL LICENSE TEXT PLEASE VISIT: https://webarchive.library.unt.edu/eot2008/20090118183026/http://creativecommons.org/licenses/by-sa/2.5/ -----------------------------------------------------------------------------------------------------------------*/ // UNCOMMENT THE FOLLOWING LINE IF YOU WILL BE RETURNING QUERY OBJECTS. (note: you may need to point the SRC to an alternate location. /*document.writeln('');*/ var jsmx = new jsmxConstructor(); function jsmxConstructor(){ this.isJSMX = true; this.async = false; this.debug = false; this.strict = true; this.waitDiv = 'JSMX_loading'; this.http = http; this.onWait = _popWait; this.onWaitEnd = _killWait; this.onError = _onError; this.onDebug = _onDebug; } // perform the XMLHttpRequest(); function http(verb,url,cb,q){ var self = (this.isJSMX) ? this : jsmx ; //reference our arguments var qryStr = (!q) ? '' : _toQueryString(q); var calledOnce = false; //this is to prevent a bug in onreadystatechange... "state 1" gets called twice. var url = (verb.toLowerCase() == 'get') ? _addQS(url,qryStr) : url ; var readystatecalled = false; self.cb = cb; try{//this should work for most modern browsers excluding: IE Mac var xhr = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP") ; xhr.onreadystatechange = function(){ switch(xhr.readyState){ case 1: if(!calledOnce){ readystatecalled = true; self.onWait(self.waitDiv); calledOnce = true; } break; case 2: break; case 3: break; case 4: self.onWaitEnd(self.waitDiv); if ( xhr.status == 200 ){// only if "OK" var success = true; try{ var rObj = _parseResponse( xhr ); } catch(e){ if(self.strict){ self.onError(xhr,self,1);success = false; } else{ var rObj = xhr.responseText; } } if(success){ self.cb( rObj ); }// THIS IS IT... THE "return" STATEMENT. }else{ self.onError(xhr,self,2); } if(self.debug){self.onDebug(xhr.responseText);} delete xhr; //clean this function from memory once we re done with it. break; } }; xhr.open( verb , _noCache(url) , self.async ); if(verb.toLowerCase() == 'post') { xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); } xhr.send(qryStr); if(!readystatecalled){ self.cb( _parseResponse(xhr)); } }catch(e){ self.onError(xhr,self,3); } } /*--- BEGIN: RESPONSE PARSING FUNCTIONS ---*/ function _parseResponse($$){ var str = _cleanString($$.responseText); var xml = $$.responseXML; //FIRST TRY IT AS WDDX if(str.indexOf(" -1) { str = str.substring(i, str.length); i = str.indexOf(String.fromCharCode(13, 10, 13, 10)); if (i > -1) { str = str.substring(i + 2, str.length); } } return str; } function _parseClsc(str){ eval(str); var r = eval(str.split('=')[0].replace(/\s/g,'')); return r; } function leftTrim(str){ var rex = /\S/i; str = str.substring(str.search(rex),str.length); return str; } function _parseWDDX(str){ var wddx = xmlStr2Doc(str); var data = wddx.getElementsByTagName("data"); return _parseWDDXnode(data[0].firstChild); } function xmlStr2Doc(str){ var xml; if(typeof(DOMParser) == 'undefined'){ xml=new ActiveXObject("Microsoft.XMLDOM"); xml.async="false"; xml.loadXML(str); }else{ var domParser = new DOMParser(); xml = domParser.parseFromString(str, 'application/xml'); } return xml; } function _parseWDDXnode(n){ var val; switch(n.tagName){ case 'string': val = _parseWDDXstring(n); break; case 'number': val = parseFloat(n.firstChild.data); break; case 'boolean': val = n.getAttribute('value'); break; case 'dateTime': val = Date(n.firstChild.data); break; case 'array': val = _parseWDDXarray(n); break; case 'struct': val = _parseWDDXstruct(n); break; case 'recordset': val = _parseWDDXrecordset(n); break; case 'binary': val = n.firstChild.data; break; case 'char': val = _parseWDDXchar(n);; break; case 'null': val = ''; break; default: val = n.tagName; break; } return val; } function _parseWDDXstring(node){ var items = node.childNodes; var str = ''; for(var x=0;x < items.length;x++){ if(typeof(items[x].data) != 'undefined') str += items[x].data; else str += _parseWDDXnode(items[x]); } return str; } function _parseWDDXchar(node){ switch(node.getAttribute('code')){ case '0d': return '\r'; case '0c': return '\f'; case '0a': return '\n'; case '09': return '\t'; } } function _parseWDDXarray(node){ var items = node.childNodes; var arr = new Array(); for(var i=0;i < items.length;i++){ arr[i] = _parseWDDXnode(items[i]); } return arr; } function _parseWDDXstruct(node){ var items = node.childNodes; var obj = new Object(); for(var i=0;i < items.length;i++){ obj[items[i].getAttribute('name').toLowerCase()] = _parseWDDXnode(items[i].childNodes[0]); } return obj; } function _parseWDDXrecordset(node){ var qry = new Object(); var fields = node.getElementsByTagName("field"); var items; var dataType; var values; for(var x = 0; x < fields.length; x++){ items = fields[x].childNodes; values = new Array(); for(var i = 0; i < items.length; i++){ values[values.length] = _parseWDDXnode(items[i]); } qry[fields[x].getAttribute('name').toLowerCase()] = values; } return qry; } /*--- END: RESPONSE PARSING FUNCTIONS ---*/ /*--- BEGIN: REQUEST PARAMETER FUNCTIONS ---*/ function _toQueryString(obj){ //determine the variable type if(typeof(obj) == 'string') { return obj; } if(typeof(obj) == 'object'){ if(typeof obj.elements == 'undefined') {return _object2queryString(obj); }//It's an Object()! else{ return _form2queryString(obj); }//It's a form! } } function _object2queryString(obj){ var ar = new Array(); for(x in obj){ ar[ar.length] = _escape_utf8(x)+'='+_escape_utf8(obj[x]); } return ar.join('&'); } function _form2queryString(form){ var obj = new Object(); var ar = new Array(); for(var i=0;i < form.elements.length;i++){ try { elm = form.elements[i]; nm = elm.name; if(nm != ''){ switch(elm.type.split('-')[0]){ case "select": for(var s=0;s < elm.options.length;s++){ if(elm.options[s].selected){ if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); } obj[nm][obj[nm].length] = _escape_utf8(elm.options[s].value); } } break; case "radio": if(elm.checked){ if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); } obj[nm][obj[nm].length] = _escape_utf8(elm.value); } break; case "checkbox": if(elm.checked){ if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); } obj[nm][obj[nm].length] = _escape_utf8(elm.value); } break; default: if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); } obj[nm][obj[nm].length] = _escape_utf8(elm.value); break; } } }catch(e){} } for(x in obj){ ar[ar.length] = x+'='+obj[x].join(','); } return ar.join('&'); } /*--- END: REQUEST PARAMETER FUNCTIONS ---*/ //IE likes to cache so we will fix it's wagon! function _noCache(url){ return _addQS(url,'noCache='+new Date().getTime()); } function _addQS(url,q){ if(q.length > 0){ var qs = new Array(); var arr = url.split('?'); var src = arr[0]; if(arr[1]){ qs = arr[1].split('&'); } qs[qs.length]=q; url = src+'?'+qs.join('&'); } return url; } function _popWait(id){ proc = document.getElementById(id); if( proc == null ){ var p = document.createElement("div"); p.id = id; document.body.appendChild(p); } } function _killWait(id){ proc = document.getElementById(id); if( proc != null ){ document.body.removeChild(proc); } } function _onError(obj,inst,errCode){ var msg; switch(errCode){ case 1:/*parsing error*/ msg = (inst.debug) ? obj.responseText : 'Parsing Error: The value returned could not be evaluated.'; break; case 2:/*server error*/ msg = (inst.debug) ? obj.responseText : 'There was a problem retrieving the data:\n' + obj.status+' : '+obj.statusText; break; case 3:/*browser not equiped to handle XMLHttp*/ msg = 'Unsupported browser detected.'; return;/*you can remove this return to send a message to the screen*/ break; } if(!inst.debug){ alert(msg); } } function _onDebug(msg){ var debugWin = window.open('','error'); debugWin.document.write(msg); debugWin.focus(); } function _escape_utf8(data) { if (data=="" || data == null){ return ""; } data = data.toString(); var buf = ""; for (var i=0;i0x10000) { bs[0] = 0xF0 | ((c & 0x1C0000) >>> 18); bs[1] = 0x80 | ((c & 0x3F000) >>> 12); bs[2] = 0x80 | ((c & 0xFC0) >>> 6); bs[3] = 0x80 | (c & 0x3F); } else if (c>0x800) { bs[0] = 0xE0 | ((c & 0xF000) >>> 12); bs[1] = 0x80 | ((c & 0xFC0) >>> 6); bs[2] = 0x80 | (c & 0x3F); } else if (c>0x80) { bs[0] = 0xC0 | ((c & 0x7C0) >>> 6); bs[1] = 0x80 | (c & 0x3F); } else{ bs[0] = c; } if (c == 10 || c == 13){ buf += '%0'+c.toString(16); }//added to correct problem with hard returns else if (bs.length == 1 && c>=48 && c<127 && c!=92){buf += data.charAt(i);} else{ for(var j=0;j