<!--

var curr_width = document.body.clientWidth;
var left_offset = 0;
if(curr_width > 864) {
	left_offset = (curr_width - 864) / 2;
}

var COOL_TREE_FORMAT =
[
	//0. left position
	left_offset + 0,

	//1. top position
	111 + 0,

	//2. show +/- buttons
	false,

	//3. couple of button images (collapsed/expanded/blank)
	["/img/b.gif", "/img/b.gif", "/img/b.gif"],

	//4. size of images (width, height,ident for nodes w/o children)
	[16,16,0],

	//5. show folder image
	false,

	//6. folder images (closed/opened/document)
	["/img/b.gif", "/img/b.gif", "/img/b.gif"],

	//7. size of images (width, height)
	[16,16],

	//8. identation for each level [0/*first level*/, 16/*second*/, 32/*third*/,...]
	[0,0],

	//9. tree background color ("" - transparent)
	"",

	//10. default style for all nodes
	"clsNode",

	//11. styles for each level of menu (default style will be used for undefined levels)
	["clsNode", "clsCoolNodeL1"],//["clsNodeL0","clsNodeL1","clsNodeL2","clsNodeL3","clsNodeL4"],

	//12. true if only one branch can be opened at same time
	true,

	//13. item padding and spacing
	[0,0],
];

var INDEX_PRODUCTS = 2;
var INDEX_SUPPORT = 3;

var COOL_NODES = [
	['<img name=menu_r1_c1 src=images/menu_r1_c1.jpg width=203 height=24 border=0>', null, null
	],

	['<img name=menu_r3_c1 src=images/menu_r3_c1.jpg width=203 height=24 border=0 \
	 	OnMouseOver="this.src=\'images/menu_r3_c1_f2.jpg\'" \
	 	OnMouseOut="this.src=\'images/menu_r3_c1.jpg\'">', 'index.html', null
	],

	['<img name=menu_r4_c1 src=images/menu_r4_c1.jpg width=203 height=24 border=0 \
		OnMouseOver="this.src=\'images/menu_r4_c1_f2.jpg\'" \
		OnMouseOut="this.src=\'images/menu_r4_c1.jpg\'">', 'products.html', null
	],

	['<img name=menu_r5_c1 src=images/menu_r5_c1.jpg width=203 height=24 border=0 \
		OnMouseOver="this.src=\'images/menu_r5_c1_f2.jpg\'" \
		OnMouseOut="this.src=\'images/menu_r5_c1.jpg\'">', 'support.html', null
	],

	['<img name=menu_r9_c1 src=images/menu_r9_c1.jpg width=203 height=24 border=0 \
		OnMouseOver="this.src=\'images/menu_r9_c1_f2.jpg\'" \
		OnMouseOut="this.src=\'images/menu_r9_c1.jpg\'">', 'sales.html', null
	],

	['<img name=menu_r7_c1 src=images/menu_r7_c1.jpg width=203 height=24 border=0 \
		OnMouseOver="this.src=\'images/menu_r7_c1_f2.jpg\'" \
		OnMouseOut="this.src=\'images/menu_r7_c1.jpg\'">', 'contact.html', null
	],

	['<img name=menu_r10_c1 src=images/menu_r10_c1.jpg width=203 height=24 border=0 \
		OnMouseOver="this.src=\'images/menu_r10_c1_f2.jpg\'" \
		OnMouseOut="this.src=\'images/menu_r10_c1.jpg\'">', 'partners.html', null
	]
];

var db = '<div class="xmenu"><div class="zmenu">&nbsp;&nbsp;&nbsp;';
var df = '<img src=images/arrow-menu.jpg>&nbsp;';
var de = '</div></div>';
var f0 = db+df+'PEEDI'+de;
var f1 = db+df+'FLASH PROGRAMMER'+de;
var f2 = db+df+'EB55800'+de;
var f3 = db+df+'STARTER KIT ARM7'+de;
var f4 = db+df+'CPU Module PM9263'+de;
var f5 = db+df+'STARTER KIT for PM9263'+de;
var f6 = db+df+'CPU Module PM9261'+de;
var f7 = db+df+'STARTER KIT for PM9261'+de;
var f8 = db+df+'STARTER KIT for Blackfin'+de;
var f18= db+df+'SOFTWARE'+de;
var f20 = db+df+'DOWNLOAD'+de;
var f21 = db+df+'FAQ'+de;
var f22 = db+df+'APPLICATION NOTES'+de;

COOL_NODES_PRODUCTS = 
	['<img name=menu_r4_c1 src=images/menu_r4_c1.jpg width=203 height=24 border=0 \
		OnMouseOver="this.src=\'images/menu_r4_c1_f2.jpg\'" \
		OnMouseOut="this.src=\'images/menu_r4_c1.jpg\'">', 'products.html', null,
		[f0, 'peedi.html', null],
		[f1, 'flash-programmer.html', null],
		[f4, 'pm9263.html', null],
		[f5, 'starter_kit_9263.html', null],
		[f6, 'pm9261.html', null],
		[f7, 'starter_kit_9261.html', null],
		[f8, 'starter_kit_blackfin.html', null],
		[f18, 'software.html', null]
	];

COOL_NODES_SUPPORT = 
	['<img name=menu_r5_c1 src=images/menu_r5_c1.jpg width=203 height=24 border=0 \
		OnMouseOver="this.src=\'images/menu_r5_c1_f2.jpg\'" \
		OnMouseOut="this.src=\'images/menu_r5_c1.jpg\'">', 'support.html', null,
		[f20, 'downloads.html', null],
		[f21, 'faq.html', null],
		[f22, 'app_notes.html', null]
	];


function show_copyright() 
{
var d = new Date();
var curr_year = d.getFullYear();
var copy_right_text = "Copyright RONETIX &copy;" + curr_year + ". All rights reserved";

	document.write('\
		<table width="864" border="0" align="center" cellpadding="0" cellspacing="0"> \
		<tr> \
    		<th align="left" valign="top" scope="row"> \
				<img src="images/footer.jpg" width="864" height="21"> \
			</th> \
  		</tr> \
  		<tr> \
    		<th align="right" valign="top" scope="row" class="textproduct red">' + 
				copy_right_text + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
			</th> \
  		</tr> \
		</table>");
}


/* 
 * Get the size and the current position of the current browser window
 * Usage:
 	var size;
	size = get_windows_size();
	window.alert( 'Width = ' + size[0] + ' and Height = ' + size[1] );
	window.alert( 'Pos_X = ' + size[2] + ' and Pos_Y = ' + size[3] );
 * */
function get_windows_size()
{
	var myWidth = 0, myHeight = 0;
	var pos_x, pos_y;
	
	if( typeof( window.innerWidth ) == 'number' ) 
	{
		myWidth = window.innerWidth; 
		myHeight = window.innerHeight;
	} 
	else 
	if( document.documentElement && 
	  ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
		myWidth = document.documentElement.clientWidth; 
		myHeight = document.documentElement.clientHeight;
	} 
	else
	if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{
		myWidth = document.body.clientWidth; 
		myHeight = document.body.clientHeight;
	}

	if(window.screenTop == undefined)
	{
		pos_x = window.screenX;
		pos_y = window.screenY;
	}
	else
	{
		pos_x = window.screenLeft;
		pos_y = window.screenTop; 
	}
	
	return [myWidth, myHeight, pos_x, pos_y];
}

/* Open a window in the center of the current browser window
 * 
 */
function window_open(windowUri, windowName, windowWidth, windowHeight )
{
	var size;
	size = get_windows_size();
	
	var pos_x = size[2];
	var pos_y = size[3];	

	if ( windowHeight == -1 )
		windowHeight = size[1]; 
	
    var centerWidth = pos_x + (size[0] - windowWidth) / 2;
    var centerHeight = pos_y + (size[1] - windowHeight) / 2;
	
    newWindow = window.open(windowUri, windowName, 
    	'resizable=0' +
    	',width=' + windowWidth + 
        ',height=' + windowHeight + 
        ',left=' + centerWidth +
        ',top=' + centerHeight);

    newWindow.focus();
    return newWindow.name;
}

-->
