TheMonkeyKing |
Beginner |
|
|
Joined: Nov 12, 2013 |
Posts: 2 |
|
|
|
|
|
|
|
Code: | var showPop = 1;
function clearSearchText(a) {
a.value = "";
a.select()
}
function replaceString(a, c, b) {
return a.replace(c, b, "g")
}
function submitSearch(c, b, a) {
a = a + generateBrowLogURL("srcqry");
d = document.forms[c];
if ((d.elements.q.value.length == 0) || (d.elements.q.value == "Enter Keyword")) {
alert("Please enter a search keyword !");
d.elements.q.focus();
return false
} else {
if (checkValidURLChars(d.elements.q.value)) {
newstr = d.elements.q.value;
newstr = getEscapedString(newstr);
d.action = "/display.cfm?s=" + newstr + "&" + a + "&kt=" + b
} else {
newstr = d.elements.q.value;
newstr = getEscapedString(newstr);
d.action = "/" + newstr + ".cfm?" + a + "&kt=" + b
}
} if (typeof (d) != "undefined") {
d.target = "_top"
}
return true
}
function is_ie6() {
return ((window.XMLHttpRequest == undefined) && (ActiveXObject != undefined) && /msie|MSIE 6/.test(navigator.userAgent))
}
function sendRequest(f, e) {
showPop = 0;
return true;
}
function changeStatus(a) {
return true
}
function addbookmark(a) {
return (false)
}
function setAsHomePage(a, b) {
return (false)
}
function getDate() {
var b = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var a = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var g = new Date();
var e = g.getYear();
if (e < 1000) {
e += 1900
}
var j = g.getDay();
var f = g.getMonth();
var h = g.getDate();
if (h < 10) {
h = "0" + h
}
var c = b[j] + ", " + a[f] + " " + h + ", " + e;
document.write(c)
}
function checkUTFChar(c) {
var a = true;
var e;
for (e = 0; e < 128; ++e) {
var b = e.toString(16);
if (b.length == 1) {
b = "0" + b
}
b = "%" + b;
b = unescape(b);
if (b == c) {
a = false;
break
}
}
return a
}
function checkValidURLChars(c) {
var b, a;
if (c == "") {
return (false)
}
if (c.match(/[#&]/)) {
return (true)
}
a = c.length;
for (intCur = 0; intCur < a; intCur++) {
chrValue = c.charAt(intCur);
b = checkUTFChar(chrValue);
if (b == true) {
break
}
}
return b
}
function getEscapedString(e) {
var b;
var a;
var c;
c = "";
if (e == "") {
return (e)
}
a = e.length;
for (intCur = 0; intCur < a; intCur++) {
chrValue = e.charAt(intCur);
b = checkUTFChar(chrValue);
if (b == true) {
c = c + chrValue
} else {
if (chrValue == " ") {
chrValue = "_"
}
c = c + escape(chrValue)
}
}
return c
}
function relplaceAllALinks(b) {
try {
links = window.document.getElementsByTagName("A");
links_len = links.length;
for (i = 0; i < links_len; i++) {
if (links[i].href.match(b)) {
tempData = links[i].innerHTML;
modifyKeywordClickURL(links[i], "olod");
links[i].innerHTML = tempData
}
}
} catch (a) {}
}
function modifyKeywordClickURL(a, b) {
a.href = a.href + generateBrowLogURL(b);
if (typeof prctu != "undefined" && prctu.length > 0) {
a.href = prctu + getEscapedString(a.href)
}
return true
}
function generateBrowLogURL(c) {
var a = "";
try {
if (typeof br_data == "undefined" || !br_data) {
br_data = new brdata()
}
if (c == "kwclk") {
a = escape(br_data.getMousePositionData())
} else {
if (c == "adclk" || c == "srcqry") {
a = "&bd=" + escape(br_data.getSearchBoxRelatedData())
} else {
a = "&bd=" + escape(br_data.getURLBrowserData())
}
}
} catch (b) {}
return a
}
var brdata = function () {
this.fd = "#", this.cookieSupport = -1, this.isinframe = -1, this.browserdata = "", this.getLocalTimeZone = function () {
return (new Date()).getTimezoneOffset() / 60 * (-1)
}, this.getScreenHeight = function () {
return screen.height
}, this.getScreenWidth = function () {
return screen.width
}, this.calledInExternalFrame = function () {
return "n"
}, this.isCookieSupported = function () {
if (this.cookieSupport == -1) {
var a = navigator.cookieEnabled || false;
if (typeof navigator.cookieEnabled == "undefined" && !a) {
document.cookie = "skck";
a = (document.cookie.indexOf("skck") != -1) ? true : false
}
}
return this.cookieSupport
}, this.getURLBrowserData = function () {
if (this.browserdata == "") {
this.browserdata = this.getLocalTimeZone().toString() + this.fd + this.getScreenHeight() + this.fd + this.getScreenWidth() + this.fd + ((this.isCookieSupported()) ? 1 : 0).toString() + this.fd + (this.calledInExternalFrame()).toString()
}
return this.browserdata
}, this.getMousePositionData = function () {
return this.fd + mX + this.fd + mY
}, this.getSearchBoxRelatedData = function () {
return this.getURLBrowserData() + this.getMousePositionData()
}
};
function confirmToOptOut() {
optOut = confirm("You will not be able to see any ads or websearches.");
if (optOut) {
var b = new Date();
b.setTime(b.getTime() + (365 * 24 * 60 * 60 * 1000));
var a = "; expires=" + b.toGMTString();
document.cookie = "ootk=1" + a + "; path=/";
window.location.reload()
}
}
var mX = 0,
mY = 0,
br_data = false;
document.onmousemove = mPos;
function mPos(a) {
try {
mX = (window.Event) ? a.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
mY = (window.Event) ? a.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)
} catch (a) {}
return true
}
var _skPU = {
_Top: null,
_wh: function () {
var b = 0;
try {
if (typeof (this._Top.window.innerHeight) == "number") {
b = this._Top.window.innerHeight
} else {
if (this._Top.document.documentElement && this._Top.document.documentElement.clientHeight) {
b = this._Top.document.documentElement.clientHeight
} else {
if (this._Top.document.body && this._Top.document.body.clientHeight) {
b = this._Top.document.body.clientHeight
}
}
}
} catch (a) {
b = 0
}
return b
},
_ww: function () {
var a = 0;
try {
if (typeof (this._Top.window.innerWidth) == "number") {
a = this._Top.window.innerWidth
} else {
if (this._Top.document.documentElement && this._Top.document.documentElement.clientWidth) {
a = this._Top.document.documentElement.clientWidth
} else {
if (this._Top.document.body && this._Top.document.body.clientWidth) {
a = this._Top.document.body.clientWidth
}
}
}
} catch (b) {
a = 0
}
return a
},
_wt: function () {
return ((this._Top) ? ((this._Top.window.screenTop != undefined) ? this._Top.window.screenTop : this._Top.window.screenY) : 0)
},
_wl: function () {
return ((this._Top) ? ((this._Top.window.screenLeft != undefined) ? this._Top.window.screenLeft : this._Top.window.screenX) : 0)
},
doPU: function (url, pw, ph, npf, dr) {
if (!this._Top) {
this._Top = self;
if (top != self) {
try {
if (top.document.location.toString()) {
this._Top = top
}
} catch (e) {}
}
}
var _npSU = ((dr) ? url : "about:blank");
var _npID = "pu_" + Math.floor(89999999 * Math.random() + 10000000);
var pxLeft = 0;
var pxTop = 0;
if (pw == -1) {
pw = this._ww()
}
if (ph == -1) {
ph = this._wh()
}
pxLeft = (this._wl() + (this._ww() / 2) - (pw / 2));
pxTop = (this._wt() + (this._wh() / 2) - (ph / 2));
if (!npf) {
npf = "toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1"
}
var _npW = this._Top.window.open(_npSU, _npID, npf + ",top=" + pxTop + ",left=" + pxLeft + ",width=" + pw + ",height=" + ph);
if (_npW) {
_npW.blur();
if (navigator.userAgent.toLowerCase().indexOf("applewebkit") > -1) {
this._Top.window.blur();
this._Top.window.focus()
}
_npW.Init = function (e) {
with(e) {
Params = e.Params;
Main = function () {
if (typeof window.mozPaintCount != "undefined") {
var x = window.open("about:blank");
if (x) {
x.close()
}
}
var dUrl = Params.dUrl;
try {
if (navigator.userAgent.toLowerCase().indexOf("msie") < 1) {
opener.window.focus()
}
} catch (err) {}
if (!dr) {
window.location = dUrl
}
};
Main()
}
};
_npW.Params = {
dUrl: url
};
_npW.Init(_npW)
}
return _npW
}
};
function renderFACP(a) {
if (a == "ex") {
return false
}
if (showPop == 1 && typeof (__pp) != "undefined" && typeof (__pp.FACP) != "undefined" && __pp.FACP.pd == false) {
try {
if (!a) {
var a = window.event || window.Event;
a.cancelBubble = true
}
if (a.button && a.button == 2) {
return false
}
if (typeof (__pp.FACP.u) != "undefined" && __pp.FACP.u.length > 0) {
__pp.FACP.pd = true;
__pp.FACP.u = __pp.FACP.u + generateBrowLogURL("adclk");
_skPU.doPU(__pp.FACP.u, __pp.FACP.w, __pp.FACP.h, __pp.FACP.p, (a == "ex"));
showPop = 0;
return true
}
} catch (a) {
__pp.FACP.pd = true;
return false
}
} else {
return false
}
}
function atevt() {
if (document.addEventListener) {
document.addEventListener("click", ppctrl, false)
} else {
if (document.attachEvent) {
document.attachEvent("onclick", ppctrl)
} else {
document.onclick = ppctrl
}
}
}
function ppctrl(a) {
try {
if (!a) {
var a = window.event || window.Event;
}
var s = a.srcElement || a.target;
if (s.tagName && s.tagName == "INPUT") {
if (s.attributes["type"] && s.attributes["type"].value != "text") {
if (typeof (showPop) != 'undefined') showPop = 0;
}
return false;
}
if (showPop == 1 && !renderFACP(a)) {
shpp(a)
}
} catch (e) {}
}
function shpp(c) {
if (typeof (__pp) != "undefined" && showPop == 1 && !renderFACP(c)) {
try {
if (!c) {
var c = window.event || window.Event;
c.cancelBubble = true
}
if (c.button && c.button == 2) {
return
}
try {
var b = false;
if (isIE()) {
b = shdsp(c)
}
if (!b) {
if (typeof (__pp.kp) != "undefined" && typeof (__pp.kp.u) != "undefined" && __pp.kp.u && __pp.kp.u.length > 0 && __pp.kp.pd == false) {
__pp.kp.pd = true;
if (c == "ex") {
__pp.kp.u = __pp.kp.u + "&_onx_=1"
}
_skPU.doPU(__pp.kp.u, __pp.kp.w, __pp.kp.h, __pp.kp.p, (c == "ex"))
}
}
} catch (a) {}
if (c == "ex") {
shmsc(c)
} else {
shdsp(c)
}
} catch (a) {}
}
}
function shmsc(c) {
if (typeof (__pp) != "undefined") {
try {
if (typeof (__pp.ms) != "undefined" && typeof (__pp.ms.u) != "undefined" && __pp.ms.u) {
var b = __pp.ms.u.length;
for (var a = 0; a < b; a++) {
if (__pp.ms.u[a]) {
_skPU.doPU(__pp.ms.u[a], -1, -1, __pp.ms.p, true)
}
}
}
} catch (c) {}
}
}
function shdsp(a) {
try {
if (typeof (__pp.dp) != "undefined" && typeof (__pp.dp.u) != "undefined" && __pp.dp.u && __pp.dp.u.length > 0 && __pp.dp.pd == false) {
__pp.dp.pd = true;
_skPU.doPU(__pp.dp.u, __pp.dp.w, __pp.dp.h, __pp.dp.p, (a == "ex"));
return true
}
return false
} catch (a) {
return false
}
}
function isIE() {
var b = false;
try {
b = /msie|MSIE/.test(navigator.userAgent)
} catch (a) {}
return b
}; |
|
|