veBack = function() {  this.createCookie = function(name,value) {    var expires = "";    document.cookie = name+"="+value+expires+"; path=/";  }    this.readCookie = function(name) {    var nameEQ = name + "=";    var ca = document.cookie.split(';');    for(var i=0;i < ca.length;i++) {      var c = ca[i];      while (c.charAt(0)==' ') c = c.substring(1,c.length);      if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);    }    return null;  }  this.writeColorCss = function()  {    var c = this.getColor();    var image = this.getImage();        if (c || image) {      document.write('<style type="text/css">');      if (c) document.write('html {background-color:'+c+' !important;}');      if (image)  document.write('html {background-image:url('+image+') !important;}');      document.write('</style>');    }  }    this.setColor = function(value) {    this.createCookie('cms.ve.back.color', value);    var els = document.getElementsByTagName('html');    els[0].setAttribute('style', 'background-color:'+value+' !important');  }  this.getColor = function() {      return this.readCookie('cms.ve.back.color');  }    this.setImage = function(value) {    this.createCookie('cms.ve.back.image', value);    var els = document.getElementsByTagName('html');    els[0].removeA    if (value) {      els[0].setAttribute('style', 'background-image:url('+value+') !important');    }  }  this.getImage = function() {      return this.readCookie('cms.ve.back.image');  }    this.setBack = function(color, image) {    this.createCookie('cms.ve.back.color', color);    this.createCookie('cms.ve.back.image', image);    var els = document.getElementsByTagName('html');        els[0].setAttribute('style', '');    var style = '';        if (color) {      style += 'background-color:'+color+' !important;';    } else {      style += 'background-color:transparent !important;';    }    if (image) {      style += 'background-image:url('+image+') !important;';    } else {      style += 'background-image:none !important;';    }        els[0].setAttribute('style', style);  }    this.writeColorCss();}if (typeof E == 'undefined') E = {};E.veBack = new veBack();
