+away.html
<head>
<title>Переадресация</title>
<style>
h1 {font-size: 18px; font-family: arial,sans-serif; font-weight: normal;}
body {background: #363636; font-family: arial,sans-serif; color: #CCCCCC; font-size: 12px}
b {color: white; font-family: arial,sans-serif; font-weight: bold;}
hr {border: none; border-top: 1px dashed white; background: transparent; height: 1px;}
a {border-bottom: 1px dashed white; color: white; font-family: arial,sans-serif; font-size: 12px; text-decoration: none;}
table {border: 0px; width: 40%; height: 100%;}
.AlertTable {width:100%; height:250px; background: #202020;}
.AlertDiv {padding-left: 15px; padding-right: 15px; padding-top: 5px; padding-bottom: 20px; border: 1px dashed white;}
.LeftBorder {background: url('left-border.gif') repeat-y; width: 40px;}
.RightBorder {background: url('right-border.gif') repeat-y; width: 40px;}
.BottomBorder {background: url('bottom-border.gif') repeat-x; height: 40px;}
.TopBorder {background: url('top-border.gif') repeat-x; height: 40px;}
.RightBottomBorder {background: url('right-bottom-border.gif') repeat-y; width: 40px; height: 40px;}
.RightTopBorder {background: url('right-top-border.gif') repeat-y; width: 40px; height: 40px;}
.LeftBottomBorder {background: url('left-bottom-border.gif') repeat-y; width: 40px; height: 40px;}
.LeftTopBorder {background: url('left-top-border.gif') repeat-y; width: 40px; height: 40px;}
</style>
</head>
<body>
<table align="center">
<tr>
<td align="center" valign="middle">
<table class="AlertTable" cellpadding="0" cellspacing="0">
<tr><td class="LeftTopBorder"></td><td class="TopBorder"></td><td class="RightTopBorder"></td></tr>
<tr><td class="LeftBorder"></td>
<td>
<div class="AlertDiv">
<h1><img src="alert.gif" align="absmiddle">Переадресация</h1>
<hr>
Вы собираетесь перейти по ссылке <a href="/" id="OutLink">Название вашего сайта</a>.
<p>
<b>Наш сайт никак не связан с содержимым страницы <span id="OutSiteName">link</span>.
<p>
<a href="javascript://" onclick="window.close()">Закрыть окно</a></b>
</div>
</td><td class="RightBorder"></td></tr>
<tr><td class="LeftBottomBorder"></td><td class="BottomBorder"></td><td class="RightBottomBorder"></td></tr>
</table>
</td>
</tr>
</table>
</body>
<script>
function Decode(Word){
ResWord = Word
while (ResWord.indexOf('^') != -1){
ResWord = ResWord.replace('^', '&')
}
return ResWord
}
OutURL = '/'
OutText = 'Site-name'
if (window.location.search) {
OutLinkText = window.location.search.substr(1)
OutLinkInfo = OutLinkText.split('&')
for (i = 0; i < OutLinkInfo.length; i++){
if (OutLinkInfo.substr(0, 4) == 'url='){
OutURL = Decode(OutLinkInfo.substr(4))
}
if (OutLinkInfo.substr(0, 5) == 'text='){
OutText = Decode(OutLinkInfo.substr(5))
}
}
if (OutURL != '/'){
if (OutText == 'Site-name'){
OutText = OutURL
}
}
}
document.getElementById('OutLink').href = OutURL
document.getElementById('OutLink').innerText = OutText
document.getElementById('OutSiteName').innerText = OutText
</script>[ Свернуть ]
<title>Переадресация</title>
<style>
h1 {font-size: 18px; font-family: arial,sans-serif; font-weight: normal;}
body {background: #363636; font-family: arial,sans-serif; color: #CCCCCC; font-size: 12px}
b {color: white; font-family: arial,sans-serif; font-weight: bold;}
hr {border: none; border-top: 1px dashed white; background: transparent; height: 1px;}
a {border-bottom: 1px dashed white; color: white; font-family: arial,sans-serif; font-size: 12px; text-decoration: none;}
table {border: 0px; width: 40%; height: 100%;}
.AlertTable {width:100%; height:250px; background: #202020;}
.AlertDiv {padding-left: 15px; padding-right: 15px; padding-top: 5px; padding-bottom: 20px; border: 1px dashed white;}
.LeftBorder {background: url('left-border.gif') repeat-y; width: 40px;}
.RightBorder {background: url('right-border.gif') repeat-y; width: 40px;}
.BottomBorder {background: url('bottom-border.gif') repeat-x; height: 40px;}
.TopBorder {background: url('top-border.gif') repeat-x; height: 40px;}
.RightBottomBorder {background: url('right-bottom-border.gif') repeat-y; width: 40px; height: 40px;}
.RightTopBorder {background: url('right-top-border.gif') repeat-y; width: 40px; height: 40px;}
.LeftBottomBorder {background: url('left-bottom-border.gif') repeat-y; width: 40px; height: 40px;}
.LeftTopBorder {background: url('left-top-border.gif') repeat-y; width: 40px; height: 40px;}
</style>
</head>
<body>
<table align="center">
<tr>
<td align="center" valign="middle">
<table class="AlertTable" cellpadding="0" cellspacing="0">
<tr><td class="LeftTopBorder"></td><td class="TopBorder"></td><td class="RightTopBorder"></td></tr>
<tr><td class="LeftBorder"></td>
<td>
<div class="AlertDiv">
<h1><img src="alert.gif" align="absmiddle">Переадресация</h1>
<hr>
Вы собираетесь перейти по ссылке <a href="/" id="OutLink">Название вашего сайта</a>.
<p>
<b>Наш сайт никак не связан с содержимым страницы <span id="OutSiteName">link</span>.
<p>
<a href="javascript://" onclick="window.close()">Закрыть окно</a></b>
</div>
</td><td class="RightBorder"></td></tr>
<tr><td class="LeftBottomBorder"></td><td class="BottomBorder"></td><td class="RightBottomBorder"></td></tr>
</table>
</td>
</tr>
</table>
</body>
<script>
function Decode(Word){
ResWord = Word
while (ResWord.indexOf('^') != -1){
ResWord = ResWord.replace('^', '&')
}
return ResWord
}
OutURL = '/'
OutText = 'Site-name'
if (window.location.search) {
OutLinkText = window.location.search.substr(1)
OutLinkInfo = OutLinkText.split('&')
for (i = 0; i < OutLinkInfo.length; i++){
if (OutLinkInfo.substr(0, 4) == 'url='){
OutURL = Decode(OutLinkInfo.substr(4))
}
if (OutLinkInfo.substr(0, 5) == 'text='){
OutText = Decode(OutLinkInfo.substr(5))
}
}
if (OutURL != '/'){
if (OutText == 'Site-name'){
OutText = OutURL
}
}
}
document.getElementById('OutLink').href = OutURL
document.getElementById('OutLink').innerText = OutText
document.getElementById('OutSiteName').innerText = OutText
</script>[ Свернуть ]
+away.js
function IsInsideLink(TheLink){
return (TheLink.indexOf('JAVASCRIPT:') == 0) || (TheLink == '') || (TheLink.charAt(0) == '/') || (TheLink.charAt(0) == '#') || ((TheLink.indexOf('TEST1.RU*') > -1) && (TheLink.indexOf('TEST1.RU*') < 12))
}
function Code(Word){
ResWord = Word
while (ResWord.indexOf('&') != -1){
ResWord = ResWord.replace('&', '^')
}
return ResWord
}
Links = document.getElementsByTagName('a')
for (l = 0; l < Links.length; l++){
if (!IsInsideLink(Links[l].href.toUpperCase())){
Links[l].href = 'http://test1.ru/away.html?url=' + Code(Links[l].href) + '&text=' + Code(Links[l].innerText)
Links[l].target = '_blank'
}
}[ Свернуть ]
return (TheLink.indexOf('JAVASCRIPT:') == 0) || (TheLink == '') || (TheLink.charAt(0) == '/') || (TheLink.charAt(0) == '#') || ((TheLink.indexOf('TEST1.RU*') > -1) && (TheLink.indexOf('TEST1.RU*') < 12))
}
function Code(Word){
ResWord = Word
while (ResWord.indexOf('&') != -1){
ResWord = ResWord.replace('&', '^')
}
return ResWord
}
Links = document.getElementsByTagName('a')
for (l = 0; l < Links.length; l++){
if (!IsInsideLink(Links[l].href.toUpperCase())){
Links[l].href = 'http://test1.ru/away.html?url=' + Code(Links[l].href) + '&text=' + Code(Links[l].innerText)
Links[l].target = '_blank'
}
}[ Свернуть ]
На страницах сайта вместо </body>
ставим
</body><script src="http://путь_до_скрипта/away.js"></script>
TEST1.RU*-Адрес вашего сайта без http и www БОЛЬШИМИ БУКВАМИ!!!
В опере и ИЕ работает классно!
В мазиле не проверял.