Italian ...  This Cookie would be normally written by page loading ( See Nb /*...*/ ) on users'machine. 
Cookie's Layout passed to function : [ function SetCookie(name,value,expiredays) ] : ...
... MultipleInfos=WebSite:www.ics3w.com/username:Non registrato/VisitCount:1

Reload this page ( only when links are used ) to read in red color the cookie page in ASCI format into above line.
Modify the cookie by writing into the right text box your name , then doubleclik into this box ... Val_Input :
<Script language=JavaScript>
<!--    WebSite  username  VisitCount  the_info  Delete
function readTheCookie(the_info) {  var the_cookie = document.cookie; // load the cookie into a variable.
 var the_cookie = unescape(the_cookie); // unescape it, so if we click for reading the ASCI format is converted.
 var broken_cookie = the_cookie.split("="); // separate the values from the cookie name.
 var the_values = broken_cookie[1];  // This is right side Cookie part [1] left is MultipleInfos[0].
 var separated_values = the_values.split("/");// break each name:value pair into an array.
         var property_value = ""; //Simply declares this variable.
       for(var i=0; i< separated_values.length;i++)/* loop to load up the associated arrays... ...the_info[i]*/
   { property_value = separated_values[i]; var broken_info = property_value.split(":");
var the_property = broken_info[0];  var the_value = broken_info[1]; /*Follows yellow code hereafter link.*/ } }
//-->  /  The Cookie is , in this esercise case , not written onload(), please click on  :  Set 45gg   to write the Cookie page, or double click into this box : leaving (23sec) for expiring, or overwrite it if you please.  Layouts  Complementary Scripts. */
</script> Back to : ... String Manager
The other layouts and the code to call the functions.
<Script language=javascript>
<!--
function SetCookie(name,value,expiredays)
{var ExpireDate = new Date();
ExpireDate.setTime(ExpireDate.getTime()+(expiredays*24*3600*1000));
document.cookie=name+"="+escape(value)+((expiredays==null)?"": ";expires="+ExpireDate.toGMTString());}
//-->
</script>
The argument expiredays is better to be passed as Integer,
as is a little difficult to let the interpreter do it also with the eval() method.
The cookie text input box code : <input type=text name=SCtxt value=0.00018 size="6"
ondblclick="SetCookie('MultipleInfos','WebSite:www.ics3w.com/username:Non registrato/VisitCount:1',this.value)">


Il Link 45gg :
<a href="javascript:SetCookie('MultipleInfos','WebSite:www.ics3w.com/username:Non registrato/VisitCount:1',45)">Set 45gg</a>

Il Link WebSite :<a href="javascript:readTheCookie('WebSite')">WebSite</a>

The error manager coding & text translation :
if(document.cookie==""||document.cookie.substring(0,13) !="MultipleInfos")
{alert('Error Script Manager :\nThere is no cookie on your hard disk, or it is expired !\nClick on Link : Set 45gg or\ndouble click into the text box to set a cookie and exercise this program !');return}
The addings ( to retrieve desired values ) Top



The addings

This code is to be added to main Script after all variables of loop and before the closing of the loop-body self.
if(the_info=="WebSite")
{if(i==1)break;
document.forms.monitor.txtM.value=the_value}
if(the_info=="username")
{if(i==2)break;
document.forms.monitor.txtM.value=the_value}
if(the_info=="VisitCount")
{if(i==3)break;
document.forms.monitor.txtM.value=the_value}
if(the_info=="the_info")
{document.forms.monitor.txtM.value=separated_values[0]+'; '+separated_values[1]+'; '+separated_values[2]+';'}
This is an alternative code :
if(the_info=="WebSite") {document.forms.monitor.txtM.value=separated_values[0].substring(8)} if(the_info=="username") {document.forms.monitor.txtM.value=separated_values[1].substring(9)} if(the_info=="VisitCount") {document.forms.monitor.txtM.value=separated_values[2].substring(11)}
Layout (function SetCookie(name,value,expiredays) ) Top