/*
Author: Robert Hashemian
http://www.hashemian.com/

You can use this code in any manner so long as the author's
name, Web address and this disclaimer is kept intact.
********************************************************
Usage Sample:

<script language="JavaScript">
WPC_BackColor = "linen";
WPC_ForeColor = "navy";
</script>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<script language="JavaScript" 
src="http://www.hashemian.com/js/comments.js.php?a=SiteID"></script>
</td></tr><tr><td align="right">
<a style="color:blue;font-size:x-small;text-decoration:none" 
href="http://www.hashemian.com/tools/ViewAddComments.php?a=SiteID" 
target="_blank" title="View/Add comments">View/Add comments</a></td></tr></table>
*/

if (typeof(WPC_BackColor)=="undefined")
  WPC_BackColor = "";
if (typeof(WPC_ForeColor)=="undefined")
  WPC_ForeColor= "";

document.write('<br><fieldset style="background-color:' + WPC_BackColor + ';color:' + WPC_ForeColor + ';padding:5px;width:500px;"><legend><small><b>Comments (62)</b> [<a style="color:blue;font-size:xx-small;text-decoration:none" href="http://www.hashemian.com/tools/ViewAddComments.php?a=111785611542a12173aae8d" target="_blank">View/Add</a>]</small></legend><small><br>by: <b style=\'color:green\'>rh [admin]</b><img align=\'absbottom\' border=\'0\' alt=\'Site Admin\' src=\'http://www.hashemian.com/images/site-admin.gif\'> on <b>2009-09-18 13:29:57</b><br> <i>read here: http://www.hashemian.com/blog/2007/08/ip-address-and-host-name-scripts.htm</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>Tech</b> on <b>2009-09-17 18:00:01</b><br> <i>What is the php script that is used to feed the IP to the JavaScript?</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>kh again!</b> on <b>2009-07-22 04:21:44</b><br> <i>solved the firefox problem. I had to add an Id label to the text fields. I set the name and Id as the same.<br>&lt;input name=&quot;ip&quot; id=&quot;ip&quot; size=&quot;75&quot; type=&quot;hidden&quot;&gt;<br>&lt;script type=&quot;text/javascript&quot;&gt;<br>document.getElementById(&quot;ip&quot;).value=VIH_HostIP; &lt;/script&gt;<br><br>&lt;input name=&quot;host&quot; id=&quot;host&quot; size=&quot;75&quot; type=&quot;hidden&quot;&gt;<br>&lt;s</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>kh</b> on <b>2009-07-21 22:50:39</b><br> <i>and lastly<br>Why does this not work in Firefox?<br>Any fixes to my code?</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>kh</b> on <b>2009-07-21 22:38:19</b><br> <i>noticed my second item was truncated. Here it is<br>&lt;input<br> name=&quot;host&quot; size=&quot;75&quot; type=&quot;text&quot;&gt;<br>              &lt;script language=&quot;JavaScript&quot;&gt;<br>document.getElementById(&quot;host&quot;).value=VIH_HostName; &lt;/script&gt;</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>kh</b> on <b>2009-07-21 22:30:57</b><br> <i>Also - must include the original javascript in the body. Can be hidden.<br><br>For the html fields, change<br>type=&quot;text&quot; to<br>type=&quot;hidden&quot;<br><br>if you want the fields to be invisible, but still be emailed to you.</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>kh</b> on <b>2009-07-21 22:28:35</b><br> <i>This works on IE 8.06001, not on Firefox 3.0.11<br><br>&lt;input name=&quot;ip&quot; size=&quot;75&quot;<br> type=&quot;text&quot;&gt;<br>              &lt;script language=&quot;JavaScript&quot;&gt;<br>document.getElementById(&quot;ip&quot;).value=VIH_HostIP; &lt;/script&gt;&lt;input<br> name=&quot;host&quot; size=&quot;75&quot; type=&quot;text&quot;&gt;<br>              &lt;script language=&quot;JavaScript&quot;&gt;<br>document.getElementById(&q</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>kh</b> on <b>2009-07-21 21:35:44</b><br> <i>I think I got it. Will post the results later!</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>kh</b> on <b>2009-07-21 19:52:19</b><br> <i>I am trying to get the IP and Host into a html form field. I read what you said to Mary Tauber<br>document.getElementById(&quot;hfield&quot;).value=VIH_HostIP; <br><br>But i need more info. <br>Where do I paste the above code?<br>Or is there another way to do it.<br><br>PS - live your script - at least I can see my own IP and Host - have looked for two days to get that far!</i> <hr align="center" size="1" color="lightgrey" width="90%"> by: <b>harish</b> on <b>2009-06-04 08:01:04</b><br> <i>this information is very helpful for me. I have &lt;a href=&quot;http://webdesigningcompany.net/&quot;&gt;design a website&lt;/a&gt;. This is very useful for me because I want to display the ip address of the visitors on the my website. so that this information is very helpful for me.</i> <hr align="center" size="1" color="lightgrey" width="90%"> <a href="http://www.hashemian.com/tools/ViewAddComments.php?a=111785611542a12173aae8d" target="_blank" style="color:blue;text-decoration:none">more&hellip;</a><div align="center" style="font-size:xx-small">*** Pop-up blockers may interfere with this service. ***<br><a href="http://www.hashemian.com/tools/page-commenting.php" target="_blank" style="font-size:xx-small;color:blue;text-decoration:none">About this service</a></div></small></fieldset>');

