
//--script for left menu starts here-----

img1 = new Image();
img1.src="../images/butt_home_a.gif";

img2 = new Image();
img2.src = "../images/butt_home.gif";

img3 = new Image();
img3.src="../images/butt_about_a.gif";

img4 = new Image();
img4.src = "../images/butt_about.gif";

img5 = new Image();
img5.src="../images/butt_insa_journals_a.gif";

img6 = new Image();
img6.src = "../images/butt_insa_journals.gif";

img7 = new Image();
img7.src="../images/butt_adv_search_a.gif";

img8 = new Image();
img8.src = "../images/butt_adv_search.gif";

img9 = new Image();
img9.src="../images/butt_help_a.gif";

img10 = new Image();
img10.src = "../images/butt_help.gif";

img11 = new Image();
img11.src="../images/butt_contact_a.gif";

img12 = new Image();
img12.src = "../images/butt_contact.gif";

img13 = new Image();
img13.src = "../images/butt_about_project_a.gif";

img14 = new Image();
img14.src = "../images/butt_about_project.gif";

img15 = new Image();
img15.src = "../images/butt_insa_resent_journals_a.gif";

img16 = new Image();
img16.src = "../images/butt_insa_resent_journals.gif";

img17 = new Image();
img17.src = "../images/butt_insanews_a.gif";

img18 = new Image();
img18.src = "../images/butt_insanews.gif";

img19 = new Image();
img19.src = "../images/butt_pubhome_a.gif";

img20 = new Image();
img20.src = "../images/butt_pubhome.gif";

function change( name , img)
{
	eval('document.'+name+'.src='+img+'.src');
	
}


//-- script for the drop down menu starts here---

var is = new Object();
{
	is.ver = navigator.appVersion.substring(0,1);

	if (navigator.appName == "Netscape")
	{
		is.ns = true;
		eval("is.ns" + is.ver + " = true;")
		if (is.ver >= 3)
			is.ng3 = true;
	}
	else if (navigator.appName.toLowerCase().indexOf("microsoft") >= 0)
	{
		is.ver = navigator.appVersion.substr(navigator.appVersion.toLowerCase().indexOf("msie") + 5, 1)
		is.ie = true;
		eval("is.ie" + is.ver + " = true;")
		if (is.ver >= 3)
			is.ig3 = true;
	}
	else
		is.bu = true;

	if (navigator.appVersion.toLowerCase().indexOf("win") > 0)
		is.win = true;
	else if (navigator.appVersion.toLowerCase().indexOf("mac") > 0)
		is.mac = true;
	else if (navigator.appVersion.toLowerCase().indexOf("x11") > 0)
		is.x11 = true;
	else
		is.osu = true;
}

var widthCheck , heightCheck

if (is.ns)
{
	var widthCheck = window.innerWidth;
	var heightCheck = window.innerHeight;
}

this.onresize = resizeFix;

function resizeFix()
{
	var daURL = document.location.href;
	var hashJO = daURL.lastIndexOf("#");
	var nuURL = daURL.substr(0,hashJO);

	if (is.ns && (widthCheck != window.innerWidth || heightCheck != window.innerHeight))
	{
		if (hashJO > -1)
			document.location.href = nuURL;
		else
			document.location.href = document.location.href;
	}
}

function nsMacResizeFix()
{
	if (is.ns && is.mac && document.layers.length == 0)
		this.document.location.href = this.document.location.href;
}

if (is.win && is.ie6)
	document.write('<link rel="stylesheet" href="../css/insa.css" type="text/css">');
else if (is.win && is.ie)
	document.write('<link rel="stylesheet" href="../css/insa.css" type="text/css">');
else if (is.win && is.ns5)
	document.write('<link rel="stylesheet" href="../css/insa_n6.css" type="text/css">');
else if (is.win && is.ns)
	document.write('<link rel="stylesheet" href="../css/insa_n6.css" type="text/css">');
else if (is.mac && is.ie)
	document.write('<link rel="stylesheet" href="../css/insa.css" type="text/css">');
else if (is.mac && is.ns5)
	document.write('<link rel="stylesheet" href="../css/insa.css" type="text/css">');
else if (is.mac && is.ns)
	document.write('<link rel="stylesheet" href="../css/insa.css" type="text/css">');
else if (is.x11 && is.ns5)
	document.write('<link rel="stylesheet" href="../css/insa.css" type="text/css">');
else if (is.x11 && is.ns)
	document.write('<link rel="stylesheet" href="../css/insa.css" type="text/css">');

function initImages()
{
	args_images_II = initImages.arguments;

	for (var i = 0; i < args_images_II.length; i++)
	{
		eval (args_images_II[i][0] + '= new Image();')
		eval (args_images_II[i][0] + '.src = "' + args_images_II[i][1] + '";');
	}
}

function showImages()
{
	args_images_SI = showImages.arguments;

	if (is.ns5)
		eval ('document.images["' + args_images_SI[0] + '"].src = ' + args_images_SI[1] + '.src;');
		
	else if (is.ng3 && args_images_SI[2])
		eval('document.' + args_images_SI[2] + '.document.images["' + args_images_SI[0] + '"].src = ' + args_images_SI[1] + '.src;');
	
	else
		eval ('document.images["' + args_images_SI[0] + '"].src = ' + args_images_SI[1] + '.src;');
}

function hideLayer(LayerObj) {
	if (is.ns5)	{
		document.getElementById(LayerObj).style.visibility = 'hidden';
	}
	
	else if (is.ie)	{
		document.all[LayerObj].style.visibility = 'hidden';
	}

	else if (is.ns && is.ns[LayerObj] != null)	{
		document.layers[LayerObj].visibility = 'hide';
}
}

function showLayer(LayerObj) {
	if (is.ns5) {
		document.getElementById(LayerObj).style.visibility = 'visible';
	}
	
	else if (is.ie)	{
		document.all[LayerObj].style.visibility = 'visible';
	}
	
	else if (is.ns && is.ns[LayerObj] != null)	{
		document.layers[LayerObj].visibility = 'show';
}
}


function toggleMenue(object,myvalue) {
	if (is.ns5) {
		if (document.getElementById(object).style.visibility == 'visible')
		{
			document.search.selecttopic.value =myvalue;
			document.getElementById(object).style.visibility = 'hidden';
		}	
		else
		{
			document.search.selecttopic.value =myvalue;
			document.getElementById(object).style.visibility = 'visible';
		}	
	}

	else if (is.ns && is.ns[object] != null) {
	if (document.layers[object].visibility == 'visible' ||
		document.layers[object].visibility == 'show' )
		{
		document.search.selecttopic.value =myvalue;
		document.layers[object].visibility = 'hidden';
		}
	else
		{
		document.search.selecttopic.value =myvalue;
		document.layers[object].visibility = 'visible';		
		}
	}

	else if (is.ie) {
		if (document.all[object].style.visibility == 'visible')
		{
			document.search.selecttopic.value =myvalue;
			document.all[object].style.visibility = 'hidden';			
		}	
		else
		{
			document.search.selecttopic.value =myvalue;
			document.all[object].style.visibility = 'visible';
		}	
}
	return false;
}



function toggleresult(object,myvalue) {
	
	if (is.ns5) {
		if (document.getElementById(object).style.visibility == 'visible')
		{
			document.search.result.value =myvalue;
			document.getElementById(object).style.visibility = 'hidden';
		}	
		else
		{
			document.search.result.value =myvalue;
			document.getElementById(object).style.visibility = 'visible';
		}	
	}

	else if (is.ns && is.ns[object] != null) {
	if (document.layers[object].visibility == 'visible' ||
		document.layers[object].visibility == 'show' )
		{
		document.search.result.value =myvalue;
		document.layers[object].visibility = 'hidden';
		}
	else
		{
		document.search.result.value =myvalue;
		document.layers[object].visibility = 'visible';		
		}
	}

	else if (is.ie) {
		if (document.all[object].style.visibility == 'visible')
		{
			document.search.result.value =myvalue;
			document.all[object].style.visibility = 'hidden';			
		}	
		else
		{
			document.search.result.value =myvalue;
			document.all[object].style.visibility = 'visible';
		}	
}
	return false;
}



function writeInLayer(text,id)
{
	if (document.getElementById)
	{
		//alert(id)
		x = document.getElementById(id);
		//alert(x);
		text2 = '<nobr>' + text + '</nobr>';
		x.innerHTML = text2;
	}
	else if (document.all)
	{
		x = document.all[id];
		text2 = '<nobr>' + text + '</nobr>';
		x.innerHTML = text2;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		text2 = '<nobr class="dropstatus">' + text + '</nobr>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}

var termW, locW
function setvar(termW, locW)
{	
	term = termW;
	loc = locW;
}


<!--
initImages(["link1", "../images/dropblock_01.gif"],
			["link2", "../images/dropblock_02.gif"]);
//-->

var loc = 1;

function chktopsearch()
{
	strtoptxt=window.document.search.txtsearch.value
	if (strtoptxt=="")
	{
	alert("Please enter the search text.");
	window.document.search.txtsearch.focus();
	return false;
	}
	window.document.search.action="search.asp?search=yes";
	window.document.search.method="post";
	window.document.search.submit();
}

function chktopsearch1()
{
	strtoptxt=window.document.topsearch.txtsearch.value
	if (strtoptxt=="")
	{
	alert("Please enter the search text.");
	window.document.topsearch.txtsearch.focus();
	return false;
	}
	window.document.topsearch.action="search.asp?search=yes";
	window.document.topsearch.method="post";
	window.document.topsearch.submit();
}

