/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: William Bontrager | http://www.bontragerconnection.com/ */
// Copyright 2006 Bontrager Connection, LLC
// This version of the script redirects automatically.
// The Web site has a few other methods for directing also:
// http://www.bontragerconnection.com/library/redirect_with_a_cookie.shtml

// Three items can be customized (values between quotation marks):
//
// 1. What URL shall the browser be redirected 
//    to if a cookie was previously set?

//var RedirectURL = "index.html";
var RedirectURL = "index.html";

// 2. How many days shall the cookie live in 
//    the visitor's browser (0 means remove 
//    cookie whenever browser closes)?

var DaysToLive = "0";

// 3. What name shall the cookie have (any 
//    sequence of alphabetical characters 
//    is okay, so long as the name doesn't 
//    conflict with any other cookies that 
//    this web page might be setting.)?

var CookieName = "ID";

// No other customization is required.

function Action() {
location.href = RedirectURL;
}

DaysToLive = parseInt(DaysToLive);
var Value = 'allowd to view';

function GetCookie() {
var cookiecontent = '';
if(document.cookie.length > 0) {
   var cookiename = CookieName + '=';
   var cookiebegin = document.cookie.indexOf(cookiename);
   var cookieend = 0;
   if(cookiebegin > -1) {
      cookiebegin += cookiename.length;
      cookieend = document.cookie.indexOf(";",cookiebegin);
      if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
      cookiecontent = document.cookie.substring(cookiebegin,cookieend);
      }
   }
if(cookiecontent.length > 0) { return false; }
return true;
}

function SetCookie() {
var exp = '';
if(DaysToLive > 0) {
   var now = new Date();
   then = now.getTime() + (DaysToLive * 24 * 60 * 60 * 1000);
   now.setTime(then);
   exp = '; expires=' + now.toGMTString();
   }
document.cookie = CookieName + '=' + Value + exp;
return true;
//location.href = RedirectURL;
//window.location="http://www.pussylist.com/start.html";
}

function GoToLoc() {
	var table_of_contents = "index.html";
	var gDomain = window.location.hostname;
	var sPath = window.location.pathname;
	var content = (location.search) ? location.search.substring(1, location.search.length) : table_of_contents;
	
	window.location="http://www.bluebirdscans.com/" + content;
	//window.location=gDomain + "/" + content;
}
//SetCookie();

function AgeOK() {
	document.getElementById("okay").style.display = "block";
	document.getElementById("ohno").style.display = "none";
}

function AgeNO() {
	document.getElementById("okay").style.display = "none";
	document.getElementById("ohno").style.display = "block";
}
