// Function for region image changes
function region(name) {
			object = return_obj('regionimg');
			object.className=name;
}

// Function for email cloaking technique - functionised by Lee Jordan : SpamATadAsisDoTcodoTuK
function spamProof(username, hostname, subject)	{
	var linktext = username + "@" + hostname; 
	if(subject){ var subject = "?subject=" + subject;	} else { var subject = "";}
	
	document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + subject + ">" + linktext + "<\/a>") 
}








// Copyright 2003 Bontrager Connection, LLC
// Code obtained from www.willmaster.com/possibilities/
// Free to use if copyright and URL lines stay with the code.
//
// See article "New Link Marker" linked from 
//    www.willmaster.com/possibilities/archives/
//    for implementation information.

//
// Three items need to be customized or verified correct:
//

// Item 1:
// Between the apostrophies, specify what to print when a new 
//    link is determined. This might be the word "NEW" or an 
//    image to that effect. HTML code is okay.

//PrintForNew = '<span class="newitem">you may not have seen this item before</span> ';


// Item 2:
// Following the equals sign ("="), type the number of days the 
//    links cookie shall remain on the user's computer. Ten years 
//    (3652 days) is the maximum.

//CookieDays = 60;


// Item 3:
// Following the equals sign ("="), type the maximum number of 
//    seconds your page requires to load. Consider that some 
//    people might access your page with dialup or with cell 
//    phone. It's better to over-estimate by a few seconds than 
//    to type a number too small. This number determines how 
//    long the JavaScript will wait before setting the cookie 
//    with the current links, and all links on the page will 
//    need to have been loaded before that happens.

//LoadTimeSeconds = 8;


//
// Nothing else needs to be customized in this code section.
//

//HasCookie = false;
//CookieName = 'ThisURL' + escape(document.URL);
//if(PrintForNew         == ''  ) { PrintForNew     = 'new item'; }
//if(parseInt(CookieDays) < 1   ) { CookieDays      = 1;       }
//if(parseInt(CookieDays) > 3652) { CookieDays      = 3652;    }
//if(LoadTimeSeconds      < 1   ) { LoadTimeSeconds = 15;      }
//LoadTimeSeconds *= 1000;
//URLarray = new Array();

function RetrieveURLcookie() {
var Cc = '';
if(document.cookie.length > 0) {
	var Cn = CookieName + '=';
	var Cb = document.cookie.indexOf(Cn);
	var Ce = 0;
	if(Cb > -1) {
		Cb += Cn.length;
		Ce = document.cookie.indexOf(";",Cb);
		if(Ce < Cb) { Ce = document.cookie.length; }
		Cc = document.cookie.substring(Cb,Ce);
		}
	}
if(Cc == '') { return false; }
URLarray = Cc.split('&');
return true;
} // end of function RetrieveURLcookie()

function FormatCookieDate(t) {
var d = new Date(t);
var i = d.getDay();
var s = '';
if     (i == 0) { s = 'Sunday, ';    }
else if(i == 1) { s = 'Monday, ';    }
else if(i == 2) { s = 'Tuesday, ';   }
else if(i == 3) { s = 'Wednesday, '; }
else if(i == 4) { s = 'Thursday, ';  }
else if(i == 5) { s = 'Friday, ';    }
else if(i == 6) { s = 'Saturday, ';  }
i = d.getDate();
if(i < 10) { s += '0'; }
s += i + '-';
i = d.getMonth();
if     (i == 0)  { s += 'Jan-'; }
else if(i == 1)  { s += 'Feb-'; }
else if(i == 2)  { s += 'Mar-'; }
else if(i == 3)  { s += 'Apr-'; }
else if(i == 4)  { s += 'May-'; }
else if(i == 5)  { s += 'Jun-'; }
else if(i == 6)  { s += 'Jul-'; }
else if(i == 7)  { s += 'Aug-'; }
else if(i == 8)  { s += 'Sep-'; }
else if(i == 9)  { s += 'Oct-'; }
else if(i == 10) { s += 'Nov-'; }
else if(i == 11) { s += 'Dec-'; }
i = d.getFullYear();
var ss = String(i);
s += ss.substr(2) + ' ';
i = d.getHours();
if(i < 10) { s += '0'; }
s += i + ':';
i = d.getMinutes();
if(i < 10) { s += '0'; }
s += i + ':';
i = d.getSeconds();
if(i < 10) { s += '0'; }
s += i + ' GMT';
return s;
} // end of function FormatCookieDate()

function PutURLcookie() {
var numlinks = document.links.length - 1;
var ls = escape(document.links[0]);
for(var i = 1; i <= numlinks; i++) { ls += '&' + escape(document.links[i]); }
var date = new Date();
var exptime = date.getTime();
exptime += CookieDays * 24 * 60 * 60 * 1000;
var expdate = FormatCookieDate(exptime);
document.cookie = CookieName + '=' + ls + '; expires=' + expdate;
} // end of function PutURLcookie()

function IsNew(link) {
if(HasCookie == false) { return; }
var l = escape(link);
for(var i = 0; i < URLarray.length; i++) {
	if(l == URLarray[i]) { return; }
	}
document.write(PrintForNew);
} // end of function IsNew()

//HasCookie = RetrieveURLcookie();
//setTimeout('PutURLcookie()',LoadTimeSeconds);

function CountCookie(){
	var numlinks = document.links.length - 1;
	var ls = escape(document.URL);
	for(var i = 0; i <= numlinks; i++)
	{ ls += '&' + escape(document.links[i]); }
	var ii = ls.length;
	ii += 41;
	return ii;
}
function ShowCount(){
	cookiecount = CountCookie();
	remaining = ((4800-cookiecount)/1000);
	remaining = remaining.toString();
	
	cookiecount = cookiecount/1000;
	cookiecount = cookiecount.toString();
	document.writeln('Page link size : ' + cookiecount.substr(0,3) +'kb ('+ remaining.substr(0,3) +'kb)');
}
