function InsertSelection(divid, callbackname, sels) /// 選択肢の挿入 { var Obj = document.getElementById(divid); for(var i in sels){ if(undefined == sels[i]){ continue; } // Obj.innerHTML += ""+sels[i]+"
\n"; Obj.innerHTML += ""+sels[i]+"
\n"; } } function GetSelectionNum() /// 未実装 { } function FocusSelection(no) /// 選択肢のフォーカス { var Obj = document.getElementById( "SEL"+no ); Obj.focus(); } function divImageZoom(imgID, count) /// 画像の拡大 { var mod = count % 21; if(mod < 0){ return; } var size = -(mod-10)*(mod-10)/25 +5 var Obj = document.getElementById( imgID ); var s = Obj.style; var w = Obj.width; var h = Obj.height; s.zoom = size; s.left = -(w * size - w)/2; s.top = -(h * size - h)/2; } function divSetBkColor(divID_, color_) /// 背景色の指定 { var Obj = document.getElementById( divID_ ); Obj.style.background = color_; } function divInsertImage(divID, Class, ID, src) /// 画像の挿入 { var Obj = document.getElementById( divID ); Obj.innerHTML += (''); } function divClearImage(divID) /// 画像を消す { var Obj = document.getElementById( divID ); Obj.innerHTML = ""; } function divInsertChar(divID, Char) /// 文字の挿入 { // innerHtmlは遅い // var Obj = document.getElementById( divID ); // Obj.innerHTML += Char; // appendDataは動かなかった // var Obj = document.getElementById( divID ).firstChild; // Obj.appendData(Char); var Obj = document.getElementById( divID ); Obj.appendChild(document.createTextNode(Char)); } function divInsertHeart(divID) /// ハートの挿入 { var Obj = document.getElementById( divID ); Obj.innerHTML += "♡"; } function divInsertAse(divID) /// 汗マークの挿入 { var Obj = document.getElementById( divID ); Obj.innerHTML += "(汗)"; } function divClear(divID) /// DIVの内容を削除 { var Obj = document.getElementById( divID ); Obj.innerHTML = ""; } function divInsertNewLine(divID) /// 改行 { var Obj = document.getElementById( divID ); Obj.innerHTML += "
"; } function divSetAlpha(divID, Opacity) { var Obj = document.getElementById( divID ); if(document.all) { // for IE Obj.style.filter = "alpha(opacity=" + Opacity + ")"; } else { // for Moz Obj.style.MozOpacity = Opacity/100; } } function divMove(divID, x, y) { var Obj = document.getElementById( divID ); // if(document.all) { // for IE Obj.style.posLeft += x; Obj.style.posTop += y; // } else { // for Moz // Obj.style.MozOpacity = Opacity/100; // } } function divSetpos(divID, x, y) { var Obj = document.getElementById( divID ); // if(document.all) { // for IE Obj.style.posLeft = x; Obj.style.posTop = y; // } else { // for Moz // Obj.style.MozOpacity = Opacity/100; // } } /*--------------------------------------------------------*/ /* 画像読み込みSDK*/ /*--------------------------------------------------------*/ WebSDKImageArray = new Array; function loadImage(imageURL) /// 画像の先読み { var img = new Image; img.src = imageURL; WebSDKImageArray.push(img); } function releaseImage() /// 先読み画像消去(出来るのか?) { WebSDKImageArray.length = 0; } /*--------------------------------------------------------*/ /* 音楽再生SDK*/ /*--------------------------------------------------------*/ function loadMusic(sndfile, ID, loop, divID) /// 音楽の読込 { var sndTag = ''; document.getElementById(divID).innerHTML += sndTag; } function playMusic(ID) /// 音楽の再生 { if(undefined == document.getElementById(ID)){ return; } document.getElementById(ID).Play(); return true; } function stopMusic(ID) /// 音楽の停止 { if(undefined == document.getElementById(ID)){ return; } document.getElementById(ID).Stop(); return true; } /*--------------------------------------------------------*/ /* 画像表示SDK*/ /*--------------------------------------------------------*/ function imageZoom(imgID, x, y, count) /// 画像の拡大 { var mod = count % 21; if(mod < 0){ return; } var size = -(mod-10)*(mod-10)/25 +5 // var size = -(mod-10)*(mod-10)/50 +3 var Obj = document.getElementById( imgID ); var s = Obj.style; var w = Obj.width; var h = Obj.height; s.zoom = size; s.left = x -(w * size - w)/2; s.top = y -(h * size - h)/2; } function imageSet(imgID, src, x, y) /// 画像の挿入 { var Obj = document.getElementById( imgID ); Obj.src = src; var s = Obj.style; s.left = x; s.top = y; } function imagePos(imgID, x, y) /// 画像の位置指定 { var Obj = document.getElementById( imgID ); var s = Obj.style; s.left = x; s.top = y; } function playMusicByFlash(divID, file, bLoop) /// 音楽の再生 { var soundArea = document.getElementById(divID); if(undefined == soundArea){ return; } var flash = '../common/mod/singlemp3player.swf' var value = ""; value += flash; value += '?file=' + file; value += '&autoStart=true&backColor=333333&frontColor=ddddff' value += '&repeatPlay=' + bLoop.toString(); value += '&songVolume=30' var html = ""; html = ''; html += ''; html += ''; html += '' soundArea.innerHTML = html; } function stopMusicByFlash(divID) { var soundArea = document.getElementById(divID); if(undefined == soundArea){ return; } soundArea.innerHTML = ""; }