// Author(s)   : Colin Stott.
// Copyright   : Congo Systemsİ 2007
// ----------------------------------------------------------------------


//----------------------------------------------------------------------------------


	 function Sniffer() 
	 {
		agent 		= navigator.userAgent.toLowerCase();
		this.major 	= parseInt(navigator.appVersion);
		this.minor 	= parseFloat(navigator.appVersion);
		this.ns 	= ((agent.indexOf('mozilla') != -1) && ((agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1)));
		this.ns4 	= (this.ns && (this.major == 4));
		this.ns6 	= (this.ns && (this.major >= 5));
		this.ie 	= (agent.indexOf("msie") != -1);
		this.mac 	= (agent.indexOf("mac")!=-1); // Added by Colin M Stott 07-09-05
		this.ie3 	= (this.ie && (this.major < 4));
		this.ie4 	= (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0") == -1));
		this.ie5 	= (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0") != -1));
		this.ie55 	= (this.ie && (this.major == 4) && (agent.indexOf("msie 5.5") != -1));
		this.ie6 	= (this.ie && (agent.indexOf("msie 6.0")!=-1) );
		
	}


 	var sniffer = new Sniffer();


//----------------------------------------------------------------------------------



/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Greg Burghardt | http://www.geocities.com/greg_burghardt/ */
	var _GET = {};
	
	function readURL() 
	{
	  var tLoc = "", tPairs = "";
	  var tGet = [];
	  var foundGet = -1;
	  tLoc = top.window.location + "";
	  foundGet = tLoc.indexOf('?');

	  if (foundGet > -1)
	  {
		tLoc = tLoc.substring(foundGet + 1, tLoc.length);
		tPairs = tLoc.split('&');
		for (var i = 0; i < tPairs.length; i++) 
		{
		  tGet = tPairs[i].split('=');
		  _GET[tGet[0]] = decodeURIComponent(tGet[1].replace(/\+/g,' '));
		}
	  }
	}



//----------------------------------------------------------------------------------



		function setmenu(victim)
		{

			seturl();

			parent.document.getElementById('welcome').src 	= "images/bx_welcome.jpg";
			parent.document.getElementById('product').src 	= "images/bx_product.jpg";
			parent.document.getElementById('contact').src 	= "images/bx_contact.jpg";

			if(victim != "nil")
			parent.document.getElementById(victim).src 		= "images/bo_"+victim+".jpg";

		}



//----------------------------------------------------------------------------------



		function seturl()
		{
			var r = ""+top.location+"";		// The pathname
			var s = r.lastIndexOf("/");		// The last / in the pathname
			var t = r.substring(s+1);		// The suffix filename. eg. default.htm
			var x = r.substring(0,4);		// The prefix url type. eg. file://
			var y = r.substring(0,s+1);		// The pathname up to the last /

			if(x != "file") // Need this in here for my local machine :)
			{
				if(r != "http://www.sibre.com.au/")
				{
					if(!top.document.getElementById("val1"))
					{
						plop = y+"index.htm"+"?page="+t;
						parent.location = plop;
					}
				}
			}
			else
			{
					if(!top.document.getElementById("val1"))
					{
						plop = y+"index.htm"+"?page="+t;
						parent.location = plop;
					}
			}
		}



//----------------------------------------------------------------------------------
