function newImage(image_date){
	d_string = new String(image_date);
	dArray = d_string.split("/");
	year = parseInt(dArray[0]);
	month = parseInt(dArray[1],10);
	day = parseInt(dArray[2]);
	update = new Date(year,month-1,day);
	now = new Date();
	period = (now-update)/(1000*60*60*24);
	if(period <=7){
		document.write("<img src='http://image.rakuten.co.jp/arukikata/cabinet/newred_ani.gif' border=0>");
	}
}



function showStock(id)
{
	var select = document.getElementById(id);
	var i = select.selectedIndex;
	if(select.options[i].value == "#"){
		var test = select.options[i].value;
		alert ("色をお選びください");
		return;
	}else{
		var url = 'http://arukikata.ir.shopserve.jp/SHOP/stock.cgi?ITEM_NO=' + select.options[i].value;
		window.open(url,'zaiko','scrollbars=yes,resizable=yes,width=450,height=500')
		return;
	}
}

function tweet() {
    var login  = 'arukikatastore'; // ← bitly に登録したユーザ名
    var apiKey = 'R_0b200da34a01938499ccfb683ef0c0cb '; // ← bitly API Key
    bitly = 'http://api.bit.ly/shorten' 
        + '?version=2.0.1&format=json&callback=callback'
        + '&login=' + login
        + '&apiKey=' + apiKey + '&longUrl=';
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = bitly + encodeURIComponent(location.href) ;
    document.body.appendChild(script);
  }

function callback(bitlyResponse) {
    var title = 'document.title';
    var url = 'http://twitter.com/home/?status=' 
        + encodeURIComponent(
             title + ' ' 
               + bitlyResponse.results[location.href]['shortUrl']
          );
    window.open(url, '_blank');
  }
