//by tsubakuroWeb
//|bvAbv version 0.03
var sw;
var Astr;
var w;
var h;
var browser;
//HTML\
function pop(url,w,h){
 if(!w) w = "";
 if(!h) h = "";
 if(!url) url = "";
 Point(w,h,'','');
 subwin = window.open(url,'window1',Astr);
 if(sw){ subwin.window.scrollTo(0, 0); }
}
//f\
function video(url,w,h){
 if(!w) w = "";
 if(!h) h = "";
 if(!url) url = "";
 Point(w,h,'','');
 subwin = window.open('','',Astr);
 subwin.document.open();
 subwin.document.write( "<ht" + "ml><he" + "ad>\n");
 subwin.document.write( "<title></title>\n");
 subwin.document.write( "<style type='text/css'>\n");
 subwin.document.write( "<!--\n");
 subwin.document.write( "body { margin: 0px }\n");
 subwin.document.write( "-->\n");
 subwin.document.write( "</style>\n");
 //uXvL[AEBhEN[Y
 subwin.document.write( "<script type='text/javascript'>\n");
 subwin.document.write( "<!--\n");
 subwin.document.write( "listenKey()\n");
 subwin.document.write( "function getKey(e) {\n");
 subwin.document.write( " if (e == null) { keycode = event.keyCode }\n");
 subwin.document.write( " else { keycode = e.which }\n");
 subwin.document.write( " key = String.fromCharCode(keycode).toLowerCase()\n");
 subwin.document.write( " if (key == 'x') { window.close() }\n");
 subwin.document.write( "}\n");
 subwin.document.write( "function listenKey() {\n");
 subwin.document.write( " document.onkeypress = getKey\n");
 subwin.document.write( "}\n");
 subwin.document.write( "//-->\n");
 subwin.document.write( "</script>\n");
 subwin.document.write( "</he" + "ad>\n");
 subwin.document.write( "<body bgcolor='#000000' oncontextmenu='return false'>\n");
 subwin.document.write( "<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>\n");
 subwin.document.write( "<tr><td align='center'>\n");
//if(browser == "ie"){
  //rfITCY
  subwin.document.write( "<object id='player' width='" + w + "' height='" + h + "' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'>\n");
  //rfIt@C
  subwin.document.write( "<param name='URL' value='" + url + "'>\n");
  //I[gX^[g
  subwin.document.write( "<param name='autoStart' value='true'>\n");
  //Đ
  subwin.document.write( "<param name='PlayCount' value='1'>\n");
  //vCj[\
  subwin.document.write( "<param name='enableContextMenu' value='false'>\n");
  subwin.document.write( "<param name='uiMode' value='full'>\n");
  subwin.document.write( "<param name='stretchToFit' value='false'>\n");
  subwin.document.write( "<param name='windowlessvideo' value='false'>\n");
  subwin.document.write( "<embed src='" + url + "' width='" + w + "' height='" + h + "'></embed>\n");
  subwin.document.write( "</object>\n");
// } else {
  //rfIt@C
//  subwin.document.write( "<embed src='" + url + "' width='" + w + "' height='" + h + "'></embed>\n");
// }
 subwin.document.write( "</td></tr>\n");
 subwin.document.write( "</table>\n");
 subwin.document.write( "");
 subwin.document.write( "</bo" + "dy></ht" + "ml>");
 subwin.document.close();
}
//POINT
function Point(pw,ph,purl,pname){
 sw = 0;
 if(purl != "") {
  g = new Image();
  g.src = purl;
  if(g.width > 0) {
   w  = g.width;
   pw = g.width;
  } else {
   w  = 640;
   pw = 640;
  }
  if(g.height > 0) {
   h  = g.height;
   ph = g.height;
  } else {
   h  = 480;
   ph = 480;
  }
 }
 if(pname == "") {
  scw = pw;
  sch = ph;
 } else {
  scw = pw + 40;
  sch = ph + 70;
 }
 if( navigator.appName.indexOf("Microsoft") > -1 ){
  browser = "ie";
 } else {
  browser = "other";
 }
 if(!!window.screen){
  ScreenWIDTH = screen.width;
 } else {
  ScreenWIDTH = 0;
 }
 if(!!window.screen){
  ScreenHEIGHT = screen.height;
 } else {
  ScreenHEIGHT = 0;
 }
 if(scw <= ScreenWIDTH){
  Pwscr = (ScreenWIDTH - scw) / 2;
 } else {
  sw = 1; scw = 640;
 }
 if(sch <= ScreenHEIGHT){
  Phscr = (ScreenHEIGHT - sch) / 2;
 } else {
  sw = 1; sch = 480;
 }
 if(sw){
  str = ",left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes";
 } else {
  str = ",left=" + Pwscr + ",top=" + Phscr + ",screenX=0,screenY=0,scrollbars=no,resizable=no";
 }
 Astr = "width=" + scw + ",height=" + sch + str;
}