// onoff.js
 if (document.images){
 				scr1dnon = new Image();
				scr1dnon.src = "/images/scroll/newsarrowdown_on.gif";
 				scr1dnoff = new Image();
				scr1dnoff.src = "/images/scroll/newsarrowdown_off.gif";
 				scr1upon = new Image();
				scr1upon.src = "/images/scroll/newsarrowup_on.gif";
 				scr1upoff = new Image();
				scr1upoff.src = "/images/scroll/newsarrowup_off.gif";
 				scr2dnon = new Image();
				scr2dnon.src = "/images/scroll/newsarrowdown_on.gif";
 				scr2dnoff = new Image();
				scr2dnoff.src = "/images/scroll/newsarrowdown_off.gif";
 				scr2upon = new Image();
				scr2upon.src = "/images/scroll/newsarrowup_on.gif";
 				scr2upoff = new Image();
				scr2upoff.src = "/images/scroll/newsarrowup_off.gif";
         }

function img_act(imgName) {
        if (document.images) {
                imgOn = eval(imgName + "on.src");
                document [imgName].src = imgOn;
        }}

function img_inact(imgName) {
        if (document.images) {
                imgOff = eval(imgName + "off.src");
                document [imgName].src = imgOff;
        }}
function openWin( windowURL, windowName, windowFeatures ) { 
                return window.open( windowURL, windowName, windowFeatures ) ; 
        } 

// master.js

var homePage = 0;
var dimensScreen = screen.width ;

 if ( document.images ) {
	toc1on = new Image();
	toc1on.src = "/prof/images/alpha_nav/a_1_on.gif";
	toc2on = new Image();
	toc2on.src = "/prof/images/alpha_nav/a_2_on.gif";
	toc3on = new Image();
	toc3on.src = "/prof/images/alpha_nav/a_3_on.gif";
	toc4on = new Image();
	toc4on.src = "/prof/images/alpha_nav/a_4_on.gif";
	toc5on = new Image();
	toc5on.src = "/prof/images/beta_nav/b_about_on.gif";
	toc6on = new Image();
	toc6on.src = "/prof/images/beta_nav/b_contact_on.gif";
	toc7on = new Image();
	toc7on.src = "/prof/images/beta_nav/b_registration_on.gif";
	toc8on = new Image();
	toc8on.src = "/prof/images/beta_nav/b_events_on.gif";
	toc9on = new Image();
	toc9on.src = "/prof/images/beta_nav/b_trade_on.gif";
	toc10on = new Image();
	toc10on.src = "/prof/images/beta_nav/b_mail_on.gif";
	/*toc11on = new Image();
	toc11on.src = "/prof/images/home/products/b_video_on.gif";
	toc12on = new Image();
	toc12on.src = "/prof/images/home/products/b_storage_on.gif";
	toc13on = new Image();
	toc13on.src = "/prof/images/home/products/b_presentation_on.gif";
	toc14on = new Image();
	toc14on.src = "/prof/images/home/products/b_security_on.gif";
	toc20on = new Image();
	toc20on.src = "/prof/images/universal/b_button_on.gif";*/
	
	toc1off = new Image();
	toc1off.src = "/prof/images/alpha_nav/a_1_off.gif";
	toc2off = new Image();
	toc2off.src = "/prof/images/alpha_nav/a_2_off.gif";
	toc3off = new Image();
	toc3off.src = "/prof/images/alpha_nav/a_3_off.gif";
	toc4off = new Image();
	toc4off.src = "/prof/images/alpha_nav/a_4_off.gif";
	toc5off = new Image();
	toc5off.src = "/prof/images/beta_nav/b_about_off.gif";			
	toc6off = new Image();
	toc6off.src = "/prof/images/beta_nav/b_contact_off.gif";
	toc7off = new Image();
	toc7off.src = "/prof/images/beta_nav/b_registration_off.gif";
	toc8off = new Image();
	toc8off.src = "/prof/images/beta_nav/b_events_off.gif";
	toc9off = new Image();
	toc9off.src = "/prof/images/beta_nav/b_trade_off.gif";
	toc10off = new Image();
	toc10off.src = "/prof/images/beta_nav/b_mail_off.gif";
	/*toc11off = new Image();
	toc11off.src = "/prof/images/home/products/b_video_off.gif";
	toc12off = new Image();
	toc12off.src = "/prof/images/home/products/b_storage_off.gif";
	toc13off = new Image();
	toc13off.src = "/prof/images/home/products/b_presentation_off.gif";
	toc14off = new Image();
	toc14off.src = "/prof/images/home/products/b_security_off.gif";
	toc20off = new Image();
	toc20off.src = "/prof/images/universal/b_button_off.gif";*/
}

var img_ar = new Array();
img_ar[0] = new Image();
img_ar[0].src = "/prof/images/alpha_nav/a_1_off.gif";
img_ar[1] = new Image();
img_ar[1].src = "/prof/images/alpha_nav/a_1_on.gif";
img_ar[2] = new Image();
img_ar[2].src = "/prof/images/alpha_nav/a_2_off.gif";
img_ar[3] = new Image();
img_ar[3].src = "/prof/images/alpha_nav/a_2_on.gif";
img_ar[4] = new Image();
img_ar[4].src = "/prof/images/alpha_nav/a_3_off.gif";
img_ar[5] = new Image();
img_ar[5].src = "/prof/images/alpha_nav/a_3_on.gif";
img_ar[6] = new Image();
img_ar[6].src = "/prof/images/alpha_nav/a_4_off.gif";
img_ar[7] = new Image();
img_ar[7].src = "/prof/images/alpha_nav/a_4_on.gif";
img_ar[8] = new Image();
img_ar[8].src = "/prof/images/alpha_nav/a_5_off.gif";
img_ar[9] = new Image();
img_ar[9].src = "/prof/images/alpha_nav/a_5_on.gif";

// purple_menu.js

function PurpleMenu( text, divclass, x, y, w, h, dropdown, fs ) {

	this.menu_text = text;
	this.subiconon = null;
	this.subiconoff = null;
	this.menuid = "main";
	this.menuname = "main";
	this.selected = new Array();
	this.alignwith = null;		
	this.drop_down = dropdown;
	
	this.prev_menu = null;
	this.prev_highlight = -1;

	this.on_hide = "";
	this.on_show = "";
	
	this.normal_background_color = "#000000";
	this.highlight_background_color = "#cc0000";
	this.normal_text_color = "#cccccc";
	this.highlight_text_color = "#000000";
	this.border_color = "#000000";
	
	this.separator = false;
	this.separator_color = "#000000";
	this.separator_height = 1;			
	this.bottom_separator = false;

	this.x = x;
	this.y = y;

	this.w = w;
	this.h = h;
	this.div_class = divclass;
	this.font_size = fs;
	this.font_height = parseInt( fs ) + 3;
	this.font_width = parseInt( fs ) - 3;	
	this.visible = false;
	this.parent = null;		
	this.open_submenu = null;
	this.orientation = "vertical";

	this.items = new Array();
	this.num_items = 0;			
	this.max_item_length = 0;	

	this.menu_window = null;	
}

PurpleMenu.prototype.AddItem = function( subitem, target ) {

	var	w;
	
	this.items[this.num_items] = new Object();

	if ( typeof( subitem ) == "string" ) {
		w = subitem.length * this.font_width;
		if ( this.orientation == "vertical" ) {
			if ( w > this.max_item_length )
				this.max_item_length = w;
		}
		else
			this.max_item_length += subitem.length;
		this.items[this.num_items].item_text = subitem;
		this.items[this.num_items].item_url = target;
		this.items[this.num_items].submenu = null;
	}

	else {
		w = subitem.toString().length * this.font_width + 8;
 		if ( this.orientation == "vertical" ) {
			if ( w > this.max_item_length )
				this.max_item_length = w;
		}
		else
			this.max_item_length += subitem.length + 2;
		this.items[this.num_items].item_text = subitem.toString();
		this.items[this.num_items].item_url = target;
		this.items[this.num_items].submenu = subitem;
		subitem.parent = this;
		subitem.menuid = this.menuid + "_" + target;
		subitem.menuname = target;
	}

	this.num_items++;

	return this.num_items;
}

PurpleMenu.prototype.AlignWithElement = function( name, ofs_x, ofs_y ) {

	this.alignwith = name;
	this.alignoffs_x = ofs_x;
	this.alignoffs_y = ofs_y;
}

PurpleMenu.prototype.CloseSiblings = function() {

	var parent = this.parent;

	if ( parent == null )
		return;

	parent.CloseSiblings();

	for ( var i = 0;  i < parent.num_items;  i++ )
		if ( (parent.items[i].submenu != null) && (parent.items[i].submenu != this) )
			parent.items[i].submenu.HideMenu();
}

PurpleMenu.prototype.EnableSeparator = function( color, height, bottom ) {

	this.separator = true;
	this.separator_color = color;
	this.separator_height = height;
	this.bottom_separator = bottom;

	for ( var i = 0;  i < this.num_items;  i++ )
		if ( this.items[i].submenu != null )
			this.items[i].submenu.EnableSeparator( color, height );
}

PurpleMenu.prototype.HideMenu = function() {

	var o = this;
		
	if ( o.menu_window == null )
		return;

	if ( !o.visible )
		return;

	for ( var i = 0;  i < o.num_items;  i++ ) {
		o.selected[i] = false;
		if ( o.items[i].submenu != null ) {
			o.NormalBackground( i );
			o.items[i].submenu.HideMenu();
		}
	}

	if ( o.border > 0 )
		o.border_window.style.visibility = "hidden";
	o.menu_window.style.visibility = "hidden";
	
	if ( o.on_hide != "" ) {
		eval( o.on_hide );
	}

	o.visible = false;
}

PurpleMenu.prototype.HighlightBackground = function( ord ) {

	var	element = document.getElementById( this.menuid + ord + '_div' );

	if ( this.prev_highlight != -1 )
		this.NormalBackground( this.prev_highlight );
		
	element.style.backgroundColor = this.highlight_background_color;
	element.style.color = this.highlight_text_color;
	this.prev_highlight = ord;

	if ( element = document.getElementById( this.menuid + ord + '_subicon' ) ) 
		element.src = this.subiconon.src;

	if ( this.prev_menu != null )
		this.prev_menu.HideMenu();
	
	if ( this.items[ord].submenu != null ) {
		this.items[ord].submenu.ShowMenu();
		this.prev_menu = this.items[ord].submenu;
	}
}

PurpleMenu.prototype.IsInMenu = function( x, y ) {

	if ( !this.visible )
		return false;
		
	return ((x >= this.x) && (x < (this.x + this.w)) && (y >= this.y) && (y < (this.y + this.h)));
}

PurpleMenu.prototype.IsVisible = function() {

	return this.visible;
}

PurpleMenu.prototype.NormalBackground = function( ord ) {

	if ( this.selected[ord] ) return;

	var	element = document.getElementById( this.menuid + ord + '_div' );

	element.style.backgroundColor = this.normal_background_color;
	element.style.color = this.normal_text_color;
	
	this.prev_highlight = -1;

	if ( element = document.getElementById( this.menuid + ord + '_subicon' ) )
		element.src = this.subiconoff.src;
}

PurpleMenu.prototype.OnHide = function( c ) {

	this.on_hide = this.on_hide + c;
}

PurpleMenu.prototype.OnShow = function( c ) {

	this.on_show = this.on_show + c;
}

PurpleMenu.prototype.SelectItem = function( ord ) {

	this.CloseSiblings();
	this.selected[ord] = true;
	this.HighlightBackground( ord );
}

PurpleMenu.prototype.SetHighlightColor = function( bg, fg ) {

	this.highlight_background_color = bg;
	this.highlight_text_color = fg;
	
	for ( var i = 0;  i < this.num_items;  i++ )
		if ( this.items[i].submenu != null )
			this.items[i].submenu.SetHighlightColor( bg, fg );
}

PurpleMenu.prototype.SetNormalColor = function( bg, fg ) {

	this.normal_background_color = bg;
	this.normal_text_color = fg;
	
	for ( var i = 0;  i < this.num_items;  i++ )
		if ( this.items[i].submenu != null )
			this.items[i].submenu.SetNormalColor( bg, fg );
}

PurpleMenu.prototype.SetOrientation = function( orientation ) {

	this.orientation = orientation;
}

PurpleMenu.prototype.SetSubmenuIcons = function( menu_on, menu_off ) {

	this.subiconon = new Image();
	this.subiconoff = new Image();

	this.subiconon.src = menu_on;
	this.subiconoff.src = menu_off;
	
	for ( var i = 0;  i < this.num_items;  i++ )
		if ( this.items[i].submenu != null )
			this.items[i].submenu.SetSubmenuIcons( menu_on, menu_off );
}

PurpleMenu.prototype.ShowMenu = function( force ) {

	var	obj = this;
	var	a_tag = "";
	var	content = "";
	var	agent;
	var	w;
	var	y;

	if ( !force ) force = 'no';
	
	if ( this.visible && (force == "off" || force == "no") ) {
		this.HideMenu();
		return;
	}

	agent = navigator.userAgent.toLowerCase();

	this.CloseSiblings();

	if ( this.menu_window == null ) {

		this.menu_window = document.createElement( "div" );
		this.menu_window.className = this.div_class;
				
		if ( this.w == -1 ) this.w = this.max_item_length;
		if ( this.h == -1 ) {
			this.h = (((this.font_height + this.separator_height) * this.num_items) + 2);
			if ( this.bottom_separator )
				this.h += this.separator_height;
		}

		for ( var i = 0;  i < this.num_items;  i++ ) {
			if ( this.items[i].submenu == null ) {
				a_tag = '<a ' +
					'href="' +
						this.items[i].item_url +
					'" ' +
					'style="color:' + this.normal_text_color + ';text-decoration:none;"' +
				'>';
			}
			else {
				a_tag = '<a ' +
					'href="' +
						this.items[i].item_url + '.ShowMenu();' +
					'" ' +
					'style="color:' + this.normal_text_color + ';text-decoration:none;"' +
				'>';
			}
			content = content + a_tag + '<div id="' + this.menuid + i + '_div" style="cursor:hand;position:absolute;font-size:' + this.font_size + ';top:' + (i * (this.font_height + this.separator_height)) + 'px;width:' + this.w + 'px;background-color:' + this.normal_background_color + ';overflow:clip;" onmouseover="' + this.menuname + '.HighlightBackground(' + i + ');">';
			content = content + "&nbsp;" + this.items[i].item_text + "&nbsp;";
			if ( (this.subiconoff != null) && (this.items[i].submenu != null) )
				content = content + '<div id="' + this.menuid + i + '_div_subicon" style="cursor:hand;position:absolute;font-size:' + this.font_size + ';"><img style="border:none;" id="' + this.menuid + i + '_subicon" name="' + this.menuid + i + '_subicon" src="' + this.subiconoff.src + '"></div>';
			content = content + '</div></a>';
		}
		
		this.menu_window.innerHTML = content;

		document.body.appendChild( this.menu_window );
	}

	if ( this.alignwith == null ) {
		if ( this.x == -1 ) {
			if ( this.parent != null )
				this.x = this.parent.x + this.parent.w + (this.parent.border * 2) + 1;
			if ( this.x > (client_width() / 2) )
				this.x = this.parent.x - this.w - (this.border * 2) - 1;
		}
		if ( this.y == -1 )
			if ( this.parent != null )
				for ( var i = 0;  i < this.parent.num_items;  i++ )
					if ( this.parent.items[i].submenu == this ) {
						this.y = this.parent.y + (this.parent.font_height * i);
						if ( this.parent.separator )
							this.y += ((this.parent.separator_height + ie) * i);
						break;
					}
	}
	else {
		var elem = document.getElementById( this.alignwith );
		this.x = 0;
		this.y = 0;
		while ( elem.offsetParent ) {
			this.x += elem.offsetLeft;
			this.y += elem.offsetTop;
			elem = elem.offsetParent;
		}
		elem = document.getElementById( this.alignwith );
		this.y += elem.offsetHeight;
		this.y += this.separator_height * 5;
		this.x += this.alignoffs_x;
		this.y += this.alignoffs_y;
	}

	if ( !this.drop_down )
		this.y -= (this.h + 2);
	this.menu_window.style.left = this.x + "px";
	this.menu_window.style.width = this.w + "px";
	this.menu_window.style.height = this.h + "px";
	this.menu_window.style.top = this.y + "px";
	this.menu_window.style.overflow = "hidden";
	this.menu_window.style.backgroundColor = this.separator_color;
	this.menu_window.style.color = this.normal_text_color;

	this.menu_window.style.visibility = "visible";
	this.visible = true;
	
	for ( i = y = 0;  i < this.num_items;  i++ ) {
		if ( this.items[i].submenu != null ) {
			elem = document.getElementById( this.menuid + i + "_div_subicon" );
			elem.style.left = this.w - 15 + "px";
			elem.style.width = "15px";
			elem.style.top = y + "px";
			elem.style.backgroundColor = this.normal_background_color;
			elem.style.color = this.normal_text_color;
		}
		y += this.font_height;
		if ( this.separator )
			y += this.separator_height;
	}
	
	if ( this.on_show != "" ) {
		eval( this.on_show );
	}

}

PurpleMenu.prototype.toString = function() {

	return this.menu_text;
}

PurpleMenu.prototype.valueOf = function() {

	return this.menu_text;
}

// Main Menus
var menu_bot = new PurpleMenu( "MainBot", "purple_menu_main", -1, -1, -1, -1, false, "9px" );

var menu_broad = new PurpleMenu( "Broadcast/Professional Video", "purple_menu", -1, -1, 152, -1, false, "9px" );
var menu_digit = new PurpleMenu( "Digital Storage Systems", "purple_menu", -1, -1, 123, -1, false, "9px" );
var menu_prese = new PurpleMenu( "Presentation Products", "purple_menu", -1, -1, 114, -1, false, "9px" );
var menu_secur = new PurpleMenu( "Video Security & Imaging", "purple_menu", -1, -1, 130, -1, false, "9px" );

/*
menu_broad.AlignWithElement( 'broad_td', 4, -17 );
menu_broad.OnShow( "img_act('toc11');" );
menu_broad.OnHide( "img_inact('toc11');" );
menu_broad.AddItem( "D9 VTR's & Camcorders", "product.jsp?asp=YES&itempath=1.1.1" );
menu_broad.AddItem( "Professional DV", "product.jsp?asp=YES&itempath=1.2.1" );
menu_broad.AddItem( "Cameras", "product.jsp?asp=YES&itempath=1.3.1" );
menu_broad.AddItem( "Professional Monitors", "product.jsp?asp=YES&itempath=1.4.1" );
menu_broad.AddItem( "High Definition Products", "product.jsp?asp=YES&itempath=1.5.1" );
menu_broad.AddItem( "S-VHS, VHS Products", "product.jsp?asp=YES&itempath=1.6.1" );
menu_broad.AddItem( "Duplication Systems", "product.jsp?asp=YES&itempath=1.7.1" );
menu_broad.AddItem( "Editing Controllers", "product.jsp?asp=YES&itempath=1.8.1" );

menu_digit.AlignWithElement( 'digit_td', 10, -17 );
menu_digit.OnShow( "img_act('toc12');" );
menu_digit.OnHide( "img_inact('toc12');" );
menu_digit.AddItem( "E-mail Archiving", "product.jsp?asp=YES&itempath=3" ); // NO ENTRY IN PRODUCT TREE MENU
menu_digit.AddItem( "DVD Library System", "product.jsp?asp=YES&itempath=3.1" );

menu_prese.AlignWithElement( 'prese_td', 5, -17 );
menu_prese.OnShow( "img_act('toc13');" );
menu_prese.OnHide( "img_inact('toc13');" );
menu_prese.AddItem( "Video Projectors", "product.jsp?asp=YES&itempath=2.1" );
menu_prese.AddItem( "Plasma Display", "product.jsp?asp=YES&itempath=2.2" );
menu_prese.AddItem( "Visual Presenters", "product.jsp?asp=YES&itempath=2.3" );
menu_prese.AddItem( "Audio Guide System", "product.jsp?asp=YES&itempath=2.4" );

menu_secur.AlignWithElement( 'secur_td', 5, -17 );
menu_secur.OnShow( "img_act('toc14');" );
menu_secur.OnHide( "img_inact('toc14');" );
menu_secur.AddItem( "Security Cameras", "product.jsp?asp=YES&itempath=4.5" );
menu_secur.AddItem( "Networks", "product.jsp?asp=YES&itempath=4.1" );
menu_secur.AddItem( "Internet Cameras", "product.jsp?asp=YES&itempath=4" ); // NO ENTRY IN PRODUCT TREE MENU
menu_secur.AddItem( "Timelapse Recorders", "product.jsp?asp=YES&itempath=4.3" );
menu_secur.AddItem( "Imaging Cameras", "product.jsp?asp=YES&itempath=4.4" );*/

menu_bot.AddItem( menu_broad, "menu_broad" );
menu_bot.AddItem( menu_digit, "menu_digit" );
menu_bot.AddItem( menu_prese, "menu_prese" );
menu_bot.AddItem( menu_secur, "menu_secur" );

menu_bot.SetOrientation( "horizontal" );

menu_bot.EnableSeparator( "#333333", 1 );

//menu_bot.SetSubmenuIcons( "/prof/images/universal/menu_dot_on.gif", "/prof/images/universal/menu_dot_off.gif" );

menu_bot.SetNormalColor( "#000000", "#999999" );
menu_bot.SetHighlightColor( "#cc0000", "#000000" );

