// JavaScript Document
function subWin1()
{
	var sub1;
	sub1 = window.open('','window0','width=320,height=500,resizable=yes,status=no,scrollbars=no,location=no,toolbar=no');
	sub1.focus();
}

function subWin2()
{
	var sub2;
	sub2 = window.open('','window1','width=415,height=400,resizable=no,status=no,scrollbars=no,location=no,toolbar=no');
	sub2.focus();
}


// passage time
var pass = 24;

// display content
var content = 'New!!';

var currentDate = new Date();
var spans = document.getElementsByTagName('span');
for (i = 0; i < spans.length; i++) {
    if(spans[i].getAttribute('class') == 'new' ||
     spans[i].getAttribute('className') == 'new') {
        time = spans[i].childNodes[0].nodeValue.split(":");
        var entryDate = new Date(time[0], time[1]-1, time[2], time[3], time[4], time[5]);
        var now = (entryDate.getTime() - currentDate.getTime())/(60*60*1000);
        now = Math.ceil(now);
        if(-now <= pass){
            spans[i].innerHTML = content;
        }
    }
}
