var ITISInteraction = function(initValue) {this.name = initValue.instanceName;this.domain = initValue.domain;this.url = initValue.url;this.url2 = initValue.url2;document.domain = this.domain;};ITISInteraction.prototype.createHtml = function() {var forumid = getVar('forumid');var subid = getVar('subid');var topic_id = getVar('topic_id');var mode = getVar("mode");var post_id = getVar('post_id');var sf_flag = getVar('sf_flag');var pagelast = getVar('pagelast');var consultType = getVar('consultType');var param = '';var html = '';if (post_id != '') {forumid = getVar('forum_id');subid = getVar('sub_id');topic_id = getVar('topic_id');mode = getVar("mode");replylink = getVar("replylink");sf_strprosecute_id = getVar("sf_strprosecute_id");param = '?forum_id=' + forumid + '&sub_id=' + subid + '&topic_id=' + topic_id + '&mode=' + mode + '&post_id=' + post_id + '&sf_strprosecute_id=' + sf_strprosecute_id;if (replylink != '')param = param + '#replylink';html = '
';}else if (forumid != '' && topic_id != '' && mode != '') {param = '?forumid=' + forumid + '&subid=' + subid + '&topic_id=' + topic_id + '&mode=' + mode;if (pagelast != '')param += '&pagelast=' + pagelast ;if (consultType != '')param += '&consultType=' + consultType ;html = '';}else if (forumid != '' && subid != '' && mode == '') {param = '?forumid=' + forumid + '&subid=' + subid + '&sf_flag=' + sf_flag;html = '';}else {param = '&sf_flag=' + sf_flag;html = '';}html += '';document.write(html);};ITISInteraction.prototype.setIframeHeight = function() {if (is_ie()) {var dom = window.frames[this.name];var obj = document.getElementById(this.name);obj.height = dom.document.getElementById("bodyScrollHeight").value;}else {var obj = document.getElementById(this.name);obj.height = obj.contentDocument.getElementById("bodyScrollHeight").value;}};ITISInteraction.prototype.getWebUrl = function(){var obj = document.getElementById("weburl");if(obj){return obj.value;}else{return '';}};ITISInteraction.prototype.setIframeUrl = function(url){var obj = document.getElementById(this.name);obj.src = url;};function is_ie() {if (navigator.appName.indexOf("Microsoft") != -1){return true;}else{return false;}}var it = new ITISInteraction({domain:'iek.org.tw', url: 'https://iekweb2.iek.org.tw/interaction/Client/itisinteraction.ashx/../forums.aspx?forumid=46&subid=', url2: 'https://iekweb2.iek.org.tw/interaction/Client/itisinteraction.ashx/../forums.aspx', instanceName:'interaction'});it.createHtml();function setIframeHeight(){if(it){it.setIframeHeight();}}function getWebUrl(){if(it){return it.getWebUrl();}}function getVar(name){get_string = document.location.search;return_value = '';do {name_index = get_string.indexOf(name + '=');if(name_index != -1){get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index);end_of_value = get_string.indexOf('&');if(end_of_value != -1){value = get_string.substr(0, end_of_value);}else{value = get_string;}if(return_value == '' || value == ''){return_value += value;}else{return_value += ', ' + value;}}} while(name_index != -1)space = return_value.indexOf('+');while(space != -1){return_value = return_value.substr(0, space) + ' ' + return_value.substr(space + 1, return_value.length);space = return_value.indexOf('+');}return (return_value);}