// <tt>this page contains scripts </tt><script language="javascript">


var ie = document.all;


// Gestion des cookies

function getCookieVal (offset)
   {

   var endstr = document.cookie.indexOf (";", offset);

   if (endstr == -1)

      endstr = document.cookie.length;

   return unescape(document.cookie.substring(offset, endstr));

   }

function GetCookie (name)
   {

   var arg = name + "=";

   var alen = arg.length;

   var clen = document.cookie.length;

   var i = 0;

   while (i < clen)
      {

      var j = i + alen;

      if (document.cookie.substring(i, j) == arg)

         return getCookieVal (j);

      i = document.cookie.indexOf(" ", i) + 1;

      if (i == 0) break;

      }

   return null;

   }

function SetCookie (name, value)
   {

   var argv = SetCookie.arguments;

   var argc = SetCookie.arguments.length;

   var expires = (argc > 2) ? argv[2] : null;

   var path = (argc > 3) ? argv[3] : null;

   var domain = (argc > 4) ? argv[4] : null;

   var secure = (argc > 5) ? argv[5] : false;

   document.cookie = name + "=" + escape (value) +

        ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +

        ((path == null) ? "" : ("; path=" + path)) +

        ((domain == null) ? "" : ("; domain=" + domain)) +

        ((secure == true) ? "; secure" : "");

   }

function DeleteCookie ()
   {

   var exp = new Date();

   exp.setTime (exp.getTime() - 1000000000);  // This cookie is history (changed -1 to make it previous time)

   var cval = GetCookie ('DemoName');

   document.cookie ='DemoName' + "=" + cval + "; expires=" + exp.toGMTString();
   alert("The cookie has been deleted.");
   }


var supported_useragents = "";

function get_useragent_reliability( )
{

   var reliability = GetCookie( "www.sequoia.be--reliable-user-agent" );

	if ( reliability == null || reliability == "yes" )
	   return true;
   else
	   return false;
}

function set_useragent_reliability( reliable )
{
   SetCookie( "www.sequoia.be--reliable-user-agent", reliable );
}


function must_open_new_frameset( language )
{
 var must = window.parent == self && location.hash.toLowerCase( ) != "#noframe" && get_useragent_reliability( );
 
 if ( !must )
 {
     if ( window.parent.frames.frames[0].name != "toc_" + language )
       must = true;
 
 }
 
 return must;
}

function open_frameset_en( wnd, home  )
{
if ( must_open_new_frameset( "en" ) )
   {
   if ( wnd == null )
	   wnd = self.location.pathname;

   if ( home == null )
    home = "./";

   // not in a frame set !
   // open a new frameset
	window.parent.document.location = home + "english.htm#"+escape(wnd)+document.location.hash;
	}
	else
	 if ( self.location.hash && ie )
		self.location.hash = self.location.hash.replace( "##", "#" );
	}


function open_frameset_fr( wnd, home  )
{
if ( must_open_new_frameset( "fr" ) )
   {
   if ( wnd == null )
	   wnd = self.location.pathname;

   if ( home == null )
    home = "./";

   // not in a frame set !
   // open a new frameset
	window.parent.document.location = home + "francais.htm#"+escape(wnd)+document.location.hash;
	}
	else
	 if ( self.location.hash && ie)
		document.location.hash  = self.location.hash.replace( "##", "#" );

}
function generate_frameset( language, toc, default_page, title )
{

	var doc = unescape(location.hash.substr( 1 ));
	var height = ie ? 64 : 77;
  
	if ( doc == null || doc == "" )
		doc = default_page;

	var HtmlCode = "";

	HtmlCode += "<head><title>" + title + "</title></head>";
    HtmlCode +=  "  <frameset cols='25%, *' marginheight='0' marginwidth='0' > ";
	HtmlCode +=  "    <frame name='toc_" + language + "' scrolling='no' src='" + toc + "' /> ";
	HtmlCode +=  "    <frame name='right' src='" + doc + "' /> ";
	HtmlCode +=  "   </frameset>";

    document.write( HtmlCode )
}

function generate_frameset_en( )
{
	generate_frameset( "en", "autotable_e.htm", "en/project-independent/introduction_e.htm", "Sequoia IT methodology" );

}

function generate_frameset_fr( )
{
	generate_frameset( "fr", "autotable_f.htm", "fr/project-independent/introduction_f.htm", "Méthode IT Séquoia" );
}

// </script>
