
 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;
  }
}

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 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, '');
    // alert (check_name);
        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;
    }
} 

function installSearchEngine() {
 if (window.external && ("AddSearchProvider" in window.external)) {
   // Firefox 2 and IE 7, OpenSearch
   window.external.AddSearchProvider("http://www.harpooned.co.uk/IIS.xml");
// } else if (window.sidebar && ("addSearchEngine" in window.sidebar)) {
//   // Firefox <= 1.5, Sherlock
//   window.sidebar.addSearchEngine("http://example.com/search-plugin.src",
//                                  "http://example.com/search-icon.png",
//                                  "Search Plugin", "");
 } else {
   // No search engine support (IE 6, Opera, etc).
   alert("No search engine support");
 }
}



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;
      }
   }
}
