<!--
//Do Browser Detection
var browserName=navigator.appName; 
if (browserName=="Netscape") {
  document.write("<link href=/style/mozilla.css rel=stylesheet type=text/css media=screen />");
}
else
{
  if (browserName=="Microsoft Internet Explorer") {
      document.write("<link href=/style/ie.css rel=stylesheet type=text/css media=screen />");
  }
  else
  {
      if (browserName=="Opera") {
          document.write("<link href=/style/mozilla.css rel=stylesheet type=text/css media=screen />");
          document.write("<link href=/style/opera.css rel=stylesheet type=text/css media=screen />");
      }
      else
      {
          document.write("<link href=/style/mozilla.css rel=stylesheet type=text/css media=screen />");
          alert("You seem to be using '" + browserName + "' as your browser. This site has only been tested with IE 6 & Mozilla 1.7.1.");
      }
  }
}

// Confirm Delete Function
function confirmDelete(delete_id, content_type, specified_return_page) {
  var answer = confirm('You are about to permenantly remove the selected content from the database.\nPlease click OK to proceed, or CANCEL abort the process.');
  if (answer == true) {
      document.location.href = './modules/deletedata.php?current=' + delete_id +  '&type=' + content_type + '&returnpage=' + specified_return_page;
  }
}

// Confirm Delete My Profile
function confirmDeleteMyProfile(delete_id) {
  var answer = confirm('If you choose to delete your account, we will remove all your details from the site and you will no-longer receive any email communications from us.\n\nPlease click OK to proceed, or CANCEL abort the process.');
  if (answer == true) {
      document.location.href = './modules/deletemyprofile.php?current=' + delete_id;
  }
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}
//-->
