function cpmst_WriteAdsFlashGame(cpm_t, cpm_s, cpm_B, cpm_C, cpm_G, cpm_l) { var cpm_p; var status = 0; var div; div = document.createElement("div"); div.id = "divOnFlash"; div.style.position = "absolute"; div.style.display = "block"; document.body.appendChild(div); var cpm_E = ''; cpm_a('divOnFlash').style.top = (cpm_a('_game').offsetTop) + 'px'; if (cpm_a('_game')) { cpm_a('_game').style.cssText = 'margin: 0px auto;width:' + cpm_t + 'px'; } if (cpm_a('flash_0.7055475')) { cpm_a('divOnFlash').style.left = cpm_a('flash_0.7055475').offsetLeft + 'px'; cpm_a('divOnFlash').style.width = cpm_a('flash_0.7055475').offsetWidth + 'px'; } else { cpm_a('divOnFlash').style.left = cpm_a('_game').offsetLeft + 'px'; cpm_a('divOnFlash').style.width = cpm_a('_game').offsetWidth + 'px'; } cpm_a('divOnFlash').style.height = $(document).height() + 'px'; cpm_a('divOnFlash').style.overflow = 'hidden'; cpm_E = cpm_E.concat('<div style="position:absolute" id="divOnFlash_child">'); cpm_E = cpm_E.concat(cpm_c(cpm_t, cpm_s, cpm_B, cpm_C, cpm_G, cpm_l)); cpm_E = cpm_E.concat('</div>'); cpm_a('divOnFlash').innerHTML = cpm_E; var cpm_n = ($(window).width() - 800) / 2; window.onresize = function() { if (cpm_a('divOnFlash')) { setTimeout(function() { check_parent_ad(); }, 1000); if (cpm_a('flash_0.7055475')) cpm_a('divOnFlash_child').style.left = cpm_a('flash_0.7055475').offsetLeft + 'px'; else cpm_a('divOnFlash_child').style.left = cpm_a('_game').offsetLeft + 'px'; } cpm_a('divOnFlash').style.width = ($(window).width() + 25) + 'px'; } }; function check_parent_ad() { if (parseInt(cpm_a('divOnFlash').offsetLeft) > parseInt(cpm_a('_game').offsetLeft)) { cpm_a('divOnFlash').style.left = parseInt(cpm_a('_game').offsetLeft) + 'px'; } return; }; function cpmst_WriteAdsImageGame(cpm_C, cpm_q, cpm_o, cpm_z, cpm_h, cpm_cpm_d, cpm_k, cpm_j, cpm_f, cpm_i, cpm_g, cpm_e, cpm_v, cpm_u, cpm_y, cpm_F) { var cpm_p; var status = 0; var p = document.getElementById("_game"); var div; var cpm_E = ''; div = document.createElement("div"); div.id = "divOnFlash"; div.style.position = "absolute"; div.style.display = "block"; p.appendChild(div); cpm_a('divOnFlash').style.top = cpm_a('_game').offsetTop + 'px'; cpm_a('divOnFlash').style.left = cpm_a('_game').offsetLeft + 'px'; cpm_a('divOnFlash').style.width = $(document).width() + 'px'; cpm_a('divOnFlash').style.height = $(document).height() + 'px'; cpm_E = cpm_E.concat('<div style="position:absolute" id="divOnFlash_child">'); cpm_E = cpm_E.concat(cpm_b(cpm_C, cpm_q, cpm_o, cpm_z, cpm_h, cpm_cpm_d, cpm_k, cpm_j, cpm_f, cpm_i, cpm_g, cpm_e, cpm_v, cpm_u, cpm_y, cpm_F)); cpm_E = cpm_E.concat('</div>'); cpm_a('divOnFlash').style.width = $(window).width() + 'px'; var cpm_n = ($(window).width() - 800) / 2; window.onresize = function() { if (cpm_a('divOnFlash')) { setTimeout(function() { check_parent_ad(); }, 1000); if (cpm_a('flash_0.7055475')) cpm_a('divOnFlash_child').style.left = cpm_a('flash_0.7055475').offsetLeft + 'px'; else cpm_a('divOnFlash_child').style.left = cpm_a('_game').offsetLeft + 'px'; } cpm_a('divOnFlash').style.width = ($(window).width() + 25) + 'px'; } }; function cpm_a(cpm_A) { if (document.getElementById) { m = document.getElementById(cpm_A) } else if (document.all) { m = document.all[cpm_A] } else if (document.layers) { m = document[cpm_A] } return m; }; function Pupop_default(cpm_m, cpm_x, cpm_w) { cpm_a('_game').style.width = "800px"; var cpm_n = ($(window).width() - 800) / 2; window.moveTo(((screen.height - $(window).height()) / 2) + 60, 0); if (navigator.appVersion.indexOf("MSIE") != -1) window.resizeTo(820, 754); else window.resizeTo(820, 750); cpm_a('divOnFlash').style.width = '800px'; cpm_a('divOnFlash').style.height = '65px'; if (navigator.appVersion.indexOf("MSIE") != -1) { cpm_a('divOnFlash').style.top = (cpm_a('_game').offsetHeight - 10) + 'px'; } else { cpm_a('divOnFlash').style.top = cpm_a('_game').offsetHeight + 'px'; } cpm_a('divOnFlash_child').style.width = '800px'; cpm_a('divOnFlash_child').style.height = '600px'; cpm_a('divOnFlash_child').style.top = '-' + (cpm_a('_game').offsetHeight - 60) + 'px'; }; function cpm_c(cpm_t, cpm_s, cpm_B, cpm_C, cpm_r, cpm_l) { var cpm_D = ''; cpm_D = cpm_D.concat('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http:fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" border="0" width=').concat(cpm_t).concat(' height=').concat(cpm_s).concat('>'); cpm_D = cpm_D.concat('<param name="movie" value="').concat(cpm_B).concat('">'); cpm_D = cpm_D.concat('<param name="AllowScriptAccess" value="always">'); cpm_D = cpm_D.concat('<param name="quality" value="High">'); cpm_D = cpm_D.concat('<param name="wmode" value="transparent">'); cpm_D = cpm_D.concat('<param name="FlashVars" value="').concat('link=').concat(escape(cpm_C)).concat('&zoneid=').concat(cpm_r).concat('&actionTag=').concat(escape(cpm_l)).concat('">'); cpm_D = cpm_D.concat('<embed src="').concat(cpm_B).concat('" FlashVars="').concat('link=').concat(escape(cpm_C)).concat('&zoneid=').concat(cpm_r).concat('&actionTag=').concat(escape(cpm_l)).concat('" pluginspage="http:www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" play="true" loop="true" wmode="transparent" AllowScriptAccess="always" width=').concat(cpm_t).concat(' height=').concat(cpm_s).concat('>'); cpm_D = cpm_D.concat('</object>'); return cpm_D; }; function cpm_b(cpm_C, cpm_q, cpm_o, cpm_z, cpm_h, cpm_cpm_d, cpm_k, cpm_j, cpm_f, cpm_i, cpm_g, cpm_e, cpm_v, cpm_u, cpm_y, cpm_F) { var cpm_D = ''; if (cpm_C != '') { if (cpm_q == 0) { cpm_D = cpm_D.concat('<a href="').concat(cpm_C).concat('"').concat('target="_blank"'); } else { cpm_D = cpm_D.concat('<a href="').concat(cpm_o).concat('"'); cpm_D = cpm_D.concat('clk.aspx?lg=').concat(cpm_q).concat('&t=').concat(cpm_z).concat('&i=').concat(cpm_h); cpm_D = cpm_D.concat('&b=').concat(cpm_cpm_d).concat('&s=').concat(cpm_k); cpm_D = cpm_D.concat('&r=').concat(cpm_j).concat("&c=").concat(cpm_f); cpm_D = cpm_D.concat("&p=").concat(cpm_i).concat("&n=").concat(cpm_g); cpm_D = cpm_D.concat("&l=").concat(cpm_e).concat('"'); cpm_D = cpm_D.concat(' target="_blank">'); } } cpm_D = cpm_D.concat('<img border="0" width="').concat(cpm_v).concat('" height="').concat(cpm_u).concat('" src="').concat(cpm_y).concat(cpm_F).concat('">'); if (cpm_C != '') { cpm_D = cpm_D.concat('</a>'); } } 

function cpms_l(cpms_N) { if (document.getElementById) { m = document.getElementById(cpms_N) } else if (document.all) { m = document.all[cpms_N] } else if (document.layers) { m = document[cpms_N] } return m; }; function cpms_o(cpms_O, cpms_Q) { var p = cpms_Q ? cpms_Q.slice(0) : [0, 0]; while (cpms_O) { p[0] += cpms_O.offsetLeft; p[1] += cpms_O.offsetTop; if (cpms_O.tagName.toUpperCase() == "BODY") break; cpms_O = cpms_O.offsetParent; } return p; }; function cpms_i(cpms_O) { var cpms_G = 0; if (cpms_O.offsetParent) while (1) { cpms_G += cpms_O.offsetLeft; if (!cpms_O.offsetParent) break; cpms_O = cpms_O.offsetParent; } else if (cpms_O.x) cpms_G += cpms_O.x; return cpms_G; }; function cpms_j(cpms_O) { var cpms_H = 0; if (cpms_O.offsetParent) while (1) { cpms_H += cpms_O.offsetTop; if (!cpms_O.offsetParent) break; cpms_O = cpms_O.offsetParent; } else if (cpms_O.y) cpms_H += cpms_O.y; return cpms_H; }; function cpms_stayfloatdiv(id, cpms_I) { if (cpms_l(id + '_direction')) { if (cpms_l(id + '_status') == 1) return; } if (cpms_l(id + '_direction')) { direction = cpms_l(id + '_direction').value; } else { direction = 0; } if (cpms_l(id) && cpms_l(id + '_position')) { var cpms_x = cpms_j(cpms_l(id + '_position')); var cpms_w = cpms_i(cpms_l(id + '_position')); var cpms_v = parseInt(cpms_l(id + '_position').offsetHeight); var cpms_y = parseInt(cpms_l(id + '_position').offsetWidth); var cpms_r = parseInt(cpms_l(id).offsetHeight); var cpms_s = parseInt(cpms_l(id).offsetWidth); if (direction == 0 || direction == 1 || direction == 2) { cpms_l(id).style.top = cpms_x + 'px'; } else if (direction == 6 || direction == 7 || direction == 8) { cpms_l(id).style.top = cpms_x - cpms_r + cpms_v + 'px'; } else { cpms_l(id).style.top = cpms_x + (cpms_v - cpms_r) / 2 + 'px'; } if (direction == 0 || direction == 3 || direction == 6) { cpms_l(id).style.left = cpms_w + 'px'; } else if (direction == 2 || direction == 5 || direction == 8) { cpms_l(id).style.left = cpms_w - cpms_s + cpms_y + 'px'; } else { cpms_l(id).style.left = cpms_w + (cpms_y - cpms_s) / 2 + 'px'; } } if (cpms_I == true) cpms_k(id); setTimeout(function() { cpms_stayfloatdiv(id) }, 100); }; function cpms_k(id) { if (cpms_l(id + '_direction')) { direction = cpms_l(id + '_direction').value; } else { alert(cpms_l(id + '_direction')); direction = 0; } if (cpms_l(id) && cpms_l(id + '_child')) { var cpms_p = parseInt(cpms_l(id + '_child').offsetHeight); var cpms_q = parseInt(cpms_l(id + '_child').offsetWidth); var cpms_z = parseInt(cpms_l(id).offsetHeight); var cpms_A = parseInt(cpms_l(id).offsetWidth); if (direction == 0 || direction == 1 || direction == 2) { cpms_l(id + '_child').style.top = 0 + 'px'; } else if (direction == 6 || direction == 7 || direction == 8) { cpms_l(id + '_child').style.top = cpms_z - cpms_p + 'px'; } else { cpms_l(id + '_child').style.top = (cpms_z - cpms_p) / 2 + 'px'; } if (direction == 0 || direction == 3 || direction == 6) { cpms_l(id + '_child').style.left = 0 + 'px'; } else if (direction == 2 || direction == 5 || direction == 8) { cpms_l(id + '_child').style.left = cpms_A - cpms_q + 'px'; } else { cpms_l(id + '_child').style.left = (cpms_A - cpms_q) / 2 + 'px'; } } }; function cpms_expandbanner(cpms_D, cpms_M, cpms_L) { cpms_l(cpms_D).style.zIndex = '999999'; if (cpms_l(cpms_D + '_position')) { cpms_l(cpms_D).style.height = cpms_L + 'px'; cpms_l(cpms_D).style.width = cpms_M + 'px'; cpms_stayfloatdiv(cpms_D); cpms_k(cpms_D); return; } var cpms_c = parseInt(cpms_l(cpms_D).offsetHeight); var cpms_f = parseInt(cpms_l(cpms_D).offsetWidth); if ((cpms_c < cpms_L - 10) || (cpms_f < cpms_M - 10)) { if (cpms_c < cpms_L - 10) { cpms_l(cpms_D).style.height = cpms_c + 10 + 'px'; } else { cpms_l(cpms_D).style.height = cpms_L + 'px'; } if (cpms_f < cpms_M - 10) { cpms_l(cpms_D).style.width = cpms_f + 10 + 'px'; } else { cpms_l(cpms_D).style.width = cpms_M + 'px'; } cpms_stayfloatdiv(cpms_D); cpms_k(cpms_D); setTimeout(function() { cpms_expandbanner(cpms_D, cpms_M, cpms_L) }, 5); return; } else { cpms_l(cpms_D).style.height = cpms_L + 'px'; cpms_l(cpms_D).style.width = cpms_M + 'px'; cpms_stayfloatdiv(cpms_D); cpms_k(cpms_D); } }; function cpms_collapbanner(cpms_D, cpms_M, cpms_L) { cpms_l(cpms_D).style.zIndex = '99'; if (cpms_l(cpms_D + '_position')) { cpms_l(cpms_D).style.height = cpms_L + 'px'; cpms_l(cpms_D).style.width = cpms_M + 'px'; cpms_stayfloatdiv(cpms_D); cpms_k(cpms_D); return; } var cpms_c = parseInt(cpms_l(cpms_D).offsetHeight); var cpms_f = parseInt(cpms_l(cpms_D).offsetWidth); if ((cpms_c > cpms_L + 10) || (cpms_f > cpms_M + 10)) { if (cpms_c > cpms_L + 10) { cpms_l(cpms_D).style.height = cpms_c - 10 + 'px'; } else { cpms_l(cpms_D).style.height = cpms_L + 'px'; } if (cpms_f > cpms_M + 10) { cpms_l(cpms_D).style.width = cpms_f - 10 + 'px'; } else { cpms_l(cpms_D).style.width = cpms_M + 'px'; } cpms_stayfloatdiv(cpms_D); cpms_k(cpms_D); setTimeout(function() { cpms_collapbanner(cpms_D, cpms_M, cpms_L) }, 5); return; } else { cpms_l(cpms_D).style.height = cpms_L + 'px'; cpms_l(cpms_D).style.width = cpms_M + 'px'; cpms_stayfloatdiv(cpms_D); cpms_k(cpms_D); } }; function cpms_expandslideselfbanner(cpms_D, cpms_M, cpms_L) { cpms_l(cpms_D).style.zIndex = '999999'; cpms_m(cpms_D, cpms_M, cpms_L); }; function cpms_collapslideselfbanner(cpms_D, cpms_M, cpms_L) { cpms_l(cpms_D).style.zIndex = '99'; cpms_n(cpms_D, cpms_M, cpms_L); }; function cpms_m(cpms_d, cpms_M, cpms_L) { if (cpms_l("divMove").style.display == "block") { return; } cpms_E = setInterval("cpms_a(" + cpms_M + "," + cpms_L + ",'" + cpms_d + "')", 50); }; function cpms_n(cpms_d, cpms_M, cpms_L) { if (cpms_l("divMove").style.display == "block") { return; } cpms_E = setInterval("cpms_b(" + cpms_M + "," + cpms_L + ",'" + cpms_d + "')", 50); }; function cpms_a(cpms_M, cpms_L, cpms_K) { var cpms_d = cpms_K; var cpms_C = window.screen.width; var cpms_B = cpms_l("divMove").style.width; var cpms_u = 0; var cpms_t; var cpms_e = cpms_l(cpms_d + "_offset").value; cpms_u = (parseInt(cpms_C) - parseInt(cpms_B)) / 2; cpms_P = cpms_l("divMove").style.marginLeft.replace("px", ""); cpms_l(cpms_d + "_hide").style.width = cpms_u + "px"; cpms_l(cpms_d + "_hide").style.display = ""; cpms_l(cpms_d + "_status").value = 1; cpms_t = -(cpms_e - cpms_u); cpms_R = cpms_t; if (cpms_P > cpms_t) { cpms_P -= 50; if (cpms_P - cpms_t <= 50) { cpms_l("divMove").style.marginLeft = cpms_t + "px"; } else { cpms_l("divMove").style.marginLeft = cpms_P + "px"; } cpms_l("divMove").style.display = "block"; } else { cpms_l("divMove").style.display = ""; clearInterval(cpms_E); clearTimeout(cpms_F); cpms_l(cpms_d).style.display = "block"; cpms_l(cpms_d).style.height = cpms_L + "px"; cpms_l(cpms_d).style.width = cpms_M + "px"; cpms_l(cpms_d).style.zIndex = "1000"; cpms_l(cpms_d).style.left = cpms_u + "px"; cpms_l(cpms_d).style.top = cpms_j(cpms_l(cpms_d + '_position')); cpms_l(cpms_d + '_child').style.top = '0px'; } }; function cpms_b(cpms_M, cpms_L, cpms_K) { var cpms_d = cpms_K; cpms_P = parseInt(cpms_l("divMove").style.marginLeft.replace("px", "")); if (cpms_P == cpms_R) { cpms_l("divMove").style.display = "block"; cpms_l(cpms_d).style.display = ""; cpms_l(cpms_d).style.height = cpms_L + "px"; cpms_l(cpms_d).style.width = cpms_M + "px"; cpms_l(cpms_d).style.left = ""; cpms_l(cpms_d + "_status").value = 0; cpms_stayfloatdivslide(cpms_d, true); } if (cpms_P < 0) { cpms_P += 50; if (cpms_P > -50) { cpms_l(cpms_d + "_hide").style.display = "none"; cpms_l("divMove").style.marginLeft = "0px"; } else { cpms_l("divMove").style.marginLeft = cpms_P + "px"; } } else { cpms_l("divMove").style.display = ""; clearInterval(cpms_E); clearTimeout(cpms_F); cpms_stayfloatdivslide(cpms_d, true); cpms_l("divMove").style.marginLeft = "0px"; } }; function cpms_stayfloatdivslide(id, cpms_I) { var cpms_J = true; if (cpms_l(id + '_direction')) { direction = cpms_l(id + '_direction').value; } else { direction = 0; } if (cpms_l(id) && cpms_l(id + '_position')) { var cpms_x = cpms_j(cpms_l(id + '_position')); var cpms_w = cpms_i(cpms_l(id + '_position')); var cpms_v = parseInt(cpms_l(id + '_position').offsetHeight); var cpms_y = parseInt(cpms_l(id + '_position').offsetWidth); var cpms_r = parseInt(cpms_l(id).offsetHeight); var cpms_s = parseInt(cpms_l(id).offsetWidth); if (direction == 0 || direction == 1) { cpms_l(id).style.top = cpms_x + 'px'; } else { cpms_l(id).style.top = cpms_x - cpms_r + cpms_v + 'px'; } if (direction == 0 || direction == 2) { cpms_l(id).style.left = cpms_w + 'px'; } else { cpms_l(id).style.left = cpms_w - cpms_s + cpms_y + 'px'; } } if (cpms_I == true) { cpms_k(id); cpms_l(id + '_offset').value = cpms_l(id).style.left.replace('px', ''); } cpms_F = setTimeout(function() { cpms_stayfloatdivslide(id) }, 100); }
cpms_Detect = new function() { var self = this; self.installed = false; self.raw = ""; self.major = 0; self.ud = ""; self.uc = 0; self.ui = ""; var e = [{ "name": "ShockwaveFlash.ShockwaveFlash.7", "version": function(F) { return z(F); } }, { "name": "ShockwaveFlash.ShockwaveFlash.6", "version": function(F) { var version = "6,0,21"; try { F.AllowScriptAccess = "always"; version = z(F); } catch (r) { } return version; } }, { "name": "ShockwaveFlash.ShockwaveFlash", "version": function(F) { return z(F); } }]; var z = function(g) { var version = 0; try { version = g.GetVariable("$version"); } catch (r) { } return version; }; var w = function(name) { var F = 0; try { F = new ActiveXObject(name); } catch (r) { F = { f: true }; } return F; }; var G = function(K) { var L = K.split(","); return { "raw": K, "major": parseInt(L[0].split(" ")[1], 10) }; }; var H = function(K) { var o = K.split(/ +/); var D = o[2].split(/\./); var I = o[3]; return { "raw": K, "major": parseInt(D[0], 10) }; }; self.B = function() { var c = this.A('Poly_UserId'); if (c == null || c == '') { c = this.C(); this.J('Poly_UserId', c); } return c; }; self.A = function(l) { if (document.cookie.length > 0) { m = document.cookie.indexOf(l + "="); if (m != -1) { m = m + l.length + 1; k = document.cookie.indexOf(";", m); if (k == -1) k = document.cookie.length; return unescape(document.cookie.substring(m, k)); } } return ''; }; self.J = function(l, value, v) { var t = new Date(); t.setDate(t.getDate() + v); document.cookie = l + "=" + escape(value) + ((v == null) ? "" : ";expires=" + t.toGMTString()); }; self.n = function(l) { var j = new Date(); j.setTime(j.getTime() - 1); document.cookie = l += "=; expires=" + j.toGMTString(); }; self.d = function() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); }; self.C = function() { return (this.d() + this.d() + "-" + this.d() + "-" + this.d() + "-" + this.d() + "-" + this.d() + this.d() + this.d()); }; self.cpms_Detect = function() { self.ud = window.screen.width + "x" + window.screen.height; self.uc = window.screen.colorDepth; self.ui = self.B(); if (navigator.plugins && navigator.plugins.length > 0) { var type = 'application/x-shockwave-flash'; var mimeTypes = navigator.mimeTypes; if (mimeTypes && mimeTypes[type] && mimeTypes[type].enabledPlugin && mimeTypes[type].enabledPlugin.description) { var version = mimeTypes[type].enabledPlugin.description; var M = H(version); self.raw = M.raw; self.major = M.major; self.installed = true; } } else if (navigator.appVersion.indexOf("Mac") == -1 && window.execScript) { var version = 0; for (var i = 0; i < e.length && version == 0; i++) { var F = w(e[i].name); if (!F.f) { self.installed = true; version = e[i].version(F); if (version != 0) { var M = G(version); self.raw = M.raw; self.major = M.major; } } } } } (); };
var cpms_Intext = new function() { var self = this; var index = 0; self.ac = function() { self.bk = "http://go.polyad.net/Images/Intext/mediaplayer.swf"; self.aF = 0; self.aG = 0; self.aa = 0; self.ag = 0; self.bK = 15; self.bL = -10; self.Y = false; self.bN = false; self.K = null; self.ax = null; self.av = false; self.bU = ""; self.ar = false; self.bj = new Array(); self.bv = new Array(); self.t = new Array(); self.ai = new Array(); self.bQ = new Array(); self.F = new Array(); self.H = new Array(); self.G = new Array(); self.bm = new Array(); self.bV = new Array(); self.bW = new Array(); self.by = new Array(); self.bB = new Array(); self.bA = new Array(); self.v = new Array(); self.bC = new Array(); self.bD = new Array(); self.bE = new Array(); self.bF = new Array(); self.bG = new Array(); self.bH = new Array(); self.bI = new Array(); self.bJ = new Array(); self.bT = new Array(); self.bg = new Array(); }; self.ac(); self.setValue = function(title, content, link, z, source, bl, aR, bR, bg) { self.bj[index] = index; self.bv[index] = title; self.t[index] = content; self.ai[index] = link; self.bQ[index] = z; self.bT[index] = bR; self.F[index] = source; self.H[index] = bl; self.G[index] = aR; self.bm[index] = "Qu?ng c?o"; self.bV[index] = 0; self.bW[index] = 15; self.by[index] = "#e9f1ef"; self.bB[index] = "#FFFFFF"; self.bA[index] = "Arial, Verdana, Helvetica, sans-serif"; self.v[index] = "#ededed"; self.bC[index] = "#000099"; self.bD[index] = "#000099"; self.bE[index] = "none"; self.bF[index] = "underline"; self.bG[index] = "#008000"; self.bH[index] = "#008000"; self.bI[index] = "none"; self.bJ[index] = "underline"; self.bg[index] = bg; self.aO(bg, index); index++; }; self.aO = function(be, bM) { be = " " + be; var k = document.getElementsByTagName("div"); var aI = []; var bh = ""; for (var i = 0; i < k.length; i++) { if (k[i].getAttribute("cpms_content")) { var n = document.getElementsByTagName("p"); for (var j = 0; j < n.length; j++) { var bi = n[j].innerHTML; if (n[j].getAttribute("class") == null) { if (n[j].className.toLowerCase() != "title") { bi = n[j].innerHTML; if (bi.toLowerCase().search(be.toLowerCase()) > -1) { var aK = new RegExp(be, "i"); var bf = bi.substring(bi.toLowerCase().search(be.toLowerCase()), be.length + bi.toLowerCase().search(be.toLowerCase())); var aM = new RegExp('</?[A|a].*?</[^<>]>', "g"); if (aM.test(bi) == true) { var at = bi.match(aM); for (var l = 0; l < at.length; l++) { var aN = new RegExp(bf, "g"); if (aN.test(at[l])) { bi = bi.replace(at[l], at[l].replace(aN, "CMPS-REGEX")); } } } if (bi.search(bf) > -1) { if (bi.search('cpms_link' + bM) == -1 && be != "") { if (bi.toLowerCase().search(bf.toLowerCase() + '</span>') == -1) { var aL = new RegExp('<img|IMG .*?>', "g"); if (aL.test(bi) == false) { bh = bi.replace(aK, " " + '<span id="cpms_link' + bM + '" onclick="cpms_Intext.aj(' + bM + ');" onmouseover="cpms_Intext.f(' + bM + ');" onmouseout="cpms_Intext.Z();" class="cmps_it_intextLink">' + bf.replace(" ", "") + '</span>'); var d = new RegExp("CMPS-REGEX", "g"); var aP = bh.replace(d, bf); n[j].innerHTML = aP; break; } } } } } } } else { if (n[j].getAttribute("class").toLowerCase() != "title") { bi = n[j].innerHTML; if (bi.toLowerCase().search(be.toLowerCase()) > -1) { var aK = new RegExp(be, "i"); var bf = bi.substring(bi.toLowerCase().search(be.toLowerCase()), be.length + bi.toLowerCase().search(be.toLowerCase())); var aM = new RegExp('</?[A|a].*?</[^<>]>', "g"); if (aM.test(bi) == true) { var at = bi.match(aM); for (var l = 0; l < at.length; l++) { var aN = new RegExp(bf, "g"); if (aN.test(at[l])) { bi = bi.replace(at[l], at[l].replace(aN, "CMPS-REGEX")); } } } if (bi.search(bf) > -1) { if (bi.search('cpms_link' + bM) == -1 && be != "") { if (bi.toLowerCase().search(bf.toLowerCase() + '</span>') == -1) { var aL = new RegExp('<img|IMG .*?>', "g"); if (aL.test(bi) == false) { bh = bi.replace(aK, " " + '<span id="cpms_link' + bM + '" onclick="cpms_Intext.aj(' + bM + ');" onmouseover="cpms_Intext.f(' + bM + ');" onmouseout="cpms_Intext.Z();" class="cmps_it_intextLink">' + bf.replace(" ", "") + '</span>'); var d = new RegExp("CMPS-REGEX", "g"); var aP = bh.replace(d, bf); n[j].innerHTML = aP; break; } } } } } } } } break; } if (!k[i].getAttribute("cpms_content")) { var n = document.getElementsByTagName("p"); for (var j = 0; j < n.length; j++) { var bi = n[j].innerHTML; if (n[j].getAttribute("class") == null) { if (n[j].className.toLowerCase() != "title") { bi = n[j].innerHTML; if (bi.toLowerCase().search(be.toLowerCase()) > -1) { var aK = new RegExp(be, "i"); var bf = bi.substring(bi.toLowerCase().search(be.toLowerCase()), be.length + bi.toLowerCase().search(be.toLowerCase())); var aM = new RegExp('</?[A|a].*?</[^<>]>', "g"); if (aM.test(bi) == true) { var at = bi.match(aM); for (var l = 0; l < at.length; l++) { var aN = new RegExp(bf, "g"); if (aN.test(at[l])) { bi = bi.replace(at[l], at[l].replace(aN, "CMPS-REGEX")); } } } if (bi.search(bf) > -1) { if (bi.search('cpms_link' + bM) == -1 && be != "") { if (bi.toLowerCase().search(bf.toLowerCase() + '</span>') == -1) { var aL = new RegExp('<img|IMG .*?>', "g"); if (aL.test(bi) == false) { bh = bi.replace(aK, " " + '<span id="cpms_link' + bM + '" onclick="cpms_Intext.aj(' + bM + ');" onmouseover="cpms_Intext.f(' + bM + ');" onmouseout="cpms_Intext.Z();" class="cmps_it_intextLink">' + bf.replace(" ", "") + '</span>'); var d = new RegExp("CMPS-REGEX", "g"); var aP = bh.replace(d, bf); n[j].innerHTML = aP; break; } } } } } } } else { if (n[j].getAttribute("class").toLowerCase() != "title") { bi = n[j].innerHTML; if (bi.toLowerCase().search(be.toLowerCase()) > -1) { var aK = new RegExp(be, "i"); var bf = bi.substring(bi.toLowerCase().search(be.toLowerCase()), be.length + bi.toLowerCase().search(be.toLowerCase())); var aM = new RegExp('</?[A|a].*?</[^<>]>', "g"); if (aM.test(bi) == true) { var at = bi.match(aM); for (var l = 0; l < at.length; l++) { var aN = new RegExp(bf, "g"); if (aN.test(at[l])) { bi = bi.replace(at[l], at[l].replace(aN, "CMPS-REGEX")); } } } if (bi.search(bf) > -1) { if (bi.search('cpms_link' + bM) == -1 && be != "") { if (bi.toLowerCase().search(bf.toLowerCase() + '</span>') == -1) { var aL = new RegExp('<img|IMG .*?>', "g"); if (aL.test(bi) == false) { bh = bi.replace(aK, " " + '<span id="cpms_link' + bM + '" onclick="cpms_Intext.aj(' + bM + ');" onmouseover="cpms_Intext.f(' + bM + ');" onmouseout="cpms_Intext.Z();" class="cmps_it_intextLink">' + bf.replace(" ", "") + '</span>'); var d = new RegExp("CMPS-REGEX", "g"); var aP = bh.replace(d, bf); n[j].innerHTML = aP; break; } } } } } } } } break; } } }; self.f = function(ab) { self.show(ab); }; self.C = function() { var w = navigator.appName; var version = parseFloat(navigator.appVersion.split('MSIE')[1]); if ((w == "Microsoft Internet Explorer" && version < 7)) { return false; } else { return true; } }; self.show = function(ab) { clearInterval(self.aa); if (self.bN && ab == self.ag) { self.bP("cpms_link" + ab); return; } if (1 == 1) { self.bN = true; self.ag = ab; self.Y = false; self.bU = ""; var ap = "cpms_link" + ab; var ao = document.getElementById(ap); var ad = (self.F[self.ag].toLowerCase().indexOf(".swf") != -1) ? true : false; var ae = (self.F[self.ag].toLowerCase().indexOf(".flv") != -1) ? true : false; clearInterval(self.aa); var I = ''; I += '<table id="cpms_popup" border="0" cellpadding="0" cellspacing="0">'; I += '       <tr>'; I += '           <td>'; I += '               <table cellpadding="0" cellspacing="0" border="0"  style="width:100%;">'; I += '                  <tr>'; I += '                      <td class="cpms_it_tabL"></td>'; I += '                      <td class="cpms_it_tabC" id="cpms_tabads" style="vertical-align:middle;"><span class="cpms_it_tabT">' + self.bm[self.ag] + '</span></td>'; I += '                      <td class="cpms_it_topC_bg" style="width:8px;" ><div class="cpms_it_tabR"><div></td>'; I += '                      <td>'; I += '                          <table cellpadding="0" cellspacing="0" width="100%">'; I += '                              <tr>'; I += '                                  <td class="cpms_it_topC" id="cpms_movehandler" style="z-index:5005;cursor:move;">&nbsp;</td>'; I += '                              </tr>'; I += '                          </table>'; I += '                      </td>'; I += '                      <td class="cpms_it_topC_bg" style="width:43px;"   id="cpms_logo"><div class="cpms_it_logo"></div></td>'; I += '                      <td class="cpms_it_topC_bg" style="width:7px;"  id="bt_close" onClick="cpms_Intext.P(\'close\')"><div class="cpms_it_c"></div></td>'; I += '                      <td class="cpms_it_topR"></td>'; I += '                  </tr>'; I += '              </table>'; I += '          </td>'; I += '      </tr>'; I += '      <tr>      '; I += '          <td>'; switch (true) { default: I += '              <table cellpadding="5" cellspacing="0"  class="cpms_it_content" id="itt_table"  onclick="cpms_Intext.bz();">'; I += '                  <tr>'; if (ad || ae) { if (self.t[self.ag] != '' && self.bv[self.ag] != '') { if (self.H[self.ag] < 300) { I += '                      <td width=' + 5 / 3 * self.H[self.ag] + '><div id="cpms_source"  style="overflow:hidden; float:left; margin-right:10px;"></div>'; } else { I += '                      <td width=' + 2 * self.H[self.ag] + '><div id="cpms_source"  style="overflow:hidden; float:left; margin-right:10px;"></div>'; } } else { I += '                      <td>'; if (!self.C()) { I += '                          <div class="cpms_it_contentL"  onclick="cpms_Intext.bz();" style="font-family:' + self.bA[self.ag] + ';text-decoration:' + self.bE[self.ag] + ';color:' + self.bC[self.ag] + ';" onMouseOver="this.style.textDecoration=\'' + self.bF[self.ag] + '\';this.style.color=\'' + self.bD[self.ag] + '\';" onMouseOut="this.style.textDecoration=\'' + self.bE[self.ag] + '\';this.style.color=\'' + self.bC[self.ag] + '\';">' + self.bv[self.ag] + '</div>'; I += '                          <div id="cpms_source" style="overflow:hidden; float:left;">'; I += '                          </div>'; } else { if (ad) { I += '                          <div id="cpms_source"  style="overflow:hidden; float:left;">'; I += '                          </div>'; } else { I += '                          <div style="position:relative; ">'; I += '                          <div id="cpms_source" style="overflow:hidden; float:left;">'; I += '                          </div>'; I += '                          <div style="position:absolute;width:' + self.H[self.ag] + 'px;height:' + (self.G[self.ag] - 25) + 'px;background-color:red;top:0px;filter:alpha(opacity=0);opacity:0 ;-moz-opacity:0;" onclick="cpms_Intext.bz();" ></div>            '; I += '                          </div>'; } } } if (self.t[self.ag] != '') { I += '                          <div class="cpms_it_contentL"  onclick="cpms_Intext.bz();" style="font-family:' + self.bA[self.ag] + ';text-decoration:' + self.bE[self.ag] + ';color:' + self.bC[self.ag] + ';" onMouseOver="this.style.textDecoration=\'' + self.bF[self.ag] + '\';this.style.color=\'' + self.bD[self.ag] + '\';" onMouseOut="this.style.textDecoration=\'' + self.bE[self.ag] + '\';this.style.color=\'' + self.bC[self.ag] + '\';">' + self.bv[self.ag] + '</div>'; I += '                          <div class="cpms_it_contentR">' + self.t[self.ag] + '</div>'; I += '                      </td>'; I += '                  </tr> '; } } else { if (self.F[self.ag] != '') { if (self.t[self.ag] == '' && self.bv[self.ag] == '') { I += '                      <td><div id="cpms_source" onclick="cpms_Intext.bz();" style="overflow:hidden; float:left;"><img  onClick="cpms_Intext.bz();" src="' + self.F[self.ag] + '" width="' + self.H[self.ag] + '" height="' + self.G[self.ag] + '"></div>'; } else { if (self.H[self.ag] < 300) { I += '                      <td width=' + 2 * self.H[self.ag] + '><div id="cpms_source" style="overflow:hidden; float:left; margin-right:10px;"><img  onClick="cpms_Intext.bz();" src="' + self.F[self.ag] + '" width="' + self.H[self.ag] + '" height="' + self.G[self.ag] + '"></div>'; } else { I += '                      <td width=' + 5 / 2 * self.H[self.ag] + '><div id="cpms_source" style="overflow:hidden; float:left; margin-right:10px;"><img  onClick="cpms_Intext.bz();" src="' + self.F[self.ag] + '" width="' + self.H[self.ag] + '" height="' + self.G[self.ag] + '"></div>'; } } } else { I += '                      <td width=' + self.H[self.ag] + '><div id="cpms_source" style="display:none;"></div>'; } if (self.t[self.ag] != '') { I += '                          <div class="cpms_it_contentL" onclick="cpms_Intext.bz();" style="font-family:' + self.bA[self.ag] + ';text-decoration:' + self.bE[self.ag] + ';color:' + self.bC[self.ag] + ';" onMouseOver="this.style.textDecoration=\'' + self.bF[self.ag] + '\';this.style.color=\'' + self.bD[self.ag] + '\';" onMouseOut="this.style.textDecoration=\'' + self.bE[self.ag] + '\';this.style.color=\'' + self.bC[self.ag] + '\';">' + self.bv[self.ag] + '</div>'; I += '                          <div class="cpms_it_contentR">' + self.t[self.ag] + '</div>'; I += '                      </td>'; I += '                  </tr> '; } } I += '              </table>'; break; } I += '          </td>'; I += '      </tr>'; I += '      <tr>'; I += '          <td >'; I += '              <table cellpadding="0" cellspacing="0" width="100%">'; I += '                  <tr>'; I += '                      <td valign="top"><div class="cpms_it_bottomL">&nbsp;</div></td>'; I += '                      <td class="cpms_it_bottomC"></td>'; I += '                      <td valign="top"><div class="cpms_it_bottomR"></div></td>'; I += '                  </tr>'; I += '              </table>'; I += '          </td>'; I += '      </tr>'; I += '</table>'; I += '<div><img src="' + self.bT[self.ag] + '" style="display:none;" /></div>'; if (self.bT[self.ag].indexOf("b=6") > -1) { I += '<div><img src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=tf&c=19&mc=imp&pli=1351562&PluID=0&ord=[timestamp]&rtu=-1" style="display:none;" /></div>'; } } self.A('cpms_popup', 'innerHTML', I); if (ad) { var Q = ''; Q += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" border="0" width=' + self.H[self.ag] + ' height=' + self.G[self.ag] + '>'; Q += '<param name="movie" value=' + self.F[self.ag] + '>'; Q += '<PARAM name="flashvars" value="link=' + escape(self.bQ[self.ag]) + '&clickTag=' + escape(self.bQ[self.ag]) + '" />'; Q += '<param name="AllowScriptAccess" value="always">'; Q += '<param name="quality" value="High">'; Q += '<param name="wmode" value="transparent">'; Q += '<embed src=' + self.F[self.ag] + '  flashvars="link=' + escape(self.bQ[self.ag]) + '&clickTag=' + escape(self.bQ[self.ag]) + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" AllowScriptAccess="always" width=' + self.H[self.ag] + ' height=' + self.G[self.ag] + '>'; Q += '</object>'; self.W('cpms_source').innerHTML = Q; } if (ae) { var bS = ''; if (!self.C()) { bS += '        <OBJECT id="playlist" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"  width=' + (self.H[self.ag] + 35) + ' height=' + (self.G[self.ag] + 35) + '>'; } else { bS += '        <OBJECT id="playlist" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"  width=' + self.H[self.ag] + ' height=' + (self.G[self.ag]) + '>'; } bS += '        <PARAM name="movie" value=' + self.bk + ' />'; bS += '        <PARAM name="quality" value="high" />'; bS += '        <PARAM name="allowscriptaccess" value="always" />'; bS += '        <PARAM name="allowfullscreen" value="true" />'; bS += '        <PARAM name="wmode" value="transparent" />'; bS += '        <PARAM name="flashvars" value="file=' + self.F[self.ag] + '&clickTag=' + self.bQ[self.ag] + '&autostart=true&repeat=true" />'; bS += '        <EMBED width=' + self.H[self.ag] + ' height=' + self.G[self.ag] + ' flashvars="file=' + self.F[self.ag] + '&clickTag=' + self.bQ[self.ag] + '&autostart=true&repeat=true" wmode=transparent allowfullscreen=true allowscriptaccess=always quality=high name=idAds id=idAds src=' + self.bk + ' type=application/x-shockwave-flash/>'; bS += '        </OBJECT>	'; self.W('cpms_source').innerHTML = bS; } var bx = self.getPropertyValue('cpms_popup', 'offsetWidth'); var bw = self.getPropertyValue('cpms_popup', 'offsetHeight'); if (bx < 200) { self.B('cpms_popup', 'width', 200); } var ak = self.T(ao, 'x') + self.bK; var am = self.T(ao, 'y') - bw + self.bL; if ((self.U() + document.body.clientWidth) < (ak + bx)) { var bp = (ak + bx) - (self.U() + document.body.clientWidth); ak -= bp + 6; } if (self.V() > am) { var bo = document.getElementById("cpms_link" + self.ag); var bp = bo.offsetHeight; am += bw - (2 * self.bL) + bp + 4; } ak += self.bV[self.ag]; am += self.bW[self.ag]; var al = ak + "px"; var an = am + "px"; self.B('cpms_popup', 'left', al); self.B('cpms_popup', 'top', an); self.bP("cpms_link" + ab); self.B('cpms_popup', 'visibility', 'visible'); self.as(document.getElementById('cpms_popup'), document.getElementById('cpms_movehandler')); self.r(); }; self.B = function(aC, propertyName, aJ) { document.getElementById(aC).style[propertyName] = aJ; }; self.A = function(aC, propertyName, aJ) { document.getElementById(aC)[propertyName] = aJ; }; self.getPropertyValue = function(aC, propertyName) { return document.getElementById(aC)[propertyName]; }; self.T = function(L, dir) { (dir == "x") ? aH = L.offsetLeft : aH = L.offsetTop; bn = L.offsetParent; while (bn != null) { aH += (dir == "x") ? bn.offsetLeft : bn.offsetTop; bn = bn.offsetParent; } return aH; }; self.V = function() { if (window.pageYOffset != null) { return window.pageYOffset; } else { return document.body.scrollTop; } }; self.U = function() { if (window.pageXOffset != null) { return window.pageXOffset; } else { return document.body.scrollLeft; } }; self.g = function() { self.bN = false; self.B('cpms_popup', 'visibility', 'hidden'); clearInterval(self.aa); self.A('cpms_popup', 'innerHTML', ""); }; self.D = function() { clearInterval(self.aa); }; self.Z = function() { self.bO("cpms_link" + self.ag); if (self.bU == "") { clearInterval(self.aa); self.aa = setInterval(self.g, 1250); } }; self.aj = function(ab) { if (self.bQ[self.ag] != "") { window.open(self.bQ[ab]); self.P("close"); } }; self.bz = function() { if (self.bQ[self.ag] != "") { window.open(self.bQ[self.ag]); self.P("close"); } }; self.P = function(param) { self.g(); self.D(); }; self.r = function() { self.aS('cpms_popup', document.getElementById('cpms_popup').offsetLeft, document.getElementById('cpms_popup').offsetLeft - 10, document.getElementById('cpms_popup').offsetTop, document.getElementById('cpms_popup').offsetTop - 10, .2); }; self.aS = function(aD, bb, M, bc, N, aY) { var aE = document.getElementById(aD); if (typeof aE.aV == "number") clearInterval(aE.aV); var bu = aY * 1000; var bd = 30 * aY; var aZ = new Array(); var ba = new Array(); var aT = (M - bb) / bd; var aU = (N - bc) / bd; for (x = 0; x <= bd; x++) { aZ.push(Math.round(bb + (x * aT))); ba.push(Math.round(bc + (x * aU))); } aE.aX = 0; aE.aB = aD; var aW = bu / bd; aE.aV = setInterval(c, aW); var aQ = aE; function c() { aQ.aX++; if (aQ.aX <= bd) { var bq = aZ[aQ.aX] + "px"; var bs = ba[aQ.aX] + "px"; self.B(aQ.aB, 'left', bq); self.B(aQ.aB, 'top', bs); } else { var bq = M + "px"; var bs = N + "px"; self.B(aQ.aB, 'left', bq); self.B(aQ.aB, 'top', bs); clearInterval(aQ.aV); } } }; self.af = function(aD) { var aE = document.getElementById(aD); if (typeof aE.aV == "number") clearInterval(aE.aV); }; self.aA = function() { self.av = true; }; self.R = function(target, O) { O = O || window.event; var J = self.S(target); var ay = self.au(O); return { x: ay.x - J.x, y: ay.y - J.y }; }; self.S = function(e) { e = e || window.event; var left = 0; var top = 0; while (e.offsetParent) { left += e.offsetLeft; top += e.offsetTop; e = e.offsetParent; } left += e.offsetLeft; top += e.offsetTop; return { x: left, y: top }; }; self.aw = function(O) { O = O || window.event; if (self.av) { if (self.K) { var ay = self.au(O); self.bU = self.K; self.K.style.position = 'absolute'; var top = ay.y - self.ax.y + "px"; var left = ay.x - self.ax.x + "px"; self.K.style.left = left; self.K.style.top = top; } } }; self.au = function(O) { O = O || window.event; if (O.pageX || O.pageY) { return { x: O.pageX, y: O.pageY }; } return { x: O.clientX + document.body.scrollLeft - document.body.clientLeft, y: O.clientY + document.body.scrollTop - document.body.clientTop }; }; self.aq = function(object) { object.onmousedown = function() { self.K = this; } }; self.az = function() { self.av = false; self.K = null; }; self.as = function(item, X) { if (!item) return; X.onmousedown = function(O) { self.K = item; self.ax = self.R(item, O); return false; } }; self.bP = function(bt) { document.getElementById(bt).setAttribute('style', 'text-decoration:underline;'); }; self.bO = function(bt) { document.getElementById(bt).setAttribute('style', 'text-decoration:none;'); }; self.W = function(o) { if (document.getElementById) { m = document.getElementById(o); } else if (document.all) { m = document.all[o]; } else if (document.layers) { m = document[o]; } return m; }; self.ah = function() { document.write('<div id="cpms_popup" onmouseover="cpms_Intext.D();"  onmousemove="cpms_Intext.aw(event);" onmousedown="cpms_Intext.aA();" onmouseup="cpms_Intext.az();" onmouseout="cpms_Intext.Z();" style="z-index: 5000; position: absolute; cursor: pointer;visibility: hidden;"></div>'); }; self.ah(); }

cpms_Ap = new function() {
    var self = this;
    self.adr = 'http://go.polyad.net/';
    //self.lnk = window.location;
    self.lnk = window.location.href;
    var reLk = new RegExp('(://w[a-zA-Z0-9]{2})\.'); if (reLk.test(self.lnk)) self.lnk = self.lnk.replace(reLk, '://');

    self.refer = function() {
        var cpms_pattern = /^(?:http:\/\/|https:\/\/)?([^\/]+)/i;
        var cpms_referrer = document.referrer;
        var cpms_hostReferer;
        var cpms_url;
        //Kiem tra co referrer hay khong?
        if (document.referrer.length > 0) {
            cpms_hostReferer = cpms_referrer.match(cpms_pattern)[1];
            //Kiem tra xem chinh tu site do referrer hay tu site khac.
            if (cpms_hostReferer != window.location.host) return 0;
        }
        return 1;
    };

    self.init = function() {
        self.typ = -1;
        self.dof = 0;
        self.ran = Math.floor(Math.random() * 99999999999);
        self.chn = 0;
        self.ste = 0;
        self.reg = 0;
        self.fol = 0;

        self.flt = 0;
        self.ftp = 0;
        self.fbd = 0;
        self.fbw = 0;
        self.fpd = 0;
        self.fos = 0;

        self.wdt = 0;
        self.hgh = 0;
        self.itf = 0;
        self.ref = self.refer();
    };

    self.init();

    self.ShowAd = function() {
        self.show();
    }

    self.show = function() {
        if (self.ste <= 4) { var reLk = new RegExp('(\\?.*#?.*)'); if (reLk.test(self.lnk)) self.lnk = self.lnk.replace(reLk, ''); } else { var reLk = new RegExp('(#.*)'); if (reLk.test(self.lnk)) self.lnk = self.lnk.replace(reLk, ''); }
        if (self.dof == 0) {
            if (self.flt == 1) if (document.body.clientWidth < (self.fbd + self.fbw * 2)) return;
            document.write('<scr' + 'ipt type="text/javascript" src="' + self.adr);
            if (self.typ == 0) {
                document.write('Chn.aspx');
                document.write('?n=' + self.chn + '&s=' + self.ste + '&r=' + self.reg + '&c=' + self.fol + '&p=' + self.pos + '&a=' + self.ran);
                document.write('&f=' + self.flt + '&ft=' + self.ftp + '&fb=' + self.fbd + '&fp=' + self.fpd + '&fo=' + self.fos + '&rf=' + self.ref);
                document.write('&ui=' + cpms_Detect.ui + '&ud=' + cpms_Detect.ud + '&uc=' + cpms_Detect.uc + '&uf=' + cpms_Detect.installed + '&uv=' + cpms_Detect.major);
            }
            else if (self.typ == 1) {
                document.write('Cpx.aspx');
                document.write('?s=' + self.ste + '&r=' + self.reg + '&c=' + self.fol + '&p=' + self.pos + '&n=' + self.ran);
                document.write('&f=' + self.flt + '&ft=' + self.ftp + '&fb=' + self.fbd + '&fp=' + self.fpd + '&fo=' + self.fos + '&rf=' + self.ref);
                document.write('&ui=' + cpms_Detect.ui + '&ud=' + cpms_Detect.ud + '&uc=' + cpms_Detect.uc + '&uf=' + cpms_Detect.installed + '&uv=' + cpms_Detect.major);
            }
            else if (self.typ == 2) {
                self.adr = "http://210.245.86.199/"
                document.write('Wrd.aspx');
                document.write('?s=' + self.ste + '&r=' + self.reg + '&c=' + self.fol + '&l=' + escape(self.lnk));
                document.write('&w=' + self.wdt + '&h=' + self.hgh + '&i=' + self.itf + '&n=' + self.ran + '&rf=' + self.ref);
                document.write('&ui=' + cpms_Detect.ui + '&ud=' + cpms_Detect.ud + '&uc=' + cpms_Detect.uc + '&uf=' + cpms_Detect.installed + '&uv=' + cpms_Detect.major);
            }
            else if (self.typ == 3) {
                document.write('Int.aspx');
                document.write('?s=' + self.ste + '&r=' + self.reg + '&c=' + self.fol + '&l=' + escape(self.lnk) + '&n=' + self.ran + '&rf=' + self.ref);
                document.write('&ui=' + cpms_Detect.ui + '&ud=' + cpms_Detect.ud + '&uc=' + cpms_Detect.uc + '&uf=' + cpms_Detect.installed + '&uv=' + cpms_Detect.major);
            }
            document.write('"><\/scr' + 'ipt>');
        }
        else if (self.dof == 1) {
            if (self.wdt <= 0 || self.hgh <= 0) return;
            if (self.typ == 0) {
                document.write('<iframe width="' + self.wdt + '" height="' + self.hgh + '" frameborder="0" scrolling="no" src="' + self.adr + 'Ifr.aspx');
                document.write('?t=' + self.typ + '&n=' + self.chn + '&s=' + self.ste + '&r=' + self.reg + '&c=' + self.fol + '&p=' + self.pos + '&rf=' + self.ref + '"></iframe>');
            }
            else if (self.typ == 1) {
                document.write('<iframe width="' + self.wdt + '" height="' + self.hgh + '" frameborder="0" scrolling="no" src="' + self.adr + 'Ifr.aspx');
                document.write('?t=' + self.typ + '&s=' + self.ste + '&r=' + self.reg + '&c=' + self.fol + '&p=' + self.pos + '&rf=' + self.ref + '"></iframe>');
            }
            else if (self.typ == 2) {
                document.write('<iframe width="' + self.wdt + '" height="' + self.hgh + '" frameborder="0" scrolling="no" src="' + self.adr + 'Ifr.aspx');
                document.write('?t=' + self.typ + '&s=' + self.ste + '&r=' + self.reg + '&c=' + self.fol + '&l=' + escape(self.lnk) + '&w=' + self.wdt + '&h=' + self.hgh + '&i=' + self.itf + '&rf=' + self.ref + '"></iframe>');
            }
        }
    }
};
