var colorful = new ColorfulInput;

colorful.color['focus'] = '#f5f5f5';

window.onload = function() {
   colorful.set();
   smartRollover();
}

function ColorfulInput() {
   this.skip  = [];
   this.color = { 'blur': '', 'focus': '#EEEEEE' };

   this.set = function() {
      for (var i = 0; i < document.forms.length; i++) {
         for (var f = 0; f < document.forms[i].length; f++) {
            var elm = document.forms[i][f];
            if(!this._checkSkip(elm)) continue;

            this._setColor(elm, 'focus');
            this._setColor(elm, 'blur');
         }
      }
   }

   this._checkSkip = function(elm) {
      for(var i in this.skip) {
         if(elm.type == this.skip[i]) return false;
      }
      return true;
   }

   this._setColor = function(elm, type) { 
      var color = this.color[type];
      var event = function() { elm.style.backgroundColor = color; };

      if(elm.addEventListener) {
         elm.addEventListener(type, event, false);
      } else if(elm.attachEvent) {
         elm.attachEvent('on'+type, event);
      } else {
         elm['on'+type] = event;
      }
   }

}

function hideElement(){
 if(document.styleSheets) arguments[0].style.display="none";
}


// class要素の追加・変更
function changesytle(cssfile) {
  document.getElementById('form_css_sw').href = cssfile;

}


function wOpCam(){
  window.open('abt_campaign.html','cam','width=520,height=500,scrollbars=yes')

}