// Add the following in the <head> section:
// <script language="JavaScript" type="text/javascript" src="disclaimer.js"></script>

// Add the following in the <body> tag:
// onload="disclaimer()"

// Edit the items following where they appear below:
// openWin('<url here>','<width>','<height>','yes');



// Get a cookie value
function getCookie(name)
{
	var index = document.cookie.indexOf(name + "=");
	if (index == -1) return null;
	index = document.cookie.indexOf("=", index) + 1;
	var endcha = document.cookie.indexOf(";", index);
	if (endcha == -1) endcha = document.cookie.length;
	return unescape(document.cookie.substring(index, endcha));
}

// Write a cookie
function writeCookie(name, value)
{
	document.cookie = name +"=" + escape(value)
}


// Open a remote Window
function openWin(url,width,height,scroll)
{
	windowName = "itemWindow";
	featureList = "resizable=yes,status=no,toolbar=no,menubar=no";
	if(arguments[4]){windowName=arguments[4]};
	if(arguments[5]){featureList=arguments[5]};
	msgWindow = open(url,windowName,"width="+width+",height="+height+",scrollbars="+scroll+","+featureList);
}

// Main funciton
function disclaimer(url)
{
	check = getCookie('disclaimer');
	if (check == null || check == "")
		{
			writeCookie('redirect',url);
			document.location = "disclaimer.html";
			/* openWin('disclaimer.html','550','350','yes'); */
		}
}

// Jump
function jump()
{
	jumpto = getCookie('redirect');

	if (jumpto == null || jumpto == "")
		{
			window.location = "index.html";
		}
	else
		{
			window.location = jumpto;
		}

}
