<!-- The Scripts on this page have been modified for the UK24Net Cookie tools pages -->

<!-- Original:  Joe Norman (joe@wdrealty.com) -->
<!-- Web Site:  http://www.jacksonville.net/~joman/ArraysNCookies.html -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var arrRecords = new Array();
var arrCookie = new Array();
var recCount = 0;
var strRecord="";
var tmp1Record="";
expireDate = new Date;
expireDate.setDate(expireDate.getDate()+365);

function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i = 0; i < thisCookie.length; i++) {
if (cookieName == thisCookie[i].split("=")[0]) {
return thisCookie[i].split("=")[1];
   }
}
return 0;
}
function loadCookie() {
if(document.cookie != "") {
arrRecords = cookieVal("Records").split(",");
//currentRecord();
   }
}




function popwin() { win = window.open("popwin.html ", 'popup', 'width=400, height=460,toolbar = no, status = no'); }


function displayHTML() {

win = window.open("", 'popup', 'toolbar = yes, status = yes');
strRecord = "";
for(i = 0; i < document.frm1.elements.length; i++) { strRecord = strRecord + document.frm1.elements[i].value + "|"; }
arrRecords[recCount] = strRecord;
document.frm2.add.value = "  NEW  ";
document.cookie = "Records="+arrRecords+";expires=" + expireDate.toGMTString();
var inf = "<a href=\"" + document.frm1.elements[1].value + "\">" + document.frm1.elements[0].value + "</a> " + document.frm1.elements[3].value ;
win.document.write("<p>" + inf + "</p>");
win.document.write("<form><textarea cols=40 rows=14>" + inf + "</textarea></form>") ;

}



//list
function listRecords() 
{

 if (arrRecords.length != "")
 {
  
  for (l = 0; l < arrRecords.length ; l++)
   {
   tmp1Record = arrRecords[l];
   currRecord = tmp1Record.split("|");
       document.write("<a href=\"" + currRecord[1] + "\">" + currRecord[0] + "</a><br />");
   }
 }
document.write("</p>");
}



// Splice method Protype Function
// Peter Belesis, Internet.com
// http://www.dhtmlab.com/
 
if (!Array.prototype.splice) {
   function array_splice(ind,cnt) {
      if (arguments.length == 0) return ind;
      if (typeof ind != "number") ind = 0;
      if (ind < 0) ind = Math.max(0,this.length + ind);
      if (ind > this.length) {
            if (arguments.length > 2) ind = this.length;
            else return [];
            }
      if (arguments.length < 2) cnt = this.length-ind;
      cnt = (typeof cnt == "number") ? Math.max(0,cnt) : 0;
      removeArray = this.slice(ind,ind+cnt);
      endArray = this.slice(ind+cnt);
      this.length = ind;
      for (var i = 2; i < arguments.length; i++) { this[this.length] = arguments[i];  }
      for(var i = 0; i < endArray.length; i++) { this[this.length] = endArray[i];     }
      return removeArray;
      }
Array.prototype.splice = array_splice;
}
recCount = 0;
loadCookie();



//general cookie stuff

function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}


function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function showBookmark()
{


var inf = readCookie("Records")
document.frm1.cookieText.value = inf;
//winB.document.write("<p>" + inf + "</p>");


}

function setBookmark()
{

//winB = window.open(" ", 'popup', 'toolbar = yes, status = yes');

var inf = document.frm1.cookieText.value
createCookie("Records",inf,365);
//winB.document.write("<p>" + inf + "</p>");


}
//  End -->
