<!--
function writeDate(){
	cdate  = new Date();
	cmonth = cdate.getMonth()+1;
	cday   = cdate.getDate();
	cyear  = cdate.getFullYear();
	cyear  = cyear+"";
	cyear  = cyear.substring(2);
	div    = "/";
	cfdate = cmonth+div+cday+div+cyear; 
	document.write(cfdate);
}

function bookmarkThis(){
	if (window.external)
	{
	  window.external.AddFavorite(document.URL, document.title);
	}
	else{
		alert("Your browser does not support automatic bookmarking. Please add this page to your bookmarks manually.");
	}
}

function popWindow(url,width,height){
	var iWidth = 550;
	var iHeight = 700;
	if(width){
		iWidth = width;
	}
	if(height){
		iHeight = height;
	}
	Default=window.open(url,'Default','menubar=yes,scrollbars=yes,resizable=yes,width='+iWidth+',height='+iHeight);
	Default.focus();
}

function getCookie() {
	prefix = "movie=";
	start = document.cookie.indexOf(prefix)
	if (start == -1) {
		return null
	} else {
		end = document.cookie.indexOf(";", start);
		if (end == -1) {
			end = document.cookie.length;
		}
		return unescape(document.cookie.substring(start + prefix.length, end));
	}
}

function write_movie() {
	movies = new Array('cessna', 'bell', 'e_z_go', 'kautex', 'textron_systems', 'jacobsen', 'greenlee', 'fluid_power', 'textron_financial');
	last_movie = parseInt(getCookie());
	if (isNaN(last_movie)) { start_pos = 0; } else {
                if (last_movie >= (movies.length - 1)) { start_pos = 0 } else { start_pos = last_movie+1 };
        }
	//expire the cookie date
	exp_date = new Date;
	exp_date.setDate(exp_date.getDate() + 7);
	document.cookie = "movie="+start_pos+"; expires=" + exp_date;
	return movies[start_pos];
}
function movie_link() {
	links = new Array('/textron_businesses/cessna/index.jsp', '/textron_businesses/bell/bell_helicopter.jsp', '/textron_businesses/industrial/e_z_go.jsp', '/textron_businesses/industrial/kautex.jsp', '/textron_businesses/bell/textron_systems.jsp', '/textron_businesses/industrial/jacobsen.jsp', '/textron_businesses/industrial/greenlee.jsp', '/textron_businesses/industrial/fluid_and_power.jsp', '/textron_businesses/finance/index.jsp' );

	last_movie = parseInt(getCookie());
	return links[last_movie];
}

function isIE() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		return true;
	} else { 
		return false;
	}
}

function isFirefox() {
	if (navigator.userAgent.indexOf("Firefox") > -1) {
		return true;
	} else { 
		return false;
	}
}

function compareToVersion(major,minor,patch) {
	var lMajor = 0;
	var lMinor = 0;
	var lPatch = 0;
	//check for arguments, substitute 0 for undefined args
	argcheck = typeof arguments[0];
	if (argcheck != "undefined") lMajor = arguments[0];
	argcheck = typeof arguments[1];
	if (argcheck != "undefined") lMinor = arguments[1];
	argcheck = typeof arguments[2];
	if (argcheck != "undefined") lPatch = arguments[2];
	var result = -1;
	//regexp for firefox
	var versionRegexp = /Firefox\/(\d+\.\d+\.*\d*)/;
	navigator.userAgent.search(versionRegexp);
	var versionString = RegExp.$1;
	//create array of numbers out of version string
	var versionArray = versionString.split(".");
	var majorVer = parseInt(versionArray[0]);
	var minorVer = parseInt(versionArray[1]);
	var patchVer = parseInt(versionArray[2]);
	if (isNaN(patchVer)) patchVer = 0;
	var pMajorGT = false;
	var pMinorGT = false;
	var pPatchGT = false;

	var pMajorEQ = false;
	var pMinorEQ = false;
	var pPatchEQ = false;

	//determine version (in)equalities
	if (majorVer > lMajor) pMajorGT = true;
	if (minorVer > lMinor) pMinorGT = true;
	if (patchVer > lPatch) pPatchGT = true;
	
	if (majorVer == lMajor) pMajorEQ = true;
	if (minorVer == lMinor) pMinorEQ = true;
	if (patchVer == lPatch) pPatchEQ = true;	

	//test major ver
	if(pMajorGT){
		result = 1;
		return result;
	}
	if(!pMajorGT && !pMajorEQ){
		result = -1;
		return result;	
	}
	
	//test minor version
	if(pMajorEQ && pMinorGT){
		result = 1;
		return result;	
	}
	if(pMajorEQ && !pMinorGT && !pMinorEQ){
		result = -1;
		return result;	
	}
	
	//test patch ver
	if(pMajorEQ && pMinorEQ && pPatchGT){
		result = 1;
		return result;	
	}
	if(pMajorEQ && pMinorEQ && pPatchEQ){
		result = 0;
		return result;	
	}	
	if(pMajorEQ && pMinorEQ && !pPatchGT && !pPatchEQ){
		result = -1;
		return result;	
	}

	alert("result="+result);

}


function mail_tag (user, domain) {
	return "<a href=\"mailto:"+user+"@"+domain+"\">"+user+"@"+domain+"</a>";
}

//-->