/*----------------------------------------------------------------------- * co-brand̃wb_Atb^o͗p * * DEPENDENCIES * - nv_base.js * - todofuken_cd.js * * @version $Revision: 1144 $ *----------------------------------------------------------------------- */ //MSNp̃f[^ var MSN = { cp : "001", bgColor : "#FFFFFF" } var CoBrand = null; var paramCp = NVRequest.getParameter("CP"); //ȉACPp[^̌`Ół΁AIuWFNg𐶐 if(paramCp && paramCp.match(/^\d{3}$/)){ /*----------------IuWFNgJn--------------------*/ var KEIMANA = { bgColor : "#FFFFFF" } function _CoBrand(cp){ var self = this; this.undoStyleHandler = function(){self.undoStyle();}; this.error = null; this.nullElement = new Object(); //̕KvJSƓƂ邽߃wb_[œǂݍ document.write([ '', // get_co_header '', // get_co_footer '', // get_site_header '', // get_site_footer ''].join(" \n")); this.changeStyle(); this.changeStyleByCoBrand(); } _CoBrand.prototype = { head : function(mode){ try{ if (!this.error) document.write(get_co_header() + get_site_header()); }catch(e){ this.error = "cannot write header"; throw e; } }, foot : function(mode){ try{ if (!this.error) document.write(get_site_footer() + get_co_footer()); }catch(e){ this.error = "cannot write footer"; throw e; } }, //G[ɐݒɖ߂ undoStyle : function(){ if(this.error == null){ return; } this.getStyle("header").display = "block"; this.getStyle("header2").display = "block"; this.getStyle("header4").display = "block"; this.getStyle("header5").display = "block"; this.getStyle("co_header").display = "block"; this.getStyle("co_header2").display = "block"; this.getStyle("co_header4").display = "block"; this.getStyle("co_header5").display = "block"; this.getStyle("keimanaFooter").display = "block"; this.getStyle("footer").display = "block"; this.getStyle("co_footer").display = "block"; this.undoStyleByCoBrand(); }, getStyle : function(id){ var obj = document.getElementById(id); if(obj == null){ return this.nullElement; } return obj.style; } } //ŵ݃pXႤ if(location.pathname.indexOf("/college") == 0){ _CoBrand.prototype.root = "/college/"; _CoBrand.prototype.changeStyle = function(){ document.write([ '', ''].join(" \n")); }; }else{ //keimanaPart́umargin-bottom: 15pxv //̓tb^ƃACAXpiframěԂ̂߂ɕKv //wid=footer3divgĂ邽߁Asv _CoBrand.prototype.root = "/"; _CoBrand.prototype.changeStyle = function(){ document.write([ '', ''].join(" \n")); } } //MSN̏ꍇ͔wiFύX if(paramCp == MSN.cp){ _CoBrand.prototype.changeStyleByCoBrand = function(){ document.write([ '', ''].join(" \n")); }, //G[ɂ̓[obN _CoBrand.prototype.undoStyleByCoBrand = function(){ document.body.style.backgroundColor = null; this.getStyle("container").backgroundColor = null; this.getStyle("pageBody").backgroundColor = null; this.getStyle("header3").backgroundColor = null; this.getStyle("footer3").backgroundColor = null; this.getStyle("co_header3").backgroundColor = null; this.getStyle("co_footer3").backgroundColor = null; this.getStyle("keimanaPart").backgroundColor = null; } }else{ _CoBrand.prototype.changeStyleByCoBrand = function(){}; _CoBrand.prototype.undoStyleByCoBrand = function(){}; } CoBrand = new _CoBrand(paramCp); /*----------------IuWFNgI--------------------*/ }