//----------------------------------------------------------------
//	Copyright用 西暦表示
//----------------------------------------------------------------

function GetYear() {
 var makeY = 2007	// 制作年を設定
 var myD = new Date();
 if ( myD.getFullYear() == makeY ) {
  document.write(makeY);
 } else {
  document.write(makeY+"-"+myD.getFullYear());
 }
}

//----------------------------------------------------------------
//	flashを挿入
//----------------------------------------------------------------

function showswf(flashName, width, height, noSwfURL, noSwfTxt) {

	document.write('<object data="'+flashName+'" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="src" value="'+flashName+'" />');
	document.write('<param name="autostart" value="true" />');
	document.write('<a href="'+noSwfURL+'" target="_blank" title="'+noSwfTxt+'">'+noSwfTxt+'</a>');
	document.write('</object>');
}


function showswfImg(flashName, width, height, noSwfURL, noSwfImg, noSwfTxt) {

	document.write('<object data="'+flashName+'" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="src" value="'+flashName+'" />');
	document.write('<param name="autostart" value="true" />');
	document.write('<a href="'+noSwfURL+'" target="_blank" title="'+noSwfTxt+'"><img src="'+noSwfImg+'" alt="'+noSwfTxt+'" /></a>');
	document.write('</object>');
}

function showswfmovie(flashName, attach, width, height, noSwfURL, noSwfTxt) {

	document.write('<object data="'+flashName+'" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="src" value="'+flashName+'" />');
	document.write('<param name="autostart" value="true" />');
	document.write('<param name="FlashVars" value="'+attach+'" />');
	document.write('<a href="'+noSwfURL+'" target="_blank" title="'+noSwfTxt+'">'+noSwfTxt+'</a>');
	document.write('</object>');
}


//----------------------------------------------------------------
//	ロールオーバーをclass指定
//----------------------------------------------------------------

function ImageRollOver() {
	if (!document.getElementById) return

	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) { 
			if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);

			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;

			aImages[i].onmouseover = function() {
			sTempSrc = this.getAttribute('src');
			this.setAttribute('src', this.getAttribute('hsrc'));
			} 

			aImages[i].onmouseout = function() {
			if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
			this.setAttribute('src', sTempSrc);
			}
		}
	}
}
window.onload = ImageRollOver;


//----------------------------------------------------------------
//	ポップアップ
//----------------------------------------------------------------

function opwin(url,w,h){
      w = open(url,"_blank","width="+w+",height="+h+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes");
      w.moveTo(0,0);
      w.focus();
}
