<!-- Comment out script from browsers that don't know JavaScript
// This JavaScript code should run under Netscape Navigator 3.0
// and Microsoft Internet Explorer 3.0 and above. It will not run
// locally under Internet Explorer. If you use IE, you must load
// this page from a web server.
//===============================================================
// Here are our standard Cookie routines
//===============================================================
//---------------------------------------------------------------
// GetCookie - Returns the value of the specified cookie or null
//             if the cookie doesn't exist
//---------------------------------------------------------------
function getCookie(name) {
    var result = null;
    var myCookie = " " + document.cookie + ";";
    var searchName = " " + name + "=";
    var startOfCookie = myCookie.indexOf(searchName)
    var endOfCookie;
    if (startOfCookie != -1) {
        startOfCookie += searchName.length; 
        // skip past cookie name
        endOfCookie = myCookie.indexOf(";", startOfCookie);
        result = unescape(myCookie.substring(startOfCookie,endOfCookie));
    }
    return result;
}
//---------------------------------------------------------------
// SetCookieEZ - Quickly sets a cookie which will last until the
//               user shuts down his browser
//---------------------------------------------------------------
function SetCookieEZ(name, value) {
    document.cookie = name + "=" + escape(value);
}
//---------------------------------------------------------------
// SetCookie - Adds or replaces a cookie. Use null for parameters
//             that you don't care about
//---------------------------------------------------------------
function SetCookie(name, value, expires, path, domain, secure) {
    var expString = ((expires == null)? "" : ("; expires=" + expires.toGMTString()));
    var pathString = ((path == null) ? "" : ("; path=" + path));
    var domainString = ((domain == null)? "" : ("; domain=" + domain));
    var secureString = ((secure == true) ? "; secure" : "");
    document.cookie = name + "=" + escape(value) + expString + pathString + domainString + secureString;
}
function setIWMCookie( name, value ) {
    var duration = 45 * 24 * 60 * 60 * 1000;
    var expDate = new Date();
    expDate.setTime( expDate.getTime() + duration );
    SetCookie( name, value, expDate, "/", "www.iwantmine.com", null );
}
//---------------------------------------------------------------
// ClearCookie  - Removes a cookie by setting an expiration date
//                three days in the past
//---------------------------------------------------------------
function ClearCookie(name) {
    var ThreeDays = 3 * 24 * 60 * 60 * 1000;
    var expDate = new Date();
    expDate.setTime (expDate.getTime() - ThreeDays);
    document.cookie = name + "=ImOutOfHere; expires="+ expDate.toGMTString();
}

//---------------------------------------------------------------
// this function disables all the links on the page 
//---------------------------------------------------------------
function disable_links(){ 
  for(var i=0; i < document.links.length;i++)
  {
      document.links[i].onclick=function () { return false; }
      document.links[i].title = "This link has been disabled 'cause this is a demo site";
  }
  return true;

} 

//---------------------------------------------------------------
// check_demo  - Checks for demo user. If found, disable links
//---------------------------------------------------------------
function check_demo() {
    icookie = getCookie( "IWANTMINE" );
    if ( icookie == "demo_1user" ) {
        dcookie = getCookie( "IWANTMYDEMO" );
        if ( dcookie == null || dcookie.length == 0 ) {
            SetCookieEZ( "IWANTMYDEMO", "SET");
            msg1 =  "Because this is a demo system, ";
            msg1 += "links on this page have been disabled.\r\r";
            msg1 += "Please use the menu on the left of the screen ";
            msg1 += "to navigate around the site.";
            alert( msg1 );
        }
        disable_links();
    }
}


//-->