// JavaScript Document<!--//Cookie pathvar domain="; domain=dailystyle.net; path=/";// sw cssif(navigator.appVersion.indexOf("Mac") >= 1){var cssName="";	if ((navigator.userAgent.indexOf('Mozilla') != -1) && (navigator.userAgent.indexOf('Mac OS X') != -1)){	//Safari, NS		cssName="font_mac";	}	else{		cssName="font_mac";	}}else{		cssName="font_win";}document.write('<link rel="stylesheet" rev="stylesheet" type="text/css" href="/css/'+cssName+'.css" charset="Shift_JIS" />');//var dsData_str=readCookie("dsData");var dsData = dsData_str.split(",");if (dsData[0].length !=6) {	dsData_str = "B1BFBB"+","+"76807D"+","+"2"+","+"0";	writeCookie("dsData", dsData_str, 24*365);	dsData = dsData_str.split(",");}var dsColor = dsData[0];var dsText = dsData[1];var dsPtn = dsData[2];var dsCat ="";document.write('<style type="text/css">');document.write('<!--');document.write('.ds {color: #' + dsText + '}');document.write('.dsBg {background-color: #' + dsColor + '}');document.write('.dsBorder {border: 1px solid #' + dsColor + '}');document.write('a.ds:link {color: #' + dsText + '}');document.write('a.ds:visited {color: #' + dsText + '}');document.write('a.ds:hover {color: #333333}');document.write('a.ds:active {color: #' + dsColor + '}');document.write('#dsNavi a:hover {color: #' + dsText + '}');document.write('#indexIssue .ds {color: #' + dsText + '}');document.write('#indexAdvise h3, #indexAdvise h4 {background-color: #' + dsColor + '}');document.write('#sideMenu ul a:link, #dsItem a.btn:link {color: #' + dsText + '}');document.write('#sideMenu ul a:visited, #dsItem a.btn:visited {color: #' + dsText + '}');document.write('#sideMenu ul a:hover, #dsItem a.btn:hover {color: #FFFFFF; background-color: #' + dsColor + '}');document.write('#sideMenu ul a:active, #dsItem a.btn:active {color: #' + dsColor + '; background-color: #FFFFFF}');document.write('#dsItemList ul a:visited {background-color: #EEEEEE}');document.write('#dsItemList ul a:hover {background-color: #' + dsColor + '}');document.write('#dsItemList ul a:active {background-color: #333333}');document.write('-->');document.write('</style>');// writeCookie("myCookie", "my name", 24);// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.function writeCookie(name, value, hours){  var expire = "";  if(hours != null)  {    expire = new Date((new Date()).getTime() + hours * 3600000);    expire = "; expires=" + expire.toGMTString();  }  document.cookie = name + "=" + escape(value) + domain + expire;}// alert( readCookie("myCookie") );function readCookie(name){  var cookieValue = "";  var search = name + "=";  if(document.cookie.length > 0)  {     offset = document.cookie.indexOf(search);    if (offset != -1)    {       offset += search.length;      end = document.cookie.indexOf(";", offset);      if (end == -1) end = document.cookie.length;      cookieValue = unescape(document.cookie.substring(offset, end));    }  }  return cookieValue;}function rdm(n) {	return Math.floor(Math.random()*n)+1;}function set_cat(cat) {	dsCat=cat;}function flash_value(){	var flashValue="dsData_str=" + dsColor+","+dsText+","+dsPtn+","+dsCat;	return flashValue;}function save_color(a) {	writeCookie("dsData", a, 24*365);	window.location.reload();}var imgNo=0;function swImgLoad() {	var topImage; topImage=new Array(5);	for (var i=0;i<5;i++){		topImage[i]=new Image();		topImage[i].src="images/topimage"+(i)+".jpg";	}	imgNo=rdm(5)-1;	swImg();}function swImg(){ 	document.sw.src= topImage [imgNo].src;	imgNo++; 	if(imgNo==5) {		imgNo=0; 	}	swTime =setTimeout ('swImg()',20000); }//var backLocation=readCookie("dsTmp");function historyBack() {	//if(backLocation.length > 0 && backLocation != thisLocation){		//document.write('<ul><li><a href="javascript:history.back();" class="ds">前のページへ</a></li></ul>');	//} else {		//document.write('<ul><li><a href="/index.html" class="ds">トップページへ</a></li></ul>');		//writeCookie("dsTmp", thisLocation, 0.5);	//}}function addFavorite() {	document.write('<ul><li><a href="javascript:setFavorite();" class="ds">favoriteに追加</a></li></ul>');}function indexAdviseTitle() {document.write('<h4>ポイント</h4>');}function getFileName(file_url){	var file_name = file_url.substring(file_url.lastIndexOf("/")+1,file_url.length);    //下は拡張子を取り除く場合    file_name = file_name.substring(0,file_name.indexOf("."));    return file_name;}//alert(getFileName(location.href));var thisLocation=location.href;function setFavorite() {	var dsItem_str=readCookie("dsItemData");	var thisNo=getFileName(thisLocation);	if(!document.itemPhoto.alt) var thisName=thisNo;	else var thisName = document.itemPhoto.alt.replace(",", "^");	if(dsItem_str.indexOf(thisNo) != -1) {		alert("Favoriteに登録済です。");		return;	}	var dsItem=new Array();	var dsItemName=new Array();	if (dsItem_str.length >= 10) {		var dsItemName_str=readCookie("dsItemNameData");		if(!dsItemName_str) dsItemName_str=dsItem_str;		dsItem=dsItem_str.split(",");		dsItemName=dsItemName_str.split(",");		var i = dsItem.length;		dsItem[i] = thisNo;		dsItemName[i] = thisName;	}else{		dsItem[0] = thisNo;		dsItemName[0] = thisName;	}	//alert(dsItem[i]);	writeCookie("dsItemData", dsItem, 24*365);	writeCookie("dsItemNameData", dsItemName, 24*365);	window.location.href = "/favorite.html?id="+thisNo;	//alert(readCookie("dsItemData"));}//var flash_value="dsData_str=" + dsColor+","+dsText+","+dsPtn+","+dsCat+"&amp;dsiItem_str=" + dsFavorite;//-->