fsize=$.cookie('fsize');//cookieのfsizeを取得
size=$.cookie('size');
//fsizeがnullじゃなかったら、#fontSizeControl（css）のhref属性を置き換え
if(fsize != null) {
$(function(){
$("#fontSizeControl").attr({href:dirPath+$.cookie('fsize')});
});

if(size != null){
$(function(){
switch (size) {
    case "small":
      if(document.getElementById("img_font_s") != null) {
        document.getElementById("img_font_s").src = dirPath+"/common/images/small_icon_on.gif";
      }
      if(document.getElementById("img_font_m") != null) {
        document.getElementById("img_font_m").src = dirPath+"/common/images/middium_icon.gif";
      }
      if(document.getElementById("img_font_l") != null) {
        document.getElementById("img_font_l").src = dirPath+"/common/images/large_icon.gif";
      }
      break;
    case "middium":
      if(document.getElementById("img_font_s") != null) {
        document.getElementById("img_font_s").src = dirPath+"/common/images/small_icon.gif";
      }
      if(document.getElementById("img_font_m") != null) {
        document.getElementById("img_font_m").src = dirPath+"/common/images/middium_icon_on.gif";
      }
      if(document.getElementById("img_font_l") != null) {
        document.getElementById("img_font_l").src = dirPath+"/common/images/large_icon.gif";
      }
      break;
    case "large":
      if(document.getElementById("img_font_s") != null) {
        document.getElementById("img_font_s").src = dirPath+"/common/images/small_icon.gif";
      }
      if(document.getElementById("img_font_m") != null) {
        document.getElementById("img_font_m").src = dirPath+"/common/images/middium_icon.gif";
      }
      if(document.getElementById("img_font_l") != null) {
        document.getElementById("img_font_l").src = dirPath+"/common/images/large_icon_on.gif";
      }
      break;
  }});
  }
}
function fontSize(size){

cssPath="/common/css/"+size+".css";
cssurl=dirPath+cssPath;

$.cookie('fsize',null);
$.cookie('size',null);

$('#fontSizeControl').attr({href:cssurl});
$.cookie('fsize',cssPath,{expires:30,path:'/',domain:'www.e-kec.com'});
$.cookie('size',size,{expires:30,path:'/',domain:'www.e-kec.com'});

$('#currentcss').html(cssurl);

switch (size) {
    case "small":
      if(document.getElementById("img_font_s") != null) {
        document.getElementById("img_font_s").src = dirPath+"/common/images/small_icon_on.gif";
      }
      if(document.getElementById("img_font_m") != null) {
        document.getElementById("img_font_m").src = dirPath+"/common/images/middium_icon.gif";
      }
      if(document.getElementById("img_font_l") != null) {
        document.getElementById("img_font_l").src = dirPath+"/common/images/large_icon.gif";
      }
      break;
    case "middium":
      if(document.getElementById("img_font_s") != null) {
        document.getElementById("img_font_s").src = dirPath+"/common/images/small_icon.gif";
      }
      if(document.getElementById("img_font_m") != null) {
        document.getElementById("img_font_m").src = dirPath+"/common/images/middium_icon_on.gif";
      }
      if(document.getElementById("img_font_l") != null) {
        document.getElementById("img_font_l").src = dirPath+"/common/images/large_icon.gif";
      }
      break;
    case "large":
      if(document.getElementById("img_font_s") != null) {
        document.getElementById("img_font_s").src = dirPath+"/common/images/small_icon.gif";
      }
      if(document.getElementById("img_font_m") != null) {
        document.getElementById("img_font_m").src = dirPath+"/common/images/middium_icon.gif";
      }
      if(document.getElementById("img_font_l") != null) {
        document.getElementById("img_font_l").src = dirPath+"/common/images/large_icon_on.gif";
      }
      break;
  }
}


