//	jscript.js - Common JScript

	// Identify browser type, version, O/S, and colour depth
		// March 3, 2001
		theAgent = navigator.userAgent.toLowerCase();
		var isMozilla = false;
		var isOpera = (theAgent.indexOf("opera") != -1);
		if ( isOpera == false )
			var isNetscape = ((theAgent.indexOf('mozilla')!=-1) && ((theAgent.indexOf('spoofer')==-1)
				&& (theAgent.indexOf('compatible') == -1)));
		var isWebtv = (theAgent.indexOf("webtv") != -1);
		if ( (isWebtv == false) && (isOpera == false) )
			var isIE = (theAgent.indexOf("msie") != -1);
		var version = parseFloat(navigator.appVersion);
		if ( isIE )
			version = parseFloat(theAgent.substring(4+theAgent.indexOf("msie")));
		else if ( isNetscape && (version>=5) )
		  {
			isMozilla = (theAgent.indexOf("netscape6") == -1);
		  }
		else if ( isOpera )
		  {
			if ( theAgent.indexOf("opera/") == 0 )
				version = parseFloat(theAgent.substring(1+theAgent.indexOf("/")));
			else if ( theAgent.indexOf("opera/") != -1 )
				version = parseFloat(theAgent.substring(2+theAgent.indexOf(")")));
			else
				version = parseFloat(theAgent.substring(6+theAgent.indexOf("opera")));
		  }
		var isModernBrowser = (isIE && (version>=4)) || (isNetscape && (version>=5)) || (isOpera && (version>="4"));
		osWindows = (theAgent.indexOf("win") != -1);

	// Set special stylesheet for modern browsers
		if ( isModernBrowser && osWindows )
		  {
			document.writeln( '<style type="text/css">' );

    		document.writeln( 'body { margin:1ex; }' );

			if ( isNetscape && (version>=5) )
			  {
    			document.writeln( 'body, p, td, td center { font-size:97%; }' );
    			document.writeln( 'ol li { padding:0px 0px 1.0ex 0px; }' );
    			document.writeln( 'ul li { margin:0px; padding:0px 0px 1.0ex 0px; }' );
			  }
			else if ( isIE && (version>=5) )
			  {
    			document.writeln( 'body, li, p, tr, tr td, td, td center { font-size:95%; }' );
    			document.writeln( 'ol li { padding:0px 0px 1.0ex 0px; }' );
    			document.writeln( 'ul li { margin:0px 0px 0px 2em; padding:0px 0px 1.0ex 0px; }' );
			  }
			else if ( isIE && (version>=4) )
			  {
    			document.writeln( 'body, p, td, td center { font-size:92%; }' );
    			document.writeln( 'ul li { padding:0px 0px 0.5ex 2.5em; }' );
			  }
			else /* Opera */
			  { 
    			document.writeln( 'body, p, tr, td, td center { font-size:95%; }' );
    			document.writeln( 'ol li { padding:0px 0px 1.0ex 0px; }' );
    			document.writeln( 'ul li { margin:0px 0px 0px 1em; padding:0px 0px 1.0ex 1ex; }' );
			  }

   			document.writeln( 'li, p { margin:0 0 0.80em 0; }' );
   			document.writeln( 'li.l2 { font-size:100%; }' );
    		document.writeln( 'table.main { margin:0 0 0 0; }' );
    		document.writeln( 'table.center { margin-left:auto; margin-right:auto; margin-bottom:0.8em; }' );
   			document.writeln( 'ul { list-style-position:outside; margin:0.7em 0px 0px 0px; }' );
			document.writeln( '</style>' );
		  }

	function myNoframeMenu()
	{
	if ( isModernBrowser && (self.location == top.location) )
	  {
		document.writeln( '<P ALIGN=CENTER><FONT SIZE="-1">' );
		document.writeln( '<A HREF="../index.html" TARGET="_top">ChristRing</A> |' );
		document.writeln( '<A HREF="home.html">WebRing\'s Home Page</A> |' );
		document.writeln( '<A HREF="../ix_ChristianWebRing.html">Frames</A><BR>' );
		document.writeln( '<A HREF="join.html">Join the Ring</A> |' );
		document.writeln( '<A HREF="faq.html">Ring FAQ</A> |' );
		document.writeln( '<A HREF="links.html">Ring Links</A></FONT></P>' );
	  }
	}

