ОсновноеRadiotalkПользовательское
MPCHAT - CMS хостинг чатов для профессионалов
83   •   Посмотреть все темы

JavaScript - Скрипты

 

105
Human @Human
Форма для определения терминов по их сокращениям
Данный скрипт служит для перевода наиболее употребляемых сокращений в обозначающие их термины (IMXO, PS, SER, SUBJ и др.). Подробнее о сокращениях можно прочесть в статье

<script language="JavaScript">
<!--
//агенство Art&Fact, 15.12.2000, ********** artefact@udm.net
function tr() {
var stra = document.form.text.value
var acr = new Array()
acr[1]="2DAY"
acr[2]="A/W"
acr[3]="AFK"
acr[4]="ANON"
acr[5]="APPS"
acr[6]="APU"
acr[7]="ARVO"
acr[8]="B/DBDAY"
acr[9]="B/F"
acr[10]="B4"
acr[11]="BBIAF"
acr[12]="BBL"
acr[13]="BRB"
acr[14]="BTW"
acr[15]="CONV"
acr[16]="CUL"
acr[17]="CWYL"
acr[18]="D/L"
acr[19]="DAE"
acr[20]="DEF"
acr[21]="DESC"
acr[22]="DET"
acr[23]="ESP"
acr[24]="FAQ"
acr[25]="FOCL"
acr[26]="FYI"
acr[27]="G/F"
acr[28]="GA"
acr[29]="GEN"
acr[30]="GG"
acr[31]="ILU"
acr[32]="IMHO"
acr[33]="IMNSO"
acr[34]="IMO"
acr[35]="IMP"
acr[36]="INET"
acr[37]="IOW"
acr[38]="J/K"
acr[39]="JIC"
acr[40]="K/B"
acr[41]="L/H"
acr[42]="L/I"
acr[43]="L/O"
acr[44]="L8R"
acr[45]="LAMER"
acr[46]="LJBF"
acr[47]="LN"
acr[48]="LOL"
acr[49]="MEM"
acr[50]="MESG"
acr[51]="MORN"
acr[52]="MOTAS"
acr[53]="MOTOS"
acr[54]="MOTSS"
acr[55]="MYL"
acr[56]="NET"
acr[57]="NFC"
acr[58]="ORIG"
acr[59]="PERM"
acr[60]="PIC"
acr[61]="PL&F"
acr[62]="POSS"
acr[63]="POV"
acr[64]="PPL"
acr[65]="PREV"
acr[66]="PROB"
acr[67]="PROG"
acr[68]="PSWD"
acr[69]="PUB"
acr[70]="Q"
acr[71]="R/H"
acr[72]="RE"
acr[73]="REG"
acr[74]="RL"
acr[75]="ROTFL"
acr[76]="RTFM"
acr[77]="RTM"
acr[78]="SER"
acr[79]="SUBJ"
acr[80]="SUM1"
acr[81]="TIA"
acr[82]="TTYL"
acr[83]="TTYS"
acr[84]="TTYT"
acr[85]="U"
acr[86]="U/L"
acr[87]="V"
acr[88]="W/E"
acr[89]="WAREZ"
acr[90]="YDAY"
acr[91]="PS"
acr[92]="ЗЫ"
acr[93]="ИМХО"
acr[94]="СУБЖ"
acr[95]="САБЖ"
acr[96]="PLS"
acr[97]="NB"
acr[98]="VX"
var eng = new Array()
eng[1]="today"
eng[2]="anyway"
eng[3]="away from keyboard"
eng[4]="anonymous"
eng[5]="applications"
eng[6]="as per usual"
eng[7]="afternoon"
eng[8]="birthday"
eng[9]="boy friend"
eng[10]="before"
eng[11]="be back in a few"
eng[12]="be back later"
eng[13]="be right back"
eng[14]="by the way"
eng[15]="conversation"
eng[16]="see you later"
eng[17]="communicate with you later"
eng[18]="download"
eng[19]="deep and meaningful"
eng[20]="definitely"
eng[21]="description"
eng[22]="details"
eng[23]="especially"
eng[24]="frequently asked questions"
eng[25]="falling off the chair laughing"
eng[26]="for your information"
eng[27]="girl friend"
eng[28]="go ahead"
eng[29]="generally"
eng[30]="gotta go"
eng[31]="I love you"
eng[32]="in my humble opinion"
eng[33]="in my not so humble opinion"
eng[34]="in my opinion"
eng[35]="important"
eng[36]="Internet"
eng[37]="in other words"
eng[38]="just kidding"
eng[39]="just in case"
eng[40]="keyboard"
eng[41]="left-handed"
eng[42]="login"
eng[43]="logout"
eng[44]="later"
eng[45]=""
eng[46]="let`s just be friends"
eng[47]="last night"
eng[48]="laughing out loudly"
eng[49]="remember"
eng[50]="message"
eng[51]="morning"
eng[52]="member of the appropriate sex"
eng[53]="member of the opposite sex"
eng[54]="member of the same sex"
eng[55]="mail you later"
eng[56]="Internet"
eng[57]="no further comment"
eng[58]="original"
eng[59]="permission"
eng[60]="picture"
eng[61]="peace love and friendship"
eng[62]="possibly"
eng[63]="point of view"
eng[64]="people"
eng[65]="previous"
eng[66]="problem"
eng[67]="program"
eng[68]="password"
eng[69]="public"
eng[70]="question"
eng[71]="right-handed"
eng[72]="repeat hello"
eng[73]="regular"
eng[74]="real life"
eng[75]="rolling on the floor laughing"
eng[76]="read the fucking manual"
eng[77]="read the manual"
eng[78]="serious"
eng[79]="subject"
eng[80]="someone"
eng[81]="thanks in advance"
eng[82]="talk to you later"
eng[83]="talk to you soon"
eng[84]="talk to you tomorrow"
eng[85]="you"
eng[86]="upload"
eng[87]="very"
eng[88]="weekend"
eng[89]=""
eng[90]="yesterday"
eng[91]="postscriptum"
eng[92]="postscriptum"
eng[93]="in my humble opinion"
eng[94]="subject"
eng[95]="subject"
eng[96]="please"
eng[97]="note bene"
eng[98]="virus exchange"
var rus = new Array()
rus[1]="сегодня"
rus[2]="как бы то ни было"
rus[3]="на сегодня закругляюсь"
rus[4]="анонимный"
rus[5]="приложение"
rus[6]="как обычно"
rus[7]="днем"
rus[8]="день рождения"
rus[9]="дружок"
rus[10]="сначала"
rus[11]="скоро вернусь"
rus[12]="вернусь позже"
rus[13]="сейчас вернусь"
rus[14]="кстати"
rus[15]="разговор"
rus[16]="увидимся позже"
rus[17]="пообщаемся позже"
rus[18]="загрузка"
rus[19]="глубоко и многозначительно"
rus[20]="определенно"
rus[21]="описание"
rus[22]="детали"
rus[23]="особенно"
rus[24]="часто задаваемые вопросы"
rus[25]="от смеха падаю со стула"
rus[26]="для вашего сведения"
rus[27]="подружка"
rus[28]="продолжай"
rus[29]="в общем"
rus[30]="ну я пошел"
rus[31]="я тебя люблю"
rus[32]="по моему скромному мнению"
rus[33]="по моему не очень скромному мнению"
rus[34]="по моему мнению"
rus[35]="важно"
rus[36]="Интернет"
rus[37]="иными словами"
rus[38]="шучу"
rus[39]="на всякий случай"
rus[40]="клавиатура"
rus[41]="левша"
rus[42]="войти в сеть"
rus[43]="выйти из сети"
rus[44]="потом"
rus[45]="агрессивный неопытный пользователь"
rus[46]="давай просто дружить"
rus[47]="вчера вечером"
rus[48]="громко смеюсь"
rus[49]="вспомнить"
rus[50]="сообщение"
rus[51]="утро"
rus[52]="участник подходящего пола"
rus[53]="участник противоположного пола"
rus[54]="участник того же пола"
rus[55]="напишу тебе позже"
rus[56]="Сеть"
rus[57]="я все сказал"
rus[58]="подлинный"
rus[59]="допуск, разрешение"
rus[60]="картинка"
rus[61]="мир, любовь и дружба"
rus[62]="возможно"
rus[63]="точка зрения"
rus[64]="люди"
rus[65]="предыдущий"
rus[66]="проблема"
rus[67]="программа"
rus[68]="пароль"
rus[69]="общественный"
rus[70]="вопрос"
rus[71]="правша"
rus[72]="здравствуй еще раз"
rus[73]="регулярный"
rus[74]="реальный, не виртуальный"
rus[75]="от смеха катаюсь по полу"
rus[76]="прочти чертово руководство"
rus[77]="прочти руководство"
rus[78]="серьезно"
rus[79]="тема"
rus[80]="кто-то"
rus[81]="заранее благодарен"
rus[82]="потом поговорим"
rus[83]="скоро поговорим"
rus[84]="завтра поговорим"
rus[85]="ты, вы"
rus[86]="выгрузка"
rus[87]="очень"
rus[88]="выходные"
rus[89]="пиратское программное обеспечение"
rus[90]="вчера"
rus[91]="послесловие"
rus[92]="послесловие"
rus[93]="по моему скромному мнению"
rus[94]="тема"
rus[95]="тема"
rus[96]="пожалуйста"
rus[97]="обратить особое внимание"
rus[98]="человек(сообщество), который пишет/собирает вирусы"
var flag = false;
for(r=1; r<=98; r++) {
if (stra == acr[r]) { document.form.text1.value=eng[r];
document.form.text2.value=rus[r]; flag = true; break; }}
if(!flag) { document.form.text1.value=''; document.form.text2.value=''; }
}
//-->
</script>

Форма:

<form name="form">
сокращение:
<input type="text" size="10" name="text">
<input type="button" value="Перевести" onClick="tr()">
<input type="reset" value="Очистить">
английский термин:
<input name="text1" type="text" size="40">
русский аналог:
<input name="text2" type="text" size="40">
</form>

105
Human @Human
Что-то вроде копирайта.
<html>
<head>

<script language="JavaScript">
if (document.all){

yourLogo='http://www.astrakhan-ru.mpchat.com/';
logoFont='Arial';
logoColor='ffffff';


yourLogo=yourLogo.split('');
L=yourLogo.length;
H=0;
W=0;
R=0;
E=0;
MY=0;
MX=0;
Wd=0;
Hd=0;
F=new Array();
Y=new Array();
X=new Array();
S=new Array();
A=new Array();
B=new Array();

document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < L; i++)
document.write('<div id="ie" style="position:absolute;top:0;left:0;width:10px;height:10px;'
+'font-family:'+logoFont+';font-size:50px;color:'+logoColor+'">'+yourLogo[i]+'</div>');
document.write('</div></div>');

//Initial Placement!
function Set(){
for (i=0; i < L; i++){
H=window.document.body.offsetHeight;
W=window.document.body.offsetWidth;
A[i]=Math.round(Math.random()*H);
B[i]=Math.round(Math.random()*W);
S[i]=Math.random()*0.07+0.05;
R=Math.round(Math.random()*3);
E=Math.round(Math.random()*2500+50)
if (R == 3) B[i]=-E;
if (R == 2) B[i]=W+E;
if (R == 1) A[i]=-E;
if (R == 0) A[i]=H;
F[i]=W/10;
}
}
Set();

function Assign(){
outer.style.top=document.body.scrollTop;
for (i=0; i < L; i++){
F[i]-=S[i]*55;
if (F[i] < 2) F[i]=1;
ie[i].style.top =Y[i];
ie[i].style.left=X[i];
ie[i].style.fontSize=F[i];
}
}
function fly(){
MY=window.document.body.clientHeight/2;
MX=window.document.body.clientWidth/2;
Wd=Math.round(Math.random()*40+5);
Hd=Math.round(Math.random()*30+5);
for (i=0; i < L; i++)
{
Y[i]=A[i]+=(MY-A[i])*(S[i]);
X[i]=B[i]+=(MX-B[i])*(S[i]);
if ((X[i] > MX-Wd) && (X[i] < MX+Wd) && (Y[i] > MY-Hd) && (Y[i] < MY+Hd)){
H=window.document.body.offsetHeight;
W=window.document.body.offsetWidth;
A[i]=Math.round(Math.random()*H);
B[i]=Math.round(Math.random()*W);
S[i]=Math.random()*0.05+0.05;
R=Math.round(Math.random()*3);
E=Math.round(Math.random()*50+50)
if (R == 3) B[i]=-E;
if (R == 2) B[i]=W+E;
if (R == 1) A[i]=-E;
if (R == 0) A[i]=H+E;
}
if ((X[i] < 0) || (X[i] > W) || (Y[i] < 0) || (Y[i] > H))
F[i]=W/10;
}
Assign();
setTimeout('fly()',20);
}
window.onload=fly;
}
// -->
</script>
</head>
<body>
</body>
</html>

4316
Никита @DMc_Pozitiv
Классный скрипт...
Показывает сколько осталось до нового года)Можна задать и свои значения!У себя установил - доволен!
<style style="text/css">

.lcdstyle{
color:white;
font: bold 18px MS Sans Serif;
padding: 3px;
}

</style>
<script type="text/javascript">
function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}

cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdtime.prototype.showresults=function(){
var thisobj=this


var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}


function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>До нового года осталось...<br> "+arguments[0]+" <sup>дней</sup> "+arguments[1]+" <sup>часов</sup> "+arguments[2]+" <sup>минут</sup> "+arguments[3]+" <sup>секунд</sup></span> "
}
else{ //else if target date/time met
var displaystring="" //Don't display any text
alert("С новым годом!!!") //Instead, perform a custom alert
}
return displaystring
}

</script>

<div id="countdowncontainer2"></div>

<script type="text/javascript">
var currentyear=new Date().getFullYear()
var thischristmasyear=(new Date().getMonth()>=1&& new Date().getDate()>1)? currentyear+1 : currentyear
var christmas=new cdtime("countdowncontainer2", "january 1, "+thischristmasyear+" 0:0:00")
christmas.displaycountdown("days", formatresults2)

</script>

7094
--- @Render
Астрологический калькулятор.
<meta http-equiv = "content-type" content = "text/html; charset = Windows-1251">
<SCRIPT LANGUAGE="JavaScript">
function signs() {
var start = 1901, birthyear = document.zodiac.year.value, date=document.zodiac.date.value, month=document.zodiac.month.selectedIndex;

with (document.zodiac.sign){

if (month == 1 && date >=20 || month == 2 && date <=18) {value = "Водолей";}
if (month == 1 && date > 31) {value = "Ошибка!";}
if (month == 2 && date >=19 || month == 3 && date <=20) {value = "Рыбы";}
if (month == 2 && date > 29) {value = "Ошибка!";}
if (month == 3 && date >=21 || month == 4 && date <=19) {value = "Овен";}
if (month == 3 && date > 31) {value = "Ошибка!";}
if (month == 4 && date >=20 || month == 5 && date <=20) {value = "Телец";}
if (month == 4 && date > 30) {value = "Ошибка!";}
if (month == 5 && date >=21 || month == 6 && date <=21) {value = "Близнецы";}
if (month == 5 && date > 31) {value = "Ошибка!";}
if (month == 6 && date >=22 || month == 7 && date <=22) {value = "Рак";}
if (month == 6 && date > 30) {value = "Ошибка!";}
if (month == 7 && date >=23 || month == 8 && date <=22) {value = "Лев";}
if (month == 7 && date > 31) {value = "Ошибка!";}
if (month == 8 && date >=23 || month == 9 && date <=22) {value = "Дева";}
if (month == 8 && date > 31) {value = "Ошибка!";}
if (month == 9 && date >=23 || month == 10 && date <=22) {value = "Весы";}
if (month == 9 && date > 30) {value = "Ошибка!";}
if (month == 10 && date >=23 || month == 11 && date <=21) {value = "Скорпион";}
if (month == 10 && date > 31) {value = "Ошибка!";}
if (month == 11 && date >=22 || month == 12 && date <=21) {value = "Стрелец";}
if (month == 11 && date > 30) {value = "Ошибка!";}
if (month == 12 && date >=22 || month == 1 && date <=19) {value = "Козерог";}
if (month == 12 && date > 31) {value = "Ошибка!";}
}
x = (start - birthyear) % 12
with (document.zodiac.csign){
if (x == 1 || x == -11) {value = "Крыса";}
if (x == 0) {value = "Бык";}
if (x == 11 || x == -1) {value = "Тигр";}
if (x == 10 || x == -2) {value = "Кролик";}
if (x == 9 || x == -3) {value = "Дракон";}
if (x == 8 || x == -4) {value ="Змея";}
if (x == 7 || x == -5) {value = "Лошадь";}
if (x == 6 || x == -6) {value = "Овца";}
if (x == 5 || x == -7) {value = "Обезьяна";}
if (x == 4 || x == -8) {value = "Петух";}
if (x == 3 || x == -9) {value = "Собака";}
if (x == 2 || x == -10) {value = "Кабан";}
}}
</script>

<form name="zodiac">
<center>
<table bgcolor="#60d4ff" border="2" bordercolor="#000000" rules="none" cellspacing="0" cellpadding="4">
<tr><td><b><i>Year</i></b></td>
<td><div align="right"><input type="text" size="10" name="year" value="Год" onClick=value=""></div></td>
<td>&nbsp;</td>
<tr><td><b><i>Месяц</i></b></td>
<td><div align="right">
<select name="month">
<option value="x">Месяц</option>
<option value="1">Январь</option>
<option value="2">Февраль</option>
<option value="3">Март</option>
<option value="4">Апрель</option>
<option value="5">Май</option>
<option value="6">Июнь</option>
<option value="7">Июль</option>
<option value="8">Август</option>
<option value="9">Сентябрь</option>
<option value="10">Октябрь</option>
<option value="11">Ноябрь</option>
<option value="12">Декабрь</option>
</select></div></td>
<td>&nbsp;</td></tr>
<tr><td><b><i>День</i></b></td>
<td><div align="right"><input type="text" name="date" value="День" size="3" onClick=value=""></td>
<td><input type="button" value="Расчет" onClick="signs()"></div></td></tr>
<tr><td><b><i>Знак Зодиака:</i></b></td>
<td><div align="right"><input type="text" name="sign" size="12" value="" align="right"></div</td></tr>
<td>&nbsp;</td></tr>
<tr><td><b><i>Восточный календарь:</i></b></td>
<td><div align="right"><input type="text" name="csign" size="12"></div></td>
<td>&nbsp;</td></tr>
</table>
</center>
</form>

3910
Дмитрий @Q-Tec
Вывод текущих данных.

Для вывода текущей даты используется объект Date и метод write объекта document (надписи выделенные зеленым необходимо откорректировать).

<script language="JavaScript">
<!--
current_date = new Date();
document.write("Текуща\я дата: " + current_date);
//-->
</script>

3910
Дмитрий @Q-Tec
Всплывающая подсказка.

<script language="JavaScript">
if (parseInt(navigator.appVersion)>= 4)
{
if (navigator.appName == "Netscape")
{
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
}
else
{
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
}
}

function show(layerName)
{
if (parseInt(navigator.appVersion)>= 4)
{
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}
}

function cls(layerName){
if (parseInt(navigator.appVersion)>= 4)
{
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}
}
</script>

<style type="text/css">#text1
{
HEIGHT: 80px; LEFT: 0px; POSITION: absolute; TOP: 50px; VISIBILITY: hidden; WIDTH: 250px; Z-INDEX: 10
}
</style>
<title>Всплывающая подсказка</title>
</head>

<body bgColor="#FFFFFF" text="#000000">
<div align="center" id="text1" style="HEIGHT: 80px; LEFT: 10px; TOP: 15px; WIDTH: 250px">
<table border="0" width="100%" bgcolor="#000000" cellspacing="1" cellpadding="2">
<tr>
<td align="middle" bgcolor="#FFFFE1"><p align="center"><font face="Fixedsys"
color="#FF0000">Всплывающая подсказка</font></p>
<p align="left"><font face="MS Sans Serif" size="1">   А вот
собственно и сама всплывающая подсказка...<br>
Она удобна тем что:<br>
1. Она не исчезает в самый неподходящий момент
(она исчезнет только после того, как вы уберёте
курсор с ссылки);<br>
2. Всплывающую подсказку можно добавлять не
только к графической ссылке, но и к обычному
тексту;<br>
3. Здесь можно менять шрифты;<br>
4. Можно менять цвета шрифтов;<br>
5. Сюда можно вставлять рисунки и т.д.</font></td>
</tr>
</table>
</div>

<a href="" onmouseout="cls('text1');" onmouseover="show('text1');">
Текст для примера</a>
</body>
</html>

3910
Дмитрий @Q-Tec
Вертикальное HTML меню.

<HTML>
<HEAD>
<STYLE type=text/css>
A:link { COLOR: #ffffff; FONT: 9pt Arial; TEXT-DECORATION: none}
A:visited { COLOR: #ffffff; FONT: 9pt Arial; TEXT-DECORATION: none}
A:hover { COLOR: #0000ff; FONT: 9pt Arial; TEXT-DECORATION: none}
</STYLE>
</HEAD>

<BODY>

<TABLE border=0 height=100 onmouseout="bgColor=''" onmouseover="bgColor='gray'" width=130>
<TBODY>
<TR>
<TD bgColor=gray><FONT color=white><B>Навигация</B></FONT></TD>
<TR>

<TD onmouseout="bgColor=''" onmouseover="bgColor='red'">
<A href="index.htm">Главная</A>
</TD>

<TR>
<TD onmouseout="bgColor=''" onmouseover="bgColor='red'">
<A href="dobavleniya.htm">Скрипты добавленные в новую версию</A>
</TD>

<TR>
<TD onmouseout="bgColor=''" onmouseover="bgColor='red'">
<A href="http://www.softpurgen.narod.ru">SOFTPURGEN</A>
</TD>
</TR>

</TBODY>
</TABLE>

</BODY>
</HTML>

3910
Дмитрий @Q-Tec
Выпадающеe меню с кнопкой.

<Form><Select Name="mymenu">
<Option Value="http://www.softpurgen.narod.ru/">Ваш текст - 1
<Option Value="http://www.softpurgen.narod.ru/">Ваш текст - 2
<Option Value="http://www.softpurgen.narod.ru/">Ваш текст - 3
<Option Value="http://www.softpurgen.narod.ru/">Ваш текст - 4
</Select>
<Input Type="button" Value="Go" OnClick="top.location.href=this.form.mymenu.options[this.form.mymenu.selectedIndex].value">
</Form>

3910
Дмитрий @Q-Tec
Этот скрипт автоматически поставит дату обновления Вашего документа.

<script language="JavaScript">
<!--
document.writeln(document.lastModified);
//-->
</script>

Дрожажий рисунок.

<html>
<head>
<title>Дрожащий рисунок</title>
<style>
.shakeimage{
position:relative
}
</style>
<script language="JavaScript1.2">
var rector=3
var stopit=0
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}
function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}
</script>
</head>
<body bgcolor="#cccccc" text="000000">
Подведите к рисунку указатель мыши к рисунку.
<img src="1.jpg" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)" alt="Рисунок">
</body>
</html>

Загрузка страницы.

<html>
<head>
<title>WOscripts.com - JavaScript - LoadingBar</title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
<META NAME="description" CONTENT="Коллекции CGI, PHP, JavaScript скриптов, Java апплеты, огромное количество документации по разным языкам программирования, анимированные гифы, фоны, полезные программы, форум, ссылки по теме.">
<META NAME="keywords" CONTENT="perl scripts, perl, cgi scripts, cgi, перл, java, java scripts, веб-программирование, web-programming, html, каталог ссылок, документация по веб-программированию, cgi скрипты, java скрипты, игры, java апплеты, апплеты, гифы, скрипты, скрипт, книги по веб-программированию, форум по perl, CGI, Perl, script, HTML">


<!-- HEAD START HERE -->

<style type="text/css">
#divLoadCont {position:absolute; z-index:500; left:0px; top:0px; width:100%; height:98%; clip:rect(0px 100% 100% 0px); background-color:#ffffff; layer-background-color:#ffffff;}
#divLoad1 {position:absolute; layer-background-color:silver; background-color:silver;}
#divLoad2 {position:absolute; left:0px; top:0px; layer-background-color:navy; background-color:navy;}
#divLoadText {position:absolute; background-color:transparent; font-family:arial,helvetica,sans-serif; color:navy; font-size:14px;}
</style>
<script language="JavaScript" type="text/javascript">
/**********************************************************************************
LoadingBar
* Copyright (C) 2001 Thomas Brattli
* This script was released at WOscripts.com
* Visit for more great scripts!
* This may be used and changed freely as long as this msg is intact!
* We will also appreciate any links you could give us.
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
return this
}
var bw=new lib_bwcheck()



/*VARIABLES TO SET START: */
numImages = 10 //How many images you have in your page
loaderWidth = 300 //The width of the loadbar
/*
All other settings, like colors fonts and stuff like that you
have to change in the STYLE section.

IMPORTANT:
To make this actually show the correct results
you have to place THIS code in all images:
onload="loadIt(1)"

Which means that your image should look
something like this:
<img src="whatever.gif" width="10" border="0" height="10" onload="loadIt(1)">


VARIABLES TO SET END: */



// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

currentImg = 0
//Document size object ********
function lib_doc_size(){
this.x=0;this.x2=bw.ie && document.body.offsetWidth-20||innerWidth||0;
this.y=0;this.y2=bw.ie && document.body.offsetHeight-5||innerHeight||0;
if(!this.x2||!this.y2) return message('Document has no width or height')
this.x50=this.x2/2;this.y50=this.y2/2;
return this;
}

//Lib objects ********************
function lib_obj(obj,nest){
nest=(!nest) ? "":'document.'+nest+'.'
this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;
this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt;
this.ref=this.css
this.w=this.evnt.offsetWidth||this.css.clip.width||
this.ref.width||this.css.pixelWidth||0;
return this
}
//Moving object to **************
lib_obj.prototype.moveIt = function(x,y){
this.x=x; this.y=y; this.css.left=x+px; this.css.top=y+px;
}
//Clipping object to ******
lib_obj.prototype.clipTo = function(t,r,b,l,setwidth){
this.ct=t; this.cr=r; this.cb=b; this.cl=l
if(bw.ns4){
this.css.clip.top=t;this.css.clip.right=r
this.css.clip.bottom=b;this.css.clip.left=l
}else{
if(t<0)t=0;if(r<0)r=0;if(b<0)b=0;if(b<0)b=0
this.css.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)";
if (setwidth){
this.css.pixelWidth = r;
this.css.pixelHeight = b;
this.css.width = r+px;
this.css.height = b+px;
}
}
}
var oLoad2
function startLoading(){
page = new lib_doc_size()
oLoadCont = new lib_obj('divLoadCont')
oLoad = new lib_obj('divLoad1','divLoadCont')
oLoad2 = new lib_obj('divLoad2','divLoadCont.document.divLoad1')
oLoadText = new lib_obj('divLoadText','divLoadCont.document.divLoad1')
oLoad.moveIt(page.x50-loaderWidth/2,page.y50-20)
oLoadText.moveIt(loaderWidth/2 - oLoadText.w/2,10)
oLoad.clipTo(0,loaderWidth,40,0,1)
oLoad2.per = loaderWidth/numImages
}
function loadIt(ok){
currentImg ++
if (oLoad2) oLoad2.clipTo(0,oLoad2.per*currentImg,40,0,1)
if (!ok){
oLoadCont.css.visibility = "hidden"
oLoadCont = null;
oLoad1 = null;
oLoad2 = null;
}
}

//DISPLAY FUNCTION - DELETE START -------- DELETE THIS *************
//LEAVE THIS FUNCTION WHILE TESTING. DELETE WHEN READY
function loadIt_display(ok){
currentImg ++
if (oLoad2) oLoad2.clipTo(0,oLoad2.per*currentImg,40,0,1)
if (currentImg<=numImages) setTimeout("loadIt_display(1)",200)
else{
oLoadCont.css.visibility = "hidden"
}
}
//DISPLAY FUNCTION - DELETE END *************************************
</script>

<!-- HEAD END HERE -->




</head>
<body bgcolor="#737994" text="#FFFFFF" link="#FFFFFF" topmargin="0" leftmargin="0">



<!-- BODY START HERE -->


<!-- ALWAYS HAVE THIS RIGHT AFTER THE BODY START TAG -->
<div id="divLoadCont">
<div id="divLoad1">
<div id="divLoad2"></div><br>
<div id="divLoadText">Загрузка...</div>
</div>
</div>
<script>
startLoading()
//onload=loadIt; //- LEAVE THIS LINE WHILE TESTING. UNCOMMENT WHEN READY
loadIt_display(1) //LEAVE THIS LINE WHILE TESTING. DELETE WHEN READY
</script>


<!-- BODY END HERE -->

<br><br><br>
<center>
SOFTPURGEN
<br><br>
</center>




</body>
</html>

3910
Дмитрий @Q-Tec
Изменение фона по кнопке.
<Head>
<Script Language="JavaScript">
var computed = false
var decimal = 0
function convert (entryform, from, to)
{convertfrom = from.selectedIndex
convertto = to.selectedIndex
entryform.display.value = (entryform.input.value * from[convertfrom].value / to[convertto].value )}
function addChar (input, character)
{if((character=='.' && decimal=="0") || character!='.')
{(input.value == "" || input.value == "0") ? input.value = character : input.value += character
convert(input.form,input.form.measure1,input.form.measure2)
computed = true
if (character=='.')
{decimal=1}}}
function openVothcom()
{window.open("","Display window","toolbar=no,directories=no,menubar=no");}
function clear (form)
{form.input.value = 0
form.display.value = 0
decimal=0}
function changeBackground(hexNumber)
{document.bgColor=hexNumber}
</Script>
</Head>
<Body>
<Form Method="POST" Name="background">
<Input Type="button" Value="Желтый" OnClick="changeBackground('#fff000')">
<Input Type="button" Value="Чёрный" OnClick="changeBackground('#000000')">
<Input Type="button" Value="Белый" OnClick="changeBackground('#ffffff')">
<Input Type="button" Value="Зелёный" OnClick="changeBackground('#00ff00')">
<Input Type="button" Value="Синий" OnClick="changeBackground('#0000ff')">
<Input Type="button" Value="Оранжевый" OnClick="changeBackground('#ff8000')">
<Input Type="button" Value="Серый" OnClick="changeBackground('#c0c0c0')">
<Input Type="button" Value="Красный" OnClick="changeBackground('#ff0000')">
</Form>
</Body>

Изменение фона по меню.
<Script Language="JavaScript">
document.write("<Center>");
document.write("<Form Name=\"Kolory\">");
document.write("<Select Name=\"schemesel\" OnChange=\"document.bgColor = this.options[selectedIndex].value\">");
document.write("<Option Value=\"ffffff\" selected>Белый");
document.write("<Option Value=\"0000ff\">Морской");
document.write("<Option Value=\"a0a0a0\">Серый");
document.write("<Option Value=\"e9e900\">Желтый");
document.write("<Option Value=\"a0a0ff\">Пурпур");
document.write("<Option Value=\"c70000\">Бордовый");
document.write("<Option Value=\"ffffa0\">Коричневый");
document.write("<Option Value=\"f0f0fa\">Серебряный");
document.write("<Option Value=\"ff00ff\">Розовый");
document.write("<Option Value=\"#66ff00\">Зелёный");
document.write("</Select>");
document.write("</Form>");
document.write("</Center>");
</Script>

3910
Дмитрий @Q-Tec
После загрузки страницы скрипт выводить маленькой окно сообщения.
Всё, что зелёным, можно, нужно отредактировать!
<script language="JavaScript">

//---vertas reklam---
infw=200;
infh=100;
infl=(screen.width-infw)/2;
inft=(screen.height-infh)/2-100;
innfw=1;
innfh=1;
infsk1=20;
infsk2=infsk1/(infw/infh);
infpr1=0;
infpr2=0;
infskr=3;
//--->
innfw1=35;
innfw2=35;
innfh1=20;
innfh2=20;
infprm1=((infw/innfw1)/4)*innfw1;
infprm2=((infw/innfw2)/4)*innfw2;
infprm3=((infh/innfh1)/4)*innfh1;
infprm4=((infh/innfh2)/4)*innfh2;
//--->
infl1=infl+infprm1-10;
infl2=infl+infprm2*2+30;
inft1=inft+infprm3*2+10;
inft2=inft+infprm4*2+10;
//--->
inftxt1=' ---- Ваш голос нужен в "Опросе" ----<br>голосовать?';
inftxt2='ДА';
inftxt3='НЕТ';
document.write('<div id="infn1" style="position:absolute; visibility:hidden; border: 1px outset; border-color:#0066FF; background-color: #FFF000; width: '+innfw+'px; height: '+innfh+'px; z-index:1; top: '+inft+'px; left: '+infl+'px; color: #000000; font-size:1pt; font-family:Verdana; text-align:center;"></div>');
document.write('<div onclick="inffgo4();" id="infn2" style="position:absolute; visibility:hidden; border: 1px outset; border-color:0066FF; background-color: #0066FF; width: '+innfw1+'px; height: '+innfh1+'px; z-index:2; top: '+inft1+'px; left: '+infl1+'px; color: #FFFFFF; font-size:10pt; font-family:Verdana; text-align:center;">'+inftxt2+'</div>');
document.write('<div onclick="inffgo5();" id="infn3" style="position:absolute; visibility:hidden; border: 1px outset; border-color:0066FF; background-color: #0066FF; width: '+innfw2+'px; height: '+innfh2+'px; z-index:2; top: '+inft2+'px; left: '+infl2+'px; color: #FFFFFF; font-size:10pt; font-family:Verdana; text-align:center;">'+inftxt3+'</div>');
//--->
tminf1=setTimeout('inffgo0();',3000);
function inffgo0() {
infn1.style.visibility='visible';
inffgo1();
inffgo2();
}
function inffgo1() {
innfw=innfw+infskr;
infn1.style.width=innfw;
inftm1=setTimeout('inffgo1();',infsk2);
if(innfw>=infw) {
infpr1=1;
clearTimeout(inftm1);
inffgo3();
}
}
function inffgo2() {
innfh=innfh+infskr;
infn1.style.height=innfh;
inftm2=setTimeout('inffgo2();',infsk1);
if(innfh>=infh) {
infpr2=1;
clearTimeout(inftm2);
inffgo3();
}
}
function inffgo3() {
if(infpr1==1 && infpr2==1) {
infn1.style.fontSize='10pt';
infn1.style.paddingTop='4px';
infn1.innerHTML=inftxt1;
infn2.style.visibility='visible';
infn3.style.visibility='visible';
}
}
function inffgo4() {
window.open('**********','spprg','toolbar=yes, menubar=yes, location=yes, directories=yes, resizable=yes, status=yes, scrollbars=yes');
infn1.style.visibility='hidden';
infn2.style.visibility='hidden';
infn3.style.visibility='hidden';
}
function inffgo5() {
infn1.style.visibility='hidden';
infn2.style.visibility='hidden';
infn3.style.visibility='hidden';
}
//---vertas window---
function wnfksq1() {
window.focus();
}
window.onload=wnfksq1;
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
//-->
</script>

Отредактировано Q-Tec - 16.01.2008
3910
Дмитрий @Q-Tec
Вывод произволного текста в том месте, где вам нужно, для этого создадим файл text.js

В него впишим:
var howMany = 7
var quote = new Array(howMany+1)
quote[0]="текст"
quote[1]="текст1"
quote[2]="текст2"
quote[3]="текст3"
quote[4]="текст4"
quote[5]="текст5"
quote[6]="текст6"
quote[7]="текст7"
function rndnumber(){
var randscript = -1
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1))
}
return randscript
}
quo = rndnumber()
quox = quote[quo]
document.write(quox)

После этого, вставим эту строчку
<script src=text.js></script>

туда, где бы вы хотели, что бы текст выводился.

Отредактировано Q-Tec - 16.01.2008
3910
Дмитрий @Q-Tec
Игра - Захватчики

<body bgColor="#FFFFFF">
<p align="center">

<!-- Эта программа была сделана Hiroshi Okada.-->

<script language="JavaScript">

// ---- Make array
function MakeArray( n){
this.length = n;
for (var i = 1; i <= n; i++) {
this[i] = 0
}
return this
}

// ----- poor man's random number
var d0 = new Date();
var r0 = d0.getSeconds();
function poor_rand(){
d1 = new Date();
r0 = (r0 * r0 + r0 + d1.getSeconds()) % 3721 ;
return r0 % width_n;
}

// ---- Parameters of game
var height_n = 8;
var width_n =5;

// ---- state of game
var enemy = new MakeArray( width_n); // enemy positions
var wtime; // wait time
var score; // points
var gameover; // in case of gameover set to true

// ----- Make the battlefield.
document.write( "<FORM NAME='fm1'>");
document.write( "<INPUT TYPE='text' NAME='message' SIZE=20>");
document.write( "</FORM>");
document.write( "<FORM NAME='fm2'><TABLE>");
for( var i=0; i<height_n; i++){
document.write( "<TR>");
for( var j=0;j<width_n; j++){
document.write( "<TD><CENTER><INPUT TYPE='radio'></CENTER></TD>");
}
document.write( "</TR>");
}
document.write( "<TR>");
for( var j=0;j<width_n; j++){
document.write( "<TD><INPUT TYPE='button' VALUE='-x-' onClick='fire("
+ j + ")'></TD>");
}
document.write( "</TR>");
document.write( "</TABLE>");
document.write( "<INPUT TYPE='button' VALUE='СТАРТ' onClick='game_start()'>");
document.write( "</FORM>");

// ----- game main timer event
// ----- enemy come one step
function come(){
var n = poor_rand();
document.fm2.elements[ width_n * enemy[n+1] + n].checked = true;
enemy[n+1]++;
if( enemy[n+1] < height_n){
setTimeout("come()", wtime);
}else{
gameover = true;
document.fm1.message.value = "ИГРА ОКОНЧЕНА: " + score ;
}
}

// ----- Fire the n th beam
function fire( n){
if( gameover ) return;
for( var i=0; i<enemy[n+1]; i++){ // clear enemy
document.fm2.elements[ width_n * i + n].checked = false;
}
score += enemy[ n+1];
document.fm1.message.value = "ОЧКИ: " + score;
enemy[ n+1] = 0;
if( wtime > 100){ wtime -= 10};
}

// ---- initialize & start game
function game_start(){
for( var n=0; n<width_n; n++){
for( var i=0; i<enemy[n+1]; i++){
document.fm2.elements[ width_n * i + n].checked = false;
}
enemy[n+1] = 0;
}
wtime = 400;
score = 0;
gameover = false;
document.fm1.message.value = "ОЧКИ: " + score;
setTimeout("come()", wtime);
}

// -->
</script>

</body>
</html>

Отредактировано Q-Tec - 16.01.2008
3910
Дмитрий @Q-Tec
Игра - Шашки

<body bgColor="white">

<p align="center"><script language="JavaScript">
<!--
version = 1.0;
// -->
</script> <script language="JavaScript1.1">
<!--
version = 1.1;
// -->
</script>
<script language="JavaScript">
<!--
if (version==1.0)
document.write("Ваш броузер не поддерживает JavaScript 1.1."
+ "Эта игра работает в Netscape 3+ и MSIE 4+.");
// -->
</script><script language="JavaScript1.1">
<!--

function preload() {
this.length = preload.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = new Image();
this[i].src = preload.arguments[i];
}
}
var pics = new preload("black.gif","gray.gif",
"you1.gif","you2.gif","you1k.gif","you2k.gif",
"me1.gif","me2.gif","me1k.gif","me2k.gif");

var black = -1; // computer is black
var red = 1; // visitor is red
var square_dim = 35;
var piece_toggled = false;
var my_turn = false;
var double_jump = false;
var comp_move = false;
var game_is_over = false;
var safe_from = safe_to = null;
var toggler = null;
var togglers = 0;

function Board() {
board = new Array();
for (var i=0;i<8; i++) {
board[i] = new Array();
for (var j=0;j<8;j++)
board[i][j] = Board.arguments[8*j+i];
}
board[-2] = new Array(); // prevents errors
board[-1] = new Array(); // prevents errors
board[8] = new Array(); // prevents errors
board[9] = new Array(); // prevents errors
}
var board;
Board(1,0,1,0,1,0,1,0,
0,1,0,1,0,1,0,1,
1,0,1,0,1,0,1,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,-1,0,-1,0,-1,0,-1,
-1,0,-1,0,-1,0,-1,0,
0,-1,0,-1,0,-1,0,-1);

function message(str) {
if (!game_is_over)
document.disp.message.value = str;
}
function moveable_space(i,j) {
// calculates whether it is a gray (moveable)
// or black (non-moveable) space
return (((i%2)+j)%2 == 0);
}
function Coord(x,y) {
this.x = x;
this.y = y;
}
function coord(x,y) {
c = new Coord(x,y);
return c;
}

document.write("<table border=0 cellspacing=0 cellpadding=0 width="+(square_dim*8+8)
+"<tr><td><img src='black.gif' width="+(square_dim*8+8)
+" height=4><br></td></tr>");
for(var j=0;j<8;j++) {
document.write("<tr><td><img src='black.gif' width=4 height="+square_dim+">");
for(var i=0;i<8;i++) {
if (moveable_space(i,j))
document.write("<a href='javascript:clicked("+i+","+j+")'>");
document.write("<img src='");
if (board[i][j]==1) document.write("you1.gif");
else if (board[i][j]==-1) document.write("me1.gif");
else if (moveable_space(i,j)) document.write("gray.gif");
else document.write("black.gif");
document.write("' width="+square_dim+" height="+square_dim
+" name='space"+i+""+j+"' border=0>");
if (moveable_space(i,j)) document.write("</a>");
}
document.write("<img src='black.gif' width=4 height="+square_dim+"></td></tr>");
}
document.write("<tr><td><img src='black.gif' width="+(square_dim*8+8)
+" height=4><br></td></tr></table><br>"
+"<form name='disp'><textarea name='message' wrap=virtual rows=2 cols=40></textarea><br>
<arr2.length;i++)
arr1[arr1.length+i] = arr2[i];
return arr1;
}
function legal_move(from,to) {
if ((to.x < 0) || (to.y < 0) || (to.x >
</body>
</html>

Отредактировано Q-Tec - 16.01.2008
3910
Дмитрий @Q-Tec
Меню выдвигается сбоку.

<!-- HEAD START HERE -->

<SCRIPT language=JavaScript>
<!-- Beginning of JavaScript -

// Set the starting position of the categories of your menu
var menu1top=5
var menu2top=95
var menu3top=185
var menuleft=-115

// This number configures the length and the speed of the menu-movement.
// Play around with it until you are satisfied.
var pace=14

// Don't change the variables below.
var step
var direction
var pause=25

var thismenu
var vorzeichen=1
var vorzeimenu1=-1
var vorzeimenu2=-1
var vorzeimenu3=-1

var menuismoving="no"


function inite() {
if (document.layers) {
document.menu1.left=menuleft
document.menu2.left=menuleft
document.menu3.left=menuleft
document.menu1.top=menu1top
document.menu2.top=menu2top
document.menu3.top=menu3top
}
if (document.all) {
document.all.menu1.style.posLeft=menuleft
document.all.menu2.style.posLeft=menuleft
document.all.menu3.style.posLeft=menuleft
document.all.menu1.style.posTop=menu1top
document.all.menu2.style.posTop=menu2top
document.all.menu3.style.posTop=menu3top
}
}

function getmenuname(clickedmenu) {
if (menuismoving=="no") {
if (document.layers) {
thismenu=eval("document."+clickedmenu)
}
if (document.all) {
thismenu=eval("document.all."+clickedmenu+".style")
}
step=pace
checkdirection()
movemenu()
}
}

function checkdirection() {
if (document.layers) {
if (thismenu==document.menu1){vorzeimenu1=vorzeimenu1*-1;vorzeichen=vorzeimenu1}
if (thismenu==document.menu2){vorzeimenu2=vorzeimenu2*-1;vorzeichen=vorzeimenu2}
if (thismenu==document.menu3){vorzeimenu3=vorzeimenu3*-1;vorzeichen=vorzeimenu3}
}
if (document.all) {
if (thismenu==document.all.menu1.style){vorzeimenu1=vorzeimenu1*-1;vorzeichen=vorzeimenu1}
if (thismenu==document.all.menu2.style){vorzeimenu2=vorzeimenu2*-1;vorzeichen=vorzeimenu2}
if (thismenu==document.all.menu3.style){vorzeimenu3=vorzeimenu3*-1;vorzeichen=vorzeimenu3}
}
menuismoving="yes"
}

function movemenu() {
if (document.layers) {
if (step>=0) {
thismenu.left+=step*vorzeichen
step--
var movetimer=setTimeout("movemenu()",pause)
}
else {
menuismoving="no"
clearTimeout(movetimer)
}
}
if (document.all) {
if (step>=0) {
thismenu.posLeft+=step*vorzeichen
step--
var movetimer=setTimeout("movemenu()",pause)
}
else {
menuismoving="no"
clearTimeout(movetimer)
}
}
}
// - End of JavaScript - -->
</SCRIPT>
<STYLE type=text/css>#menu1 {
LEFT: -1000px; POSITION: absolute
}
#menu2 {
LEFT: -1000px; POSITION: absolute
}
#menu3 {
LEFT: -1000px; POSITION: absolute
}
.baseline {
FONT-SIZE: 9pt; LEFT: 250px; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 100px
}
</STYLE>



<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0" onload=inite()>
<center>

<!-- BODY START HERE -->

<DIV id=menu1><IMG height=93
src="primer70_1.gif" width=150
useMap=#primer70_1.gif border=0> <MAP name=primer70_1.gif><AREA shape=RECT
coords=117,10,132,83 href="javascript:getmenuname('menu1')"><AREA shape=RECT
coords=22,10,91,24 href="http://www.aceweb.ru"><AREA
shape=RECT coords=22,25,91,38
href="http://www.aceweb.ru"><AREA shape=RECT
coords=19,39,92,51 href="http://www.aceweb.ru"><AREA
shape=RECT coords=19,54,91,64
href="http://www.aceweb.ru"><AREA shape=RECT
coords=20,67,93,79
href="http://www.aceweb.ru"></MAP></DIV>
<DIV id=menu2><IMG height=93
src="primer70_2.gif" width=150
useMap=#primer70_2.gif border=0> <MAP name=primer70_2.gif><AREA shape=RECT
coords=117,7,133,82 href="javascript:getmenuname('menu2')"><AREA shape=RECT
coords=20,12,63,23 href="#"><AREA
shape=RECT coords=18,24,65,37
href="#"><AREA shape=RECT
coords=18,40,66,52 href="#"><AREA
shape=RECT coords=19,55,71,63
href="#"><AREA shape=RECT
coords=16,68,72,80
href="#"></MAP></DIV>
<DIV id=menu3><IMG height=93
src="primer70_3.gif" width=150
useMap=#primer70_3.gif border=0> <MAP name=primer70_3.gif><AREA shape=RECT
coords=117,7,133,82 href="javascript:getmenuname('menu3')"><AREA shape=RECT
coords=19,9,82,24 href="#"><AREA
shape=RECT coords=17,25,82,36
href="#"><AREA shape=RECT
coords=19,37,81,50 href="#"><AREA
shape=RECT coords=19,51,82,64
href="#"><AREA shape=RECT
coords=19,66,82,78
href="#"></MAP></DIV>

<!-- BODY END HERE -->

3910
Дмитрий @Q-Tec
Навигация при помощи клавиш.
Данный скрипт реализует навигацию посредством клавиш.

<script language="JavaScript">
<!--
var key = new Array();
key['a'] = "index.htm";
key['b'] = "index1.htm";
key['c'] = "index2.htm";
key['d'] = "index3.htm";
function getKey(keyStroke) {
isNetscape=(document.layers);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.location = key[i];}
document.onkeypress = getKey;
//-->
</script>

3910
Дмитрий @Q-Tec
Окно открывается в полный экран.

<script>

url = "okno_04.htm";

var speedX = 7;

var speedY = 5;

var bgColor = "#000000";

var txtColor = "#FF80000";



if (document.all){
var wide = window.screen.availWidth;
var high = window.screen.availHeight;
}

function andBoom(){
if (document.all){
var Boomer = window.open("","BoomWindow","fullscreen");
Boomer.document.write('<HTML><BODY BGCOLOR='+bgColor+' SCROLL=NO><FONT FACE=ARIAL COLOR='+txtColor+'>Loading...</FONT></BODY></HTML>');
Boomer.focus();
for (H=1; H<high; H+= speedY){
Boomer.resizeTo(1,H);
}
for (W=1; W<wide; W+= speedX){
Boomer.resizeTo(W,H);
}
Boomer.location = url;
}
else {
window.open(url,"BoomWindow","");
}
}

</script>


<a href="javascript:andBoom()">Если ваш браузер не поддерживает данного скрипта попробуйте нажать сюда</a><p>
Но вообще-то вам <a href="http://scorpions.mpchat.ru/">сюда.</a></p>

<br>
Также вы можете использовать данную страницу для рекламы а весь скрипт для pop-up обмен-раскрутка!
<body onload="andBoom()">

Отредактировано Q-Tec - 16.01.2008
3910
Дмитрий @Q-Tec
Пароль на страницу.
Данный скрипт при запуске страницы запросит ввести пароль страницы.

<script language="JavaScript">
if (top.location.search=="") {
pass = prompt('Введите пароль');
if (pass=='1') // Ваш пароль акивации
{ alert('Пароль принят') } else { alert('Пароль непринят!'), top.location.href="errorpas.htm" }//Адрес страниц на которую перейдет пользователь при ошибке
};
</script>

При запросе пароля Введите 1

3910
Дмитрий @Q-Tec
Подсказка в любом месте страницы, можно вставлять таблицы и картинки.

<script>
<!--
var content=new Array()
content[0]='<br><strong>Scorpions ChaT</strong><br>Русский ChaT Эстонии'
content[1]='<br><strong>Иконки На Папки</strong><br>в этом сборнике содержаться красочные иконки которые можно ставить на любую папку например на вашу или на любую другую.'
content[2]='<br><strong>Коды для снятия блокировки у телефонов SAMSUNG</strong><br> В этом сборнике содержится 245 кодов: для увеличения громкости, удаление ошибок на телефоне и многое многое другое.'
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",450)
}
function changetext(whichcontent){
if (document.all)
descriptions.innerHTML=''+whichcontent+''
else if (document.layers){
document.d1.document.d2.document.write('<font face="Verdana">'+whichcontent+'</font>')
document.d1.document.d2.document.close()
}
}
//-->
</script>
<strong>
<a href="http://softpurgen.narod.ru/my_programms.htm" onMouseover="changetext(content[0])">Сборник JavaScripts</a> <a href="http://softpurgen.narod.ru/my_programms.htm" onMouseover="changetext(content[1])">Иконки на папки</a> <a href="http://softpurgen.narod.ru/my_programms.htm" onMouseover="changetext(content[2])">Коды для снятия блокировки у телефонов SANSUNG</a><br>
</strong>
<ilayer id="d1" width="155" height="155">
<layer id="d2" width="155" height="155">
<table width="460"><tr><td><div id="descriptions" align="left"><br> <br> <br> </div>
<!-- зарезервировали строчки чтобы содержимое не прыгало. Лучше всего изпользовать место заданной ширины как в примере. -->
</td></tr></table>
</ilayer>
</layer>

Отредактировано Q-Tec - 16.01.2008
3910
Дмитрий @Q-Tec
Таймер.
Данный скрипт показывает сколько осталось времени до Нового года в форме и в статусной строке браузера . Вставьте в тег <body … onLoad="startclock()">.

<script language="JavaScript">
<!--
var Temp2;
var timerID = null;
var timerRunning = false;
function showtime() {
now = new Date();
var CurHour = now.getHours();
var CurMinute = now.getMinutes();
var CurMonth = now.getMonth();
var CurDate = now.getDate();
var CurYear = now.getYear();
var CurSecond = now.getSeconds();
now = null;
Hourleft1 = 23 - CurHour
var Hourleft = Math.abs( Hourleft1 )
Minuteleft1 = 59 - CurMinute
var Minuteleft = Math.abs( Minuteleft1 )
Secondleft1 = 59 - CurSecond
var Secondleft = Math.abs( Secondleft1 )
if (CurYear==101) {var Yearleft = 101 - CurYear} else {var Yearleft = 2006 - CurYear};
var Monthleft1 = 11 - CurMonth
var Monthleft = Math.abs( Monthleft1 )
var Dateleft1 = 31 - CurDate
var Dateleft = Math.abs( Dateleft1 )
if (Yearleft!=1) {var ys="s"} else {var ys=""};
if (Monthleft!=1) {var mos="s"} else {var mos=""}
if (Dateleft!=1) {var ds="s"} else {var ds=""}
if (Hourleft!=1) {var hs="s"} else {var hs=""}
if (Minuteleft!=1) {var mis="s"} else {var mis=""}
if (Secondleft!=1) {var ss="s"} else {var ss=""}
Temp2=Yearleft+' year'+ys+', '+Monthleft+' month'+mos+', '+Dateleft+' day'+ds+','+Hourleft+' hour'+hs+', '+Minuteleft+' minute'+mis+', '+Secondleft+' second'+ss+' до Нового года!'
Temp3=Yearleft+' year'+ys+', '+Monthleft+' month'+mos+', '+Dateleft+' day'+ds+', '+Hourleft+' hour'+hs+', '+Minuteleft+' minute'+mis+', '+Secondleft+' second'+ss
window.status=Temp2;
document.frm.left.value=Temp3;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
var timerID = null;
var timerRunning = false;
function stopclock () {
if(timerRunning) clearTimeout(timerID);
timerRunning = false;
}
function startclock () {
stopclock();
showtime();
}
//-->
</script>
А этой формой осуществляется вывод данных.
<form name="frm">
<input type="textarea" name="left" size=50 value="С Новым годом!">
</form>