$(function () {
function gmenustylepage() {
if (!!this.domenustyle && this.domenustyle === 1) {
return '';
}
this.domenustyle = 1;
$("#g-web-ul-menu").menustyle();
}
gmenustylepage();
var n = 0;
$(window).resize(function () {
this.domenustyle = 0;
if (navigator.appname == "microsoft internet explorer" && (navigator.appversion.split(";")[1].replace(/[ ]/g, "") == "msie7.0" || navigator.appversion.split(";")[1].replace(/[ ]/g, "") == "msie8.0")) {
if (n % 2 == 0) {
this.domenustyle = 1;
gmenustylepage();
}
n++;
} else {
gmenustylepage();
}
});
$(".w-system-in").addclass("clearfix");
});
function substrkeywordinfo(keyword) {
if (keyword.length < 1) {
return keyword;
}
var _keyword = $(".input-search-w").val();
var html = "";
var issearch = true;
for (var i = 0; i < keyword.length; i++) {
if (keyword[i] == '<') {
issearch = false;
html += keyword[i];
continue;
}
if (issearch == false && keyword[i] == '>') {
issearch = true;
html += keyword[i];
continue;
}
if (issearch == false) {
html += keyword[i];
} else {
var str = keyword[i];
if (str == _keyword[0]) {
var k = i;
var isfull = false;
for (var j = 0; j < _keyword.length; j++, k++) {
if (keyword[k] == _keyword[j]) {
isfull = true;
} else {
isfull = false;
break;
}
}
if (isfull == true) {
i = k;
str = "" + _keyword + "";
}
}
html += str;
}
}
return html;
}
function substrkeyword(keyword) {
if (keyword.length < 1) {
return keyword;
}
function htmlspecialchars(string, quotestyle, charset, doubleencode) {
var opttemp = 0
var i = 0
var noquotes = false
if (typeof quotestyle === 'undefined' || quotestyle === null) {
quotestyle = 2
}
string = string || ''
string = string.tostring()
if (doubleencode !== false) {
// put this first to avoid double-encoding
string = string.replace(/&/g, '&')
}
string = string
.replace(//g, '>')
var opts = {
'ent_noquotes': 0,
'ent_html_quote_single': 1,
'ent_html_quote_double': 2,
'ent_compat': 2,
'ent_quotes': 3,
'ent_ignore': 4
}
if (quotestyle === 0) {
noquotes = true
}
if (typeof quotestyle !== 'number') {
// allow for a single string or an array of string flags
quotestyle = [].concat(quotestyle)
for (i = 0; i < quotestyle.length; i++) {
// resolve string input to bitwise e.g. 'ent_ignore' becomes 4
if (opts[quotestyle[i]] === 0) {
noquotes = true
} else if (opts[quotestyle[i]]) {
opttemp = opttemp | opts[quotestyle[i]]
}
}
quotestyle = opttemp
}
if (quotestyle & opts.ent_html_quote_single) {
string = string.replace(/'/g, ''')
}
if (!noquotes) {
string = string.replace(/"/g, '"')
}
return string
}
function htmlspecialchars_decode(string, quotestyle) {
var opttemp = 0
var i = 0
var noquotes = false
if (typeof quotestyle === 'undefined') {
quotestyle = 2
}
string = string.tostring()
.replace(/</g, '<')
.replace(/>/g, '>')
var opts = {
'ent_noquotes': 0,
'ent_html_quote_single': 1,
'ent_html_quote_double': 2,
'ent_compat': 2,
'ent_quotes': 3,
'ent_ignore': 4
}
if (quotestyle === 0) {
noquotes = true
}
if (typeof quotestyle !== 'number') {
// allow for a single string or an array of string flags
quotestyle = [].concat(quotestyle)
for (i = 0; i < quotestyle.length; i++) {
// resolve string input to bitwise e.g. 'pathinfo_extension' becomes 4
if (opts[quotestyle[i]] === 0) {
noquotes = true
} else if (opts[quotestyle[i]]) {
opttemp = opttemp | opts[quotestyle[i]]
}
}
quotestyle = opttemp
}
if (quotestyle & opts.ent_html_quote_single) {
// php doesn't currently escape if more than one 0, but it should:
string = string.replace(/*39;/g, "'")
// this would also be useful here, but not a part of php:
// string = string.replace(/'|*27;/g, "'");
}
if (!noquotes) {
string = string.replace(/"/g, '"')
}
// put this in last place to avoid escape being double-decoded
string = string.replace(/&/g, '&')
return string
}
var _keyword = htmlspecialchars(htmlspecialchars_decode($(".input-search-w").val()));
keyword = htmlspecialchars(htmlspecialchars_decode(keyword));
return keyword.replace(_keyword, "" + _keyword + "");
}
function inputkeyword(string) {
function htmlspecialchars(string, quotestyle, charset, doubleencode) {
var opttemp = 0
var i = 0
var noquotes = false
if (typeof quotestyle === 'undefined' || quotestyle === null) {
quotestyle = 2
}
string = string || ''
string = string.tostring()
if (doubleencode !== false) {
// put this first to avoid double-encoding
string = string.replace(/&/g, '&')
}
string = string
.replace(//g, '>')
var opts = {
'ent_noquotes': 0,
'ent_html_quote_single': 1,
'ent_html_quote_double': 2,
'ent_compat': 2,
'ent_quotes': 3,
'ent_ignore': 4
}
if (quotestyle === 0) {
noquotes = true
}
if (typeof quotestyle !== 'number') {
// allow for a single string or an array of string flags
quotestyle = [].concat(quotestyle)
for (i = 0; i < quotestyle.length; i++) {
// resolve string input to bitwise e.g. 'ent_ignore' becomes 4
if (opts[quotestyle[i]] === 0) {
noquotes = true
} else if (opts[quotestyle[i]]) {
opttemp = opttemp | opts[quotestyle[i]]
}
}
quotestyle = opttemp
}
if (quotestyle & opts.ent_html_quote_single) {
string = string.replace(/'/g, ''')
}
if (!noquotes) {
string = string.replace(/"/g, '"')
}
return string
}
function htmlspecialchars_decode(string, quotestyle) {
var opttemp = 0
var i = 0
var noquotes = false
if (typeof quotestyle === 'undefined') {
quotestyle = 2
}
string = string.tostring()
.replace(/</g, '<')
.replace(/>/g, '>')
var opts = {
'ent_noquotes': 0,
'ent_html_quote_single': 1,
'ent_html_quote_double': 2,
'ent_compat': 2,
'ent_quotes': 3,
'ent_ignore': 4
}
if (quotestyle === 0) {
noquotes = true
}
if (typeof quotestyle !== 'number') {
// allow for a single string or an array of string flags
quotestyle = [].concat(quotestyle)
for (i = 0; i < quotestyle.length; i++) {
// resolve string input to bitwise e.g. 'pathinfo_extension' becomes 4
if (opts[quotestyle[i]] === 0) {
noquotes = true
} else if (opts[quotestyle[i]]) {
opttemp = opttemp | opts[quotestyle[i]]
}
}
quotestyle = opttemp
}
if (quotestyle & opts.ent_html_quote_single) {
// php doesn't currently escape if more than one 0, but it should:
string = string.replace(/*39;/g, "'")
// this would also be useful here, but not a part of php:
// string = string.replace(/'|*27;/g, "'");
}
if (!noquotes) {
string = string.replace(/"/g, '"')
}
// put this in last place to avoid escape being double-decoded
string = string.replace(/&/g, '&')
return string
}
return htmlspecialchars(htmlspecialchars_decode(string));
}