<!--

// 

function doLogin(username,password) {
	var topmenu = document.getElementById('top_menu');
	var loginfields = document.getElementById('loginfields');
	var lfusername = document.getElementById('lf-username');
	var lfpassword = document.getElementById('lf-password');
	if (lfusername.value !== username && lfpassword.value !== password) {
		document.getElementById('loginform').submit();
	}
	else {
		loginfields.style.display = 'block';
	}
	var loginbox = document.getElementById('loginbox');
	loginbox.style.width = '258px';
	}	

function doLogout() {
		document.getElementById('loginform').submit();
	}	
	
function getUserMenu(rooturl) {
 var http = getHTTPObject(); // We create the HTTP Object
  var url = rooturl + '/user-menu.cfm' + '?ms=' + new Date().getTime();
  http.open('GET', url, true);
  http.onreadystatechange = function() {
	  if (http.readyState == 4) {
		result = http.responseText;
		var DivElement = document.getElementById("accountmenu");
		if (DivElement) {
			DivElement.innerHTML = result;
		}
	  }
  }
  http.send(null); 
 }


function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object



function NewWindow(pagename, pwidth, pheight) { 
	if (!pwidth) {
		pwidth = 600;
		}
	if (!pheight) {
		pheight = 480;
		}
	msgWindow = window.open(pagename,"warranty","toolbar=no,width=" + pwidth + ",height=" + pheight + ",directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
        } 
        
        
        
		
//-->

