var win = (navigator.userAgent.indexOf("Windows") != -1) || false;
var mac = (navigator.userAgent.indexOf("PPC Mac") != -1 || navigator.userAgent.indexOf("PowerPC") != -1 ) || false;
var intelMac = (navigator.userAgent.indexOf("Intel Mac") != -1) || false;
var firefox = (navigator.userAgent.indexOf("Firefox") != -1) || false;
var opera9 = (navigator.userAgent.indexOf("Opera/9") != -1) || false;
var opera = (navigator.userAgent.indexOf("Opera") != -1 && !opera9) || false;
var ie7 = (navigator.userAgent.indexOf("MSIE 7") != -1) || false;
var ie = (document.all && win && !ie7 && !opera && !opera9) || false;
var ie5 = (navigator.userAgent.indexOf("MSIE 5") != -1 && win) || false;
var macIE = (navigator.userAgent.indexOf("MSIE 5") != -1 && mac) || false;
var safari = (navigator.userAgent.indexOf("Safari") != -1) || false;
var camino = (navigator.userAgent.indexOf("Camino") != -1) || false;
var omniweb = (navigator.userAgent.indexOf("OmniWeb") != -1) || false;
var netscape = (navigator.userAgent.indexOf("Netscape") != -1) || false;

function initTop() {
	if(ie || ie7) {
		flexWidth();
		ctrlTitle();
	}
	if(safari) ctrlSafariWidth();
	//if(ie) changePNG('./', 'top')
	if(ie) changeLogoPNG('./');
	Shadowbox.init();
}
function initShop() {
	if(ie || ie7) {
		flexWidth();
		ctrlTitle();
	}
	if(safari) ctrlSafariWidth();
	if(ie) changeLogoPNG('./');
}
function initProfile() {
	if(ie) flexWidth();
	if(safari) ctrlSafariWidth();
	if(ie) changePNG('../', 'profile')
	if(ie) changeLogoPNG('../');
}
function initDisco() {
	if(ie) flexWidth();
	if(safari) ctrlSafariWidth();
	if(ie) changeLogoPNG('../');
	insertCtrlDisco();
	addClick();
}
function initCatalog(target) {
	if(ie) flexWidth();
	if(safari) ctrlSafariWidth();
	if(target != null) {
	    fixedItem(target);
	}
	if(ie) changeLogoPNG('../');
}
function initSche() {
	if(macIE) openCloseSchedule('all');
	if(ie) flexWidth();
	if(safari) ctrlSafariWidth();
	insertCtrlSche();
	if(!ie && !ie7) chkWindow();
	if(ie) changeLogoPNG('../');
}

//#######################//
//## フレキシブルWidth ##//
//#######################//

function flexWidth(target) {
	window.attachEvent('onresize',  chkContentsWidth());
	setTimeout(chkContentsWidth(target), 1);
}

function chkContentsWidth(target) {
	return function () {
		var body = document.getElementById("main");
		var width = getWindowWidth();
		
		if(width < 1024) {
			if(target == 'sche') {
				body.style.width = "99%";
				setTimeout(function() {	body.style.width = "100%"; }, 1);
			} else {
				body.style.width = "100%";
			}
		} else {
			if(target == 'sche') {
				body.style.width = "1023px";
				setTimeout(function() { body.style.width = "1024px"; }, 1);
			} else {
				body.style.width = "1024px";
			}
		}
	}
}

function getWindowWidth() {
	return document.body.clientWidth
}

//################################//
//## Safari用 widthコントロール ##//
//################################//
function ctrlSafariWidth() {
	if(safari) {
		var body = document.getElementsByTagName("BODY");
		body[0].style.width = "99.5%";
	}
}

//########################################//
//## 指定したアイテムをウインドウに固定 ##//
//########################################//

function fixedItem() {
if (document.getElementById){
	
	for(var i = 0; i < arguments.length; i++) {
		var obj = arguments[i].split("/");
		
		if(obj.length == 2) {
			var target = obj[0];
			var end = obj[1];
		} else if(obj.length > 3) {
			var target = obj[0];
			var end = null;
		} else {
			var target = obj;
			var end = null;
		}
		var marginTop = getMarginTop(target);
		
		setTimeout(fixedObj(target, marginTop, 5, end), 1);
		
		if(!macIE) {
			if(!ie && !ie7) {
				window.addEventListener('scroll', fixedObj(target, marginTop, 5, end), false);
			} else {
				window.attachEvent('onscroll',  fixedObj(target, marginTop, 5, end));
			}
		}
	}
}
}

function fixedObj(targetID, marginTopFromBody, space, endID) {
	return function() {
		//限界縦画面サイズ（これより小さいとスクロールさせない）
		if(targetID == "jacket") {
			if(endID != null) {
				var jacket = document.getElementById(targetID);
				var imgs = jacket.getElementsByTagName("IMG");
				var imgsHeight = 12; //リミットオブジェクトに対する上部余白
				for(var i = 0; i < imgs.length; i++) {
					imgsHeight += imgs[i].height;
					imgsHeight += 4;
				}
				var limit = imgsHeight;
			} else {
				return;
			}
		} else {
			var limit = document.getElementById(targetID).offsetHeight + 20;
		}
		var winHeight = getHeight();
		var winWidth = getWidth();
		
		if(winHeight > limit && winWidth > 750) {
			var obj = document.getElementById(targetID);
			var scrY = getScroll();
			
			if(targetID == "jacket") {
				if(endID != null) {
					if(endID != "more-info") {
						var limitHeight = getMarginTop(endID);
					} else {
						var temp = document.getElementById(endID);
						var h3Tags = temp.getElementsByTagName("H3");
						h3Tags[0].id = "temp";
						var limitHeight = getMarginTop("temp");
						if(ie || ie7) limitHeight -= 50;
					}
					if(scrY - (marginTopFromBody - space) > 0) {
						if(scrY + imgsHeight  < limitHeight) {
							obj.style.marginTop = scrY - (marginTopFromBody - space) + "px";
						} else {
							obj.style.marginTop = limitHeight - imgsHeight - (marginTopFromBody - space) + "px";
						}
					} else {
						obj.style.marginTop = 0 + "px";
					}
				}
			} else {
				var limitHeight = getMarginTop(endID);

				if(scrY - (marginTopFromBody - space) > 0) {
					if(scrY + limit  < limitHeight) {
						obj.style.top = scrY - (marginTopFromBody - space) + "px";
					} else {
						obj.style.top = limitHeight - limit - (marginTopFromBody - space) + "px";
					}
				} else {
					obj.style.top = 0 + "px";
				}
			}
		}
	}
}

//##########################################################//
//## 対象オブジェクトの BODYからの トップマージン取得関数 ##//
//##########################################################//
function getMarginTop(id) {
	
	var obj = document.getElementById(id);
	var marginTop = obj.offsetTop;
	if(!ie7) {
		while(obj.offsetParent.nodeName != "BODY") {
			obj = obj.offsetParent;
			marginTop += obj.offsetTop;
		}
	} else {
		while(obj.offsetParent.nodeName != "HTML") {
			obj = obj.offsetParent;
			marginTop += obj.offsetTop;
		}
	}
	obj = obj.offsetParent;
	marginTop += obj.offsetTop;

	return marginTop;
}

//######################################//
//## ブラウザの表示領域サイズ取得関数 ##//
//######################################//
function getHeight() {
    if(ie7 || firefox) {
        return document.documentElement.clientHeight;
    } else if(ie || opera || opera9) {
        return document.body.clientHeight;
    } else if(safari) {
        return window.innerHeight;
    } else {
        return 0;
    }
}
function getWidth() {
    if(ie7 || firefox) {
        return document.documentElement.clientWidth;
    } else if(ie || opera || opera9) {
        return document.body.clientWidth;
    } else if(safari) {
        return window.innerWidth;
    } else {
        return 0;
    }
}

//##########################//
//## スクロール幅取得関数 ##//
//##########################//
function getScroll() {
    if(ie7) {
        return document.documentElement.scrollTop;
    } else if(ie || macIE || netscape) {
        return document.body.scrollTop;
    } else if(safari || firefox || omniweb || opera || opera9) {
        return window.pageYOffset;
    } else {
        return 0;
    }
}
//#########################################################//
//## ディスコグラフィー用 dlタグ全体をクリック範囲にする ##//
//#########################################################//
function addClick(mode) {
	var startC = "#eeeeee";
	var endC = "#b9131f";
	
	if(mode == 'simple') {
		var div = document.getElementById("discography");
		var dlTags = div.getElementsByTagName("DL");
		var dlTagsLength = dlTags.length;
		
		for(var i = 0; i < dlTagsLength; i++) {
			var ATags = dlTags[i].getElementsByTagName("A");
			dlTags[i].href = ATags[0].href;
			dlTags[i].title = ATags[0].title;
			ATags[0].style.textDecoration = "none";
			if(!ie5) {
				dlTags[i].style.cursor = "pointer";
			}
				dlTags[i].onclick = function () {
				window.location = this.href;
			}
			dlTags[i].onmouseover = function () {
				this.style.backgroundImage = "url(../img/basic/back_ani.gif)";
				this.style.borderColor = endC;
			}
			dlTags[i].onmouseout = function () {
				this.style.backgroundImage = "url(../img/basic/back_stripe.png)";
				this.style.borderColor = startC;
			}
		}
	} else {
		var level = 15;
		var step = 1;
		var reset = 1000;
		
		var colors = gradation(startC, endC, level)
		var div = document.getElementById("discography");
		var dlTags = div.getElementsByTagName("DL");
		var dlTagsLength = dlTags.length;
		
		for(var i = 0; i < dlTagsLength; i++) {
			
			dlTags[i].counter = 0;
			
			dlTags[i].timerID1 = setInterval("", step);
			dlTags[i].timerID2 = setTimeout("", 1);
			dlTags[i].timerID3 = setTimeout("", reset);
			
			var ATags = dlTags[i].getElementsByTagName("A");
			dlTags[i].href = ATags[0].href;
			dlTags[i].title = ATags[0].title;
			ATags[0].style.textDecoration = "none";
			if(!ie5) {
				dlTags[i].style.cursor = "pointer";
			}
			dlTags[i].onclick = function () {
				window.location = this.href;
			}
			dlTags[i].onmouseover = function () {
				clearInterval(this.timerID1);
				clearTimeout(this.timerID2);
				clearTimeout(this.timerID3);
				var obj = this;
				
				this.style.backgroundImage = "url(../img/basic/back_ani.gif)";
				
				this.timerID1 = setInterval(function() {
					if(obj.counter < 0) obj.counter = 0;
					if(obj.counter < level) doGradation(obj, colors[obj.counter++]);
					else clearInterval(obj.timerID1);
				}, step);
			}
			dlTags[i].onmouseout = function () {
				clearInterval(this.timerID1);
				var obj = this;
				
				this.timerID2 = setTimeout(function() {
					obj.timerID1 = setInterval(function() {
						if(obj.counter > level - 1) obj.counter = level - 1;
						if(-1 < obj.counter) doGradation(obj, colors[obj.counter--]);
						else clearInterval(obj.timerID1);
					}, step);
					
					obj.style.backgroundImage = "url(../img/basic/back_stripe.png)";
				}, 1);
				
				this.timerID3 = setTimeout(function() {
					clearInterval(obj.timerID1);
					clearTimeout(obj.timerID2);
					clearTimeout(obj.timerID3);
					
					obj.style.backgroundImage = "url(../img/basic/back_stripe.png)";
					obj.style.borderColor = startC;
					
				}, reset);
			}
		}
	}
}

function doGradation(obj, color) {
	obj.style.borderColor = "#" + color;
}

function toHex(p) {
	p = Math.round(p);
	if(p <= 0x00) {
		return '00' ;
	} else if(p < 0x10) {
		return "0"+p.toString(16);
	}else if(p <= 0xff) {
		return p.toString(16);
	}else{
		return 'ff' ;
	}
}

function toRGB(c) {
	var p = parseInt('0x'+(c.charAt(0) == "#" ? c.substring(1) : c));
	var r = (p & 0xff0000) >>> 0x10;
	var g = (p & 0x00ff00) >>> 0x08;
	var b = (p & 0x0000ff) >>> 0x00;
	return { r:r, g:g, b:b };
}

function gradation(p0, p1, n) {
	var c0 = toRGB(p0);
	var c1 = toRGB(p1);
	var re = new Array(n);
	var dr = (c1.r-c0.r) / (n-1);
	var dg = (c1.g-c0.g) / (n-1);
	var db = (c1.b-c0.b) / (n-1);
	for(var i = 0; i < n; i++) {
		re[i] = toHex(c0.r) + '' + toHex(c0.g) + '' + toHex(c0.b);
		c0.r += dr;
		c0.g += dg;
		c0.b += db;
	}
	return re ;
}

//######################################//
//## ディスコグラフィー選択ボタン追加 ##//
//######################################//

function insertCtrlDisco() {
	var main = document.getElementById("main");
	var disco = document.getElementById("discography");
	
	var div = document.createElement("div");
	var h3 = document.createElement("h3");
	var ul = document.createElement("ul");
	var li_all = document.createElement("li");
	var li_album = document.createElement("li");
	var li_single = document.createElement("li");
	var liTags = new Array(li_all, li_album, li_single);
	var hr = document.createElement("hr");
	
	ul.appendChild(li_all);
	ul.appendChild(li_album);
	ul.appendChild(li_single);
	
	div.appendChild(h3);
	
	div.appendChild(ul);
	
	div.setAttribute("id", "ctrl");
	
	h3.innerHTML = "表示コントロール";
	
	for(var i = 0; i < liTags.length; i++) {
		liTags[i].onclick = function () {
			if(!ie5) this.style.cursor = "pointer";
			this.style.backgroundImage = "url(../img/basic/back_ani.gif)";
		}
		liTags[i].onmouseover = function () {
			if(!ie5) this.style.cursor = "pointer";
			this.style.backgroundImage = "url(../img/basic/back_ani.gif)";
		}
		liTags[i].onmouseout = function () {
			this.style.backgroundImage = "";
		}
	}
	
	li_all.innerHTML = "ALL";
	li_all.onclick = function () { openCloseDiscography('all');}
	
	li_album.innerHTML = "Album";
	li_album.onclick = function () { openCloseDiscography('album');}
	
	li_single.innerHTML = "Single";
	li_single.onclick = function () { openCloseDiscography('single'); }

	main.insertBefore(div, disco);
	main.insertBefore(hr, disco);
}

//######################################//
//## スケジュール選択ボタン追加 ##//
//######################################//

function insertCtrlSche() {
	var main = document.getElementById("main");
	var sche = document.getElementById("schedule");
	
	var div = document.createElement("div");
	var h3 = document.createElement("h3");
	var ul = document.createElement("ul");
	var li_all = document.createElement("li");
	var li_regular = document.createElement("li");
	var li_request= document.createElement("li");
	var li_web = document.createElement("li");
	var li_tv = document.createElement("li");
	var li_radio = document.createElement("li");
	var li_magazine = document.createElement("li");
	var li_etc = document.createElement("li");
	var li_event = document.createElement("li");
	var liTags = new Array(li_all, li_regular, li_request, li_web, li_tv, li_radio, li_magazine, li_etc, li_event);
	var hr = document.createElement("hr");
	
	ul.appendChild(li_all);
	if(document.getElementById('regular')) ul.appendChild(li_regular);
	if(document.getElementById('request')) ul.appendChild(li_request);
	if(document.getElementById('web')) ul.appendChild(li_web);
	if(document.getElementById('tv')) ul.appendChild(li_tv);
	if(document.getElementById('radio')) ul.appendChild(li_radio);
	if(document.getElementById('magazine')) ul.appendChild(li_magazine);
	if(document.getElementById('etc')) ul.appendChild(li_etc);
	if(document.getElementById('event')) ul.appendChild(li_event);
	
	div.appendChild(h3);
	
	div.appendChild(ul);
	
	div.setAttribute("id", "ctrl");
	
	h3.innerHTML = "表示コントロール";
	
	for(var i = 0; i < liTags.length; i++) {
		liTags[i].onclick = function () {
			if(!ie5) this.style.cursor = "pointer";
			this.style.backgroundImage = "url(../img/basic/back_ani.gif)";
		}
		liTags[i].onmouseover = function () {
			if(!ie5) this.style.cursor = "pointer";
			this.style.backgroundImage = "url(../img/basic/back_ani.gif)";
		}
		liTags[i].onmouseout = function () {
			this.style.backgroundImage = "";
		}
	}
	
	li_all.innerHTML = "ALL";
	li_all.onclick = function () { openCloseSchedule('all'); }
	
	li_regular.innerHTML = "Regular";
	li_regular.onclick = function () { openCloseSchedule('regular'); }
	
	li_request.innerHTML = "Request";
	li_request.onclick = function () { openCloseSchedule('request'); }
	
	li_web.innerHTML = "Web";
	li_web.onclick = function () { openCloseSchedule('web'); }
	
	li_tv.innerHTML = "TV";
	li_tv.onclick = function () { openCloseSchedule('tv'); }
	
	li_radio.innerHTML = "Radio";
	li_radio.onclick = function () { openCloseSchedule('radio'); }
	
	li_magazine.innerHTML = "Magazine";
	li_magazine.onclick = function () { openCloseSchedule('magazine'); }
	
	li_etc.innerHTML = "etc";
	li_etc.onclick = function () { openCloseSchedule('etc');}
	
	li_event.innerHTML = "Live / Event";
	li_event.onclick = function () { openCloseSchedule('event');}

	main.insertBefore(div, sche);
	main.insertBefore(hr, sche);
}

//####################################//
//## ディスコグラフィーアイテム選択 ##//
//####################################//

function openCloseDiscography(target) {
	var disco = document.getElementById("discography");
    var dl = disco.getElementsByTagName("DL");
    var re = new RegExp(target, "i");
    
    for(var i = 0; i < dl.length; i++) {
        if(dl[i].className.search(re) != -1 || target == "all") {
            dl[i].style.display = "block";
        } else {
            dl[i].style.display = "none"
        }
    }
}

//##############################//
//## スケジュールアイテム選択 ##//
//##############################//

function openCloseSchedule(target) {
	var schedule = document.getElementById("schedule");
    var table = schedule.getElementsByTagName("TABLE");
    var re = new RegExp(target, "i");
    
    for(var i = 0; i < table.length; i++) {
        if(table[i].id == target || target == "all") {
            table[i].style.display = "block";
            if(ie) {
				flexWidth('sche');
			}
			if(!ie && !ie7) {
				var temp = table[i].getElementsByTagName("TD");
				for(var j = 0; j < temp.length; j++) {
					if(temp[j].className == "media" || temp[j].className == "time") {
						temp[j].style.width = 100 + "px";
					} else if(temp[j].className == "contents") {
						if(!firefox) {
							temp[j].style.width = schedule.offsetWidth  - 133 + "px";
						} else {
							temp[j].style.width = schedule.offsetWidth  - 130 + "px";
						}
						break;
					}
				}
			}
        } else {
            table[i].style.display = "none"
        }
    }
    if(ie) {
		flexWidth();
	}
}

function chkResize() {
	return function () {
		var schedule = document.getElementById("schedule");
   	 	var table = schedule.getElementsByTagName("TABLE");
   	 	
    	for(var i = 0; i < table.length; i++) {
			if(!ie && !ie7) {
				var temp = table[i].getElementsByTagName("TD");
				for(var j = 0; j < temp.length; j++) {
					if(temp[j].className == "media" || temp[j].className == "time") {
						temp[j].style.width = 100 + "px";
					} else if(temp[j].className == "contents") {
						if(!firefox) {
							temp[j].style.width = schedule.offsetWidth  - 133 + "px";
						} else {
							temp[j].style.width = schedule.offsetWidth  - 130 + "px";
						}
						break;
					}
				}
			}
		}
	}
}

function chkWindow() {
	window.addEventListener('resize', chkResize(), false);
}

//######################//
//## IE6で透明PNG使用 ##//
//######################//
function changePNG(level, type) {
	
	switch(type) {
		case "top":
			var div = document.getElementById("info-push-unit");
			var h4 = div.getElementsByTagName("H4");
			h4[0].runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + level + "img/other/back_h4_release.png" + '", sizingmethod="scale")';
			h4[0].style.backgroundImage = "none";
			break;
		case "profile":
			var div = document.getElementById("member");
			var dl = div.getElementsByTagName("DL");
			
			for(var i = 0; i < dl.length; i++) {
				dl[i].runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + level + "img/basic/back_white_transparent.png" + '", sizingmethod="scale")';
				dl[i].style.background = "none";
			}
			break;
		default:
			var img = document.getElementsByTagName("IMG");
			var exp = new RegExp("\.png$", "i");
			
			for(var i = 0; i < img.length; i++) {
				if(img[i].src.search(exp) != -1) {
					img[i].runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + img[i].src + '", sizingmethod="scale")';
					img[i].src = "http://www.teichiku.co.jp/artist/tiana/img/basic/blank.gif"
				}
			}
			break;
	}
}

function changeLogoPNG(level) {
	var img = document.getElementsByTagName("IMG");
	var exp = new RegExp("logo_te_eng\.png$", "i");
	
	for(var i = 0; i < img.length; i++) {
		if(img[i].src.search(exp) != -1) {
			img[i].runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + img[i].src + '", sizingmethod="image")';
			img[i].src = level + "img/basic/blank.gif"
		}
	}
}

//########################//
//## 動画 Flashタグ挿入 ##//
//########################//
function drawFlashMovie(id, file, xsize, ysize) {
	document.write('<div id="' + id +'">' + "\n");
	switch(id) {
		case "movie":
			document.write('<h3>ミュージッククリップ</h3>' + "\n");
			break;
		case "flash":
			document.write('<h3>FLASHアニメーション</h3>' + "\n");
			var main = document.getElementById("main");
			var h2 = main.getElementsByTagName("H2");
			h2[0].style.backgroundImage = "none";
			h2[0].style.margin = "0 0 2em 260px";
			break;
		default:
			document.write('<h3>FLASHアニメーション</h3>' + "\n");
			break;
	}
	if(safari || firefox || macIE || opera || camino || omniweb) {
		document.write('<embed id="movie" src="'+ file + '" quality="high" wmode="transparent" width="' + xsize + '" height="' + ysize +  '" name="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' + "\n");
	} else {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + xsize + '" height="' + ysize + '">' + "\n");
		document.write('<param name="allowScriptAccess" value="sameDomain" />' + "\n");
		document.write('<param name="movie" value="' + file + '" />' + "\n");
		document.write('<param name="quality" value="high" />' + "\n");
		document.write('<param name="wmode" value="transparent">' + "\n");
		document.write('</object>' + "\n");
	} 
	document.write('</div>' + "\n");
	document.write('<hr />' + "\n");
}

function ctrlTitle() {
	var title = document.getElementsByTagName("TITLE");
	document.title = title[0].innerHTML.replace(/#.*/, "");
}

//#########################################//
//## Flash Player 簡易バージョンチェック ##//
//#########################################//

function chkFlashVersion(ver) {
	var flashVersion = 0;
	var targetVersion = ver;
	var text = '<div id="caution"><p>エラー：バージョン' + ver + '以上の <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> をお使いください</p>\n</div>' + "\n"
	
	if((win && (safari || firefox || opera)) || ((intelMac || mac) && ((safari && !omniweb) || firefox || camino || macIE))) {
		flashVersion = navigator.plugins["Shockwave Flash"].description.charAt(16);
			
		if(flashVersion >= targetVersion) {
			return;
		} else {
			document.write(text);
		}
	} else if(ie && !ie7) {
        var temp = new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();
        flashVersion=Math.floor(temp / 0x10000);
        
		if(flashVersion >= targetVersion) {
			return;
		} else {
			document.write(text);
		} 
	}
}

//########################//
//## FLASH ランダム再生 ##//
//########################//
function randomFlashMovie() {
	var num = 1 + Math.floor(Math.random() * 2);
	switch(num) {
		case 1:
			drawFlashMovie('movie', './flash/movie_01.swf', 210, 185);
			break;
		case 2:
			drawFlashMovie('movie', './flash/movie_02.swf', 210, 185);
			break;
		default:
			drawFlashMovie('movie', './flash/movie_01.swf', 210, 185);
			break;
	}
	return;
}

//########################//
//## メールアドレス描画 ##//
//########################//

function drawMail() {
	var emailriddlerarray = [110,97,107,97,110,111,109,111,114,105,64,116,101,105,99,104,105,107,117,46,99,111,46,106,112];
	var encryptedemail_id30 = '';
	
	for (var i = 0; i < emailriddlerarray.length; i++) {
		encryptedemail_id30 += String.fromCharCode(emailriddlerarray[i]);
	}
	document.write('<p class="mail"><a href="mailto:' + encryptedemail_id30 + '">' + encryptedemail_id30 + '</a></p>' + "\n");
}

//#######################//
//## スムーススクロール##//
//#######################//
window.addEvent('domready', function(){
	if(!window.ie6 && !window.ie7) new SmoothScroll();
}); 