var include = function(_tag, _args){
	var tag=document.createElement(_tag);
	for (attr in _args) {
		tag.setAttribute(attr, _args[attr]);
	}
	var list=document.documentElement.getElementsByTagName("*");
	for(var i=0; i<list.length; i++) {
   		if(list[i].tagName=="HEAD") {
       		break;
   		}
   	}
	var HeadTag=list[i];
	HeadTag.insertBefore(tag, list[i+1]);
}
var Application =  {
  lastId: 0,

  getNewId: function() {
    Application.lastId++;
    return "window_id_" + Application.lastId;
  }
}
var openVideo = function(video_id, video_title) {
    var win = new Window(Application.getNewId(), {className:"dialog", width:580, height:550, zIndex:100, resizable:true, title:video_title, showEffect:Effect.BlindDown, hideEffect:Effect.SwitchOff, draggable:true});
    win.getContent().innerHTML= '<div style="padding:10px;><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/' + video_id + '&hl=ja&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/' + video_id + '&hl=ja&fs=1&" type="application/x-shockwave-flash" allowfullscreen="true" width="560" height="340"></embed></object></div>'+amzHtml;
    win.setStatusBar("SingMe - 無料の洋楽歌詞検索サイト");
    win.showCenter();
}
include('script',{type:'text/javascript',src:'/js/prototype.js'});
include('script',{type:'text/javascript',src:'/js/effects.js'});
include('script',{type:'text/javascript',src:'/js/window.js'});
include('link',{type:'text/css',href:'/css/default.css',rel:'stylesheet'});
