pagecode.js
1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var prmStr = window.location.search;
var pagecode = -1;
var sid = -1;
if(prmStr != ""){
prmStr = prmStr.substring(1);
var prmArr = prmStr.split("&");
for(var i=0; i < prmArr.length; i++){
var prmKey = prmArr[i].split("=")[0];
switch(prmKey){
case "pagecode":
pagecode = prmArr[i].split("=")[1];
break;
case "sid":
sid = prmArr[i].split("=")[1];
break;
}
}
}
var paramStr = "?encrypted=0";
if(pagecode != -1){
paramStr = paramStr + '&pagecode=' + pagecode;
}
if(sid != -1){
paramStr = paramStr + '&sid=' + sid;
}
function preOpenMain(){
if(pagecode != -1 && sid != -1){
WindowOpenMain(1000,670,'_blank',{'resizable':'yes','pagecode':pagecode,'sid':sid});
}else if(pagecode == -1 && sid != -1){
WindowOpenMain(1000,670,'_blank',{'resizable':'yes','sid':sid});
}else if(pagecode != -1 && sid == -1){
WindowOpenMain(1000,670,'_blank',{'resizable':'yes','pagecode':pagecode});
}else{
WindowOpenMain(1000,670,'_blank',{'resizable':'yes'});
}
}