//this version 15/03/2005 (K.Purchase)
var d = document;

function g(o) {return d.getElementById(o);}
//function s(o) {g(o).style.visibility = 'visible';}
function h(o) {g(o).style.visibility = 'hidden';}

function Is(){
  this.ver=navigator.appVersion;
  this.agent=navigator.userAgent;
  this.dom=document.getElementById?1:0;
  this.opera5=this.agent.indexOf("Opera 5")>-1;
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6;
  this.mac=this.agent.indexOf("Mac")>-1;
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);
  return this;
}

function golink(u) {
	window.location.href = u;
}


function moveItem(o, x, y) {
	g(o).style.left = x+'px';
	g(o).style.top = y+'px';
}

function setWidth(o, w) {
	g(o).style.width = w+'px';
}

function itemSize(o) {
	var size = {width: 0, height: 0 };
	size.width = g(o).offsetWidth;//(document.all) ? g(o).clientWidth : g(o).offsetWidth;
	size.height = g(o).offsetHeight;//(document.all) ? g(o).clientHeight : g(o).offsetHeight;
	return size;
}

rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
	rnd.seed = (rnd.seed*9301+49297) % 233280;
	return rnd.seed/(233280.0);
}

function rand(number) {
	return Math.floor(rnd()*number);
}

function getCookieVal (offset) { 
	var endstr = document.cookie.indexOf (";", offset); 
	if (endstr == -1) 
		endstr = document.cookie.length; 
	return unescape(document.cookie.substring(offset, endstr));
}

function getCookie(name) { 
	var arg = name + "="; 
	var alen = arg.length; 
	var clen = document.cookie.length; 
	var i = 0; 
	while (i < clen) { 
		var j = i + alen; 
		if (document.cookie.substring(i, j) == arg) 
			return getCookieVal (j); 
		i = document.cookie.indexOf(" ", i) + 1; 
		if (i == 0) break; 
	} 
	return null;
}

function setCookie (name, value) { 
	var argv = setCookie.arguments; 
	var argc = setCookie.arguments.length; 
	var expires = (argc > 2) ? argv[2] : null; 
	var domain = (argc > 4) ? argv[4] : null; 
	var secure = (argc > 5) ? argv[5] : false; 

	document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((domain == null) ? "" : ("; domain=" + domain)) + "; path=/" + 
		((secure == true) ? "; secure" : "");
}

function deleteCookie (name) { 
	var exp = new Date(); 
	exp.setTime (exp.getTime() - 1);
	var cval = getCookie (name); 
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

function setAccessibility() {
	if(getCookie('accessible') == 'true') {
		accessible = true;
		accessOn();
	}
}
	
function openwin(sURL) {
	openWin(sURL);
}
