// JavaScript Document - put here all global elements for 'systran.fr'

// product elements (price, names, ids) ----------
// <script language="javascript" type="text/javascript">getPPrice('1');</script>
var linkDRloc = "en_US";
var linkDRcur = "840";
var prodName = new Array("Professional Premium","Professional Standard","Personal","Office Translator","PDF Translator","WebTranslator");
var prodCaID = new Array("11033618","11033619","11033620","11033621","11033622","11033623");
var tPPriceL = new Array("899.00","299.00","69.00","179.00","59.00","29.00");
var tPCurreL = new Array("&#x0024;","&#x0080;","&#x00A3;","&#x00A5;"); // currencies: $, €, £, ¥
var tPageCur = 0; // must not exceed the 'tPCurreL' range!
var tPCurreF = tPCurreL[tPageCur];
var tPPriceF = "";

function getPPrice(prodNB) // must not exceed the 'tPPriceL' range!
	{
		if( (tPageCur < tPCurreL.length) && (prodNB <= tPPriceL.length) )
			{
				if(tPageCur != 1)
					{ tPPriceF = tPCurreF + tPPriceL[prodNB]; }
				else
					{ tPPriceF = tPPriceL[prodNB] +" "+ tPCurreF; }
				document.write(tPPriceF);
			}
	}
function linkDR(prodNB, lType)
	{
		var linkDRProd = "";
		if( prodNB != null )
			{ linkDRProd = "http://shop.systransoft.com/dr/v2/ec_MAIN.Entry16?SP=10024&PN=29&V3=1&V5=&V4=10&S1=&S2=&S3=&S4=&S5=&xid=28102&trackingid=cat_50&CUR=840&DSP=0&PGRP=0&ABCODE=&CACHE_ID=0&V1="+ prodCaID[prodNB] +"&V2="+ prodCaID[prodNB]; }
		else
			{ linkDRProd = "http://shop.systransoft.com/dr/v2/ec_Main.Entry17c?SP=1&SID=28102&CID=0&pn=1&pid=0"; }
		if( lType )
			{ return(linkDRProd); }
		else
			{ location = linkDRProd; return(""); }
	}

// function to 'show/hide' elements ----------
function zShowHide(wDIV, sOFF, sON)
	{
		var myD = document.getElementById(wDIV);
		var myS = document.getElementById("menSR");
		var disP = myD.style.display;
		var styD = myS.className;
		if (disP == "block")
			{ disP = "none"; styD = sOFF; }
		else if (disP == "" || disP == "none")
			{ disP = "block"; styD = sON; }
		myD.style.display = disP;
		myS.className = styD;
	}
// 'show/hide' drop-down menu ----------
function menuShow(id)
	{ document.getElementById(id).style.display	= 'block'; }

function menuHide(id)
	{ document.getElementById(id).style.display = 'none'; }

// 'enable/disable' submit button for forms ----------
function enableForm()
	{
		var lINP_OK = 0, lSEL_0K = 0, lCHK_OK = 0;

		for( var i=0; i < chkLINP.length; i++ )
			{
				if( document.getElementById(chkLINP[i]).value == "" )
					{ document.getElementById(chkLINP[i]+"_L").style.color = "#D90000"; lINP_OK += 1; }
				else
					{ document.getElementById(chkLINP[i]+"_L").style.color = "#000"; }
			}
		for( var j=0; j < chkLSEL.length; j++ )
			{
				if( document.getElementById(chkLSEL[j]).selectedIndex == 0 )
					{ document.getElementById(chkLSEL[j]+"_L").style.color = "#D90000"; lSEL_0K += 1; }
				else
					{ document.getElementById(chkLSEL[j]+"_L").style.color = "#000"; }
			}
		for( var k=0; k < chkLCHK.length; k++ )
			{
				var lCHK = 0;
				var v00 = document.getElementsByName(chkLCHK[k]);
				for( var l=0; l < v00.length; l++ )
					{
						if( v00[l].checked == true )
							{ lCHK += 1; }
					}
				if( lCHK == 0 )
					{ document.getElementById(chkLCHK[k]+"_L").style.color = "#D90000"; lCHK_OK += 1; }
				else
					{ document.getElementById(chkLCHK[k]+"_L").style.color = "#000"; }
			}
		if( (lINP_OK + lSEL_0K + lCHK_OK) > 0 )
			{ document.getElementById("fSubmit").disabled = true; }
		else
			{ document.getElementById("fSubmit").disabled = false; }
	}

// basic architecture ----------
function sCorpMenu(baseDOM)
	{
		var domain;
		if( !baseDOM )
			{ domain = ""; }
		else
			{ domain = baseDOM; }
		var linkHome = "", pushMenu = ' style="left: 383px;"';
		if( location.pathname != "/" )
			{
				if( location.pathname != "/index.html" )
					{
						linkHome = '<a href="'+ domain +'/" onmouseover="menuHide(\'dMenuContent\');">Home</a> | ';
						pushMenu = ' style="left: 427px;"';
					}
			}
		document.write('<a href="'+ domain +'/company/">Company</a> | <a href="'+ domain +'/products/">Products &amp; Services</a> | <a href="'+ domain +'/solutions/">Solutions</a> | '
									+'<!--<a href="http://store.digitalriver.com/servlet/ControllerServlet?Action=DisplayHomePage&SiteID=systran&Locale='+ linkDRloc +'">Store</a> | --><a href="'+ domain +'/support/">Support</a> | <a href="'+ domain +'/contact/" onmouseover="menuHide(\'dMenuContent\');">Contact</a> | '+ linkHome
									+'<span id="dMenu"'+ pushMenu +'><dl><dt onmouseover="menuShow(\'dMenuContent\');">Purchase</dt><dd id="dMenuContent"><dl>'
									+'<dd><a href="http://shop.digitalriver.com/dr/v2/ec_Main.Entry17c?SP=1&SID=28102&CID=0&pn=1&pid=0&CUR='+ linkDRcur +'">'+ linkDRloc.substr(3, 2) +' Store</a></dd>'
									+'<dd><a href="'+ domain + '/company/globalstore.html">Global Store</a></dd>'
									+'<dd><a href="'+ domain +'/company/partners/distribution.html">Authorized Resellers</a></dd>'
									+'</dl></dd></dl></span>');
	}

function sProdLeft01(exceptNB)
	{
		var styleCOL = " class=\"c02\"", styleAFF = "", y = prodName.length;
		if( exceptNB ) { y -= 1; }
		
		document.write('<dt class="c02"><a href="http://store.digitalriver.com/servlet/ControllerServlet?Action=DisplayHomePage&SiteID=systran&Locale='+ linkDRloc +'">SYSTRAN Online Store</a></dt>');
		for( var x = 0; x < prodName.length ; x++ )
			{
				if( exceptNB )
					{ if( y%2 == 0 ) { styleAFF = styleCOL; } else { styleAFF = ""; } }
				else
					{ if( y%2 != 0 ) { styleAFF = styleCOL; } else { styleAFF = ""; } }
				if( x != exceptNB )
					{
						document.write('<dd'+ styleAFF +'><a href="http://store.digitalriver.com/DRHM/servlet/ControllerServlet?Action=DisplayCategoryProductListPage&SiteID=systran&Locale='+ linkDRloc +'&Env=BASE&categoryID='+ prodCaID[x] +'">SYSTRAN '+ prodName[x] +'</a></dd>');
						y--;
					}
			}
	}

function sCorpLeft00()
	{
		document.write('<dt class="c02">Quick Links</dt>'
									+'<dd><a href="/company/technology/index.html">Technology</a></dd>'
									+'<dd class="c02"><a href="/company/investors/index.html">Investors</a></dd>'
									+'<dd><a href="/company/newsroom/pr/index.html">Press Releases</a></dd>'
									+'<dt class="c02">Past Events</dt>'
									+'<dd ><a href="/events/gtc2006.html">GTC - Sacramento 2006</a></dd>'	
									+'<dt class="c02"><a href="/company/careers/index.html">Careers</a></dt>'
									+'<dt><a href="/company/newsroom/index.html">News</a></dt>'
									+'<dd class="c02 lh02"><a href="/__/pdf/SYSTRAN.PR_2006_Q3_EN.pdf"><b>October 27, 2006</b><br />Revenue for Third Quarter 2006 &nbsp; [PDF]</dd>'
									+'<dd class="c02 lh02"><a href="/__/pdf/SYSTRAN_PR_2006S1_EN.pdf"><b>August 04, 2006</b><br />SYSTRAN annouced its First Semester Interim Report &nbsp; [PDF]</dd>'
									+'<dd class="c02 lh02"><a href="/__/pdf/TreasuryStockAcquisitionPlan_2006-06.pdf"><b>June 6, 2006</b><br />Treasury Stock Acquisition Plan 2006 &nbsp; [PDF]</a></dd>'
									+'<dt><a href="/contact/">Contact</a></dt>'
									+'<dt class="c02"><a href="/company/partners/distribution.html">Authorized Resellers</a></dt>'
									+'<dt><a href="/Affiliates/index.html">Affiliate Program</a></dt>');
	}

function sCorpLeft01()
	{
		document.write('<dt class="c02"><a href="/company/index.html">About SYSTRAN</a></dt>'
									+'<dt><a href="/company/technology/index.html">Technology</a></dt>'
									+'<dd class="c02"><a href="/company/technology/benefits.html">MT Benefits</a></dd>'
									+'<dd><a href="/company/technology/customization.html">MT Customization</a></dd>'
									+'<dd class="c02"><a href="/company/technology/whitepapers.html">White Papers</a></dd>'
									+'<dd><a href="/company/technology/casestudies.html">Case Studies</a></dd>'
									+'<dt class="c02"><a href="/company/newsroom/index.html">News</a></dt>'
									+'<dd><a href="/company/newsroom/pr/index.html">Press Releases</a></dd>'
									+'<dd class="c02"><a href="/company/newsroom/in_the_news/index.html">In The News</a></dd>'
									+'<dt><a href="/company/investors/index.html">Investors</a></dt>'
									+'<dd class="c02"><a href="/company/investors/annual_reports.html">Annual Report</a></dd>'
									+'<dd><a href="/company/investors/financial_releases.html">Financial Releases</a></dd>'
									+'<dd class="c02"><a href="/company/investors/cob_filings.html">AMF Filings</a></dd>'
									+'<dt><a href="/company/careers/index.html">Careers</a></dt>'
									+'<dt class="c02"><a href="/company/partners/distribution.html">Distribution Partners</a></dt>'
									+'<dt><a href="/Affiliates/index.html">Affiliate Program</a></dt>'
									+'<dd class="c02 lh02"><a href="/Affiliates/af_resources.html">Affiliate Banners and Text Links</a></dd>');
	}

function sCorpLeft02()
	{
		document.write('<dt class="c02"><a href="javascript:getLinkDR(\'\')">Desktop products</a></dt>'
									+'<dd class="lh02"><a href="javascript:getLinkDR(\'0\')">SYSTRAN Professional Premium</a></dd>'
									+'<dd class="c02 lh02"><a href="javascript:getLinkDR(\'1\')">SYSTRAN Professional Standard</a></dd>'
									+'<dd><a href="javascript:getLinkDR(\'2\')">SYSTRAN Personal</a></dd>'
									+'<dd class="c02"><a href="javascript:getLinkDR(\'3\')">SYSTRAN Office Translator</a></dd>'
									+'<dd><a href="javascript:getLinkDR(\'4\')">SYSTRAN PDF Translator</a></dd>'
									+'<dd class="c02"><a href="javascript:getLinkDR(\'5\')">SYSTRAN WebTranslator</a></dd>'
									+'<dt><a href="http://www.digitalriver.com/promo=132782">Mobile - Pocket PC products</a></dt>'
									+'<dd class="c02"><a href="http://www.digitalriver.com/promo=132782">SYSTRAN Mobile</a></dd>'
									+'<dt><a href="/products/online_services/">Online Services</a></dt>'
									+'<dd class="c02"><a href="/products/online_services/systranlinks.html">SYSTRANLinks</a></dd>'
									+'<dd class="l02"><a href="/products/online_services/systranlinks_bronze.html">Bronze</a></dd>'
									+'<dd class="c02 l02"><a href="/products/online_services/systranlinks_silver.html">Silver</a></dd>'
									+'<dd class="l02"><a href="/products/online_services/systranlinks_gold.html">Gold</a></dd>'
									+'<dd class="c02 l02"><a href="/products/online_services/systranlinks_corporate.html">Corporate</a></dd>'
									+'<dd><a href="/products/online_services/systranet.html">SYSTRANet</a></dd>'
									+'<dd class="c02"><a href="/products/online_services/systranbox.html">SYSTRANBox</a></dd>'
									+'<dt><a href="/products/client-server/">Client Server Solutions</a></dt>'
									+'<dd class="c02"><a href="/products/client-server/webserver.html">SYSTRAN WebServer</a></dd>'
									+'<dd><a href="/products/client-server/enterprise/">SYSTRAN Enterprise</a></dd>'
									+'<dt class="c02"><a href="/products/professional/">Professional Services</a></dt>');
	}

function sCorpLeft03()
	{
		document.write('<dt><a href="/contact/">Contact</a></dt>'
									+'<dt class="c02">Technical Support</dt>'
									+'<dd><a href="/contact/Windows.html">Desktop Products</a></dd>'
									+'<dd class="c02"><a href="/contact/eServices.html">Online Services</a></dd>'
									+'<dd><a href="/contact/Enterprise.html">Client-Server Solutions</a></dd>'
									+'<dd class="c02"><a href="/support/FAQ/index.html">FAQ</a></dd>'
									+'<dt>Sales</dt>'
									+'<dd class="c02"><a href="/contact/Retail.html">Individual and Small Business</a></dd>'
									+'<dd><a href="/contact/Sales.html">Corporate</a></dd>'
									+'<dd class="c02"><a href="mailto:usg-sales@systransoft.com">US Government</a></dd>');
	}

function sCorpLeft04()
	{
		document.write('<dt class="c02"><a href="./">Solutions</a></dt>'
									+'<dd class="lh02"><a href="./individual.html">Individual User &amp; Home Office</a></dd>'
									+'<dd class="c02 lh02"><a href="./smallbusiness.html">Small &amp; Medium Businesses</a></dd>'
									+'<dd><a href="./largebusiness.html">Large Businesses</a></dd>'
									+'<dd class="c02 lh02"><a href="./government.html">Governments &amp; Public Administrations</a></dd>'
									+'<dd><a href="./agencies.html">Translation Agencies</a></dd>'
									+'<dd class="c02 lh02"><a href="./developers.html">Developers &amp; Software Integrators</a></dd>');
	}

function sCorpBott(baseDOM)
	{
		var domain;
		if( !baseDOM )
			{ domain = ""; }
		else
			{ domain = baseDOM; }
		document.write('Copyright &copy; 2005 SYSTRAN S.A. All rights reserved.<br /><a href="'+ domain +'/Terms-en.html">Legal Notices</a> | <a href="'+ domain +'/contact/">Contact SYSTRAN</a>');
	}

