var JS_Image = new Array();

function SetImage(offsrc, onsrc, txt)
{
	if (document.images)
	{
		this['mouse_out'] = new Image();
		this['mouse_out'].src = offsrc;
		this['mouse_over'] = new Image();
		this['mouse_over'].src = onsrc;
	}	this['text'] = txt;
}

function ImgOver(imgname, second_image)
{
	if (document.images)
	{
		document.images[imgname].src = JS_Image[imgname]['mouse_over'].src;
		if (second_image)
			document.images[second_image].src = JS_Image[second_image]['mouse_over'].src;
	}
}

function ImgOut(imgname, second_image)
{
	if (document.images)
	{
		document.images[imgname].src = JS_Image[imgname]['mouse_out'].src;
		if (second_image)
			document.images[second_image].src = JS_Image[second_image]['mouse_out'].src;
	}
}

// top Nav
var JS_Nav = new Array();
var nav_length = 8;
var this_path = '../images/';

var line_img = new Image();
	line_img.src = this_path + "dot_nav_blue.gif";

function SetNav(offsrc, onsrc, txt, order)
{
	this['mouse_out'] = new Image();
	this['mouse_out'].src = offsrc;
	this['mouse_over'] = new Image();
	this['mouse_over'].src = onsrc;
	this['text'] = txt;
	this['order'] = order;
}

// left - top - right
function NavOver(navname)
{
	clearNav();
	activateNav(navname);
}	

function activateNav(navname)
{
	if (document.images)
	{
		document.images[navname].src = JS_Nav[navname]['mouse_over'].src;
		// left - top - lower - right
		var temp_order = JS_Nav[navname]['order'];
		document.images['div' + (temp_order - 1)].src = line_img.src;
		document.images['div' + temp_order].src = line_img.src;
		document.images['top' + temp_order].src = line_img.src;
	}
}

function NavOut(navname)
{
	if (document.images)
	{
		document.images[navname].src = JS_Nav[navname]['mouse_out'].src;

		// left - top - lower - right
		var temp_order = JS_Nav[navname]['order'];
		if(temp_order == 1){document.images['div' + (temp_order - 1)].src = this_path + "dot_white.gif";}
		else{document.images['div' + (temp_order - 1)].src = this_path + "div.gif";}
		if(temp_order == nav_length){document.images['div' + temp_order].src = this_path + "dot_white.gif";}
		else{document.images['div' + (temp_order)].src = this_path + "div.gif";}
		document.images['top' + temp_order].src = this_path + "dot_white.gif";
	}
}

function offNav()
{
	clearNav(); 
}

function clearNav()
{
	var temp_nav;
	var NavList = new Array("products", "solutions_and_services", "customers", "partners", "support", "news_and_events", "about", "demo");
	for(var i=0; i<NavList.length; i++)
	{
		temp_nav = NavList[i]
		if(temp_nav != this_nav)
			NavOut(temp_nav);
	}
	if(this_nav)
		activateNav(this_nav);
}



