function enable(){
DeleteCookie("totdc");
etotd.innerHTML="Топик дня активирован";
setTimeout('etotd.style.visibility="hidden"; totdstart()',1000);
}
function mover(){
etotd.style.borderLeftColor="#5C0000";
etotd.style.borderRightColor="#FE5E5E";
etotd.style.borderBottomColor="#FE5E5E";
etotd.style.borderTopColor="#5C0000";
etotd.style.paddingLeft="1px";
etotd.style.paddingTop="3px";
}
function mout(){
etotd.style.borderLeftColor="#FE5E5E";
etotd.style.borderRightColor="#5C0000";
etotd.style.borderBottomColor="#5C0000";
etotd.style.borderTopColor="#FE5E5E";
etotd.style.paddingLeft="0px";
etotd.style.paddingTop="2px";
}
// Cookie Functions - Second Helping (21-Jan-96)
// Written by: Bill Dortch, hIdaho Design <bdortch@netw.com>
// The following functions are released to the public domain.
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
// Add below your tips (Do not edit anything above this line !!!!)
todmsg[0]="You can install the \"Tip of the day\" script to your homepage in less than 3 minutes ?"
todmsg[1]="The \"Tip of the day\" Script works in Internet Explorer 4 and Internet Explorer 5 ?"
todmsg[2]="The only file you need to edit to customize the script is the file called totdmsg.js ?"
todmsg[3]="If you un check the \"Show tips at startup\" checkbox a button will be displayed in the top left corner of the Browser the next time you access your page, to allow you to re-enable the \"Tip of the day\" Script ?"
todmsg[4]="The messages are displayed randomly each time you reload the page ?"
todmsg[5]="You can have as many tips as you like (even 10000 and Im not joking) !"
todmsg[6]="You should never place a \" symbol in your Tip description ?<BR>You should first place a backslash \\ before the quotation mark, because else the script will not work. So is you like to type \"My Quote\" type : \\\"My Quote\\\""
todmsg[7]="If a message is too long and does not fit in the screen, a scroll bar is displayed to allow you to view the whole tip ?<BR><BR>Like in this simple example I set up !<BR><BR><BR>See ? No problem !<BR><BR>It works fine :-)"
todmsg[8]="You can use even HTML tags in the tip ?<BR><FONT FACE=\"Arial\" SIZE=\"4\" COLOR=\"#FF0000\"><B><I>See ? Im using HTML code !</I></B></FONT><BR>Just be careful when you use HTML code and put a backslash \\ before all quotation marks that your Tags may have !"
todmsg[9]="It would be nice to put a link back to my page if you use this script ? My page URL is : <A HREF=
\"http://www.geocities.com/~lef\">http://www.ge</A>"
todmsg[10]="If all tips are displayed the script starts over again to make the tip rotation infinte ?"
todmsg[11]="You should put each tip description in a separate line and in the format todmsg[x]=\"Tip goes here.....\" ?<BR><BR> [x is a number in ascending order, starting from 0, you can see the todmsg.js file to understand it better]"
todmsg[12]="You should <I><B>not</B></I> contact me regarding any questions for the Script<BR>You can ask for help in the DynamicDrive forums :<A HREF=\"http://www.dynamicdrive.com\">http://w</A> or you can ask for help in the JavaScript news group : <A HREF=\"news://comp.lang.javascript\">news://co</A>"
todmsg[13]="You should type each tip description in a single line and <U><B>never</B></U> press Enter within a description and brake it into 2 rows ! (If a description is broken up in 2 lines, the script will stop working and you will get JavaScript errors)"
todmsg[14]="The \"Tip of the day\" Script starts working after you page finishes loading (to prevent Illegal operations in IE4) ? So if you want to make it faster to display the tip (before you page loads) you could have as an entry HTML page a page with only the script and a plain link to the rest of your pages.<BR><BR>Example : You can have as index.htlm a page wich only contains the code of the scirpt to make sure that the visitor sees the the Tip before entering your page."
todmsg[15]="While the \"Tip of the day\" is displayed the user cannot access your main page, unless he closes the \"Tip of the day\" window of course !"
todmsg[16]="You can use this script as an alternative method to display messages (disclaimers, notices, etc) for your page ? Just edit the file totd.html and replace the phrase \"Did you know that...\" with whatever you like !"
todmsg[17]="After you finish customizing the script and writing your own tips, you should upload the files : totd.html , totd.js, totdmsg.js and totd.gif to your webpage provider and place them all in the same directory !"
todmsg[18]="To insert the \"Tip of the day\" script to your page, you have to :<BR> 1.) Copy and paste everything within the <Script> tags (including the Script tags) from the file index.html <BR> 2.) You should place this : onLoad=\"totdinit()\" in your pages BODY tag<BR><BR>If you have already another onLoad statement in your BODY tag (from another JavaScript) do not put a second statement there because simply it won't work ! Here is what you have to do in that case : <BR>Let's say you have a JavaScript that requires you to place in the BODY tag the statement onLoad=\"init()\" and you like to use the \"Tip of the day\" script too (which requires you to add the onLoad=\"totdinit()\" statement)<BR>You do not place 2 onLoad statements ! Instead you use this : onLoad=\"init();totdinit()\" , which means you place both function calls in the same event handler (onLoad) separated by a semicolon. Same can be used for even more than 2 Scripts, like onLoad=\"init();totdinit();start();go()\" etc...."
todmsg[19]="You can un check the \"Show tips at startup\" checkbox, even if you click on the \"Show tips at startup\" text and not in the checkbox directly !"
todmsg[20]="If the \"Tip of the day\" window is closed by the x in the upper right corner and not from the close button the Script doen't take notice if the checkbox was un checked ! So make sure to close it from the close button if you have un checked the checkbox and do not wish to see any more Tips in the feature !"
todmsg[21]="The number of the tip you are viewing and the whole number of tips available are displayed in the down left edge of the window ? This is done to help you keep track of the tips you read, and off course to be aware how many tips to expect !"
todmsg[22]="There are 23 Tips here (including this one), so you have plenty to read ! :-)"
</Script>
<Script Language="JavaScript">
cnt=0;
todmsg.sort(rndm)
function rndm(a,b){
return (Math.random()-Math.random())
}
function chgstatus(){
if (dspl1.checked)
dspl1.checked=false;
else
dspl1.checked=true;
}
function dspltip(){
mtxt.innerHTML=todmsg[0]
cntr.innerHTML="1/"+todmsg.length
}
function ntip(){
if (cnt<todmsg.length-1)
cnt++;
else
cnt=0;
mtxt.innerHTML=todmsg[cnt];
cntr.innerHTML=(cnt+1)+"/"+todmsg.length
}
function endf(){
if (!dspl1.checked)
window.returnValue=1
else
window.returnValue=0
window.close();
}
</Script>
</BODY>
</HTML>