// iPallet Viewer Ver. 1.0, 2007-10-01
function ipalletviewer(resource_name, resource_type, resource_pod){
  document.write('<object id="ipallet" name="ipallet" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="520" height="360">\n');
  document.write('<param name="movie" value="/scripts/ipallet_viewer-1_0.swf?pod=' + resource_pod + '&amp;rsc=' + resource_name + '&amp;typ=' + resource_type + '&amp;key=1">\n');
  document.write('<param name="loop" value="false">\n');
  document.write('<param name="menu" value="true">\n');
  document.write('<param name="quality" value="high">\n');
  document.write('<param name="bgcolor" value="#dddddd">\n');
  document.write('<embed name="ipallet" src="/scripts/ipallet_viewer-1_0.swf?pod=' + resource_pod + '&amp;rsc=' + resource_name + '&amp;typ=' + resource_type + '&amp;key=1" loop="false" menu="true" quality="high" bgcolor="#dddddd" width="520" height="360" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed>\n');
  document.write('</object>\n');
}
function callLink(aid){
  if (navigator.appName.indexOf("Microsoft") != -1){
    window.document.ipallet.SetVariable("sLink", aid);
  } else {
    document.ipallet.SetVariable("sLink", aid);
  }
}

function entryCheck(){
  var s = location.search;
  if (s != null && s.length > 0){
    var c = s.substring(s.indexOf("=")+1);
    switch(c){
      case "0":
      window.alert("エントリー成功．");
      break;
      case "1":
      window.alert("エントリー失敗．");
      break;
      default:
      window.alert("不明なエラー．\nエントリー失敗．");
      break;
    }
  }
}