/*************************************************************************\
IS Networks Limited
menuJS_3.js
Version 1.00	20/02/2006
\*************************************************************************/

// Show/hide function for vertical expanding menus
function ShowHideVerticalMenu(id,text,c_closed,c_open,target,tclass,mlink) {
	
	menu_ob = document.getElementById("vm_"+id);
	head_ob = document.getElementById("vh_"+id);
	
	
	head_url="javascript:ShowHideVerticalMenu('"+id+"','"+text+"','"+c_closed+"','"+c_open+"','"+target+"','"+tclass+"');";
	if (menu_ob.style.display=="none") {
		menu_ob.style.display="inline";
		head_ob.innerHTML="<"+"a href=\""+head_url+"\" target=\""+target+"\" class=\""+tclass+"\">"+c_open+text+"</a>";
		document.cookie="iami_vertical_menu="+id;
	} else {
		menu_ob.style.display="none";
		head_ob.innerHTML="<a href=\""+head_url+"\" target=\""+target+"\" class=\""+tclass+"\">"+c_closed+text+"</a>";
		document.cookie="iami_vertical_menu=''";
	}
	if (mlink!="") {
		document.cookie="iami_vertical_menu="+id;
		window.location=mlink;
	}
}

function VerticalMenuGotoURL(id,mlink) {
	document.cookie="iami_vertical_menu="+id;
	window.location=mlink;
}

// this function gets the cookie, if it exists
function Get_Cookie( name ) {
	
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
