function whichversion(){

	browserName = navigator.appName;
	browserVer = parseInt(navigator.appVersion);
	condition1 = (browserName.indexOf("Netscape") >=0 ) && browserVer >= 4 ;
	condition2 = (browserName.indexOf("Explorer") >= 0) && browserVer >= 4;
	thisbrowser = "";
	if (condition2 == true ) thisbrowser =  "IE4";
	if (condition1 == true ) thisbrowser =  "NS4";


	return thisbrowser;

}

function hidediv() 
{
	if (whichversion() == 'IE4')
	{
		window.document.all(selecteddiv).style.visibility='hidden';
    	window.document.all(selecteddiv1).bgColor = 'black';
   		window.document.all.line.bgColor = 'black';


	}
	
	else if (whichversion() == 'NS4')
	{
	
	}
}


function highlight(id) 
{

	var divs = "div_" + id;
	
	if (whichversion() == 'IE4')
	{

	window.document.all(divs).style.visibility='visible';

	window.document.all(selecteddiv).style.visibility='hidden';
	window.document.all(selecteddiv1).bgColor = 'black';
	
	if (divs == selecteddiv)
	{	
	window.document.all(divs).style.visibility='visible';
	}
	
	selecteddiv=divs;
	selecteddiv1=id;	
	
	if (id == 'one')
		{eval(id + ".bgColor = '716a75'");
			window.document.all.line.bgColor = '716a75';
			}
	else if (id == 'two')
		{eval(id + ".bgColor = '7077a2'");
			window.document.all.line.bgColor = '7077a2';
			}
	else if (id == 'three')
		{eval(id + ".bgColor = 'f38b02'");
			window.document.all.line.bgColor = 'f38b02';
			}
	else if (id == 'four')
		{eval(id + ".bgColor = 'E75252'");
			window.document.all.line.bgColor = 'E75252';
			}
	else if (id == 'five')
		{eval(id + ".bgColor = '81a765'");
			window.document.all.line.bgColor = '81a765';
			}
	}
	else if (whichversion() == 'NS4')
	{
	
	}
}

function unhighlight(id) {

	if (whichversion() == 'IE4')
	{

	//eval(id + ".bgColor = 'black'");
	//window.document.all.line.bgColor = 'white';
	
	}
	
	if (whichversion() == 'NS4')
	{

	}	
	
}

function swap() 
{

	if (whichversion() == 'IE4')
	{
		window.document.all(selecteddiv).style.visibility='hidden';
    	window.document.all(selecteddiv1).bgColor = 'black';
   		window.document.all.line.bgColor = 'black';


	}
	
	else if (whichversion() == 'NS4')
	{
	
	}
}


//test code by sanjeev
var div2="item0";
//Default browsercheck, added to all scripts!
function checkBrowser(){
        this.ver=navigator.appVersion
        this.dom=document.getElementById?1:0
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
        this.ie4=(document.all && !this.dom)?1:0;
        this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        this.ns4=(document.layers && !this.dom)?1:0;
        this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
        return this
}
bw=new checkBrowser()
function show(div,nest){
        obj1=bw.dom?document.getElementById(div2).style:bw.ie4?document.all[div2].style:bw.ns4?nest?document[nest].document[div2]:document[div2]:0; 
obj1.visibility='hidden';
div2="item" + div;

div="item" + div;
obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;         if(obj.visibility=='visible' || obj.visibility=='show') obj.visibility='hidden'
        else obj.visibility='visible'
}


var tohidenext="item0";
function show_old(division)
	{

	var division1="item" + division;
		
	if (whichversion() == "NS4")
	{
	window.document.layers[tohidenext].visibility='hide';
	tohidenext=division1;
	
	var status=document.layers[division1];
		if(status.visibility=='hide')
			{status.visibility='show';}
		else status.visibility='hide'}

	else if (whichversion() == "IE4")0
	{
	window.document.all(tohidenext).style.visibility='hidden';
	tohidenext=division1;
	var status=document.all[division1].style;
	if(status.visibility=='visible')
			{status.visibility='hidden'}
		else status.visibility='visible'}
	}

	function gomenu()
		{
			optindex=document.qform.qs.selectedIndex;
			govalue=document.qform.qs.options[optindex].value;
			window.location.href=govalue;
		}

function load1()
{

	if (whichversion() == "NS4")
		{

		if (screen.availWidth<=640)
		 {
			for (var i=0; i<27; i++) {
				itemid = "item" + i;
				window.document.layers[itemid].left = 135;
				window.document.layers[itemid].top = 300;
				}
				
			}
			
			else if (screen.availWidth<=800) 
					{
			for (var i=0; i<27; i++) {
				itemid = "item" + i;
				window.document.layers[itemid].left = 185;
				window.document.layers[itemid].top = 430;
				}
	
				}
				else 
				{

			for (var i=0; i<27; i++) {
				itemid = "item" + i;
				window.document.layers[itemid].left = 300;
				window.document.layers[itemid].top = 600;
				}
	
				}

			}

		else if (whichversion() == "IE4"){


	    	if (screen.availwidth<=640)
			{
			for (var i=0; i<27; i++) {
				itemid = "item" + i;
			window.document.all(itemid).style.left = 135;
			window.document.all(itemid).style.top = 300;
				}
			}	
		else if (screen.availwidth<=800) 
			{
			for (var i=0; i<27; i++) {
				itemid = "item" + i;
				window.document.all(itemid).style.left = 185;
				window.document.all(itemid).style.top = 430;
				}
			}
		else 
			{
			
			for (var i=0; i<27; i++) {
			
				itemid = "item" + i;
			window.document.all(itemid).style.left = 300;
			window.document.all(itemid).style.top = 600;
                   
				}
			}
		}
}

