/*------------------------------------------------------------------------------ * Module: klstyleselector.js *------------------------------------------------------------------------------ * Description: K&L Style Selector Object. *------------------------------------------------------------------------------ * Requirements: DOM Compliant browser with enabled Javascript. *------------------------------------------------------------------------------ * Copyright 2003-2004, K&L Design Productions. All Rights Reserved. * * You may not use the code contained in this file without the express written * permission of K&L Productions. * You may not redistribute, sell, or offer this file for download, in any form * or on any medium, without the express written permission of K&L Productions. * This includes, but is not limited to, adding it to script archives or * bundling and distributing it with other scripts/software. * You agree to retain the credits and copyright notice in the source code when * including it in your own pages. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHOR OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. *----------------------------------------------------------------------------*/ var fonts=['Arial','Century Gothic','Comic Sans MS','Courier New','Georgia','Lucida Console','Tahoma','Times New Roman','Trebuchet MS','Verdana'];function klStyleSelector(parent,childNum,header){this.convertCSSName=function(cssName){sn=cssName.split('-');rs=sn[0];for(var i=1;i0){for(var i=0;i0)this.ss.push(dss[i]);}}}if(this.ss.length>1){sss=this.ssppdiv.appendChild(document.createElement('label'));sss.appendChild(document.createTextNode('Style Sheet: '));sss.appendChild(document.createElement('select'));sss.lastChild.alternateStyleSheets=this.ss;var setSSi=-1;for(var i=0;i=0){for(var i=0;i 0)cookiestr+="="+this.attributes[attr];}document.cookie=cookiestr;};this.erase=function(){this.expiresIn(-1);this.set();delete cookies[this.name];};}function cookieContainer(){this.add=function(name,value){this[name]=new cookie(name,value);};this.get=function(name){for(o in this)if(o==name)return this[o];return null;};var cstr=document.cookie;var spaces=/\s/gi;cstr=cstr.replace(spaces,'');while(cstr.length>0){cequal=cstr.indexOf("=");if(cequal==-1)cequal=cstr.length;var name=cstr.substring(0,cequal);cstr=cstr.substring(cequal+1,cstr.length);cend=cstr.indexOf(";");if(cend==-1)cend=cstr.length;var value=unescape(cstr.substring(0,cend));cstr=cstr.substring(cend+1,cstr.length);this.add(name,value);}}