<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Hot Scripts Forums</title>
		<link>http://www.hotscripts.com/forums/</link>
		<description>This is a discussion forum for programmers and hotscripts questions and issues.</description>
		<language>en</language>
		<lastBuildDate>Sun, 22 Nov 2009 20:34:54 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://cdn.hotscripts.com/forums/hsforum/misc/rss.jpg</url>
			<title>Hot Scripts Forums</title>
			<link>http://www.hotscripts.com/forums/</link>
		</image>
		<item>
			<title>Two scriptaculous highlight effects</title>
			<link>http://www.hotscripts.com/forums/javascript/55949-two-scriptaculous-highlight-effects.html</link>
			<pubDate>Sat, 21 Nov 2009 18:56:02 GMT</pubDate>
			<description><![CDATA[For some reason I can't get two highlight effects to work onload of a page, for two different divs. Lordy, can anyone help? 
 
Thanks!]]></description>
			<content:encoded><![CDATA[<div>For some reason I can't get two highlight effects to work onload of a page, for two different divs. Lordy, can anyone help?<br />
<br />
Thanks!</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/javascript/">JavaScript</category>
			<dc:creator>mjjwatson</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/javascript/55949-two-scriptaculous-highlight-effects.html</guid>
		</item>
		<item>
			<title>plz help me</title>
			<link>http://www.hotscripts.com/forums/php/55947-plz-help-me.html</link>
			<pubDate>Sat, 21 Nov 2009 15:17:51 GMT</pubDate>
			<description>hi 
i m new to php.can anybosy tell me how to use php with xmlpost. 
 
can anybosy giveme some example so that i can understand or give me any book suggestions. 
 
plz asap</description>
			<content:encoded><![CDATA[<div>hi<br />
i m new to php.can anybosy tell me how to use php with xmlpost.<br />
<br />
can anybosy giveme some example so that i can understand or give me any book suggestions.<br />
<br />
plz asap</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>riya123</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55947-plz-help-me.html</guid>
		</item>
		<item>
			<title>This guy is really weird</title>
			<link>http://www.hotscripts.com/forums/lounge/55945-guy-really-weird.html</link>
			<pubDate>Sat, 21 Nov 2009 03:34:51 GMT</pubDate>
			<description><![CDATA[DomainState.com - Domain discussion forum (http://www.domainstate.com) 
 
It's a strong forum site with PR4 but this dude is using <meta name="robots" content="noindex,nofollow"> all over the pages including the homepage, if you query "site:domainstate.com" on Google, you can see there's just the...]]></description>
			<content:encoded><![CDATA[<div><a href="http://www.domainstate.com" target="_blank">DomainState.com - Domain discussion forum</a><br />
<br />
It's a strong forum site with PR4 but this dude is using &lt;meta name=&quot;robots&quot; content=&quot;noindex,nofollow&quot;&gt; all over the pages including the homepage, if you query &quot;site:domainstate.com&quot; on Google, you can see there's just the homepage that's indexed. Actually not fully indexed but just a stub or something.<br />
<br />
The owner is really weird. Ain't this the easiest SEO disaster?</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/lounge/">The Lounge</category>
			<dc:creator>ichsie2036</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/lounge/55945-guy-really-weird.html</guid>
		</item>
		<item>
			<title>@font-face help (Trying to get a graceful degrade)</title>
			<link>http://www.hotscripts.com/forums/css/55944-font-face-help-trying-get-graceful-degrade.html</link>
			<pubDate>Sat, 21 Nov 2009 02:04:27 GMT</pubDate>
			<description><![CDATA[I'm using @font-face to embed a font, but the custom font has a different scale than the system fonts it degrades to.    For example:  
 
Custom font at 25 px is about the same "size" as 12 px Arial.   
 
The problem arises when an older browser doesn't support the custom font, it degrades to...]]></description>
			<content:encoded><![CDATA[<div>I'm using @font-face to embed a font, but the custom font has a different scale than the system fonts it degrades to.    For example: <br />
<br />
Custom font at 25 px is about the same &quot;size&quot; as 12 px Arial.  <br />
<br />
The problem arises when an older browser doesn't support the custom font, it degrades to Arial, but still keeps the 25pt making the text much larger.<br />
<br />
I'm wondering if there's a CSS trick for this, or if anyone can suggest a typography program that will allow me to change the aspect ratio / height size of a font file.<br />
<br />
Thanks!<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">HTML Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">@font-face {&nbsp; <br />
&nbsp; font-family: &quot;My Font&quot;;&nbsp; <br />
&nbsp; src: url(../font/myfont.eot); /* IE */&nbsp; <br />
&nbsp; src: local(&quot;My Font&quot;), url(../font/myfont.ttf) format(&quot;truetype&quot;); /* non-IE */&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
body {<br />
&nbsp; &nbsp; &nbsp; &nbsp; font-family: &quot;My Font&quot;, Arial, sans-serif;<br />
&nbsp; &nbsp; &nbsp; &nbsp; font-size: 25px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/css/">CSS</category>
			<dc:creator>therocket954</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/css/55944-font-face-help-trying-get-graceful-degrade.html</guid>
		</item>
		<item>
			<title>Database select querry</title>
			<link>http://www.hotscripts.com/forums/database/55943-database-select-querry.html</link>
			<pubDate>Fri, 20 Nov 2009 23:14:01 GMT</pubDate>
			<description><![CDATA[Hi 
I have a working database and search facility that I need to refine a bit but am having problem with 
. 
PHP: 
--------- 
$query = "SELECT  
	model,  
	brand,  
	gc_number,  
	dir,]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
I have a working database and search facility that I need to refine a bit but am having problem with<br />
.<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">$query&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"SELECT&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;model,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;brand,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;gc_number,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;dir,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;manuals_pdffiles.id,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;pdf_file,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;category,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;pdf_info,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;DATE_FORMAT(date_available,&nbsp;'%d&nbsp;%b&nbsp;%y')&nbsp;AS&nbsp;Fdate,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;safety,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;asbestos,<br />&nbsp;&nbsp;&nbsp;&nbsp;class&nbsp;<br />FROM&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;manuals_models&nbsp;<br />LEFT&nbsp;JOIN&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;manuals_pdffiles&nbsp;ON&nbsp;manual_id&nbsp;=&nbsp;manuals_pdffiles.id&nbsp;<br />LEFT&nbsp;JOIN&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;manuals_brands&nbsp;ON&nbsp;brand_id&nbsp;=&nbsp;manuals_brands.id&nbsp;<br />WHERE&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;(model&nbsp;like&nbsp;'%$entry%')&nbsp;AND&nbsp;class&nbsp;=&nbsp;1&nbsp;<br />ORDER&nbsp;BY&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;brand,&nbsp;model&nbsp;"</span><span style="color: #007700">;&nbsp;<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>The field 'models' might contain an entry such as &quot;Potterton Puma 80e&quot;  and if the site visitor enters a search string ($entry) enters say &quot;puma 80e&quot; the select statement returns the correct entry. If they enter &quot;puma 80 e&quot; it doesn't obviously.<br />
<br />
I can easily modify the search string $entry to remove all the spaces but how do I modify the WHERE statement so that the database entry 'model' is also minus any spaces?<br />
<br />
Using the above example then 'model' would end up as &quot;PottertonPuma80e&quot; and the search string would be &quot;puma80e&quot;. Then if site visitor added extra spaces (or left any out) the select statement would find the entry?<br />
<br />
Hope that makes sence!!</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/database/">Database</category>
			<dc:creator>alane</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/database/55943-database-select-querry.html</guid>
		</item>
		<item>
			<title>PHP4 to PHP5 issue help</title>
			<link>http://www.hotscripts.com/forums/php/55942-php4-php5-issue-help.html</link>
			<pubDate>Fri, 20 Nov 2009 21:19:04 GMT</pubDate>
			<description><![CDATA[i have a page with a switch statement 
 
on php4 i was able to put this line of code in the add bar "video.php?viewby=job&&job=AI-5254" 
 
and now on php 5 that doesnt work im not recieving any errors 
 
any suggestions?]]></description>
			<content:encoded><![CDATA[<div>i have a page with a switch statement<br />
<br />
on php4 i was able to put this line of code in the add bar &quot;video.php?viewby=job&amp;&amp;job=AI-5254&quot;<br />
<br />
and now on php 5 that doesnt work im not recieving any errors<br />
<br />
any suggestions?</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>tc325</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55942-php4-php5-issue-help.html</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Random Id From table]]></title>
			<link>http://www.hotscripts.com/forums/php/55936-random-id-table.html</link>
			<pubDate>Thu, 19 Nov 2009 23:12:18 GMT</pubDate>
			<description>Heya guys 
 
ok i have a table in my db called room under the table i have roomid and z the roomid can be anything from 1 - 1000 but the z will be the same if its the same area. now what i wanna do is select from roomid where id=300 that will then give the z from that table in this case 3 
 
so...</description>
			<content:encoded><![CDATA[<div>Heya guys<br />
<br />
ok i have a table in my db called room under the table i have roomid and z the roomid can be anything from 1 - 1000 but the z will be the same if its the same area. now what i wanna do is select from roomid where id=300 that will then give the z from that table in this case 3<br />
<br />
so right now i have z=3 ,what i now wanna do is get all the roomid's where z=3 and choose a random one, and display it as a variable<br />
<br />
How can i do that ?<br />
<br />
Cheers<br />
Mike</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>smithygotlost</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55936-random-id-table.html</guid>
		</item>
		<item>
			<title>Looking for a script that hotel owners can add their listing, includes registration</title>
			<link>http://www.hotscripts.com/forums/script-requests/55928-looking-script-hotel-owners-can-add-their-listing-includes-registration.html</link>
			<pubDate>Thu, 19 Nov 2009 01:35:28 GMT</pubDate>
			<description><![CDATA[HI, 
I can't find a script for this: 
I want to create a website for hotel owners to register, add their business information to the directory through a form.  The directory will have a summary of the hotel and a link to a detail page.   
There will be 3 different levels the owner can sign up for:...]]></description>
			<content:encoded><![CDATA[<div>HI,<br />
I can't find a script for this:<br />
I want to create a website for hotel owners to register, add their business information to the directory through a form.  The directory will have a summary of the hotel and a link to a detail page.  <br />
There will be 3 different levels the owner can sign up for:<br />
free listing - free<br />
enhanced listing - $low cost  can attach images<br />
top level - $$ highest cost  can attach images<br />
<br />
I found directory listings, but not with registration.  I found registration scripts but not with directory listings.<br />
<br />
Can you recommend a script?<br />
many thanks.</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/script-requests/">Script Requests</category>
			<dc:creator>AlN</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/script-requests/55928-looking-script-hotel-owners-can-add-their-listing-includes-registration.html</guid>
		</item>
		<item>
			<title>Looking for a script that hotel owners can add their listing, includes registration</title>
			<link>http://www.hotscripts.com/forums/script-requests/55927-looking-script-hotel-owners-can-add-their-listing-includes-registration.html</link>
			<pubDate>Thu, 19 Nov 2009 01:33:54 GMT</pubDate>
			<description><![CDATA[HI, 
I can't find a script for this: 
I want to create a website for hotel owners to register, add their business information to the directory through a form.  The directory will have a summary of the hotel and a link to a detail page.   
There will be 3 different levels the owner can sign up for:...]]></description>
			<content:encoded><![CDATA[<div>HI,<br />
I can't find a script for this:<br />
I want to create a website for hotel owners to register, add their business information to the directory through a form.  The directory will have a summary of the hotel and a link to a detail page.  <br />
There will be 3 different levels the owner can sign up for:<br />
free listing - free<br />
enhanced listing - $low cost<br />
top level - $$ highest cost<br />
<br />
I found directory listings, but not with registration.  I found registration scripts but not with directory listings.<br />
<br />
Can you recommend a script?<br />
many thanks.</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/script-requests/">Script Requests</category>
			<dc:creator>AlN</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/script-requests/55927-looking-script-hotel-owners-can-add-their-listing-includes-registration.html</guid>
		</item>
		<item>
			<title>New Here - Again</title>
			<link>http://www.hotscripts.com/forums/new-members-introductions/55926-new-here-again.html</link>
			<pubDate>Thu, 19 Nov 2009 01:13:08 GMT</pubDate>
			<description>Hey all.  I use to have an account on here and I wish I had the password to it... :mad:  Anyway, I am here to get some help for my problems and hopefully help others with theirs.  I am currently having an issue and if you would like to help me here is the link: 
...</description>
			<content:encoded><![CDATA[<div>Hey all.  I use to have an account on here and I wish I had the password to it... :mad:  Anyway, I am here to get some help for my problems and hopefully help others with theirs.  I am currently having an issue and if you would like to help me here is the link:<br />
<br />
<a href="!55899!http://www.hotscripts.com/forums/php/55899-item-database-issues.html" target="_blank">http://www.hotscripts.com/forums/php...se-issues.html</a></div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/new-members-introductions/"><![CDATA[New Members & Introductions]]></category>
			<dc:creator>The Knowing</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/new-members-introductions/55926-new-here-again.html</guid>
		</item>
		<item>
			<title>dynamically create table</title>
			<link>http://www.hotscripts.com/forums/javascript/55925-dynamically-create-table.html</link>
			<pubDate>Wed, 18 Nov 2009 22:30:33 GMT</pubDate>
			<description><![CDATA[hi all, 
 
I have below table 
 
 
HTML: 
--------- 
<TABLE id=tblGrid cellSpacing=0 cellPadding=0 border=1> 
<TR class="rowHeader"> 
<td>]]></description>
			<content:encoded><![CDATA[<div>hi all,<br />
<br />
I have below table<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">HTML Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><span style="color:#008080">&lt;TABLE id=tblGrid cellSpacing=0 cellPadding=0 border=1&gt;</span><br />
<span style="color:#008080">&lt;TR class=<span style="color:#0000FF">&quot;rowHeader&quot;</span>&gt;</span><br />
<span style="color:#008080">&lt;td&gt;</span><br />
<span style="color:#000080">&lt;html:text property=<span style="color:#0000FF">&quot;name&quot;</span> style=<span style="color:#0000FF">&quot;WIDTH: 20px&quot;</span>/&gt;</span><br />
<span style="color:#008080">&lt;/td&gt;</span><br />
<span style="color:#008080">&lt;/tr&gt;</span><br />
<span style="color:#008080">&lt;TR&gt;</span><br />
<span style="color:#008080">&lt;td&gt;</span><br />
name&nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color:#008080">&lt;/td&gt;</span><br />
<span style="color:#008080">&lt;/tr&gt;</span><br />
<br />
<span style="color:#008080">&lt;/table&gt;</span></code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/javascript/">JavaScript</category>
			<dc:creator>anvi123</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/javascript/55925-dynamically-create-table.html</guid>
		</item>
		<item>
			<title>Php Sum()</title>
			<link>http://www.hotscripts.com/forums/php/55924-php-sum.html</link>
			<pubDate>Wed, 18 Nov 2009 20:31:31 GMT</pubDate>
			<description>Heya Guys 
 
Im not sure im doing something wrong or whats happening, But im trying to get the total of the field points, when i run 
 
 
PHP: 
--------- 
select sum(points) from user 
--------- 
in the database i get the total perfectly but when i make</description>
			<content:encoded><![CDATA[<div>Heya Guys<br />
<br />
Im not sure im doing something wrong or whats happening, But im trying to get the total of the field points, when i run<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">select&nbsp;sum</span><span style="color: #007700">(</span><span style="color: #0000BB">points</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">from&nbsp;user&nbsp;<br /></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>in the database i get the total perfectly but when i make<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">$adminpoints&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"select&nbsp;sum(points)&nbsp;from&nbsp;user"</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>I get an Resource id #68 error<br />
<br />
Am i doing something wrong ?<br />
<br />
Cheers<br />
Mike</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>smithygotlost</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55924-php-sum.html</guid>
		</item>
		<item>
			<title>Snowing + Konami</title>
			<link>http://www.hotscripts.com/forums/javascript/55923-snowing-konami.html</link>
			<pubDate>Wed, 18 Nov 2009 15:39:47 GMT</pubDate>
			<description><![CDATA[Hello everyone, i've been trying to work this out but it seems i can't get it right.  
What i want to do is the following, I found the konami code JS somewhere in the web, and it tells you how to activate it and everything. Now what i want to do is, once Konami Code is activated lunch a snowing...]]></description>
			<content:encoded><![CDATA[<div>Hello everyone, i've been trying to work this out but it seems i can't get it right. <br />
What i want to do is the following, I found the konami code JS somewhere in the web, and it tells you how to activate it and everything. Now what i want to do is, once Konami Code is activated lunch a snowing script that will make some snow storms.<br />
<br />
However I can't get it to lunch when the konami code is input, i can make alerts go but it seems i can't make the snow storm go.<br />
<br />
<br />
Here is the konami code code:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;script type=&quot;text/javascript&quot;&gt;<br />
var kkeys = [], konami = &quot;38,38,40,40,37,39,37,39,66,65&quot;;<br />
$(document).keydown(function(e) {<br />
&nbsp; kkeys.push( e.keyCode );<br />
&nbsp; if ( kkeys.toString().indexOf( konami ) &gt;= 0 ){<br />
&nbsp; &nbsp; $(document).unbind('keydown',arguments.callee);<br />
&nbsp; &nbsp; // Launch easter egg here&nbsp; &nbsp; <br />
$.getScript('URL OF THE JS HERE, Removed for privacy reasons', function(){<br />
&nbsp; SnowStorm()<br />
<br />
});&nbsp; <br />
&nbsp; }<br />
});<br />
<br />
&lt;/script&gt;</code><hr />
</div>Now the JavaScript for the SnowStorm is the following, I know it works right, but i can't get it to work togther with the Konami code:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">/*<br />
&nbsp;  DHTML PNG Snowstorm! OO-style Jascript-based Snow effect<br />
&nbsp;  --------------------------------------------------------<br />
&nbsp;  Version 1.3.20081215 (Previous rev: v1.2.20041121a)<br />
&nbsp;  Dependencies: GIF/PNG images (0 through 4.gif/png)<br />
&nbsp;  Code by Scott Schiller - http://schillmania.com<br />
&nbsp;  --------------------------------------------------------<br />
&nbsp;  Description:<br />
&nbsp; <br />
&nbsp;  Initializes after body onload() by default (via addEventHandler() call at bottom.)<br />
&nbsp; <br />
&nbsp;  Properties:<br />
&nbsp; <br />
&nbsp;  usePNG<br />
&nbsp;  ---------------<br />
&nbsp;  Enables PNG images if supported (&quot;false&quot; falls back to GIF)<br />
&nbsp; <br />
&nbsp;  flakeTypes<br />
&nbsp;  ---------------<br />
&nbsp;  Sets the range of flake images to use (eg. a value of 5<br />
&nbsp;  will use images ranging from 0.png to 4.png.)<br />
&nbsp; <br />
&nbsp;  flakesMax<br />
&nbsp;  ---------------<br />
&nbsp;  Sets the maximum number of snowflakes that can exist on<br />
&nbsp;  the screen at any given time.<br />
&nbsp;  <br />
&nbsp;  flakesMaxActive<br />
&nbsp;  ---------------<br />
&nbsp;  Sets the limit of &quot;falling&quot; snowflakes (ie. moving, thus<br />
&nbsp;  considered to be &quot;active&quot;.)<br />
&nbsp; <br />
&nbsp;  vMax<br />
&nbsp;  ---------------<br />
&nbsp;  Defines the maximum X and Y velocities for the storm.<br />
&nbsp;  A range up to this value is selected at random.<br />
&nbsp; <br />
&nbsp;  flakeWidth<br />
&nbsp;  ---------------<br />
&nbsp;  The width (in pixels) of each snowflake image.<br />
&nbsp; <br />
&nbsp;  flakeHeight<br />
&nbsp;  ---------------<br />
&nbsp;  Height (pixels) of each snowflake image.<br />
&nbsp;  <br />
&nbsp;  flakeBottom<br />
&nbsp;  ---------------<br />
&nbsp;  Limits the &quot;bottom&quot; coordinate of the snow.<br />
<br />
&nbsp;  snowStick<br />
&nbsp;  ---------------<br />
&nbsp;  Allows the snow to &quot;stick&quot; to the bottom of the window.<br />
&nbsp;  When off, snow will never sit at the bottom.<br />
&nbsp; <br />
&nbsp;  snowCollect<br />
&nbsp;  ---------------<br />
&nbsp;  Enables snow to pile up (slowly) at bottom of window.<br />
&nbsp;  Can be very CPU/resource-intensive over time.<br />
&nbsp;  Also requires snowStick = true.<br />
<br />
&nbsp;  followMouse<br />
&nbsp;  ---------------<br />
&nbsp;  Allow the mouse to affect the &quot;wind&quot;, left-to-right.<br />
<br />
*/<br />
<br />
var snowStorm = null;<br />
<br />
function SnowStorm() {<br />
<br />
&nbsp; // PROPERTIES<br />
&nbsp; // ------------------<br />
<br />
&nbsp; var imagePath = '/images/snow/'; // relative path to snow images (including trailing slash)<br />
&nbsp; var flakesMax = 128;<br />
&nbsp; var flakesMaxActive = 64;<br />
&nbsp; var vMaxX = 8;<br />
&nbsp; var vMaxY = 4;<br />
&nbsp; var usePNG = true;<br />
&nbsp; var flakeBottom = null;&nbsp; &nbsp; &nbsp; &nbsp; // Integer for fixed bottom, 0 or null for &quot;full-screen&quot; snow effect<br />
&nbsp; var snowStick = true;<br />
&nbsp; var snowCollect = false;<br />
&nbsp; var targetElement = null;&nbsp; &nbsp; &nbsp; // element which snow will be appended to (document body if undefined)<br />
&nbsp; var followMouse = true;<br />
&nbsp; var flakeTypes = 6;<br />
&nbsp; var flakeWidth = 5;<br />
&nbsp; var flakeHeight = 5;<br />
<br />
&nbsp; // ------------------<br />
<br />
&nbsp; var zIndex = 0; // CSS stacking order applied to each snowflake<br />
&nbsp; var flakeLeftOffset = 0; // amount to subtract from edges of container<br />
&nbsp; var flakeRightOffset = 0; // amount to subtract from edges of container<br />
<br />
&nbsp; // --- End of user section ---<br />
<br />
&nbsp; var addEvent = function(o,evtName,evtHandler) {<br />
&nbsp; &nbsp; typeof(attachEvent)=='undefined'?o.addEventListener(evtName,evtHandler,false):o.attachEvent('on'+evtName,evtHandler);<br />
&nbsp; }<br />
<br />
&nbsp; var removeEvent = function(o,evtName,evtHandler) {<br />
&nbsp; &nbsp; typeof(attachEvent)=='undefined'?o.removeEventListener(evtName,evtHandler,false):o.detachEvent('on'+evtName,evtHandler);<br />
&nbsp; }<br />
<br />
&nbsp; var classContains = function(o,cStr) {<br />
&nbsp; &nbsp; return (typeof(o.className)!='undefined'?o.className.indexOf(cStr)+1:false);<br />
&nbsp; }<br />
<br />
&nbsp; var s = this;<br />
&nbsp; var storm = this;<br />
&nbsp; this.timers = [];<br />
&nbsp; this.flakes = [];<br />
&nbsp; this.disabled = false;<br />
&nbsp; this.terrain = [];<br />
&nbsp; this.active = false;<br />
<br />
&nbsp; var isIE = navigator.userAgent.match(/msie/i);<br />
&nbsp; var isIE6 = navigator.userAgent.match(/msie 6/i);<br />
&nbsp; var isOldIE = (isIE &amp;&amp; (isIE6 || navigator.userAgent.match(/msie 5/i)));<br />
&nbsp; var isWin9X = navigator.appVersion.match(/windows 98/i);<br />
&nbsp; var isiPhone = navigator.userAgent.match(/iphone/i);<br />
&nbsp; var isBackCompatIE = (isIE &amp;&amp; document.compatMode == 'BackCompat');<br />
&nbsp; var isOpera = navigator.userAgent.match(/opera/i);<br />
&nbsp; if (isOpera) isIE = false; // Opera (which may be sneaky, pretending to be IE by default)<br />
&nbsp; var noFixed = (isBackCompatIE || isIE6 || isiPhone);<br />
&nbsp; var screenX = null;<br />
&nbsp; var screenX2 = null;<br />
&nbsp; var screenY = null;<br />
&nbsp; var scrollY = null;<br />
&nbsp; var vRndX = null;<br />
&nbsp; var vRndY = null;<br />
&nbsp; var windOffset = 1;<br />
&nbsp; var windMultiplier = 2;<br />
&nbsp; var pngSupported = (!isIE || (isIE &amp;&amp; !isIE6 &amp;&amp; !isOldIE)); // IE &lt;7 doesn't do PNG nicely without crap filters<br />
&nbsp; var docFrag = document.createDocumentFragment();<br />
&nbsp; this.oControl = null; // toggle element<br />
&nbsp; if (flakeLeftOffset == null) flakeLeftOffset = 0;<br />
&nbsp; if (flakeRightOffset == null) flakeRightOffset = 0;<br />
<br />
&nbsp; function rnd(n,min) {<br />
&nbsp; &nbsp; if (isNaN(min)) min = 0;<br />
&nbsp; &nbsp; return (Math.random()*n)+min;<br />
&nbsp; }<br />
<br />
&nbsp; this.randomizeWind = function() {<br />
&nbsp; &nbsp; vRndX = plusMinus(rnd(vMaxX,0.2));<br />
&nbsp; &nbsp; vRndY = rnd(vMaxY,0.2);<br />
&nbsp; &nbsp; if (this.flakes) {<br />
&nbsp; &nbsp; &nbsp; for (var i=0; i&lt;this.flakes.length; i++) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (this.flakes[i].active) this.flakes[i].setVelocities();<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; function plusMinus(n) {<br />
&nbsp; &nbsp; return (parseInt(rnd(2))==1?n*-1:n);<br />
&nbsp; }<br />
<br />
&nbsp; this.scrollHandler = function() {<br />
&nbsp; &nbsp; // &quot;attach&quot; snowflakes to bottom of window if no absolute bottom value was given<br />
&nbsp; &nbsp; scrollY = (flakeBottom?0:parseInt(window.scrollY||document.documentElement.scrollTop||document.body.scrollTop));<br />
&nbsp; &nbsp; if (isNaN(scrollY)) scrollY = 0; // Netscape 6 scroll fix<br />
&nbsp; &nbsp; if (!flakeBottom &amp;&amp; s.flakes) {<br />
&nbsp; &nbsp; &nbsp; for (var i=0; i&lt;s.flakes.length; i++) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (s.flakes[i].active == 0) s.flakes[i].stick();<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; this.resizeHandler = function() {<br />
&nbsp; &nbsp; if (window.innerWidth || window.innerHeight) {<br />
&nbsp; &nbsp; &nbsp; screenX = window.innerWidth-(!isIE?16:2)-flakeRightOffset;<br />
&nbsp; &nbsp; &nbsp; screenY = (flakeBottom?flakeBottom:window.innerHeight);<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; screenX = (document.documentElement.clientWidth||document.body.clientWidth||document.body.scrollWidth)-(!isIE?8:0)-flakeRightOffset;<br />
&nbsp; &nbsp; &nbsp; screenY = flakeBottom?flakeBottom:(document.documentElement.clientHeight||document.body.clientHeight||document.body.scrollHeight);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; screenX2 = parseInt(screenX/2);<br />
&nbsp; }<br />
<br />
&nbsp; this.resizeHandlerAlt = function() {<br />
&nbsp; &nbsp; screenX = targetElement.offsetLeft+targetElement.offsetWidth-flakeRightOffset;<br />
&nbsp; &nbsp; screenY = flakeBottom?flakeBottom:targetElement.offsetTop+targetElement.offsetHeight;<br />
&nbsp; &nbsp; screenX2 = parseInt(screenX/2);<br />
&nbsp; }<br />
<br />
&nbsp; this.freeze = function() {<br />
&nbsp; &nbsp; // pause animation<br />
&nbsp; &nbsp; if (!s.disabled) {<br />
&nbsp; &nbsp; &nbsp; s.disabled = 1;<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; return false;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; for (var i=0; i&lt;s.timers.length; i++) {<br />
&nbsp; &nbsp; &nbsp; clearInterval(s.timers[i]);<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; this.resume = function() {<br />
&nbsp; &nbsp; if (s.disabled) {<br />
&nbsp; &nbsp; &nbsp;  s.disabled = 0;<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; return false;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; s.timerInit();<br />
&nbsp; }<br />
<br />
&nbsp; this.toggleSnow = function() {<br />
&nbsp; &nbsp; if (!s.flakes.length) {<br />
&nbsp; &nbsp; &nbsp; // first run<br />
&nbsp; &nbsp; &nbsp; s.start();<br />
&nbsp; &nbsp; &nbsp; s.setControlActive(true);<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; s.active = !s.active;<br />
&nbsp; &nbsp; &nbsp; if (s.active) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.show();<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.resume();<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.setControlActive(true);<br />
&nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.stop();<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.freeze();<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.setControlActive(false);<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; this.stop = function() {<br />
&nbsp; &nbsp; this.freeze();<br />
&nbsp; &nbsp; for (var i=this.flakes.length; i--;) {<br />
&nbsp; &nbsp; &nbsp; this.flakes[i].o.style.display = 'none';<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; removeEvent(window,'scroll',s.scrollHandler);<br />
&nbsp; &nbsp; removeEvent(window,'resize',s.resizeHandler);<br />
&nbsp; &nbsp; if (!isIE) {<br />
&nbsp; &nbsp; &nbsp; removeEvent(window,'blur',s.freeze);<br />
&nbsp; &nbsp; &nbsp; removeEvent(window,'focus',s.resume);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; // removeEventHandler(window,'resize',this.resizeHandler,false);<br />
&nbsp; }<br />
<br />
&nbsp; this.show = function() {<br />
&nbsp; &nbsp; for (var i=this.flakes.length; i--;) {<br />
&nbsp; &nbsp; &nbsp; this.flakes[i].o.style.display = 'block';<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; this.SnowFlake = function(parent,type,x,y) {<br />
&nbsp; &nbsp; var s = this;<br />
&nbsp; &nbsp; var storm = parent;<br />
&nbsp; &nbsp; this.type = type;<br />
&nbsp; &nbsp; this.x = x||parseInt(rnd(screenX-20));<br />
&nbsp; &nbsp; this.y = (!isNaN(y)?y:-rnd(screenY)-12);<br />
&nbsp; &nbsp; this.vX = null;<br />
&nbsp; &nbsp; this.vY = null;<br />
&nbsp; &nbsp; this.vAmpTypes = [2.0,1.0,1.25,1.0,1.5,1.75]; // &quot;amplification&quot; for vX/vY (based on flake size/type)<br />
&nbsp; &nbsp; this.vAmp = this.vAmpTypes[this.type];<br />
<br />
&nbsp; &nbsp; this.active = 1;<br />
&nbsp; &nbsp; this.o = document.createElement('img');<br />
&nbsp; &nbsp; this.o.style.position = 'absolute';<br />
&nbsp; &nbsp; this.o.style.width = flakeWidth+'px';<br />
&nbsp; &nbsp; this.o.style.height = flakeHeight+'px';<br />
&nbsp; &nbsp; this.o.style.fontSize = '1px'; // so IE keeps proper size<br />
&nbsp; &nbsp; this.o.style.zIndex = zIndex;<br />
&nbsp; &nbsp; this.o.src = imagePath+this.type+(pngSupported &amp;&amp; usePNG?'.png':'.gif');<br />
&nbsp; &nbsp; docFrag.appendChild(this.o);<br />
<br />
&nbsp; &nbsp; this.refresh = function() {<br />
&nbsp; &nbsp; &nbsp; s.o.style.left = s.x+'px';<br />
&nbsp; &nbsp; &nbsp; s.o.style.top = s.y+'px';<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; this.stick = function() {<br />
&nbsp; &nbsp; &nbsp; if (noFixed || (targetElement != document.documentElement &amp;&amp; targetElement != document.body)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.o.style.top = (screenY+scrollY-flakeHeight-storm.terrain[Math.floor(s.x)])+'px';<br />
&nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.o.style.display = 'none';<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.o.style.top = 'auto';<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.o.style.bottom = '0px';<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.o.style.position = 'fixed';<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.o.style.display = 'block';<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; this.vCheck = function() {<br />
&nbsp; &nbsp; &nbsp; if (s.vX&gt;=0 &amp;&amp; s.vX&lt;0.2) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.vX = 0.2;<br />
&nbsp; &nbsp; &nbsp; } else if (s.vX&lt;0 &amp;&amp; s.vX&gt;-0.2) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.vX = -0.2;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; if (s.vY&gt;=0 &amp;&amp; s.vY&lt;0.2) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.vY = 0.2;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; this.move = function() {<br />
&nbsp; &nbsp; &nbsp; var vX = s.vX*windOffset;<br />
&nbsp; &nbsp; &nbsp; s.x += vX;<br />
&nbsp; &nbsp; &nbsp; s.y += (s.vY*s.vAmp);<br />
&nbsp; &nbsp; &nbsp; if (vX &gt;= 0 &amp;&amp; (s.x &gt;= screenX || screenX-s.x &lt; (flakeWidth+1))) { // X-axis scroll check<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.x = 0;<br />
&nbsp; &nbsp; &nbsp; } else if (vX &lt; 0 &amp;&amp; s.x-flakeLeftOffset&lt;0-flakeWidth) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.x = screenX-flakeWidth-1; // flakeWidth;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; s.refresh();<br />
&nbsp; &nbsp; &nbsp; var yDiff = screenY+scrollY-s.y-storm.terrain[Math.floor(s.x)];<br />
&nbsp; &nbsp; &nbsp; if (yDiff&lt;flakeHeight) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.active = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (snowCollect &amp;&amp; snowStick) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var height = [0.75,1.5,0.75];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var i=0; i&lt;2; i++) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; storm.terrain[Math.floor(s.x)+i+2] += height[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.o.style.left = (s.x/screenX*100)+'%'; // set &quot;relative&quot; left (change with resize)<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!flakeBottom) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (snowStick) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.stick();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.recycle();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; this.animate = function() {<br />
&nbsp; &nbsp; &nbsp; // main animation loop<br />
&nbsp; &nbsp; &nbsp; // move, check status, die etc.<br />
&nbsp; &nbsp; &nbsp; s.move();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; this.setVelocities = function() {<br />
&nbsp; &nbsp; &nbsp; s.vX = vRndX+rnd(vMaxX*0.12,0.1);<br />
&nbsp; &nbsp; &nbsp; s.vY = vRndY+rnd(vMaxY*0.12,0.1);<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; this.recycle = function() {<br />
&nbsp; &nbsp; &nbsp; s.o.style.display = 'none';<br />
&nbsp; &nbsp; &nbsp; s.o.style.position = 'absolute';<br />
&nbsp; &nbsp; &nbsp; s.o.style.bottom = 'auto';<br />
&nbsp; &nbsp; &nbsp; s.setVelocities();<br />
&nbsp; &nbsp; &nbsp; s.vCheck();<br />
&nbsp; &nbsp; &nbsp; s.x = parseInt(rnd(screenX-flakeWidth-20));<br />
&nbsp; &nbsp; &nbsp; s.y = parseInt(rnd(screenY)*-1)-flakeHeight;<br />
&nbsp; &nbsp; &nbsp; s.o.style.left = s.x+'px';<br />
&nbsp; &nbsp; &nbsp; s.o.style.top = s.y+'px';<br />
&nbsp; &nbsp; &nbsp; s.o.style.display = 'block';<br />
&nbsp; &nbsp; &nbsp; s.active = 1;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; this.recycle(); // set up x/y coords etc.<br />
&nbsp; &nbsp; this.refresh();<br />
<br />
&nbsp; }<br />
<br />
&nbsp; this.snow = function() {<br />
&nbsp; &nbsp; var active = 0;<br />
&nbsp; &nbsp; var used = 0;<br />
&nbsp; &nbsp; var waiting = 0;<br />
&nbsp; &nbsp; for (var i=s.flakes.length; i--;) {<br />
&nbsp; &nbsp; &nbsp; if (s.flakes[i].active == 1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.flakes[i].move();<br />
&nbsp; &nbsp; &nbsp; &nbsp; active++;<br />
&nbsp; &nbsp; &nbsp; } else if (s.flakes[i].active == 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; used++;<br />
&nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; waiting++;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; if (snowCollect &amp;&amp; !waiting) { // !active &amp;&amp; !waiting<br />
&nbsp; &nbsp; &nbsp; // create another batch of snow<br />
&nbsp; &nbsp; &nbsp; s.createSnow(flakesMaxActive,true);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; if (active&lt;flakesMaxActive) {<br />
&nbsp; &nbsp; &nbsp; with (s.flakes[parseInt(rnd(s.flakes.length))]) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!snowCollect &amp;&amp; active == 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; recycle();<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else if (active == -1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; active = 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; this.mouseMove = function(e) {<br />
&nbsp; &nbsp; if (!followMouse) return true;<br />
&nbsp; &nbsp; var x = parseInt(e.clientX);<br />
&nbsp; &nbsp; if (x&lt;screenX2) {<br />
&nbsp; &nbsp; &nbsp; windOffset = -windMultiplier+(x/screenX2*windMultiplier);<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; x -= screenX2;<br />
&nbsp; &nbsp; &nbsp; windOffset = (x/screenX2)*windMultiplier;<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; this.createSnow = function(limit,allowInactive) {<br />
&nbsp; &nbsp; for (var i=0; i&lt;limit; i++) {<br />
&nbsp; &nbsp; &nbsp; s.flakes[s.flakes.length] = new s.SnowFlake(s,parseInt(rnd(flakeTypes)));<br />
&nbsp; &nbsp; &nbsp; if (allowInactive || i&gt;flakesMaxActive) s.flakes[s.flakes.length-1].active = -1;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; targetElement.appendChild(docFrag);<br />
&nbsp; }<br />
<br />
&nbsp; this.timerInit = function() {<br />
&nbsp; &nbsp; s.timers = (!isWin9X?[setInterval(s.snow,20)]:[setInterval(s.snow,75),setInterval(s.snow,25)]);<br />
&nbsp; }<br />
<br />
&nbsp; this.init = function() {<br />
&nbsp; &nbsp; for (var i=0; i&lt;2048; i++) {<br />
&nbsp; &nbsp; &nbsp; s.terrain[i] = 0;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; s.randomizeWind();<br />
&nbsp; &nbsp; s.createSnow(snowCollect?flakesMaxActive:flakesMaxActive*2); // create initial batch<br />
&nbsp; &nbsp; addEvent(window,'resize',s.resizeHandler);<br />
&nbsp; &nbsp; addEvent(window,'scroll',s.scrollHandler);<br />
&nbsp; &nbsp; if (!isIE) {<br />
&nbsp; &nbsp; &nbsp; addEvent(window,'blur',s.freeze);<br />
&nbsp; &nbsp; &nbsp; addEvent(window,'focus',s.resume);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; s.resizeHandler();<br />
&nbsp; &nbsp; s.scrollHandler();<br />
&nbsp; &nbsp; if (followMouse) {<br />
&nbsp; &nbsp; &nbsp; addEvent(document,'mousemove',s.mouseMove);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; s.timerInit();<br />
&nbsp; }<br />
<br />
&nbsp; var didInit = false;<br />
<br />
&nbsp; this.start = function(bFromOnLoad) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!didInit) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; didInit = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else if (bFromOnLoad) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // already loaded and running<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; if (typeof targetElement == 'string') {<br />
&nbsp; &nbsp; &nbsp; targetElement = document.getElementById(targetElement);<br />
&nbsp; &nbsp; &nbsp; if (!targetElement) throw new Error('Snowstorm: Unable to get targetElement');<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!targetElement) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; targetElement = (!isIE?(document.documentElement?document.documentElement:document.body):document.body);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; if (targetElement != document.documentElement &amp;&amp; targetElement != document.body) s.resizeHandler = s.resizeHandlerAlt; // re-map handler to get element instead of screen dimensions<br />
&nbsp; &nbsp; s.resizeHandler(); // get bounding box elements<br />
&nbsp; &nbsp; if (screenX &amp;&amp; screenY &amp;&amp; !s.disabled) {<br />
&nbsp; &nbsp; &nbsp; s.init();<br />
&nbsp; &nbsp; &nbsp; s.active = true;<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />
<br />
&nbsp; if (document.addEventListener) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; // safari 3.0.4 doesn't do DOMContentLoaded, maybe others - use a fallback to be safe.<br />
&nbsp; &nbsp; &nbsp; &nbsp; document.addEventListener('DOMContentLoaded',function(){s.start(true)},false);<br />
&nbsp; &nbsp; window.addEventListener('load',function(){s.start(true)},false);<br />
&nbsp; } else {<br />
&nbsp; &nbsp; addEvent(window,'load',function(){s.start(true)});<br />
&nbsp; }<br />
<br />
}<br />
<br />
<br />
<br />
snowStorm = new SnowStorm();</code><hr />
</div><br />
If anyone could help me, that would be great.<br />
Thank You.<br />
donald_nqn</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/javascript/">JavaScript</category>
			<dc:creator>donald_nqn</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/javascript/55923-snowing-konami.html</guid>
		</item>
		<item>
			<title>Dynamic next and previous navigation within directory without database</title>
			<link>http://www.hotscripts.com/forums/script-requests/55922-dynamic-next-previous-navigation-within-directory-without-database.html</link>
			<pubDate>Wed, 18 Nov 2009 10:24:42 GMT</pubDate>
			<description><![CDATA[_Basic information:_ 
 
A folder/directory containing around 50 differently named .html files (not numerically numbered, but named with the page's content's reference code and which would be increased by several new pages a month) 
 
A 'next' and 'previous' button/link on each of the pages/files. 
...]]></description>
			<content:encoded><![CDATA[<div><u>Basic information:</u><br />
<br />
A folder/directory containing around 50 differently named .html files (not numerically numbered, but named with the page's content's reference code and which would be increased by several new pages a month)<br />
<br />
A 'next' and 'previous' button/link on each of the pages/files.<br />
<br />
<br />
Is it possible to use PHP look within the directory, pehaps sending a current page id or location on clicking 'next' or 'prev', to then <i>next</i> or <i>previous</i> dynamically through those files alpha-numerically relative to the page currently the user is on without the use of a database?<br />
<br />
Cheers for the brain picking</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/script-requests/">Script Requests</category>
			<dc:creator>j_uu</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/script-requests/55922-dynamic-next-previous-navigation-within-directory-without-database.html</guid>
		</item>
		<item>
			<title>Script program for a website</title>
			<link>http://www.hotscripts.com/forums/script-requests/55921-script-program-website.html</link>
			<pubDate>Wed, 18 Nov 2009 08:58:46 GMT</pubDate>
			<description>I am looking for somebody to create ascript similar to easysearchdirectory but exactly. Customize to my needs, instead of making it for different companies I want it for a specific type of business. F u have an idea of what I am talking about and/or need more details and are willing to create it,...</description>
			<content:encoded><![CDATA[<div>I am looking for somebody to create ascript similar to easysearchdirectory but exactly. Customize to my needs, instead of making it for different companies I want it for a specific type of business. F u have an idea of what I am talking about and/or need more details and are willing to create it, contact me at gabr.rodr[at]yahoo[dot]com. Also I am looking for reasonable price.</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/script-requests/">Script Requests</category>
			<dc:creator>Titolo</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/script-requests/55921-script-program-website.html</guid>
		</item>
	</channel>
</rss>
