📄 gssmethods.js
字号:
if(typeof(g_gssCookieDomain) != "undefined") {
if(g_gssCookieDomain.length > 0) {
if(document.domain.indexOf(".com") > -1) {
document.domain = g_gssCookieDomain;
}
}
}
var srchUIratio = 0.5;
if(fetchcookieval("gss_srchscroll") != "blank") srchUIratio = parseFloat(fetchcookieval("gss_srchscroll"));
var srchheightlimit = 100;
var scaleswitch = false;
var staticheight = 159+55+21;
var min_pane_height = 20;
var mouse_y = -1;
function calcscaleon(){
top.scaleswitch = true;
document.body.style.cursor = "n-resize";
if(event && event.clientY){
mouse_y = event.clientY;
}
}
function calcscaleoff(){
document.body.style.cursor = "";
top.scaleswitch = false;
}
if(document.getElementById){
document.onmouseup = calcscaleoff;
document.onmousemove = scalesrch;
document.onselectstart = cancelselect;
}
function scalesrch(){
if(top.scaleswitch && document.getElementById){
document.body.style.cursor = "n-resize";
var yloc = event.clientY;
if(!document.getElementById("previewdiv")) yloc += 180 + top.sharedheight - top.pheight;
if(top.mouse_y < 0) top.mouse_y = yloc;
if(top.mouse_y != yloc){
diffr = yloc - top.mouse_y;
top.pheight = Math.ceil(top.sharedheight*(top.srchUIratio));
top.pheight = top.pheight - diffr;
if(top.pheight <= min_pane_height) top.pheight = min_pane_height;
else if(top.pheight >= top.sharedheight-min_pane_height) top.pheight = top.sharedheight-min_pane_height;
else top.mouse_y = yloc;
top.srchUIratio = top.pheight/top.sharedheight;
top.calcsearchdivsizes();
setcookieval("gss_srchscroll", top.srchUIratio);
}
}
}
function cancelselect(){
if(top.scaleswitch){
return false;
}
}
function gss_handlesurvey(surveyurl, freq, expiration, properties){
now = new Date();
firesurvey = false;
if(fetchcookieval("gss_survey") == "blank") firesurvey = true;
else{
then = new Date(fetchcookieval("gss_survey"));
if((now.valueOf() - then.valueOf()) > (expiration*24*60*60*1000)) firesurvey = true;
}
if(firesurvey){
if(Math.random() < (1/freq)){
surveywin = window.open(surveyurl, "surveywin", properties);
setcookieval("gss_survey", now.toString());
surveywin.focus();
}
}
}
function gss_drawselectlist(parentobj, childobj){
if(failure==0){
if(parentobj != ""){
if(parentobj.type.toLowerCase().indexOf("select") > -1) catalognum = parentobj.selectedIndex;
else catalognum = 0;
}else catalognum = 0;
var arraylen = eval(childobj.name+catalognum+'.length;');
if(document.all){
while(childobj.children.length > 0){
for(i=0;i<childobj.children.length;i++){
childobj.remove(childobj.children[i]);
}
}
}else{
for(i=0;i<childobj.options.length;i++){
childobj.options[i] = null;
}
}
var selectedIndex = 0;
var makeselect = true;
if(parentobj != ""){
if(parentobj.type.toLowerCase().indexOf("select") > -1){
if(parentobj.options[catalognum].value.indexOf("PRODLISTSRC=OFF") > -1) makeselect = false;
}else if(parentobj.type.toLowerCase().indexOf("hidden") > -1){
if(parentobj.value.indexOf("PRODLISTSRC=OFF") > -1) makeselect = false;
}
}
if(makeselect){
for(i=0;i<arraylen;i++){
tempstr = eval(childobj.name+catalognum+'['+i+']');
eval("if("+childobj.name+catalognum+"default > 0) selectedIndex = "+i+";");
eval("childobj.options[i] = new Option(\""+tempstr+"\")");
childobj.disabled = false;
}
}else{
childobj.options[0] = new Option("", "");
selectedIndex = 0;
childobj.disabled = true;
}
}
childobj.options[selectedIndex].selected = true;
}
function gss_fixMetrixUrl(){
if(sUrl){
var dg = "1F4FC18C-F71E-47fb-8FC9-612F8EE59C61";
var cv;
var p1 = "guid=";
var p2 = "&guid=";
var gl = 32;
cv = fetchcookieval("MC1").toLowerCase();
if(cv == "blank") cv = fetchcookieval("MC2").toLowerCase();
if(cv != "blank"){
if(cv.substr(0,p1.length) == p1) dg = cv.substr(p1.length, gl);
else if(cv.indexOf(p2) > -1) dg = cv.substr(cv.indexOf(p2) + p2.length, gl);
}
sUrl = sUrl + "&guid=" + dg
document.images["metrixgif"].src = sUrl
}
}
function faqswitch(idnum){
if(document.getElementById){
if(document.getElementById("faqdiv"+idnum)){
if(document.getElementById("faqdiv"+idnum).style.display == "none"){
document.getElementById("faqdiv"+idnum).style.display = "";
if(document.getElementById("faqplus"+idnum)){document.getElementById("faqplus"+idnum).style.display = "none";}
if(document.getElementById("faqminus"+idnum)){document.getElementById("faqminus"+idnum).style.display = "";}
if(document.getElementById("chevdown"+idnum)){document.getElementById("chevdown"+idnum).style.display = "none";}
if(document.getElementById("chevup"+idnum)){document.getElementById("chevup"+idnum).style.display = "";}
}else{
document.getElementById("faqdiv"+idnum).style.display = "none";
if(document.getElementById("faqplus"+idnum)){document.getElementById("faqplus"+idnum).style.display = "";}
if(document.getElementById("faqminus"+idnum)){document.getElementById("faqminus"+idnum).style.display = "none";}
if(document.getElementById("chevdown"+idnum)){document.getElementById("chevdown"+idnum).style.display = "";}
if(document.getElementById("chevup"+idnum)){document.getElementById("chevup"+idnum).style.display = "none";}
}
}
}
}
function gss_hidefaqs(){
if(document.getElementsByTagName){
var divarray = new Array();
divarray = document.getElementsByTagName("div");
for(i=0; i<divarray.length; i++){
if(divarray[i].id){
if(divarray[i].id.indexOf("faqdiv") > -1){
if(divarray[i].style.display != "none"){
faqswitch(divarray[i].id.replace("faqdiv", ""));
}
}
}
}
}
}
function gss_focusToc(focusid){
if(document.getElementById("faq"+focusid)) top.location.href = top.location.href + "#faq" + focusid ;
}
function gss_HideCategoryToc(clid){
if(document.getElementById("faq"+clid)){
if(document.getElementsByTagName){
var faqarray = new Array();
faqarray = document.getElementsByTagName("div");
for(i=0;i<faqarray.length;i++)
{
if(faqarray[i].className == "faqcontainer"){faqarray[i].style.display = "none";}
}
if(document.getElementById("faq"+clid).style.display == "none") document.getElementById("faq"+clid).style.display = "";
if(document.getElementById("toc")){
document.getElementById("toc").style.display = "none";
}
if(typeof(document.faqform.faqsection) != "undefined") {
var el = document.faqform.faqsection.options;
for(i = 0; i < el.length; i++) {
if(el[i].value == "faq"+clid) {
el[i].selected = true;
}
}
}
}
}
}
function clickExpandCollapse(){
if(document.getElementsByTagName){
var faqarray = new Array();
faqarray = document.getElementsByTagName("div");
for(i=0; i<faqarray.length; i++){
if(faqarray[i].id.substring(0,6) == "faqdiv"){
if(document.getElementById("ExpandCollapse").innerHTML == "+ Show All"){if(faqarray[i].style.display == "none") faqswitch(faqarray[i].id.substring(6,faqarray[i].id.length));}
else{if(faqarray[i].style.display == "") faqswitch(faqarray[i].id.substring(6,faqarray[i].id.length));}
}
}
if(document.getElementById("ExpandCollapse").innerHTML == "+ Show All"){
document.getElementById("ExpandCollapse").innerHTML="- Hide All";
}else{
document.getElementById("ExpandCollapse").innerHTML="+ Show All";
}
}
}
var shownsection = 0;
function sortfaq(){
if(document.getElementsByTagName){
var faqarray = new Array();
faqarray = document.getElementsByTagName("div");
shownsection = document.faqform.faqsection.selectedIndex;
if(document.faqform.faqsection.selectedIndex < 1){
for(i=0;i<faqarray.length;i++){
if(faqarray[i].className == "faqswitches"){faqarray[i].style.display = "";}
if(faqarray[i].className == "faqcontainer"){faqarray[i].style.display = "";}
if(faqarray[i].className == "faqbody"){faqarray[i].style.display = "";}
}
}else{
for(i=0;i<faqarray.length;i++){
if(faqarray[i].className == "faqcontainer"){faqarray[i].style.display = "none";}
if(faqarray[i].className == "faqswitches"){faqarray[i].style.display = "none";}
}
var elem = document.getElementById(document.faqform.faqsection.options[document.faqform.faqsection.selectedIndex].value);
elem.style.display = "";
var idnum = elem.id.substring(3, elem.id.length);
if(document.getElementById("faqdiv"+idnum).style.display == "none") document.getElementById("faqdiv"+idnum).style.display = "" ;
//if(document.getElementById("faqdiv"+idnum).style.display == "none") faqswitch(idnum);
}
}
}
function sortNonProdfaq(clid){
if(document.getElementById("faq"+clid))
{
if(document.getElementsByTagName){
var faqarray = new Array();
faqarray = document.getElementsByTagName("div");
for(i=0;i<faqarray.length;i++){
if(faqarray[i].className == "faqcontainer"){faqarray[i].style.display = "none";}
if(faqarray[i].className == "faqswitches"){faqarray[i].style.display = "none";}
}
var elem = document.getElementById("faq"+clid);
elem.style.display = "";
if(document.getElementById("faqdiv"+clid).style.display == "none") faqswitch(clid);
shownsection = parseInt(clid);
}
}
}
function switchstate(sourcetag, targettag, nocookie){
if(document.body.innerHTML){
var objexists = true;
eval("if(!"+sourcetag+") objexists = false;");
if(objexists == true){
eval(targettag+".innerHTML = "+sourcetag+".innerHTML");
if(nocookie != "1") document.cookie = targettag+"="+sourcetag+"; expires=Fri, 31 Dec 2002 23:59:59 GMT; path=/";
}
}
}
function loadstate(spanid){
if(document.getElementById){
if(fetchcookieval(spanid+"sw") == "0") document.getElementById(spanid).style.display = 'none';
if(fetchcookieval(spanid+"sw") == "1") document.getElementById(spanid).style.display = '';
}
return true;
}
function fetchcookieval(key){
var cookiename;
var cookieval;
var keyfound = false;
var cookiearray = document.cookie.split(";")
for(i=0;i<cookiearray.length;i++){
cookiename = cookiearray[i].substring(0, cookiearray[i].indexOf("="));
if(cookiename.charAt(0) == " ") cookiename = cookiename.substring(1, cookiename.length);
cookieval = cookiearray[i].substring(cookiearray[i].indexOf("=")+1, cookiearray[i].length);
if(key == cookiename){keyfound = true; break;}
}
if(keyfound) return cookieval;
else return "blank";
}
function setcookieval(key, val){
if(typeof(g_gssCookieDomain) != "undefined") {
if(document.domain.indexOf(".com") > -1) {
document.domain = g_gssCookieDomain;
}
document.cookie = key+'='+val+'; expires=Fri, 31 Dec 2002 23:59:59 GMT; Domain=' + g_gssCookieDomain + '; path=/';
} else {
document.cookie = key+'='+val+'; expires=Fri, 31 Dec 2002 23:59:59 GMT; path=/';
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -