<!-- Begining

// -----------------------------------------------------------------------------
// Script to show/hide divisions on page.

var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

function hideBlock(ident) {
if (ie4) {document.all[ident].style.display = "none";}
if (ns4) {document.layers[ident].visibility = "hide";}
if (ns6) {document.getElementById([ident]).style.display = "none";}
}

function showBlock(ident) {
if (ie4) {document.all[ident].style.display = "block";}
if (ns4) {document.layers[ident].visibility = "show";}
if (ns6) {document.getElementById([ident]).style.display = "block";}
}

// Script to show/hide divisions on LEFT MENU page.
function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("cont").getElementsByTagName("SPAN");
		if(el.style.display == "none"){
			for (var i=0; i<ar.length; i++){
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
function ChangeClass(menu, newClass) { 
	 if (document.getElementById) { 
	 	document.getElementById(menu).className = newClass;
	 } 
} 
// -----------------------------------------------------------------------------
// Functions used by Contact Form
// -----------------------------------------------------------------------------

// number of days cookie lives for
var num_days = 180;

function ged(noDays){
    var today = new Date();
    var expr = new Date(today.getTime() + noDays*24*60*60*1000);
    return  expr.toGMTString();
}
// ------------------------------------------------------------------------
// Javascript encode/decode for Unicode to UTF-8
// ------------------------------------------------------------------------
function utf8_encode(string)
{
	string = string.replace(/\r\n/g,"\n");
	var utftext = "";

	for (var n = 0; n < string.length; n++) {

		var c = string.charCodeAt(n);

		if (c < 128) {
			utftext += String.fromCharCode(c);
		}
		else if((c > 127) && (c < 2048)) {
			utftext += String.fromCharCode((c >> 6) | 192);
			utftext += String.fromCharCode((c & 63) | 128);
		}
		else {
			utftext += String.fromCharCode((c >> 12) | 224);
			utftext += String.fromCharCode(((c >> 6) & 63) | 128);
			utftext += String.fromCharCode((c & 63) | 128);
		}

	}

	return utftext;
}

function utf8_decode(utftext)
{
	var string = "";
	var i = 0;
	var c = c1 = c2 = 0;

	while ( i < utftext.length ) {

		c = utftext.charCodeAt(i);

		if (c < 128) {
			string += String.fromCharCode(c);
			i++;
		}
		else if((c > 191) && (c < 224)) {
			c2 = utftext.charCodeAt(i+1);
			string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
			i += 2;
		}
		else {
			c2 = utftext.charCodeAt(i+1);
			c3 = utftext.charCodeAt(i+2);
			string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
			i += 3;
		}

	}

	return string;
}

// ------------------------------------------------------------------------
function writeCookie(){
// Test to see if form contains anything.
	if ((document.forms.ContactDetailsForm.username.value == "")|| 
		(document.forms.ContactDetailsForm.email.value == "")|| 
		(document.forms.ContactDetailsForm.city.value == "")|| 
		(document.forms.ContactDetailsForm.country.value == "")||
		(document.forms.ContactDetailsForm.company.value == "")||
		(document.forms.ContactDetailsForm.phone.value == "")){
			window.alert("Please enter all of the required information.");
			return false;
	}

	// Collect information from form.
	var contactName = encodeURIComponent(document.forms.ContactDetailsForm.username.value);
	var testEmail = document.forms.ContactDetailsForm.email.value; // encoding screws up syntax check, so we use unencoded value in test.
	var contactEmail = encodeURIComponent(document.forms.ContactDetailsForm.email.value);
	var contactCompany = encodeURIComponent(document.forms.ContactDetailsForm.company.value);
	var contactCity = encodeURIComponent(document.forms.ContactDetailsForm.city.value);
	var contactCountry = encodeURIComponent(document.forms.ContactDetailsForm.country.value);
	var contactPhone = encodeURIComponent(document.forms.ContactDetailsForm.phone.value);
	var contactWebSite = encodeURIComponent(document.forms.ContactDetailsForm.web.value);
	var contactDistributor = encodeURIComponent(document.forms.ContactDetailsForm.distributor.value);
	var contactOtherCompany = encodeURIComponent(document.forms.ContactDetailsForm.othercompany.value);

	// Test for valid email address syntax
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		// window.alert(testEmail);
	if (filter.test(testEmail) != true){
		window.alert('This does not seem to be a valid email address. Please try again.');
		return false;
	}

	// Do tests on formMailList checkbox
	if (document.forms.ContactDetailsForm.maillist.checked){
		var contactMailList = "Yes";
	} else {
		var contactMailList = "No";
	}
	
	//Construct string.
	var cookieString = "CogentDataHub1=" + ("ContactName=" + contactName 
							+ "&ContactEmail=" + contactEmail
							+ "&ContactMailList=" + contactMailList
							+ "&ContactCompany=" + contactCompany
							+ "&ContactCity=" + contactCity
							+ "&ContactCountry=" + contactCountry
							+ "&ContactPhone=" + contactPhone
							+ "&ContactWebSite=" + contactWebSite
							+ "&ContactDistributor=" + contactDistributor
							+ "&ContactOtherCompany=" + contactOtherCompany);

	// Add expiration date if save Cookie is requested.
	
	if (document.forms.ContactDetailsForm.savecookie.checked){
		cookieString = (cookieString + ";expires=" + ged(num_days));
		document.cookie = cookieString;
		verifyCookieContact();
		// window.location = ("Download_Software.html");
		return;
	} else {
		// Just write session cookie
		document.cookie = cookieString;
		verifyCookieContact();
		// window.location = ("Download_Software.html");
		return;
	}
}
// ------------------------------------------------------
// Functions used by the Contact page
// Differs from verifyCookie function in that it doesn't reload page
// if cookie is not written due to browser blocking cookies.
// ------------------------------------------------------
function verifyCookieContact(){
	// Checks to see if the CogentDataHub1 is present.
	// Redirects to Contact Form if necessary.
	
	var cookieName = "CogentDataHub1";
    var start = document.cookie.indexOf(cookieName);
    if (start == -1){ 
		// If cookie doesn't exist then do nothing and continue to display the page.
		return;
    } else {
		// If cookie is found, then redirect to Download and exit.
		window.location = ("Download_Software.html");
		return;
	}
}
// ------------------------------------------------------
// Functions used by the Download_Software page
// Used when Download_Software page is loaded to check to see if cookie
// is present.  If it is, then just display the page, if not, then
// redirect to contact form.
// Only really used for when people link directly to Download_Software page.
// ------------------------------------------------------
function verifyCookieDownload(){
	// Checks to see if the CogentCookie is present.
	// Redirects to Contact Form if necessary.
	
	var cookieName = "CogentDataHub1";
    var start = document.cookie.indexOf(cookieName);
    if (start == -1){ 
		// If cookie doesn't exist then redirect to Contact and exit.
		window.location = ("Contact_Form.html"); 
		return;
    } else {
		// If cookie is found, then do nothing and continue to dislay the page.
		return;
	}
}

if (!(typeof needDownloadCookie === 'undefined'))
    verifyCookieDownload();

// ------------------------------------------------------
// Functions used by the Download page
// ------------------------------------------------------
function verifyCookie(){
	// Checks to see if the CogentCookie is present.
	// Redirects to Contact Form if necessary.
	
	var cookieName = "CogentDataHub1";
    var start = document.cookie.indexOf(cookieName);
    if (start == -1){ 
		// If cookie doesn't exist then redirect to Contact and exit.
		window.location = ("Contact_Form.html"); 
		return;
    } else {
		// If cookie is found, then redirect to Download and exit.
		window.location = ("Download_Software.html");
		return;
	}
}
// ------------------------------------------------------------------------
function readTheCookie(cookie_info){
	
	// Read the Cogent Cookie Details.
	var cookieName = "CogentDataHub1";
	
	// Find the start of the Cogent Cookie.
	var firstChar = document.cookie.indexOf(cookieName);
	var lastChar;
	var NN2Hack = firstChar + cookieName.length;
	// If you found the cookie ...
	if((firstChar != -1) && (document.cookie.charAt(NN2Hack) == '=')) {
		// skip 'name' and '='.
		firstChar += cookieName.length + 1;
		// Find the end of the value string (i.e. the next ';').
	    lastChar = document.cookie.indexOf(';', firstChar); 
		// If reach the end, then this means our cookie was the only one 
		// and assume lastChar = length of cookie.
			if(lastChar == -1) {
				lastChar = document.cookie.length;
			}
		// Extract the contents of the cookie.
		var the_values = unescape(document.cookie.substring(firstChar, lastChar));
		// Parse the cookie string.
		// split and copy each name=value pair into an array (list)
		var separated_values = the_values.split("&");
		// Loop through the list of name=values and load up the associate array
		var property_value = "";
			for (var loop = 0; loop < separated_values.length; loop++){
				property_value = separated_values[loop];
				var broken_info = property_value.split("=");
				var the_property = broken_info[0];
				var the_value = broken_info[1];
				cookie_info[the_property] = decodeURIComponent(the_value);
			}
		
	} else { // If cookie is not found, just exit
		return;
	}
}

// ------------------------------------------------------------------------
function setContactDetailsForm(){

	// Checks to see if the CogentCookie is present.
	// If it is there then copy details into form.
	var cookieName = "CogentDataHub1";
    var start = document.cookie.indexOf(cookieName);
    if (start == -1){ 
		// If cookie doesn't exist then just exit function.
		return;
    } else {
		// If cookie is found, then read cookie and fill in form.
			
		var cookie_details = new Array();
		readTheCookie(cookie_details);
		// Test to see if MailList is "Yes".
		if (cookie_details["ContactMailList"] == "Yes"){
			document.forms.ContactDetailsForm.maillist.checked = true;
		}
		// read the other data from the associative array.
		document.forms.ContactDetailsForm.username.value = cookie_details["ContactName"];
		document.forms.ContactDetailsForm.email.value = cookie_details["ContactEmail"];
		document.forms.ContactDetailsForm.phone.value = cookie_details["ContactPhone"];
		document.forms.ContactDetailsForm.company.value = cookie_details["ContactCompany"];
		document.forms.ContactDetailsForm.city.value = cookie_details["ContactCity"];
		document.forms.ContactDetailsForm.country.value = cookie_details["ContactCountry"];
		checkDistrib("country");
		document.forms.ContactDetailsForm.web.value = cookie_details["ContactWebSite"];
		document.forms.ContactDetailsForm.distributor.value = cookie_details["ContactDistributor"];
		document.forms.ContactDetailsForm.othercompany.value = cookie_details["ContactOtherCompany"];
	}
}
// ------------------------------------------------------------------------
function checkDistrib(calledFrom){
	// When user selects distrib, check to see if the choose 'Other company'
	// and then make entry field visible.

	if (calledFrom == "country") {
	    try {
		var distribCombo = document.forms['ContactDetailsForm'].distributor;
		var countryCombo = document.forms['ContactDetailsForm'].country;
		var option = countryCombo.options[countryCombo.selectedIndex];
		SetDropDown (distribCombo, option.value);
	    }
	    catch (e) {
		window.alert (e);
	    }
	}
	else if (calledFrom == "reset") {
	    var distribCombo = document.forms['ContactDetailsForm'].distributor;
	    SetDropDown (distribCombo, "reset");
	}

	var distribChoice = document.forms['ContactDetailsForm'].distributor.value;

	if (distribChoice == "Other company" && (calledFrom == "normal" || calledFrom == "country") ) {
	    // window.alert('You picked ' + distribChoice);
	    showBlock('Other_Company');
	    return;
	} else {
	    hideBlock('Other_Company');
	    return;	
	}
}

// ------------------------------------------------------------------------
function checkDistrib2(calledFrom){
	// When user selects distrib, check to see if the choose 'Other company'
	// and then make entry field visible.  Used on Request_Quote.html

	if (calledFrom == "country") {
	    try {
		var distribCombo = document.forms['requestQuote'].distributor;
		var countryCombo = document.forms['requestQuote'].country;
		var option = countryCombo.options[countryCombo.selectedIndex];
		SetDropDown (distribCombo, option.value);
	    }
	    catch (e) {
		window.alert (e);
	    }
	}
	else if (calledFrom == "reset") {
	    var distribCombo = document.forms['requestQuote'].distributor;
	    SetDropDown (distribCombo, "reset");
	}

	var distribChoice = document.forms['requestQuote'].distributor.value;

	if (distribChoice == "Other company" && (calledFrom == "normal" || calledFrom == "country") ) {
	    // window.alert('You picked ' + distribChoice);
	    showBlock('Other_Company');
	    return;
	} else {
	    hideBlock('Other_Company');
	    return;	
	}
}

// ------------------------------------------------------------------------
function changeFileSize(formName){
	// Changes the number in the File Size field depending
	// on which OS is selected.
	
	var OS = document.forms[formName].OS.value;
	
	if (OS == "Linux"){ 
		// Copy LinSize into FileSize field.
		document.forms[formName].FileSize.value = document.forms[formName].LinSize.value;
		document.forms[formName].FileVer.value = document.forms[formName].LinVer.value;
    } else if (OS == "QNX6"){
		// Copy Q6Size into FileSize field.
		document.forms[formName].FileSize.value = document.forms[formName].Q6Size.value;
		document.forms[formName].FileVer.value = document.forms[formName].Q6Ver.value;
	} else if (OS == "QNX4"){
		// Copy Q4Size into FileSize field.
		document.forms[formName].FileSize.value = document.forms[formName].Q4Size.value;
		document.forms[formName].FileVer.value = document.forms[formName].Q4Ver.value;
	} else if (OS == "Windows"){
		// Copy WinSize into FileSize field.
		document.forms[formName].FileSize.value = document.forms[formName].WinSize.value;
		document.forms[formName].FileVer.value = document.forms[formName].WinVer.value;
	}

}
// ------------------------------------------------------------------------
// -----------     Scripts used for IFRAMES implementation      -----------
// ------------------------------------------------------------------------

function buildQueryString(theFormName)
{
 theForm = document.forms[theFormName];
 var qs = '';
 for (e=0;e<theForm.elements.length;e++)
 {
  if (theForm.elements[e].name!='')
  {
   qs+=(qs=='')?'?':'&';
   qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value);
  }
 }
 // This time stamp helps get around IE caching the page which 
 // leads to random downloads not getting logged.
 qs += "&now=" + (new Date()).getTime();  
 return qs;
}

// ------------------------------------------------------------------------
function createTempIframe (framename)
{
	var tempIFrame;
	
	// create the IFrame and return a reference to the
	// object so we can use it later.
	try {
		tempIFrame=document.createElement('iframe');
		tempIFrame.setAttribute('id',framename);
		tempIFrame.style.border='0px';
		tempIFrame.style.width='0px';
		tempIFrame.style.height='0px';
		tempIFrame = document.body.appendChild(tempIFrame);
			
		// if (document.frames) {
			// this is for IE5 Mac, because it will only
			// allow access to the document object
			// of the IFrame if we access it through
			// the document.frames array
			// tempIFrame = document.frames[framename];
		// }
	} catch(exception) {
		// This is for IE5 PC, which does not allow dynamic creation
		// and manipulation of an iframe object. Instead, we'll fake
		// it up by creating our own objects.
		iframeHTML='<iframe id="'+framename+'" style="';
		iframeHTML+='border:0px;';
		iframeHTML+='width:0px;';
		iframeHTML+='height:0px;';
		iframeHTML+='"><\/iframe>';
		document.body.innerHTML+=iframeHTML;
		  //tempIFrame = new Object();
		  //tempIFrame.document = new Object();
		  //tempIFrame.document.location = new Object();
		  //tempIFrame.document.location.iframe = document.getElementById(framename);
		  //tempIFrame.document.location.replace = function(location) {
		  // this.iframe.src = location;
		  //}
		  tempIFrame = document.getElementById(framename);
	}
	return (tempIFrame);
}
// ------------------------------------------------------------------------
var IFrameObj; // our IFrame object
var IFrameObj2; // another IFrame object
// ------------------------------------------------------------------------
function callToServer(theFormName) {
	
	// Copy cookie details into the hidden fields within the download form.
	copyCookieDetails(theFormName);

	if (!document.createElement)
		return true;
	var URL = 'http://developers.cogentrts.com/cgi-bin/software.g' + buildQueryString(theFormName) + '&DownloadSite=www.cogentdatahub.com';

	if (!IFrameObj)
		IFrameObj = createTempIframe('RSIFrame');
	if (!IFrameObj2)
		IFrameObj2 = createTempIframe('RSIFrame2');
	
	if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
		// we have to give NS6 a fraction of a second
		// to recognize the new IFrame
		setTimeout('callToServer("'+theFormName+'")',10);
		return false;
	}
	
	// Make the redirection call to server 
	// with argument string appended
	
	// IFrameObj.src = URL;
	// IFrameObj2.src = getDownloadName(theFormName);
	IFrameObj.setAttribute("src", URL);
	IFrameObj2.setAttribute("src", getDownloadName(theFormName));
	
	return false;
}

// ------------------------------------------------------------------------
function copyCookieDetails(theFormName){
	// Copy cookie details into the hidden fields within the download form.
	var cookie_details = new Array();
	readTheCookie(cookie_details);
	document.forms[theFormName].ContactName.value = (cookie_details["ContactName"]);
	document.forms[theFormName].ContactEmail.value = (cookie_details["ContactEmail"]);
	document.forms[theFormName].ContactPhone.value = (cookie_details["ContactPhone"]);
	document.forms[theFormName].ContactCompany.value = (cookie_details["ContactCompany"]);
	document.forms[theFormName].ContactMailList.value = (cookie_details["ContactMailList"]);
	document.forms[theFormName].ContactCity.value = (cookie_details["ContactCity"]);
	document.forms[theFormName].ContactCountry.value = (cookie_details["ContactCountry"]);
	document.forms[theFormName].ContactWebSite.value = (cookie_details["ContactWebSite"]);
	document.forms[theFormName].ContactDistributor.value = (cookie_details["ContactDistributor"]);
	document.forms[theFormName].ContactOtherCompany.value = (cookie_details["ContactOtherCompany"]);
}

// ------------------------------------------------------------------------
function resetIframe(){
	
	// URL = 'Blank_Iframe.html';
	document.getElementById('ackFrame').setAttribute("src", "about:blank");
	return true;
}
// ------------------------------------------------------------------------
function checkMail(mailType){
	
	// Clear notification Iframe.
	// resetIframe();
	
	// Copy recipient email address from form.
	var recipient = document.getElementById('emailTest').emailAddress.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(recipient)) {
		if (mailType == "email") {
			sendEmail();
		}
		else {
			sendSMS();
		}
		return false;
	}
	else {
		window.alert('This does not seem to be a valid email address. Please try again.');
		return false;
	}
}

// ------------------------------------------------------------------------
function sendEmail(){
	
	// Copy recipient email address from form.
	var recipient = document.getElementById('emailTest').emailAddress.value;
	// Create url to call gamma script.
	var URL = 'http://developers.cogentrts.com/cgi-bin/demomail.g?email=' + recipient;
	// Make call to gamma script.
	document.getElementById('ackFrame').setAttribute("src", URL);
	return false;
}
// ------------------------------------------------------------------------
function sendSMS(){
	
	// Copy recipient email address from form.
	var recipient = document.getElementById('emailTest').emailAddress.value;
	// Create url to call gamma script.
	var URL = 'http://developers.cogentrts.com/cgi-bin/demoSMS.g?email=' + recipient;
	// Make call to gamma script.
	document.getElementById('ackFrame').setAttribute("src", URL);
	return false;
}


/*
 * Synchronously load a script document
 */
function loadScript(dname)
{
    var result = null;
    var xhttp;
    if (window.XMLHttpRequest)
    {
	xhttp=new XMLHttpRequest();
    }
    else
    {
	xhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xhttp.open("GET",dname,false);
    xhttp.send("");
    try
    {
	if (xhttp.status != 404)
	    result = xhttp.responseText;
    }
    catch (ex)
    {
	result = null;
    }
    if (result)
    {
	var se = document.createElement('script');
	se.type = "text/javascript";
	se.text = result;
	document.getElementsByTagName('head')[0].appendChild(se);
    }
    return result;
}

loadScript("/Scripts/jquery.js");
loadScript("/Scripts/xlate.js");
loadScript("/Scripts/imageswap.js");
loadScript("/Scripts/dropDown.js");
loadScript("/Scripts/placeholder.js");

// This is a browser-independent way to attach another event to an already-hooked window onload function
/*
if (false)
{
    if (window.attachEvent)
    {window.attachEvent('onload', runTranslationsAfterLoad);}
    else if (window.addEventListener)
    {window.addEventListener('load', runTranslationsAfterLoad, false);}
    else
    {document.addEventListener('load', runTranslationsAfterLoad, false);}
}
*/

/*
 * Every page has a footer script, so we are calling the translation from there.
 * We do this because we must call the translation before the body tag closes to
 * minimize the amount of flicker on a page load (in Japanese, for example, the
 * page flickers first to English, then to Japanese).
 */
function runTranslationsAfterLoad()
{
    $('<div id="hiddenXlate" style="display: none"></div>').appendTo("body");
    Translate();
}

/*  Menu header
*/

function insertMenu(headerImage)
{
	navbar = '<td id="dropmenu" rowspan="2" align="right" valign="top"><img src="/Images/nav_bar_left_spacerXlate.gif" width="148" height="24" usemap="#langSelect" border="0" /><a href="/index.html" target="_self" onmouseover="chgImage(\'nav01\',\'Img_1Alt\');" onmouseout="chgImage(\'nav01\',\'Img_1\');"><img class="xlimg" id="nav01" src="/Images/nav_bar_home_off.gif" name="nav01" width="60" height="24" alt="Home" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'homemenu\');" /></a><a href="/Products.html" target="_self" onmouseover="chgImage(\'nav02\',\'Img_2Alt\');" onmouseout="chgImage(\'nav02\',\'Img_2\');"><img class="xlimg" id="nav02" src="/Images/nav_bar_products_off.gif" name="nav02" width="80" height="24" alt="Products" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'productsmenu\');" /></a><a href="/Features.html" target="_self" onmouseover="chgImage(\'nav03\',\'Img_3Alt\');" onmouseout="chgImage(\'nav03\',\'Img_3\');"><img class="xlimg" id="nav03" src="/Images/nav_bar_features_off.gif" width="83" height="24" name="nav03" alt="Features" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'featuresmenu\');" /></a><a href="/Download.html" target="_self" onmouseover="chgImage(\'nav04\',\'Img_4Alt\');" onmouseout="chgImage(\'nav04\',\'Img_4\');"><img class="xlimg" id="nav04" src="/Images/nav_bar_download_off.gif" width="84" height="24" name="nav04" alt="Download" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'downloadmenu\');" /></a><a href="/Licensing.html" target="_self" onmouseover="chgImage(\'nav05\',\'Img_5Alt\');" onmouseout="chgImage(\'nav05\',\'Img_5\');"><img class="xlimg" id="nav05" src="/Images/nav_bar_licensing_off.gif" width="82" height="24" name="nav05" alt="Licensing" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'licensingmenu\');" /></a><a href="/Purchasing.html" target="_self" onmouseover="chgImage(\'nav06\',\'Img_6Alt\');" onmouseout="chgImage(\'nav06\',\'Img_6\');"><img class="xlimg" id="nav06" src="/Images/nav_bar_purchasing_off.gif" width="89" height="24" name="nav06" alt="Purchasing" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'purchasingmenu\');" /></a><a href="/Support.html" target="_self" onmouseover="chgImage(\'nav07\',\'Img_7Alt\');" onmouseout="chgImage(\'nav07\',\'Img_7\');"><img class="xlimg" id="nav07" src="/Images/nav_bar_support_off.gif" width="73" height="24" name="nav07" alt="Support" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'supportmenu\');" /></a><a href="/Contact.html" target="_self" onmouseover="chgImage(\'nav08\',\'Img_8Alt\');" onmouseout="chgImage(\'nav08\',\'Img_8\');"><img class="xlimg" id="nav08" src="/Images/nav_bar_contact_off.gif" width="75" height="24" name="nav08" alt="Contact" hspace="0" vspace="0" border="0" onmouseover="cssdropdown.dropit(this,event,\'contactmenu\');" /></a><img src="/Images/nav_bar_right_spacer.gif" width="26" height="24" /><map name="langSelect" id="langSelect"><area shape="rect" coords="9,4,31,20" href="javascript: setLang(\'US\');" alt="" /><area shape="rect" coords="39,4,61,20" href="javascript: setLang(\'JP\');" alt="" /></map></td>';
	
	document.write('<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="margin-top:10px;">'+
        '<tr>'+
          '<td align="left" valign="top"><img class="xlimg_gl" id="HeaderImage" src="'+headerImage+'" alt="" width="800" height="150" /></td>'+
        '</tr>'+
        '<tr>'+
          '<td align="left" valign="top"><img src="/Images/spacer.gif" alt="spacer" width="800" height="1" border="0" /></td>'+
        '</tr>'+
        '<tr>'+
        '<!-- Main Navigation -->');
		document.write(navbar);
		document.write(
		'</tr>'+
      '</table>'+
	  '<script src="/Scripts/embeddropmenu.js" type="text/javascript"></script>  <!--Script that puts the correct drop-down options on the nav menu.-->');
}

function addFooter()
{ 
	document.write('<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">'+
        '<tr>'+
		'<td height="20" align="right" valign="middle" bgcolor="#262626">'+
        '  <span class="footer"><span class="xlateid_gl" id="copyright">Copyright © 1995 - 2012, Cogent Real-Time Systems Inc. All rights reserved.</span>  <a href="/Legal.html"><span class="footerlink"><span class="xlateid_gl" id="legal">Legal Notice.</span></span></a></span></td>'+
        '</tr>'+
      '</table>');
    runTranslationsAfterLoad();
}

function addLeftMenu()
{
	document.write('<div class="strongGrey" style="margin-top:10px;"><span class="xlate_gl">What you can do</span></div>'+
                '<a href="/Features/DataHub_Web_Server.html"><span class="xlate_gl">Web visualization</span></a><br />'+
                '<a href="/Features/Tunnel_Mirror.html"><span class="xlate_gl">Access remote data</span></a><br />'+
                '<a href="/Features/Data_Logging.html"><span class="xlate_gl">Database integration</span></a><br />'+
                '<a href="/Features/Access_Embedded_Data.html"><span class="xlate_gl">Access embedded data</span></a><br />'+
                '<a href="/Features/DataHub_QuickTrend.html"><span class="xlate_gl">Real-time trend analysis</span></a><br />'+
                '<a href="/Features/System_Monitor.html"><span class="xlate_gl">System monitoring</span></a><br />'+
                '<a href="/Features/Networking_Excel.html"><span class="xlate_gl">Networking Excel data</span></a><br />'+
                '<a href="/Features/Email_Notification.html"><span class="xlate_gl">Email/SMS notification</span></a><br />');
}

/*
 * Maintain a table of keys that can be auto-replaces within the body of a tag.  The keys should be text
 * that is not normally encountere, all in upper case with underscores and numbers.
 */

var AutoReplaceTable = [];

function autoTranslate(key, replacement)
{
    AutoReplaceTable[key] = replacement;
}

/*
 * -------------------------------------------------------------------------------------------------------
 * Google Analytics code suggested by Captain Marketing.  They said add it to every page you want to track,
 * so we added it to this script.js file which is loaded by every page on the site.
 * -------------------------------------------------------------------------------------------------------
 */
 var _gaq = _gaq || [];

  _gaq.push(['_setAccount', 'UA-28578644-1']);

  _gaq.push(['_trackPageview']);

(function() {

    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

  })();
 
// --------------------------------------------------------------------------------------------------------

//  End -->
