var is_DOM3 = 1;

if (!(navigator.appVersion.indexOf("MSIE 5.5") > 0) && 
	!(navigator.appVersion.indexOf("MSIE 6") > 0) &&
	!(navigator.userAgent.indexOf("Netscape6") > 0)&&
	!(navigator.userAgent.indexOf("Gecko") > 0)) 
	is_DOM3 = 0;

if (is_DOM3){
	document.write('<LINK href="css/menu_new.css" rel="stylesheet" type="text/css">');
	document.write('<SCRIPT type="text/javascript" src="js/menubar.js"></scrip' + 't>');
	document.write('<SCRIPT type="text/javascript" src="js/addtab.js"></scrip' + 't>');
}
else{
    document.write('<LINK href="css/menu_old.css" rel="stylesheet" type="text/css">');
    document.write('<SCRIPT type="text/javascript" src="js/dhtmllib.js"></SCRIP' + 'T>');
    document.write('<SCRIPT type="text/javascript" src="js/navbar.js"></SCRIP' + 'T>');
}
function init(){
	if (!is_DOM3){
		if (isMinIE4) window.MainTable.style.position = 'absolute';

		fullWidth = getWindowWidth()
		  - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

		myNavBar1.resize(fullWidth);
		myNavBar1.create();
		myNavBar1.setzIndex(2);
	}
	else{
		if (isIE5){
			var body = document.getElementsByTagName('BODY').item(0);
			var sHTML = body.innerHTML;
			var newHTML = '<div id="menuBar">'+
				'<a class="menuButton"'+
				    'href="products.htm"'+
				    'onclick="return buttonClick(this, ' + "'menuProducts'"+ ');"'+
				    'onmouseover="buttonMouseover(this, ' + "'menuProducts'"+');">'+
				'products</a>'+
				'<a class="menuButton"'+
				    'href="download.htm"'+
				    'onmouseover="buttonMouseover(this, '+"'menuFreeDownloads'"+');">'+
				'free downloads</a>'+
				'<a class="menuButton"'+
				    'href="purchase.htm"'+
				    'onmouseover="buttonMouseover(this, '+"'menuPurchase'"+');">'+
				'purchase</a>'+
			//	'<a class="menuButton"'+
			//	    'href="logon.php"'+
			//	    'onmouseover="buttonMouseover(this, '+"'menuLogon'"+');">'+
			//	'logon</a>'+
			//	'<a class="menuButton"'+
			//	    'href="registration_full.php"'+
			//	    'onmouseover="buttonMouseover(this, '+"'menuRegistration'"+');">'+
			//	'registration</a>'+
				'<a class="menuButton"'+
				    'href="/"'+
				    'onclick="return buttonClick(this, ' + "'menuSupport'"+ ');"'+
				    'onmouseover="buttonMouseover(this, '+"'menuSupport'"+');">'+
				'support</a>'+
				'<a class="menuButton"'+
				    'href="news.htm"'+
				    'onmouseover="buttonMouseover(this, '+"'menuNews'"+');">'+
				'news</a>'+
				'<a class="menuButton"'+
				    'href="/"'+
				    'onclick="return buttonClick(this, ' + "'menuCompany'"+ ');"'+
				    'onmouseover="buttonMouseover(this, '+"'menuCompany'"+');">'+
				'company</a>'+
				'<a class="menuButton"'+
				    'href="#"'+
				    'onmouseover="buttonMouseover(this, '+"'menuContact'"+');">'+
				'contact</a>'+
				'</div>'+
				'<div id="menuProducts" class="menu">'+
                '<a class="menuItem" href="products.htm">all products</a>'+
                '<a class="menuItem" href="cyan_eProof_RapidImageView.htm">cyan eProof RapidImageView</a>'+
				'<a class="menuItem" href="cyanPrintIP_Easy_OPI.htm">cyanPrintIP Easy OPI</a>'+
				'<a class="menuItem" href="cyanPrintIP.htm">cyanPrintIP</a>'+
				'<a class="menuItem" href="AdvancedSampler.htm">AdvancedSampler</a>'+
				'<a class="menuItem" href="Opium_OPI.htm">Opium OPI</a>'+
				'<a class="menuItem" href="MacServerIP.htm">MacServerIP</a>'+
				'</div>'+
				'<div id="menuFreeDownloads" class="menu"></div>'+
				'<div id="menuPurchase" class="menu">'+
                '<a class="menuItem" href="purchase.htm">purchase</a>'+
                '<a class="menuItem" href="Opium_Cross_Update.htm">competitive upgrades</a>'+
				'</div>'+
			//	'<div id="menuLogon" class="menu"></div>'+
				'<div id="menuRegistration" class="menu"></div>'+
				'<div id="menuSupport" class="menu">'+
				'<a class="menuItem" href="support.htm">support</a>'+
				'<a class="menuItem" href="FAQ_eProof.htm">FAQ eProof</a>'+
				'<a class="menuItem" href="FAQ_cyanPrintIP.htm">FAQ cyanPrintIP</a>'+
				'<a class="menuItem" href="FAQ_AdvancedSampler.htm">FAQ AdvancedSampler</a>'+
				'<a class="menuItem" href="FAQ_Opium_OPI.htm">FAQ Opium OPI</a>'+
				'<a class="menuItem" href="FAQ_MacServerIP.htm">FAQ MacServerIP</a>'+
				'</div>'+
				'<div id="menuNews" class="menu"></div>'+
				'<div id="menuCompany" class="menu">'+
				'<a class="menuItem" href="cyan.htm">about cyan</a>'+
				'<a class="menuItem" href="job_offers.htm">careers</a>'+
				'<a class="menuItem" href="license_agreements.htm">license agreements</a>'+
				'</div>'+
				'<div id="menuContact" class="menu"> '+
				'<a class="menuItem" href="feedback.php">feedback</a>'+
				'<a class="menuItem" href="contact.htm">contact</a>'+
				'</div>';
				body.innerHTML = newHTML + sHTML;
				document.getElementById('MainTable').style.position = 'absolute';
		}
		if (isNS6){
			document.getElementById('MainTable').style.position = 'absolute';

			var body = document.getElementsByTagName('BODY').item(0);
				var firstChild = body.childNodes.item(0);
				var menuBarDIV = document.createElement('DIV');
					menuBarDIV.id = "menuBar";
					body.insertBefore(menuBarDIV, firstChild);
					var El = document.createElement('A');
						El.setAttribute('class', 'menuButton');
						El.setAttribute('href', 'products.htm');
						El.setAttribute('onclick', "return buttonClick(this, 'menuProducts');");
						El.setAttribute('onmouseover', "buttonMouseover(this, 'menuProducts');");
						menuBarDIV.appendChild(El);
						El.appendChild(document.createTextNode('products'));
					El = document.createElement('A');
						El.setAttribute('class', 'menuButton');
						El.setAttribute('href', 'download.htm');
						El.setAttribute('onmouseover', "buttonMouseover(this, 'menuFreeDownloads');");
						menuBarDIV.appendChild(El);
						El.appendChild(document.createTextNode('free downloads'));
					El = document.createElement('A');
						El.setAttribute('class', 'menuButton');
						El.setAttribute('href', 'purchase.htm');
						El.setAttribute('onmouseover', "buttonMouseover(this, 'menuPurchase');");
						menuBarDIV.appendChild(El);
						El.appendChild(document.createTextNode('purchase'));
				//	El = document.createElement('A');
				//		El.setAttribute('class', 'menuButton');
				//		El.setAttribute('href', 'logon.php');
				//		El.setAttribute('onmouseover', "buttonMouseover(this, 'menuLogon');");
				//		menuBarDIV.appendChild(El);
				//		El.appendChild(document.createTextNode('logon'));
				//	El = document.createElement('A');
				//		El.setAttribute('class', 'menuButton');
				//		El.setAttribute('href', 'registration_full.php');
				//		El.setAttribute('onmouseover', "buttonMouseover(this, 'menuRegistration');");
				//		menuBarDIV.appendChild(El);
				//		El.appendChild(document.createTextNode('registration'));
					El = document.createElement('A');
						El.setAttribute('class', 'menuButton');
						El.setAttribute('href', '');
						El.setAttribute('onclick', "return buttonClick(this, 'menuSupport');");
						El.setAttribute('onmouseover', "buttonMouseover(this, 'menuSupport');");
						menuBarDIV.appendChild(El);
						El.appendChild(document.createTextNode('support'));
					El = document.createElement('A');
						El.setAttribute('class', 'menuButton');
						El.setAttribute('href', 'news.htm');
						//El.setAttribute('onclick', "return buttonClick(this, 'menuNews');");
						El.setAttribute('onmouseover', "buttonMouseover(this, 'menuNews');");
						menuBarDIV.appendChild(El);
						El.appendChild(document.createTextNode('news'));
					El = document.createElement('A');
						El.setAttribute('class', 'menuButton');
						El.setAttribute('href', '');
						El.setAttribute('onclick', "return buttonClick(this, 'menuCompany');");
						El.setAttribute('onmouseover', "buttonMouseover(this, 'menuCompany');");
						menuBarDIV.appendChild(El);
						El.appendChild(document.createTextNode('company'));
					El = document.createElement('A');
						El.setAttribute('class', 'menuButton');
						El.setAttribute('href', 'Contact.htm');
						//El.setAttribute('onclick', "return buttonClick(this, 'menuContact');");
						El.setAttribute('onmouseover', "buttonMouseover(this, 'menuContact');");
						menuBarDIV.appendChild(El);
						El.appendChild(document.createTextNode('contact'));
		
				El = document.createElement('DIV');
					El.id = "menuProducts";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
					var a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'products.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('all products'));
                    a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'cyan_eProof_RapidImageView.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('cyan eProof RapidImageView'));						
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'cyanPrintIP_Easy_OPI.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('cyanPrintIP Easy OPI'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'cyanPrintIP.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('cyanPrintIP'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'AdvancedSampler.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('AdvancedSampler'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'Opium_OPI.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('Opium OPI'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'MacServerIP.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('MacServerIP'));
				El = document.createElement('DIV');
					El.id = "menuFreeDownloads";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
				El = document.createElement('DIV');
					El.id = "menuPurchase";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
                    a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'purchase.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('purchase'));
                    a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'Opium_Cross_Update.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('competitive upgrades'));
				//El = document.createElement('DIV');
				//	El.id = "menuLogon";
				//	El.setAttribute('class', 'menu');
				//	body.insertBefore(El, firstChild);
				El = document.createElement('DIV');
					El.id = "menuRegistration";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
				El = document.createElement('DIV');
					El.id = "menuNews";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
				El = document.createElement('DIV');
					El.id = "menuSupport";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'support.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('support'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'FAQ_eProof.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('FAQ eProof'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'FAQ_cyanPrintIP.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('FAQ cyanPrintIP'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'FAQ_AdvancedSampler.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('FAQ AdvancedSampler'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'FAQ_Opium_OPI.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('FAQ Opium OPI'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'FAQ_MacServerIP.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('FAQ MacServerIP'));
				El = document.createElement('DIV');
					El.id = "menuCompany";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'cyan.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('about cyan'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'job_offers.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('careers'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'license_agreements.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('license agreements'));
				El = document.createElement('DIV');
					El.id = "menuContact";
					El.setAttribute('class', 'menu');
					body.insertBefore(El, firstChild);
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'feedback.php');
						El.appendChild(a);
						a.appendChild(document.createTextNode('feedback'));
					a = document.createElement('A');
						a.setAttribute('class', 'menuItem');
						a.setAttribute('href', 'contact.htm');
						El.appendChild(a);
						a.appendChild(document.createTextNode('contact'));
		}
	}
}