// JavaScript Document


var player = null;
var textOut = null; 
var vidID = null;
function playerReady(thePlayer) {player = window.document[thePlayer.id];}

function createPlayer(file,autoPlay) {var so = new SWFObject('http://vimeo.com/moogaloop.swf','theatre','656','369','9');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addVariable('clip_id',[file]);
  so.addVariable('color','660000');
  so.addVariable('autoplay',[autoPlay]);
  so.addVariable('hd','1');
  so.write('mediaspace');
}  

 function loadVid(text,autoplay) {
	 if ([text] == 'd7bea'){textOut = '<p>detroit7</p><p>Live footage from the 2009 Europe tour.</p><p>Edited on location.</p><p>2009.4</p>'; vidID = "6555019";}
	 else if ([text] == 'd7col'){textOut = '<p>detroit7</p><p>Live footage from Printemps de Bourge, 2009.</p><p>We were only allowed 2 cameras!</p><p>2009.4</p>'; vidID = "6568552"}
	 else if ([text] == 'otherside'){textOut = '<p>The Other Side</p><p>A documentary I made about my brother\'s unique living situation.</p><p>2008.8</p>'; vidID = "6573269"}
	 else if ([text] == 'dray'){textOut = '<p>D\'espairsRay</p><p>Live footage from the 2009 Europe tour is now on sale for a limited time with the new single \"Final Call\".</p><p>Filmed with only one camera!</p><p>2009.7</p>'; vidID = '6574782'}
	else if ([text] == 'alv'){textOut = '<p>ALvino<br>"New World"</p><p>My first time producing/directing a major concert shoot.<br><br>Click the <img src="images/expand.gif">button in the bottom right corner　and turn HD on in the top right corner to watch it in full HD!</p><p>2010.4</p>'; vidID = "13531555"}
	else if ([text] == 'othersidej'){textOut = '<p>向こう側</p><p>弟のヒッピー生活を基にしたドキュメンタリー。</p><p>Toho Film Festivalにてノミネートされた作品。</p><p>2008.8</p>'; vidID = "6697923"}
	else if ([text] == 'd7beaj'){textOut = '<p>detroit7</p><p>2009年EUツアーからのライブ映像。</p><p>現地で編集し、YouTubeにアップ。</p><p>2009.4</p>'; vidID = "6555019"}
	else if ([text] == 'd7colj'){textOut = '<p>detroit7</p><p>プランタンドブルジュというフランスのミュージックフェスからのライブ映像。</p><p>持ち込めるカメラが2台に限界された。</p><p>2009.4</p>'; vidID = "6568552"}
	else if ([text] == 'drayj'){textOut = '<p>D\'espairsRay</p><p>PSYCHADELIC PARADE IN EUROPE 2009ツアー映像DVD付きシングル「Final Call」が9月9日から発売中！</p><p>カメラ一台で撮影</p><p>2009.7</p>'; vidID = "6574782"}
	else if ([text] == 'sen'){textOut = '<p>「川柳を基にした作品」という課題で撮った短編映画。</p><p>俳優がいなかったので、無理やりにクラスメートを演じさせた。</p><p>2007.8</p>'; vidID = "6868488"}
	else if ([text] == 'alvj'){textOut = '<p>ALvino<br>"New World"<p></p>ライブ撮影の初プロデュース。<br><br>フルHDで観るには動画の右下にある<img src="images/expand.gif">ボタンをクリックして、右上のHDボタンをONにしてください。<p>2010.4</p>'; vidID = "13531555"}
	else {textOut = '<p>D\'espairsRay</p><p>Live footage from the 2009 Europe tour is now on sale for a limited time with the new single \"Final Call\".</p><p>Filmed with only one camera!</p><p>2009.7</p>'; vidID = "6574782"}
	 document.getElementById('textArea').innerHTML = textOut;
	 createPlayer(vidID,[autoplay]);
}	

 


function mailtag() {document.getElementById('mailTag').innerHTML = '<div style="text-align:center; position:relative; top:-10px">Sword Records　〒107-0062　東京都港区南青山1-10-3　橋本ビル2階<br><a href="mailto:info' + '@jmacwhyte.com"><span style="color:#FFFFFF">info</span><img src="images/at.gif" border=0 alt="@" name="at" width="12" height="12" style="position:relative; bottom: -3px"/><span style="color:#FFFFFF">jmacwhyte.com</span></a></div>';}

function youtube(textLabel,video) {document.getElementById('mediaspace').innerHTML = '<object width="656" height="369"><param name="movie" value="http://www.youtube.com/v/'+[video]+'&hl=ja&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+[video]+'&hl=ja&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="656" height="369"></embed></object>';

	if ([textLabel] == 'dirj'){document.getElementById('textArea').innerHTML = '<p>Dir en grey<br>陵辱の雨</p><p>ゴーグルをして鳥かごを被ってる人として出演。1分17秒からのアップもそう<br>です！</p><p>（YouTube）</p>';}
	else if ([textLabel] == 'dir'){document.getElementById('textArea').innerHTML = '<p>Dir en grey<br>Ryoujoku no ame</p><p>I\'m wearing goggles with a bird cage on my head.  You can see my close-up at 1:17.</p><p>（YouTube）</p>';}
	else if ([textLabel] == 'febj'){document.getElementById('textArea').innerHTML = '<p>Tommy February6</p><p>TommyとPVの打ち合わせしたら、出演することになりました。ドラム・右側のサングラスです。</p><p>（YouTube）</p>';}
	else if ([textLabel] == 'feb'){document.getElementById('textArea').innerHTML = '<p>Tommy February6</p><p>At a meeting with Tommy about her new video, she asked me to be in it.  I\'m the drums and right-side sunglasses guy.<p>（YouTube）</p>';}
	else if ([textLabel] == 'heaj'){document.getElementById('textArea').innerHTML = '<p>Tommy February6<br>Heavenly6</p><p>Tommyの新しいアルバムが出たら、PVを4つも頼まれました（February, Heavenlyバージョンの2つずつ）。同じスタジオで、同じ日に全部撮りました。今回はベースを弾いてます（茶色い鬘）</p><p>（YouTube）</p>';}
	else if ([textLabel] == 'hea'){document.getElementById('textArea').innerHTML = '<p>Tommy February6<br>Heavenly6</p><p>When Tommy released a new album, we made 4 music videos; two versions each of two songs.  I played bass, and looked fabulous doing it!</p><p>（YouTube）</p>';}
	else if ([textLabel] == 'buri1j'){document.getElementById('textArea').innerHTML = '<p>The Brilliant Green<br>Blue Daisy</p><p>またベース弾いてます。</p><p>（YouTube）</p>';}
	else if ([textLabel] == 'buri1'){document.getElementById('textArea').innerHTML = "<p>The Brilliant Green<br>Blue Daisy</p><p>I'm playing bass, with some amazing hair. </p><p>（YouTube）</p>";}
else {document.getElementById('textArea').innerHTML = 'There was a server error...'}
}

function startUp(dmov,dplay){
	
var inputUrl = window.location
document.where.to.value = inputUrl
var processIn = document.where.to.value
startChar = processIn.indexOf("?") + 1;
movName = processIn.substr(startChar);
if (startChar == '0'){loadVid([dmov],[dplay])}
else if (movName){loadVid(movName,'0')};

}