try{ // $("body").text(); // var $j = jQuery.noConflict(); }catch(e){ } var objScript_jquery = document.createElement("script"); var tagScript_jquery = document.getElementsByTagName('script')[0]; objScript_jquery.async = true; objScript_jquery.src = "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"; tagScript_jquery.parentNode.insertBefore(objScript_jquery, tagScript_jquery); function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } function getColor(value){ var r,g,b; if(value <= 255){ r = 0; g = value; b = 255; } if(value > 255 && value <= 510){ r = 255 - value; g = 0; b = 255; } if(value > 510){ r = 255; g = 0; b = value; } return "rgb(" + r + "," + g + "," + b + ")"; } function get_elementPosition(idx){ var obj = $("div").eq(idx); //console.log("描画: %d" , idx); return obj.offset(); } function playConsole(i,kubun){ if(source[i] == undefined){ $("#play_source_Jikan_" + kubun).val(""); $("#play_source_ScrollPosition_" + kubun).val(""); $("#play_source_windowHeight_" + kubun).val(""); $("#play_source_windowWidth_" + kubun).val(""); $("#play_source_mouseX_" + kubun).val(""); $("#play_source_mouseY_" + kubun).val(""); }else{ $("#play_source_Jikan_" + kubun).val(source[i].Jikan); $("#play_source_ScrollPosition_" + kubun).val(source[i].ScrollPosition); $("#play_source_windowHeight_" + kubun).val(source[i].windowHeight); $("#play_source_windowWidth_" + kubun).val(source[i].windowWidth); $("#play_source_mouseX_" + kubun).val(source[i].mouseX); $("#play_source_mouseY_" + kubun).val(source[i].mouseY); } } function setProgressDatetime(dt){ var y = dt.getFullYear(); var m = ("0" + parseInt(dt.getMonth() + 1)).slice(-2); var d = ("0" + dt.getDate()).slice(-2); var h = ("0" + dt.getHours()).slice(-2); var i = ("0" + dt.getMinutes()).slice(-2); var s = ("0" + dt.getSeconds()).slice(-2); $("#current_time").val(h + ":" + i + ":" + s); } function cipher(val) { if((val == "" || val == undefined) && val != "0") return ""; if(val == "0") return "a"; var alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; if (!isNaN(val)) { var base_count = alphabet.length; var result = ''; while (val >= base_count) { div = val/base_count; mod = (val-(base_count*Math.floor(div))); result = alphabet.substr(mod,1) + result; val = div; } if (val) result = alphabet.substr(val,1) + result; } else{ result = 0; multi = 1; while (val.length > 0) { digit = val.substr(val.length - 1,1); result += multi * alphabet.indexOf(digit); multi = multi * alphabet.length; val = val.substr(0, val.length - 1); } } return result; } function addEvent(element, eventName, callback) { if (element.addEventListener) { element.addEventListener(eventName, callback, false); } else { element.attachEvent('on' + eventName, callback); } } function removeEvent(element,eventName,callback){ if(element.removeEventListener){ element.removeEventListener(eventName, callback, false); }else{ element.detachEvent("on" + eventName, callback); } } function getScrollPosition() { var obj = new Object(); obj.y = document.documentElement.scrollTop || document.body.scrollTop; return obj.y; } function getScrollHeight() { return $(document).height(); // return document.documentElement.scrollHeight || document.body.scrollHeight; } function getClientHeight() { return (document.documentElement.clientHeight || document.body.clientHeight); } function getElementPosition ( elm ) { var fn = arguments.callee, // 再帰用 rslt = { x:0, y:0 }, p; if( elm ) { rslt = { x : parseInt(elm.offsetLeft), y : parseInt(elm.offsetTop) }; if(elm.offsetParent) { p = fn(elm.offsetParent); rslt.x += p.x; rslt.y += p.y; } } return rslt; } function getMousePosition(evt, elm) { var d = window.document; var e = getElementPosition( elm ); var _getPos = function(x, y) { return { x : x - e.x, y : y - e.y }; }; if(window.opera) return _getPos( evt.clientX, evt.clientY ); else if(d.all) return _getPos( d.body.scrollLeft + evt.clientX, d.body.scrollTop + evt.clientY ); else if(d.layers||d.getElementById) return _getPos( evt.pageX, evt.pageY ); } function secondTOhms(second){ h=""+(second/36000|0)+(second/3600%10|0) m=""+(second%3600/600|0)+(second%3600/60%10|0) s=""+(second%60/10|0)+(second%60%10) return m + s } function GetCookie( name ){ var result = null; var cookieName = name + '='; var allcookies = document.cookie; var position = allcookies.indexOf( cookieName ); if( position != -1 ) { var startIndex = position + cookieName.length; var endIndex = allcookies.indexOf( ';', startIndex ); if( endIndex == -1 ) { endIndex = allcookies.length; } result = decodeURIComponent( allcookies.substring( startIndex, endIndex ) ); } return result; } var param = getUrlVars(); var objScript = document.createElement("script"); var tagScript = document.getElementsByTagName('script')[0]; objScript.async = true; objScript.src = "https://reliable-c.net/web_analyze/script/main/?play_unique_id=" + param['play_unique_id'] + "&play_mode=" + param['play_mode']; tagScript.parentNode.insertBefore(objScript, tagScript);