Показать сообщение отдельно
  #2 (permalink)  
Старый 26.11.2012, 20:50
Интересующийся
Отправить личное сообщение для андрей1234 Посмотреть профиль Найти все сообщения от андрей1234
 
Регистрация: 26.11.2012
Сообщений: 19

второй код
################################################## #
var uTClckUn = function() {
var cn=0,
chrome = navigator.userAgent.toLowerCase().indexOf("chrome" )!=-1,
firefox = navigator.userAgent.toLowerCase().indexOf("firefox ")!=-1,
opera = navigator.userAgent.toLowerCase().indexOf("opera") !=-1,
ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1 && !opera,
linux_firefox = firefox && navigator.userAgent.toLowerCase().indexOf('linux') !=-1,
gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1 && !chrome,
isFFGTE12 = (gecko && parseFloat(navigator.userAgent.toLowerCase().repla ce(/.*firefox\/(\d+\.\d+)*/,"$1"))>=12),
IE9_FFgte4 = ( gecko && parseFloat(navigator.userAgent.toLowerCase().repla ce(/.*firefox\/(\d+\.\d+)*/,"$1"))>=4) || (ie && navigator.userAgent.toLowerCase().indexOf('msie 9') != -1),
opera_lt11 = opera && (parseFloat(navigator.userAgent.toLowerCase().repl ace(/.*version\/(\d+\.\d+)*/,"$1")) < 11),
opera_gte115 = opera && (parseFloat(navigator.userAgent.toLowerCase().repl ace(/.*version\/(\d+\.\d+)*/,"$1"))>=11.5),
opera_gte11_le115= opera && !opera_gte115 && !opera_lt11,
nameCookie = 'u_d3763811d8',
nameCookiePl = 'u_d3763811d8_show',
url= function(){
return "http://utarget.ru/clck/d3763811d8/?ref="+utarget_ref;
},
setCookie = function(value, name) {

options = {
'path':'/',
'domain':'',
'secure':''
};
var expires = '';

var date;
date = new Date();
if (date.getHours() >= 12){
date.setHours(24);
} else {
date.setHours(12);
}
date.setMinutes(0);
date.setSeconds(0);
date.setTime(date.getTime());
expires = '; expires=' + date.toUTCString();

var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';

document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
},
getCookie = function(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
var r = cookie.substring(0, 1)==' '? 1:0;
if (cookie.substring(r, name.length + 1 +r) == (name +'=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}

return cookieValue;
},
el = this,
init = function(){
if (!opera && !linux_firefox){
document.onmouseup = onClick;
} else {
if (opera_gte11_le115){
for (i=0;i<document.links.length;i++){
var link = document.links[i];
var l = link.href;
if(!link.onclick && l && l.indexOf('javascript')==-1){
link.onclick=function(event){
return onClick(event);
};
}
}
}
if (opera_lt11){
for (i=0;i<document.links.length;i++){
var link = document.links[i];
var l = link.href;
if ((!link.target || link.target=='_self' || link.target=='_blank') &&!link.onclick && l && l.indexOf('javascript')==-1){
link.target = '_blank';
link.onclick=onClick;
}
}

}
if (opera_gte115){
for (i=0;i<document.links.length;i++){
var link = document.links[i];
var l = link.href;
if ((!link.target || link.target=='_self' || link.target=='_blank') &&!link.onmouseup && l && l.indexOf('javascript')==-1){
link.target = '_blank';
link.onmouseup=onClick;
}
}
}
if (linux_firefox){
for (i=0;i<document.links.length;i++){
var link = document.links[i];
var l = link.href;
if ((!link.target || link.target=='_self' || link.target=='_blank') &&!link.onmouseup && l && l.indexOf('javascript')==-1){
document.links[i].onmouseup = onClick;
}
}
}
}

},
onClick = function(event){
if (cn == 0) {
cn++;
var keyCode;
if (window.event) {// IE
keyCode = window.event.button;
} else if (event.which){
keyCode = event.which;
}
var process = false;
if (!(firefox || ie || opera)) process = true;
if (firefox && keyCode == 1) process = true; //enable only left click
if (ie && keyCode != 2) process = true; // disable right click
if (opera && keyCode != 2) process = true; //disable right click

if(cn && navigator.cookieEnabled && process){

if(!getCookie(nameCookie)){

if(el.locked) this.cn=0;
else{
uTClckUn.lock();
var win_opts =
Ответить с цитированием