var win = 0;
var today = new Date();
FixCookieDate(today);

function bookmark(url,name)
{
if (document.all)
{window.external.AddFavorite(url,name);}
}

function sample(page)
{
url = "http://www.stencil-library.com/docs/" + page;
var width = parseInt( screen.width * 0.6 );
var height = parseInt( screen.height * 0.6 );
var left = parseInt( ( screen.width - width ) /2 );
if (win){win.close();}
win=window.open(url,"Sample","toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=0,height=" + height + ",width=" + width + ",left=" + left + ",top=0");
}

function c(url)
{
root = "http://www.currency-convertor.com/cgi-bin/c?a=" + url + "&l=44&x=UKA00005";
if (win){win.close();}
win=window.open(root,"Currency","toolbar=0,menubar=0,scrollbars=0,resizable=0,width=588,height=252");
}

function FixCookieDate(date)
{
var base = new Date(0);
var skew = base.getTime();	 				// dawn of (Unix) time - should be 0 
if (skew > 0)							// Except on the Mac - ahead of its time 
{date.setTime(date.getTime() - skew)};
}

//      SetCookie (myCookieVar, cookieValueVar, null, "/myPath", null, true);
//
//	function SetCookie (name,value,expires,path,domain,secure) {
//	  document.cookie = name + "=" + escape (value) +
//    ((expires) ? "; expires=" + expires.toGMTString() : "") +
//    ((path) ? "; path=" + path : "") +
//    ((domain) ? "; domain=" + domain : "") +
//    ((secure) ? "; secure" : "");
// }

function setcookie(session)
{
var time = today.valueOf();					// elapsed milliseconds since 01 Jan 1970
var data = time + form1.id.value + session; 
document.cookie = "NB=" + data + ";path=/";
return true;
}

function makeArray()
{
	var args = makeArray.arguments;
	for (var i = 0 ; i < args.length;i++)
	{this[i] = args[i];}
	this.length = args.length;
}
var rangeurl = new makeArray("",
"cat027h.htm",
"cat119h.htm",
"cat105h.htm",
"cat089h.htm",
"cat268h.htm",
"cat309h.htm",
"cat067h.htm",
"cat201h.htm",
"cat336h.htm",
"cat082h.htm",
"cat077h.htm",
"cat292h.htm",
"cat134h.htm",
"cat137h.htm",
"cat036h.htm",
"cat001h.htm",
"cat057h.htm",
"cat072h.htm",
"cat247h.htm",
"cat322h.htm",
"cat270h.htm",
"cat127h.htm",
"cat050h.htm",
"cat315h.htm",
"cat132h.htm",
"cat046h.htm",
"cat026h.htm",
"cat289h.htm",
"cat501h.htm",
"cat505h.htm",
"access.htm",
"gridfinder.htm",
"exclusives.htm");
function gorange(form)
{
	ix = form.menu.selectedIndex;
	form.menu.selectedIndex = 0;
	if (rangeurl[ix] != "")
	{
	window.location.href = "http://www.stencil-library.com/docs/" + rangeurl[ix];
	}
}
