var topid;
var sheit;
function goTop2(){
	scrollBy(0,-30);
	sheit = sheit-30;
	if(sheit > 0){
		topid = setTimeout('goTop2()',1);
	}
}
function goTop(){
	sheit = document.documentElement.scrollHeight - document.documentElement.clientHeight;
	topid = setTimeout('goTop2()',1);
}
//setTimeout('goTop()',1000);


function flash(e,c,d) {
	var flash_tag = "";
	flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
	flash_tag +='WIDTH="'+c+'" HEIGHT="'+d+'" >';
	flash_tag +='<param name="movie" value="'+e+'">';
	flash_tag +='<param name="wmode" value="transparent">';
	flash_tag +='<param name="quality" value="high">';
	flash_tag +='<embed src="'+e+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	flash_tag +='type="application/x-shockwave-flash"  WIDTH="'+c+'" HEIGHT="'+d+'"></embed></object>';
	document.write(flash_tag);
}

jQuery(document).ready(function ()
{
	// garage
	var showYear = 2012;
	var showMonth = 10;
	var showDay = 26;

	nowdate = new Date();
	if (showYear < nowdate.getFullYear() || (showYear == nowdate.getFullYear() && showMonth < (nowdate.getMonth()+1)) || (showYear == nowdate.getFullYear() && showMonth == (nowdate.getMonth()+1) && showDay <= nowdate.getDate()))
		$(".hide01").show();

	// belt, muffler
	/*
	var showYear2 = 2011;
	var showMonth2 = 10;
	var showDay2 = 26;

	nowdate = new Date();
	if (showYear2 < nowdate.getFullYear() || (showYear2 == nowdate.getFullYear() && showMonth2 < (nowdate.getMonth()+1)) || (showYear2 == nowdate.getFullYear() && showMonth2 == (nowdate.getMonth()+1) && showDay2 <= nowdate.getDate()))
	{
		$(".hide02").show();
		$(".hide03").hide();
	}
	*/

	var topmenus = document.getElementById('topmenus');
	var topimgs = topmenus.getElementsByTagName('img');
	for(i=0; i<5; i++) {
		topimgs[i].onmouseover = function() {
			this.src = this.src.replace(/\.gif/, "_r\.gif");
		}
		topimgs[i].onmouseout = function() {
			this.src = this.src.replace(/_r\.gif/, "\.gif");
		}
	}
	var leftmenus = document.getElementById('leftmenu');
	var leftimgs = leftmenus.getElementsByTagName('img');
	for(i=0; i<leftimgs.length; i++) {
		leftimgs[i].onmouseover = function() {
			this.src = this.src.replace(/\.gif/, "r\.gif");
		}
		leftimgs[i].onmouseout = function() {
			this.src = this.src.replace(/r\.gif/, "\.gif");
		}
	}
	function bluring(){ 
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
	} 
	document.onfocusin=bluring; 

});
