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 = "http://www.affordable.brother.co.uk/cms/cmsAdmin/modules/popup.cfm?picfile="+escape(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) { dDate = new Date(); iYear = dDate.getFullYear(); if (iYear == "2000") { isLeapyear = false; } else { leapyear = iYear / 4; calc = 4 * leapyear; if (calc == iYear) { isLeapyear = true; } else { isLeapyear = false; } } aDate = date.split("."); iMonth = 1 * aDate[1]; iDay = 1 * aDate[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(); actStatus=0; function setStatus(s) { if(s==0) { actStatus=0; javascript:window.setTimeout("toggleSelect('10','10','10','10')",1000); } if(s==1) { actStatus=1; javascript:toggleSelect('10','10','10','10'); } } function toggleSelect(x,y,w,h) { var appVer = navigator.appVersion.toLowerCase(); var iePos = appVer.indexOf('msie'); if (iePos !=-1) { var is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos))); var is_major = parseInt(is_minor); } if (navigator.appName.substring(0,9) == "Microsoft") { // Check if IE version is 6 or older if (is_major <= 6) { var selx,sely,selw,selh,i var sel=document.getElementsByTagName("SELECT") for(i=0;ix && selxy && sely /* -------------------------------------------------------------------------------------------------------------- * API: JSMX (JavaScript MX) - This is a ColdFusion api for AJAX, using no XML but instead returning raw JavaScript. * AUTHOR: Todd Kingham * EMAIL: todd@lalabird.com * CREATED: 8.21.2005 * VERSION: 2.0.1 * 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: http://www.lalabird.com/JSMX/?fa=JSMX.downloads * * * LICENSE: THIS IS A 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: 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 alerternate location.*/ //document.writeln(''); // perform the XMLHttpRequest(); function http(mthd,url,rm,qry) { //reference our arguments return_method = rm; if(!qry) qry = ''; qryStr = toQueryString(qry); try{//this should work for most modern browsers excluding: IE Mac req = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP") ; req.onreadystatechange = processReqChange; req.open(mthd, noCache(url), true); if(mthd.toLowerCase() == 'post') req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); req.send(qryStr); }catch(e){//a browser not equiped to handle XMLHttp //alert("There was a problem retrieving the data:"); } } // handle onreadystatechange event of req object function processReqChange(){ switch(req.readyState){ case 1: break; case 2: break; case 3: break; case 4: if (req.status == 200) {// only if "OK" return_method(response2Obj(req.responseText)); } else alert("There was a problem retrieving the data:\n" + req.statusText); break; } } // HELPER FUNCTIONS function response2Obj(str){ eval("var "+str); return eval(firstWord(str)); } function firstWord(str){ return str.substring(str.search(/\S/g)).split(' ')[0]; } function toQueryString(obj){ //determine the variable type if(typeof(obj) == 'string') return obj; if(typeof(obj) == 'object'){ if(typeof(obj.elements) == 'undefined')//It's an Object()! return object2queryString(obj); else //It's a form! return form2queryString(obj); } } function object2queryString(obj){ var ar = new Array(); for(x in obj) ar[ar.length] = x+'='+obj[x]; return ar.join('&'); } function form2queryString(form){ var obj = new Object(); var ar = new Array(); for(var i=0;i