
 function goToURL() { history.go(-1); }
  

function addbookmark()
{
  if (window.sidebar) {
    window.sidebar.addPanel(bookmarktitle, bookmarkurl,"");
  } else if( document.all ) {
    window.external.AddFavorite(bookmarkurl, bookmarktitle);
  } else if( window.opera && window.print ) {
    return true;
  }
}

/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: CodeLifter.com | http://www.codelifter.com */
var good;
function checkEmailAddress(field) {
// the following expression must be all on one line...
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
  if (goodEmail) {
    good = true;
  } else {
    alert('Please enter a valid e-mail address.');
    field.focus();
    field.select();
    good = false;
  }
}


function mailThisUrl() {
  good = false
  checkEmailAddress(document.eMailer.address);
  if (good) {

u = window.location;
m = "I thought this might interest you...";
    // the following expression must be all on one line...
    window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
  }
}

function breakframes(){
	if (window != top) top.location.href = location.href;
}

function checkFrame(){
if (parent.location.href == self.location.href) {
	window.location.href = 'index.html';
}
}

function allez(showit,str1,itm){
if (showit) {
	alert(str1);
	itm.focus();
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function boxOn(which,message) {
if (document.all||document.getElementById) {
which.className = 'BorderOn';
if (document.getElementById) {
document.getElementById("Message").innerHTML = message
window.defaultStatus = message;
}
else {
Message.innerHTML = message;
window.defaultStatus = message;
      }
   }
}
function boxOff(which) {
if (document.all||document.getElementById) {
which.className = 'BorderOff';
if (document.getElementById) {
document.getElementById("Message").innerHTML = offMessage
}
else {
Message.innerHTML = offMessage;
      }
   }
}


function setCookie( name, value, expires, path, domain, secure ) {
var today = new Date();
today.setTime( today.getTime() );
if ( expires ) {
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name+"="+escape( value ) +
( ( expires ) ? ";expires="+expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

function getCookie( check_name ) {
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; 
	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		a_temp_cookie = a_all_cookies[i].split( '=' );
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found )
	{
		return null;
	}
}

