/* GLOBAL LANGUAGE COOKIE */
// this function gets the cookie, if it exists
/*only the first 2 parameters are required, the cookie name, the cookie
value. Cookie time is in milliseconds, so the below expires will make the 
number you pass in the Set_Cookie function call the number of days the cookie
lasts, if you want it to be hours or minutes, just get rid of 24 and 60.
Generally you don't need to worry about domain, path or secure for most applications
so unless you need that, leave those parameters blank in the function call.*/
function Set_Cookie(name, value, expires, path, domain, secure) {
   value = document.getElementById("choice").value;
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime( today.getTime() );
	// if the expires variable is set, make the correct expires time, the
	// current script below will set it for x number of days, to make it
	// for hours, delete * 24, for minutes, delete * 60 * 24
	if ( expires )
	{
		expires = expires * 1000 * 60 * 60 * 24;
	}
	//alert( 'today ' + today.toGMTString() );// this is for testing purpose only
	var expires_date = new Date( today.getTime() + (expires) );
	//alert('expires ' + expires_date.toGMTString());// this is for testing purposes only
	document.cookie = name + "=" +escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString()
		( ( path ) ? ";path=" + path : "" ) + 
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
}		
var exp = new Date();

function Get_Cookie( name ) {
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) )
	{
		return null;
	}
	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ";", len );
	if ( end == -1 ) end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}

// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
	if ( Get_Cookie( name ) ) document.cookie = name + "=" +
			( ( path ) ? ";path=" + path : "") +
			( ( domain ) ? ";domain=" + domain : "" ) +
			";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
/*END GLOBAL LANGUAGE COOKIE*/

//DECODE COOKIE VALUE FUNCTION
function decode(input) {
	var string = "";
	var i = 0;
	var c = c1 = c2 = 0;

	while ( i < input.length ) {
		c = input.charCodeAt(i);

		if (c < 128) {
			string += String.fromCharCode(c);
			i++;
		}
		else if ((c > 191) && (c < 224)) {
			c2 = input.charCodeAt(i+1);
			string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
			i += 2;
		}
		else {
			c2 = input.charCodeAt(i+1);
			c3 = input.charCodeAt(i+2);
			string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
			i += 3;
		}
	}
	return string;
}

//BROWSER SNIFFER
var exclude=1;
var agt=navigator.userAgent.toLowerCase();
var win=0;var mac=0;var lin=1;
if(agt.indexOf('win')!=-1){win=1;lin=0;}
if(agt.indexOf('mac')!=-1){mac=1;lin=0;}
var lnx=0;if(lin){lnx=1;}
var ice=0;
var ie=0;var ie4=0;var ie5=0;var ie6=0;var com=0;var dcm;
var op5=0;var op6=0;var op7=0;
var ns4=0;var ns6=0;var ns7=0;var mz7=0;var kde=0;var saf=0;
if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE"){
	var thisKDE=agt;
	var splitKDE=thisKDE.split("konqueror/");
	var aKDE=splitKDE[1].split("; ");
	var KDEn=parseFloat(aKDE[0]);
	if(KDEn>=2.2){
		kde=1;
		ns6=1;
		exclude=0;
		}
	}
else if(agt.indexOf('webtv')!=-1){exclude=1;}
else if(typeof window.opera!="undefined"){
	exclude=0;
	if(/opera[\/ ][5]/.test(agt)){op5=1;}
	if(/opera[\/ ][6]/.test(agt)){op6=1;}
	if(/opera[\/ ][7-9]/.test(agt)){op7=1;}
	}
else if(typeof document.all!="undefined"&&!kde){
	exclude=0;
	ie=1;
	if(typeof document.getElementById!="undefined"){
		ie5=1;
		if(agt.indexOf("msie 6")!=-1){
			ie6=1;
			dcm=document.compatMode;
			if(dcm!="BackCompat"){com=1;}
			}
		}
	else{ie4=1;}
	}
else if(typeof document.getElementById!="undefined"){
	exclude=0;
	if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}
	else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}
	else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}
	if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){mz7=0;ns6=1;saf=1;}
	}
else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){
	exclude=0;
	ns4=1;
	if(typeof navigator.mimeTypes['*']=="undefined"){
		exclude=1;
		ns4=0;
		}
	}
if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}
if(typeof navigator.__ice_version!="undefined"){exclude=1;ie4=0;}

//Site vars required for LA urls
var ArgentinaES = "http://ar.rockwellautomation.com/";
var ArgentinaEN = "http://ar.rockwellautomation.com/applications/gs/la/gsar.nsf/pages/Home_Page_EN";
var BrazilPT = "http://br.rockwellautomation.com/";
var BrazilEN = "http://br.rockwellautomation.com/applications/gs/la/gsbr.nsf/pages/Home_Page_EN";
var CaribbeanEN = "http://pr.rockwellautomation.com/";
var ChileES = "http://cl.rockwellautomation.com/";
var ChileEN = "http://cl.rockwellautomation.com/applications/gs/la/gscl2.nsf/pages/Home_Page_EN";
var ColombiaES = "http://co.rockwellautomation.com/";
var ColombiaEN = "http://co.rockwellautomation.com/applications/gs/la/gsco.nsf/pages/Home_Page_EN";
var MexicoES = "http://mx.rockwellautomation.com/";
var MexicoEN = "http://mx.rockwellautomation.com/applications/gs/la/gsmex.nsf/pages/Home_Page_EN";
var PeruES = "http://pe.rockwellautomation.com/";
var PeruEN = "http://pe.rockwellautomation.com/applications/gs/la/gspe.nsf/pages/Home_Page_EN";
var VenezuelaES = "http://ve.rockwellautomation.com/";
var VenezuelaEN = "http://ve.rockwellautomation.com/applications/gs/la/gsve.nsf/pages/Home_Page_EN";
var UnitedStatesEN = "http://www.rockwellautomation.com/";

//These functions assist folks who refuse to use the country menu.
if (parent.location.href == ArgentinaES) {
	Set_Cookie('ra_www_country','Argentina','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','Spanish','365','/','.rockwellautomation.com');
}
if (parent.location.href == ArgentinaEN) {
	Set_Cookie('ra_www_country','Argentina','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == BrazilPT) {
	Set_Cookie('ra_www_country','Brazil','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','Portuguese','365','/','.rockwellautomation.com');
}
if (parent.location.href == BrazilEN) {
	Set_Cookie('ra_www_country','Brazil','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == CaribbeanEN) {
	Set_Cookie('ra_www_country','Caribbean','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == ChileES) {
	Set_Cookie('ra_www_country','Chile','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','Spanish','365','/','.rockwellautomation.com');
}
if (parent.location.href == ChileEN) {
	Set_Cookie('ra_www_country','Chile','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == ColombiaES) {
	Set_Cookie('ra_www_country','Colombia','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','Spanish','365','/','.rockwellautomation.com');
}
if (parent.location.href == ColombiaEN) {
	Set_Cookie('ra_www_country','Colombia','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == MexicoES) {
	Set_Cookie('ra_www_country','Mexico','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','Spanish','365','/','.rockwellautomation.com');
}
if (parent.location.href == MexicoEN) {
	Set_Cookie('ra_www_country','Mexico','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == PeruES) {
	Set_Cookie('ra_www_country','Peru','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','Spanish','365','/','.rockwellautomation.com');
}
if (parent.location.href == PeruEN) {
	Set_Cookie('ra_www_country','Peru','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == VenezuelaES) {
	Set_Cookie('ra_www_country','Venezuela','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','Spanish','365','/','.rockwellautomation.com');
}
if (parent.location.href == VenezuelaEN) {
	Set_Cookie('ra_www_country','Venezuela','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
if (parent.location.href == UnitedStatesEN) {
	Set_Cookie('ra_www_country','United States','365','/','.rockwellautomation.com'); 
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}


document.write("<style type=text/css>");
document.write(".clCMAbs {position:absolute; visibility:hidden;}");
document.write("BODY {margin:0; padding:0;}");
document.write("#redbar {margin:0; padding:0; height:82px; border-bottom:1px solid #ccc; background-color:#ffffff}");
document.write(".clBar {position:absolute; visibility:hidden;}");
document.write(".none {position:absolute;}");
document.write(".noneover {}");
document.write(".clLevel0, .clLevel0over  {color:#ffffff; position:absolute; font-family:verdana,arial,helvetica,geneva; font-weight:bold; font-size:10px; margin-left:8px; padding:2px 4px 0px 6px}");
document.write(".clLevel0over {color:#fff; font-family:verdana,arial,helvetica,geneva; font-weight:bold; font-size:10px; margin-left:8px; padding:2px 4px 0px 6px;}");
document.write(".clLevel0 {}");
document.write(".clLevel0over {cursor:pointer; cursor:hand; background-color:#D82727; layer-background-color:#D82727; color:#fff;}");
document.write(".clLevel0border {position:absolute; visibility:hidden;}");
document.write(".clLevel1, .clLevel1over {border-left:3px solid #D82727; padding:2px 0px 0px 4px; margin:0px; position:absolute; font-family:verdana,arial,helvetica; font-size:10px; font-weight:regular;}");
document.write(".clLevel1 {background-color:#fff; layer-background-color:#fff; color:#555;}");
document.write(".clLevel1over {background-color:#efefef; layer-background-color:#efefef; color:#D82727; cursor:pointer; cursor:hand;}");
document.write(".clLevel1border {background-color:#808285; layer-background-color:#808285; position:absolute;  visibility:hidden; }");
document.write(".clLevel2, .clLevel2over {border-left:3px solid #D82727; padding:2px 0px 0px 4px;  position:absolute; font-family:verdana,arial,helvetica; font-size:10px; font-weight:regular; }");
document.write(".clLevel2 {background-color:#fff; layer-background-color:#fff; color:#555;}");
document.write(".clLevel2over {background-color:#efefef; layer-background-color:#efefef; color:#D82727; cursor:pointer; cursor:hand;}");
document.write(".clLevel2border {background-color:#808285; layer-background-color:#808285; position:absolute; visibility:hidden; }");
document.write("#ralogo {position:absolute; top:13px; left:18px; border:0; margin:0; padding:0}");
document.write("#sitename {position:absolute; top:27px; left:177px; color:#666; vertical-align:bottom; font-weight:normal; font-family:Verdana,arial,helvetica; font-size:10px;}");
document.write("#sitename a {color:#777777; font-family:verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:10px; text-decoration:underline;vertical-align:bottom;}");
document.write("#sitename .countryname {text-decoration:none; color:#666666; font-family:Verdana,arial,helvetica; font-size:12px; font-weight:bold;}");
document.write("#sitename .countryname a {text-decoration:underline; color:#666666; font-family:Verdana,arial,helvetica; font-size:12px; font-weight:bold;}");
document.write("#sitename a:hover {color:#BB2322;}");
document.write("#username {font-family:verdana,arial,helvetica; color:#BA2232; font-size:9.4px; font-weight:normal;}");
document.write("#useroptions {white-space:nowrap; text-align:right; margin:4px 0 0 0; padding:0px; font-family:verdana,arial,helvetica; color:#777777; font-size:9.4px; line-height:12px}");
document.write("#useroptions a {font-size:9.4; margin:0;padding:0; white-space:nowrap; color:#777777; text-decoration:none;}");
document.write("#useroptions a:hover {color:#BB2322; text-decoration:underline}");
document.write(".searchform {line-height:9.4px; color:#777777; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:9.4px; margin:0; padding:0;}");
document.write(".search {vertical-align:top; color:#666666; font-family:trebuchet ms,Verdana,Arial,Helvetica,sans-serif; font-size:9.4px;}");
document.write(".submit {vertical-align:top; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:10px; font-weight:bold; cursor:pointer}");
document.write("* .search {vertical-align:top; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; width:120px; padding-left:2px; border:1px solid #cccccc; background-color:#eeeeee; cursor:pointer}");
document.write("* .submit {vertical-align:top; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; width:18px; height:16px; line-height:8px; border:1px solid #cccccc; background-color:#eeeeee;}");
document.write("#lst {float:right;}");
document.write("#redbarlinks {background-image:url(lib/images/lst.gif); background-repeat:no-repeat; background-position:top right; position:absolute; top:59px; left:0px; width:100%; min-width:720px; background-color:#BB2322; border:1px solid #ccc; border-width:1px 0px 1px 0px; margin:0px; padding:0px; height:17px}");
document.write(".websitesubmit {vertical-align:bottom; text-align:center; color:#666; font-family:Trebuchet MS,Arial,Helvetica,sans-serif; font-size:11px; font-weight:normal; cursor:pointer;  width:23px; height:21px; margin:0; padding:0}");
document.write("* .websitesubmit {vertical-align:bottom;  text-align:center; color:#666; font-family:Trebuchet MS,Arial,Helvetica,sans-serif; width:23px; height:21px; margin:0; padding:0}");
document.write("table .myTable {position:absolute; top:0; left:0; margin:0; padding:0}");
document.write("form {margin:0; padding:0}");
document.write("</style>");

//These are the variables that are used throughout this page application.  They need to be called here - before any functions or the function will fail
var myABServer  = "www.ab.com";
var myRAProdServer  = "www.rockwellautomation.com";
var myRSIServer = "www.software.rockwell.com";
var myRAServer = "www.rockwellautomation.com"; //Make sure you change the United States case to www before going live
var Country = Get_Cookie('ra_www_country');
var Language = Get_Cookie('ra_www_lang');
var my_ra_id = Get_Cookie('ra_ur_salutation'); //old cookie name was ra_access_salutation
var myLang;
var country_site;
var country_site2;
var googlesite;
var googlecountry;
var googlebiasing;
var googlelang;
var myCountryLbl;
var myBanner;
var myRAMenuList;
var myCountryList;
var mySearchLbl = Get_Cookie('ra_www_lang');
var myWelcomeLbl;
var mySignInLbl;
var myProfileLbl;
var mySignOutLbl;
var mySpanishMenu = "/lib/js/ramenulist_es.js";
var myPortugueseMenu = "/lib/js/ramenulist_pt.js";
var myEnglishMenu = "/lib/js/ramenulist_en.js";
var myEditProfileLbl;
var mySignOutLbl;
var myMemberLbl;
var myURLbl;
var myURServer;
var myForgotPasswordLbl;
var myContactLbl;
var myFeedbackLbl;
var myCookieTestLbl;
var myPrivacyLbl;
var myContactInfoLbl;
var mySubscriptionsLbl;
var myChangePassLbl;
var myMemberHelpLbl;
var myRegistrationLbl;
var myURLangMap;
var myURLang;

// URLS REQUIRED FOR UR SITE TESTING -- EDIT BEFORE GOING LIVE
if (location.hostname == 'localhost') {
	myURServer = "localhost:8080";
		} else if (location.hostname == 'uregd.rockwellautomation.com' || location.hostname == 'test.rockwellautomation.com') {
	myURServer = "uregd.rockwellautomation.com";
		} else if (location.hostname == 'wwwdev.ab.com' || location.hostname == 'uregq.rockwellautomation.com' || location.hostname == 'uregq-01.rockwellautomation.com' || location.hostname == 'uregq-02.rockwellautomation.com' || location.hostname == 'qa.rockwellautomation.com') {
	myURServer = "uregq.rockwellautomation.com";
		} else {	
	myURServer = "uregp.rockwellautomation.com";
}

// BANNER BUILD
document.write("<div id='redbar'><table class='myTable' width='100%' bgcolor='ffffff' border='0' cellpadding='0' cellspacing='0'><tr valign='bottom'>");
document.write("<td height='47' width='169'><div id='ralogo'><a href=http://www.rockwellautomation.com><img src='lib/images/ralogo_web.gif' border='0'></a></div></td>");
//document.write("<form style='margin:0;padding:0' name=mycountry method='post' enctype='application/x-www-form-urlencoded'>");
document.write("<td width='50%' nowrap><div id='sitename'><span class='countryname'>");

//This function writes the welcome message for those who are able to log on or are logged on to Unified Reg..  This section adds the Sign in label (SignInLbl).  It also adds a language link if a country has more than one language available.  
/*var Language2 = Get_Cookie('ra_www_lang');*/

function writeRAWelcome (return_page) {
	if (return_page == null || return_page == "") {
	    return_page = location.href;
	}
	// Fix for non-standard long urls
	if (location.href.indexOf('search.rockwellautomation.com') != -1) { 
		return_page = "http://search.rockwellautomation.com/search?site=main_all";
	}
	if (location.href.indexOf('literature.rockwellautomation.com') != -1) { 
		return_page = "http://literature.rockwellautomation.com";
	}
	if (location.href.match("/UnifiedRegUI/thankYou.do")) {
		return_page = "http://www.rockwellautomation.com";
	}
	
	// SIGNED OUT STATE
	if (my_ra_id == null)  {
		if (myLang == null || myCountryLbl == "United States") { //added united states on august 22
				if (myCountryLbl == "United States") { //location.hostname == "www.rockwellautomation.com" changed from href to hostname  on august 23 onclick=returnpage()
				document.write( "<a href=http://"+myURServer+"/UnifiedRegUI/login.jsp?myFromPage="+return_page+">"+ mySignInLbl +"</a>");
				document.write("&nbsp;|&nbsp;<A HREF=http://"+myURServer+"/UnifiedRegUI/myProfile.jsp?myFromPage="+return_page+">"+ myMemberLbl +"</A>");
				}
			document.write("<a href=http://"+myURServer+"/UnifiedRegUI/login.jsp?myFromPage="+return_page+"></A>");
		}
		else {
		//COMMENTED THIS OUT UNTIL NEW UR IMPLEMENTATION
		/*document.write( "<A HREF=http://"+myABServer+"/db/extwww/owa/unified_reg_utils.ur_call?myFromPage="+return_page+"&myAction=Login>"+ mySignInLbl +"</A>&nbsp;|&nbsp;");*/
			if (myCountryLbl == "Caribbean") {
			document.write("");
			}
			else if (myCountryLbl == "United States") {
			document.write("");
			} else {
			document.write("<a href='http://"+country_site2+"' onClick=Set_Cookie('ra_www_lang','"+myLang+"','365','/','.rockwellautomation.com');linkTo();>"+myLang+"</a>");
			}
		}
	
	// SIGNED IN STATE
	} else if (my_ra_id != null)  {
		if (myLang == null || myCountryLbl == "United States") {  //added united states on august 22
			if (myCountryLbl == "United States") {  
			document.write("&nbsp;|&nbsp;<A HREF=http://"+myURServer+"/UnifiedRegUI/editUserData.do?myFromPage="+return_page+">"+ myProfileLbl +"</A>");
			document.write("&nbsp;|&nbsp;<A HREF=http://"+myURServer+"/UnifiedRegUI/logout.do?myFromPage=http://www.rockwellautomation.com>"+ mySignOutLbl +"</A>");
			}
		}
		else {
		//COMMENTED THIS OUT UNTIL NEW UR IMPLEMENTATION
		/*LEAVEOUTdocument.write("&nbsp;|&nbsp;<A HREF=http://"+myRSIServer+"/forum/unified-autologout.cfm>"+ mySignOutLbl +"</A>&nbsp;|&nbsp;");*/
		document.write("&nbsp;|&nbsp;<a href='http://"+country_site2+"' onClick=Set_Cookie('ra_www_lang','"+myLang+"','365','/','.rockwellautomation.com');linkTo();>"+myLang+"</a>");
		}
	}
}
//*************************************************************************************************************************************************************************************************************************


//This function causes the "Go" button to go to the country chosen in the drop down list.  It must be placed here - DO NOT MOVE.  This function must be called before the form is written or the form will not be able to understand its go button code.
function linkTo() {
    Country = document.getElementById("choice").value;
	GetCountrySite(Country) ;
	GetPersonalizeUrl(Language);
	document.location = "http://" + country_site;
}
//*************************************************************************************************************************************************************************************************************************

/* ============== START THE WORLDWIDE DROPDOWN MENU ========================================================*/
DoTheCookieStuff();
document.write("&nbsp;&nbsp;&nbsp;");
document.write("<select style='font-size:8pt;font-weight:normal;margin:0;padding:0;color:#444;width:180px;' name='choice' onChange=\" Set_Cookie('ra_www_country','','365','/','.rockwellautomation.com'); Set_Cookie('ra_www_lang','" + Language + "','365','/','.rockwellautomation.com');\">");
document.write("<option id='Worldwide Locations' value='Worldwide Locations''>+ Worldwide</option>");
document.write("<option id='Argentina' value='Argentina'>- Argentina</option>"); 
document.write("<option id='Australia' value='Australia'>- Australia</option>");
document.write("<option id='Belgium' value='Belgium'>- Belgi\u00EB (Belgium)</option>");
document.write("<option id='Brazil' value='Brazil'>- Brasil</option>");
document.write("<option id='Canada' value='Canada'>- Canada</option>");
document.write("<option id='Caribbean' value='Caribbean'>- Caribbean</option>");
document.write("<option id='Central America' value='Mexico'>- Central America</option>");//Uses Mexico site variable
document.write("<option id='Chile' value='Chile'>- Chile</option>");
document.write("<option id='China' value='China'>- \u4E2D\u56FD (China)</option>");
document.write("<option id='Colombia' value='Colombia'>- Colombia</option>");
document.write("<option id='Czech' value='Czech'>- \u010Cesk\u00E1 Republika (Czech Rep.)</option>");
document.write("<option id='Denmark' value='Denmark'>- Danmark</option>");
document.write("<option id='Germany' value='Germany'>- Deutschland (Germany)</option>");
document.write("<option id='Spain' value='Spain'>- Espa\u00F1a (Spain)</option>");
document.write("<option id='France' value='France'>- France</option>");
document.write("<option id='India' value='India'>- India</option>");
document.write("<option id='Ireland' value='Ireland'>- Ireland</option>");
document.write("<option id='Italy' value='Italy'>- Italia</option>");
document.write("<option id='Japan' value='Japan'>- \u65E5\u672C (Japan)</option>");
document.write("<option id='Korea' value='Korea'>- \uD55C\uAD6D (Korea)</option>");
document.write("<option id='Luxemburg' value='Luxemburg'>- Luxemburg</option>");
document.write("<option id='Hungary' value='Hungary'>- Magyarorsz\u00E1g (Hungary)</option>");
document.write("<option id='Malaysia' value='Malaysia'>- Malaysia</option>");
document.write("<option id='Mexico' value='Mexico'>- M\u00E9xico</option>");
document.write("<option id='Netherlands' value='Netherlands'>- Nederland (Netherlands)</option>");
document.write("<option id='New Zealand' value='New Zealand'>- New Zealand</option>");
document.write("<option id='Austria' value='Austria'>- \u00D6sterreich (Austria)</option>");	
document.write("<option id='Perú' value='Peru'>- Per\u00FA</option>");
document.write("<option id='Philippines' value='Philippines'>- Pilipinas (Philippines)</option>");
document.write("<option id='Poland' value='Poland'>- Polska (Poland)</option>");
document.write("<option id='Portugal' value='Portugal'>- Portugal</option>");
/*document.write("<option id='Puerto Rico' value='Puerto Rico'>- Puerto Rico</option>");*/
document.write("<option id='Russia' value='Russia'>- \u0420\u043E\u0441\u0441\u0438\u044F</option>");
document.write("<option id='Switzerland' value='Switzerland'>- Schweiz (Switzerland)</option>");
document.write("<option id='South Africa' value='South Africa'>- South Africa</option>");
document.write("<option id='Southeast Asia' value='Southeast Asia'>- Southeast Asia</option>");
document.write("<option id='Finland' value='Finland'>- Suomi (Finland)</option>");
document.write("<option id='Sweden' value='Sweden'>- Sverige (Sweden)</option>");
document.write("<option id='Taiwan' value='Taiwan'>- \u81FA\u7063 (Taiwan)</option>");
document.write("<option id='United Arab Emirates' value='United Arab Emirates'>- United Arab Emirates</option>");
document.write("<option id='United Kingdom' value='United Kingdom'>- United Kingdom</option>");
document.write("<option id='United States' value='United States'>- United States</option>");
document.write("<option id='Venezuela' value='Venezuela'>- Venezuela</option>");
document.write("</select>");
document.write(" <input type='button' value='Go' class='websitesubmit'  onClick=\" Set_Cookie('ra_www_lang','"+Language+"','365','/','.rockwellautomation.com'); linkTo();\">");
document.write("</div>");


// This code names the possible countries from the drop down list.  It must be called AFTER the drop down list  as east option selects the Country Case.  Please  DO NOT MOVE this section.
function GetCountrySite(Country) {  
/* ======================START ASIA PACIFIC REGION ================================================= */
switch (Country) {
//WORLDWIDE LOCATIONS
	case "Worldwide Locations":
		myCountryLbl = "";
		country_site = "www.rockwellautomation.com/locations/";
		break
//AUSTRALIA
	case "Australia":
		myCountryLbl = "Australia";
		country_site = "www.rockwellautomation.com.au";
		break
//CHINA
	case "China":
		myCountryLbl = "\u4E2D\u56FD";
		country_site = "www.rockwellautomation.com.cn";
		break
//INDIA
	case "India":
		myCountryLbl = "India";
		country_site = "domino.automation.rockwell.com/applications/gs/ap/gsIND.nsf?OpenDatabase";
		break
//JAPAN
	case "Japan":
		myCountryLbl ="\u65E5\u672C";
		country_site = "www.automation.rockwell.co.jp";
		break
//KOREA
	case "Korea":
		myCountryLbl ="\uD55C\uAD6D";
		country_site = "www.rockwellautomation.co.kr";
		break
//MALAYSIA
	case "Malaysia":
		myCountryLbl = "Malaysia";
		country_site = "www.rockwellautomation.com.my";
		break
//TAIWAN
	case "Taiwan":
		myCountryLbl = "\u81FA\u7063";
		country_site = "www.rockwellautomation.com.tw";
		break
//SOUTH EAST ASIA
	case "Southeast Asia":
		myCountryLbl = "Southeast Asia";
		country_site = "domino.automation.rockwell.com/applications/gs/ap/gsSEA.nsf?OpenDatabase";
		break
//NEW ZEALAND
	case "New Zealand":
		myCountryLbl = "New Zealand";
		country_site = "www.rockwellautomation.co.nz";
		break
//PHILIPPINES
	case "Philippines":
		myCountryLbl = "Pilipinas";
		country_site = "www.rockwellautomation.ph";
		break	
/* ==============START EMEA COUNTRIES======================================================= */
//AUSTRIA
	case "Austria":
		myCountryLbl = "\u00D6sterreich";
		country_site = "www.rockwellautomation.at"
		break
//BELIGUM
	case "Belgium":
		myCountryLbl = "Belgi\u00EB";
		country_site = "www.rockwellautomation.be";
		break
//CENTRAL EASTERN EUROPE
	case "Central Eastern Europe":
		myCountryLbl = "Central Eastern Europe";
		country_site = "www.rockwellautomation.at/applications/gs/emea/gsat.nsf/pages/Zentraleuropa";
		break
//CZECHOSLOVAKIA
	case "Czech":
		myCountryLbl = "\u010Cesk\u00E1 Republika";
		country_site = "www.rockwellautomation.cz";
		break
//DENMARK
	case "Denmark":
		myCountryLbl = "Danmark";
		country_site = "www.rockwellautomation.dk";
		break
//FINLAND
	case "Finland":
		myCountryLbl = "Suomi";
		country_site = "www.rockwellautomation.fi";
		break
//FRANCE
	case "France":
		myCountryLbl = "France";
		country_site = "www.rockwellautomation.fr";
		break
//GERMANY
	case "Germany":
		myCountryLbl = "Deutschland";
		country_site = "www.rockwellautomation.de";
		break
//HUNGARY
	case "Hungary":
		myCountryLbl = "Hungary";
		country_site = "www.rockwellautomation.hu";
		break
//IRELAND
	case "Ireland":
		myCountryLbl = "Ireland";
		country_site = "www.rockwellautomation.ie";
		break
//ITALY
	case "Italy":
		myCountryLbl = "Italia";
		country_site = "www.rockwellautomation.it";
		break
//LUXEMBURG (tied to Belgium)
	case "Luxemburg":
		myCountryLbl = "Luxemburg";
		country_site = "www.rockwellautomation.be";
		break
//NETHERLANDS
	case "Netherlands":
		myCountryLbl = "Nederland";
		country_site = "www.rockwellautomation.nl";
		break
//POLAND
	case "Poland":
		myCountryLbl = "Polska";
		country_site = "www.rockwellautomation.pl";
		break
//RUSSIA
	case "Russia":
		myCountryLbl = "\u0420\u043E\u0441\u0441\u0438\u044F";
		country_site = "www.rockwellautomation.ru";
		break
//SOUTH AFRICA
	case "South Africa":
		myCountryLbl = "South Africa";
		country_site = "www.rockwellautomation.co.za";
		break
//SPAIN
	case "Spain":
		myCountryLbl = "Espa\u00F1a";
		country_site = "www.rockwellautomation.es";
		break
//SWEDEN
	case "Sweden":
		myCountryLbl = "Sverige";
		country_site = "www.rockwellautomation.se";
		break
//SWITZERLAND
	case "Switzerland":
		myCountryLbl = "Schweiz";
		country_site = "www.rockwellautomation.ch";
		break
//UNITED ARAB EMIRATES
	case "United Arab Emirates":
		myCountryLbl = "United Arab Emirates";
		country_site = "www.rockwellautomation.ae";
		break
//UNITED KINGDOM
	case "United Kingdom":
		myCountryLbl = "United Kingdom";
		country_site = "www.rockwellautomation.co.uk";
		break
/* ===================START LATIN AMERICA SECTION===================================================*/
//ARGENTINA
	case "Argentina":
	switch (Language)
	{
	case "Spanish":
		myCountryLbl = "Argentina";
		Language = "Spanish";
		myLang = "English";
		country_site = "ar.rockwellautomation.com"
		country_site2 = "ar.rockwellautomation.com/applications/gs/la/gsar.nsf/pages/Home_Page_EN";
		googlesite = "|argentina";
		googlecountry = "argentina";
		googlebiasing = "a__argentina";
		googlelang = "es";
		break
	case "English":
		myCountryLbl = "Argentina";
		Language = "English";
		myLang = "Espa\u00F1ol";
		country_site = "ar.rockwellautomation.com/applications/gs/la/gsar.nsf/pages/Home_Page_EN";
		country_site2 = "ar.rockwellautomation.com";
		googlesite = "|argentina";
		googlecountry = "argentina";
		googlebiasing = "a__argentina";
		googlelang = "";
		break
	default:	
		myCountryLbl = "Argentina";
		Language = "Spanish";
		myLang = "English";
		country_site = "ar.rockwellautomation.com/";
		country_site2 = "ar.rockwellautomation.com/applications/gs/la/gsar.nsf/pages/Home_Page_EN";
		googlesite = "|argentina";
		googlecountry = "argentina";
		googlebiasing = "a__argentina";
		googlelang = "es";
		}
		break
//BRAZIL
	case "Brazil":
	switch (Language)
	{
	case "Portuguese":
		myCountryLbl = "Brasil";
		Language = "Portuguese";
		myLang = "English";
		country_site = "br.rockwellautomation.com";
		country_site2 = "br.rockwellautomation.com/applications/gs/la/gsbr.nsf/pages/Home_Page_EN";
		googlesite = "|brazil";
		googlecountry = "brazil";
		googlebiasing = "a__brazil";
		googlelang = "pt-BR";
		break
	case "English":
		myCountryLbl = "Brazil";
		Language = "English";
		myLang = "Portugu\u00EAs";
		country_site = "br.rockwellautomation.com/applications/gs/la/gsbr.nsf/pages/Home_Page_EN";
		country_site2 = "br.rockwellautomation.com";
		myBanner = "http://"+myRAServer+myEnglishMenu;
		googlesite = "|brazil";
		googlecountry = "brazil";
		googlebiasing = "a__brazil";
		googlelang = "";
		break
	default:
		case "Portuguese":
		myCountryLbl = "Brasil";
		Language = "Portuguese";
		myLang = "English";
		country_site = "br.rockwellautomation.com";
		country_site2 = "br.rockwellautomation.com/applications/gs/la/gsbr.nsf/pages/Home_Page_EN";
		myBanner = "http://"+myRAServer+myPortugueseMenu;
		googlesite = "|brazil";
		googlecountry = "brazil";
		googlebiasing = "a__brazil";
		googlelang = "pt-BR";
		}
		break
//CARIBBEAN
	case "Caribbean":
		myCountryLbl = "Caribbean";
		country_site = "pr.rockwellautomation.com";
		country_site2 = "";
		googlesite = "|caribbean";
		googlecountry = "caribbean";
		googlebiasing = "a__caribbean";
		googlelang = "";
		break
//CHILE
	case "Chile":
	switch (Language)
	{
	case "Spanish":
		myCountryLbl = "Chile";
		Language = "Spanish";
		myLang = "English";
		country_site = "cl.rockwellautomation.com";
		country_site2 = "cl.rockwellautomation.com/applications/gs/la/gscl2.nsf/pages/Home_Page_EN";
		googlesite = "|chile";
		googlecountry = "chile";
		googlebiasing = "a__chile";
		googlelang = "es";
	break
	case "English":
		myCountryLbl = "Chile";
		Language = "English";
		myLang = "Espa\u00F1ol";
		country_site = "cl.rockwellautomation.com/applications/gs/la/gscl2.nsf/pages/Home_Page_EN";
		country_site2 = "cl.rockwellautomation.com";
		googlesite = "|chile";
		googlecountry = "chile";
		googlebiasing = "a__chile";
		googlelang = "";
		break
	default:
		myCountryLbl = "Chile";
		Language = "Spanish";
		myLang = "English";
		country_site = "cl.rockwellautomation.com";
		country_site2 = "cl.rockwellautomation.com/applications/gs/la/gscl2.nsf/pages/Home_Page_EN";
		googlesite = "|chile";
		googlecountry = "chile";
		googlebiasing = "a__chile";
		googlelang = "es";
		}
		break
//COLOMBIA
	case "Colombia":
	switch (Language)
	{
	case "Spanish":
		myCountryLbl = "Colombia";
		Language = "Spanish";
		myLang = "English";
		country_site = "co.rockwellautomation.com";
		country_site2 = "co.rockwellautomation.com/applications/gs/la/gsco.nsf/pages/Home_Page_EN";
		googlesite = "|colombia";
		googlecountry = "colombia";
		googlebiasing = "a__colombia";
		googlelang = "es";
		break
	case "English":
		myCountryLbl = "Colombia";
		Language = "English";
		myLang = "Espa\u00F1ol";
		country_site = "co.rockwellautomation.com/applications/gs/la/gsco.nsf/pages/Home_Page_EN";
		country_site2 = "co.rockwellautomation.com";
		googlesite = "|colombia";
		googlecountry = "colombia";
		googlebiasing = "a__colombia";
		googlelang = "";
		break
	default:
		myCountryLbl = "Colombia";
		Language = "Spanish";
		myLang = "English";
		country_site = "co.rockwellautomation.com";
		country_site2 = "co.rockwellautomation.com/applications/gs/la/gsco.nsf/pages/Home_Page_EN";
		googlesite = "|colombia";
		googlecountry = "colombia";
		googlebiasing = "a__colombia";
		googlelang = "es";
		}
		break
//MEXICO
 	case "Mexico":
	switch (Language)
	{
	case "Spanish":
		myCountryLbl = "M\u00E9xico & Am\u00E9rica Central";
		Language = "Spanish";
		myLang = "English";
		country_site = "mx.rockwellautomation.com";
		country_site2 = "mx.rockwellautomation.com/applications/gs/la/gsmex.nsf/pages/Home_Page_EN";
		googlesite = "|mexico";
		googlecountry = "mexico";
		googlebiasing = "a__mexico";
		googlelang = "es";
		break
	case "English":
		myCountryLbl = "Mexico & Central America";
		Language = "English";
		myLang = "Espa\u00F1ol";
		country_site = "mx.rockwellautomation.com/applications/gs/la/gsmex.nsf/pages/Home_Page_EN";
		country_site2 = "mx.rockwellautomation.com";
		googlesite = "|mexico";
		googlecountry = "mexico";
		googlebiasing = "a__mexico";
		googlelang = "";
		break
	default:
		myCountryLbl = "M\u00E9xico & Am\u00E9rica Central";
		Language = "Spanish";
		myLang = "English";
		country_site = "mx.rockwellautomation.com";
		country_site2 = "mx.rockwellautomation.com/applications/gs/la/gsmex.nsf/pages/Home_Page_EN";
		googlesite = "|mexico";
		googlecountry = "mexico";
		googlebiasing = "a__mexico";
		googlelang = "es";
		}
		break
//PORTUGAL  -- banner till in Notes
	case "Portugal":
		myCountryLbl = "Portugal";
		country_site = "domino.automation.rockwell.com/applications/gs/EMEA/GSPT.nsf?OpenDatabase";
		break
//VENEZUELA
	case "Venezuela":
	switch (Language)
	{
	case "Spanish":
		myCountryLbl = "Venezuela";
		Language = "Spanish";
		myLang = "English";
		country_site = "ve.rockwellautomation.com";
		country_site2 = "ve.rockwellautomation.com/applications/gs/la/gsve.nsf/pages/Home_Page_EN";
		googlesite = "|venezuela";
		googlecountry = "venezuela";
		googlebiasing = "a__venezuela";
		googlelang = "es";
		break
	case "English":
		myCountryLbl = "Venezuela";
		Language = "English";
		myLang = "Espa\u00F1ol";
		country_site = "ve.rockwellautomation.com/applications/gs/la/gsve.nsf/pages/Home_Page_EN";
		country_site2 = "ve.rockwellautomation.com";
		googlesite = "|venezuela";
		googlecountry = "venezuela";
		googlebiasing = "a__venezuela";
		googlelang = "";
		break
	default:
		Language = "Spanish";
		myCountryLbl = "Venezuela";
		myLang = "English";
		country_site = "ve.rockwellautomation.com";
		country_site2 = "ve.rockwellautomation.com/applications/gs/la/gsve.nsf/pages/Home_Page_EN";
		googlesite = "|venezuela";
		googlecountry = "venezuela";
		googlebiasing = "a__venezuela";
		googlelang = "es";
		}
		break
//PERU
	case "Peru":
	switch (Language)
	{
	case "Spanish":
		myCountryLbl = "Per\u00FA";
		Language = "Spanish";
		myLang = "English";
		country_site = "pe.rockwellautomation.com";
		country_site2 = "pe.rockwellautomation.com/applications/gs/la/gspe.nsf/pages/Home_Page_EN";
		googlesite = "|peru";
		googlecountry = "peru";
		googlebiasing = "a__peru";
		googlelang = "es";
		break
	case "English":
		myCountryLbl = "Peru";
		Language = "English";
		myLang = "Espa\u00F1ol";
		country_site = "pe.rockwellautomation.com/applications/gs/la/gspe.nsf/pages/Home_Page_EN";
		country_site2 = "pe.rockwellautomation.com";
		googlesite = "|peru";
		googlecountry = "peru";
		googlebiasing = "a__peru";
		googlelang = "";
		break
	default:
		myCountryLbl = "Per\u00FA";
		Language = "Spanish";
		myLang = "English";
		country_site = "pe.rockwellautomation.com";
		country_site2 = "pe.rockwellautomation.com/applications/gs/la/gspe.nsf/pages/Home_Page_EN";
		googlesite = "|peru";
		googlecountry = "peru";
		googlebiasing = "a__peru";
		googlelang = "es";
		}			
		break
//PUERTO RICO -- goes to Caribbean site instead. no puerto rico site.
	/*case "Puerto Rico":
		myCountryLbl = "Puerto Rico";
		country_site = "pr.rockwellautomation.com";
		break*/
/*================== START NORTH AMERICA REGION======================================================= */
//CANADA
	case "Canada":
		myCountryLbl = "Canada";
		country_site = "www.rockwellautomation.ca";
		break
//UNITED STATES
	case "United States":	
		myCountryLbl = "United States";
		country_site = "www.rockwellautomation.com";
		country_site2 = "";
		googlesite = "";
		googlecountry = "";
		googlebiasing = "";
		googlelang = "";
		break
//DEFAULT
	default:
		myCountryLbl = "";
		country_site = "";
		mySignInLbl = "";
		googlesite = "";
		googlecountry = "";
		googlebiasing = "";
		googlelang = "";
	}
}
// END MAIN COUNTRIES
//*************************************************************************************************************************************************************************************************************************


/*  START DOMAIN NAME OVERIDES SECTION--------------------------------------------------------------------------------------------------*/
function DoTheCookieStuff()  {
	GetCountrySite(Country);
	switch (location.hostname)
	{
//ARGENTINA 
	case "ar.rockwellautomation.com":
		if (document.location.href == ArgentinaEN) {
		document.write('<a href='+ArgentinaEN+'>Argentina</a>');
		} else 
		document.write('<a href='+ArgentinaES+'>Argentina</a>');
		break
//BRAZIL
	case "br.rockwellautomation.com":
		if (document.location.href == BrazilEN) {
		document.write('<a href='+BrazilEN+'>Brazil</a>');
		} else 
		document.write('<a href='+BrazilPT+'>Brasil</a>');
		break
//CHILE
	case "cl.rockwellautomation.com":
		if (document.location.href == ChileEN) {
		document.write('<a href='+ChileEN+'>Chile</a>');
		} else 
		document.write('<a href='+ChileES+'>Chile</a>');
		break
//COLOMBIA
	case "co.rockwellautomation.com":
		if (document.location.href == ColombiaEN) {
		document.write('<a href='+ColombiaEN+'>Colombia</a>');
		} else 
		document.write('<a href='+ColombiaES+'>Colombia</a>');
		break
//MEXICO
	case "mx.rockwellautomation.com":
		if (document.location.href == MexicoEN) {
		document.write('<a href='+MexicoEN+'>Mexico & Central America</a>');
		} else
		document.write('<a href='+MexicoES+'>M\u00E9xico & Am\u00E9rica Central</a>');
		break
//CARIBBEAN & PUERTO RICO
	case "pr.rockwellautomation.com":
		document.write('<a href='+CaribbeanEN+'>Caribbean</a>');
		break
//VENEZUELA
	case "ve.rockwellautomation.com":
		if (location.href == VenezuelaEN) {
		document.write('<a href='+VenezuelaEN+'>Venezuela</a>');
		} else
		document.write('<a href='+VenezuelaES+'>Venezuela</a>');
		break
//PERU
	case "pe.rockwellautomation.com":
		if (document.location.href == PeruEN) {
		document.write('<a href='+PeruEN+'>Per\u00FA</a>');
		} else
		document.write('<a href='+PeruES+'>Per\u00FA</a>');
		break
//DEFAULT
	default:
		document.write('<a href="http://' + country_site + '">' + myCountryLbl + '</a>');
	}
}
/*END OVERRIDES--------------------------------------------------------------------------------------------------*/

/*// LANGUAGE CASES
switch (myURLang) {
case "en":
	Language = "English";	
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
	break;
case "fr":
	Language = "French";
	Set_Cookie('ra_www_lang','French','365','/','.rockwellautomation.com');
	break;
case "it":	
	Language = "Italian";	
	Set_Cookie('ra_www_lang','Italian','365','/','.rockwellautomation.com');
	break;
case "de":
	Language = "German";	
	Set_Cookie('ra_www_lang','German','365','/','.rockwellautomation.com');
	break;
case "pt":
	Language = "Portuguese";	
	Set_Cookie('ra_www_lang','Portuguese','365','/','.rockwellautomation.com');
	break;
case "es":
	Language = "Spanish";	
	Set_Cookie('ra_www_lang','Spanish','365','/','.rockwellautomation.com');
	break;
case "zh":
	Language = "ChineseSimplified";	
	Set_Cookie('ra_www_lang','ChineseSimplified','365','/','.rockwellautomation.com');
	break;
case "zc":
	Language = "ChineseComplex";	
	Set_Cookie('ra_www_lang','ChineseComplex','365','/','.rockwellautomation.com');
	break;
case "ja":
	Language = "Japanese";	
	Set_Cookie('ra_www_lang','Japanese','365','/','.rockwellautomation.com');
	break;
case "ko":
	Language = "Korean";	
	Set_Cookie('ra_www_lang','Korean','365','/','.rockwellautomation.com');
	break;
case "pl":
	Language = "Polish";	
	Set_Cookie('ra_www_lang','Polish','365','/','.rockwellautomation.com');
	break;
case "cs":
	Language = "Czech";	
	Set_Cookie('ra_www_lang','Czech','365','/','.rockwellautomation.com');
	break;
default:
	Language = "English";	
	Set_Cookie('ra_www_lang','English','365','/','.rockwellautomation.com');
}
*/


//This function, which changes language with country pick or with the Language change link on the right side of the banner, must be called after the countries.  PLEASE DO NOT MOVE.  This section sets various values that would otherwise have to be called in each individual country.
function GetPersonalizeUrl(NewLanguage)  { 
	switch (NewLanguage)  { 
	}
}

myPersonalizeUrl = GetPersonalizeUrl(Language);
switch (Language)
{
case "ChineseComplex":
	mySearchLbl = "";  /*FIX THESE LATER*/
	break
case "ChineseSimplified":
	mySearchLbl = "\u641C\u7D22"
	break
case "Czech":
	mySearchLbl = "Search";
	break
case "Danish":
	mySearchLbl = "S\u00F8g";
	break
case "Dutch":
	mySearchLbl = "Zoek";
	break
case "English":
	if (Country == null || Language == null) { 
		mySignInLbl = ""; 
		} else 
		mySignInLbl = "Sign In";
		myProfileLbl = "My Profile";
	if (Country == null || Language == null) { 
		mySignOutLbl = "";
		} else 
		mySignOutLbl = "Sign Out";
	myProfileLbl = "My Profile";
	myWelcomeLbl = "Welcome ";
	mySearchLbl = "Search";
	myBanner = "http://"+myRAServer+myEnglishMenu;
	myMemberLbl = "Become a Member";
	myURLbl = "User Registration";
	myEditProfileLbl = "Edit My Profile";
	myForgotPasswordLbl = "Forgot Password";
	myContactLbl = "Questions/Comments";
	myFeedbackLbl = "Feedback";
	myCookieTestLbl = "Cookie Test Page";
	myPrivacyLbl = "Privacy Policy";
	myContactInfoLbl = "Contact Information";
	mySubscriptionsLbl = "Subscriptions";
	myChangePassLbl = "Change Password";
	myMemberHelpLbl = "Member Help";
	myRegistrationLbl = "Website Registration";
	break		
case "French":
	mySearchLbl = "Recherche";
	break
case "German":
	mySearchLbl = "Suche";
	break
case "Italian":
	mySearchLbl = "Ricerca";
break
case "Japanese":
	mySearchLbl = "\u691C\u7D22";
	break
case "Korean":
	mySearchLbl = "Search";
	break
case "Polish":
	mySearchLbl = "Szukaj";
	break
case "Portuguese":
	mySignInLbl = "Sinal Dentro";  /*THESE ARE NOT YET NEEDED*/
	mySignOutLbl = "Sinal Para fora";  /*THESE ARE NOT YET NEEDED*/
	myProfileLbl = "";
	myWelcomeLbl = "Hello ";
	mySearchLbl = "Pesquisar";
	myBanner = "http://"+myRAServer+myPortugueseMenu;
	break			
case "Spanish":
	mySignInLbl = "Muestra Adentro";  /*THESE ARE NOT YET NEEDED */
	mySignOutLbl = "Muestra Fuera";  /*THESE ARE NOT YET NEEDED*/
	myProfileLbl = "";
	myWelcomeLbl = "Hola ";
	mySearchLbl = "B\u00FAsqueda";//
	myBanner = "http://"+myRAServer+mySpanishMenu;
	break
case "Swedish":
	mySearchLbl = "S\u00F6k";
	break
default:
	if (Country == null) { 
		mySignInLbl = ""; 
		} else 
		mySignInLbl = "Sign In";
		myProfileLbl = "My Profile";
	if (Country == null) { 
		mySignOutLbl = "";
		} else 
		mySignOutLbl = "Sign Out";
		myProfileLbl = "My Profile";
	myWelcomeLbl = "Welcome ";
	mySearchLbl = "Search";
	myBanner = "http://"+myRAServer+myEnglishMenu;
	myLang = null;
	myMemberLbl = "Become a Member";
	myURLbl = "User Registration";
	myEditProfileLbl = "Edit My Profile";
	myForgotPasswordLbl = "Forgot Password";
	myContactLbl = "Questions/Comments";
	myFeedbackLbl = "Feedback";
	myCookieTestLbl = "Cookie Test Page";
	myPrivacyLbl = "Privacy Policy";
	myContactInfoLbl = "Contact Information";
	mySubscriptionsLbl = "Subscriptions";
	myChangePassLbl = "Change Password";
	myMemberHelpLbl = "Member Help";
	myRegistrationLbl = "Website Registration";
	myURLang = "en";
	googlesite = "";
	googlecountry = "";
	googlebiasing = "";
	googlelang = "";
}
//******************************************************************************************************************************************************************************************************************************************************************************************

document.write("</div></td>");
/* START SECOND TD FOR SEARCH AND USER SIGN IN */
document.write("<td width='50%' align='right' nowrap valign='bottom'><div class='searchform' style='margin-right:18px;'>");//remove "1" below before launching
//	document.write("<form enctype='application/x-www-form-urlencoded' method='get' action='http://search.rockwellautomation.com/search' class='searchform'>");
	document.write("	<INPUT TYPE=hidden NAME=site VALUE='main_all"+googlesite+"'>");
	document.write("	<INPUT TYPE=hidden NAME=country VALUE="+googlecountry+">");
	document.write("	<INPUT TYPE=hidden NAME=entsp VALUE="+googlebiasing+">");
	document.write("	<INPUT TYPE=hidden NAME=lang VALUE="+googlelang+">");
	document.write("	<INPUT TYPE=hidden NAME=hl VALUE="+googlelang+">");
	document.write("	<INPUT TYPE=hidden NAME=oe VALUE='UTF-8'>");
	document.write("	<INPUT TYPE=hidden NAME=ie VALUE='UTF-8'>");
	document.write("	<INPUT TYPE=hidden NAME=client VALUE='main_fe'>");
	document.write("	<INPUT TYPE=hidden NAME=output VALUE='xml_no_dtd'>");
	document.write("	<INPUT TYPE=hidden NAME=proxystylesheet VALUE='main_fe'>");
	document.write("<img src='http://www.rockwellautomation.com/lib/images/googlebanner.gif'>");
	document.write("<input type='text' name='q' onFocus=if(this.value=='" + mySearchLbl  + "')value='' onBlur=if(this.value=='')value='" + mySearchLbl  + "'; value='"+ mySearchLbl +"' size='14' class='search'>");
	document.write("&nbsp;<input type='submit' name='submit' value='&#187;' class='submit' border='0'>");
//	document.write("</form>");
//THIS IS THE OLD BANNER FORM SO LEAVE THIS FOR NOW
//document.write("<form method='get' action='http://search1.rockwellautomation.com/search'  class='searchform'><INPUT TYPE=hidden NAME=site VALUE='main_all"+googlesite+"'><INPUT TYPE=hidden NAME=country VALUE="+googlecountry+"><INPUT TYPE=hidden NAME=entsp VALUE="+googlebiasing+"><INPUT TYPE=hidden NAME=lang VALUE="+googlelang+"><INPUT TYPE=hidden NAME=hl VALUE="+googlelang+"><INPUT TYPE=hidden NAME=oe VALUE='UTF-8'><INPUT TYPE=hidden NAME=ie VALUE='UTF-8'><INPUT TYPE=hidden NAME=client VALUE=main_fe><INPUT TYPE=hidden NAME=output VALUE=xml_no_dtd><INPUT TYPE=hidden NAME=proxystylesheet VALUE=main_fe><img src='http://www.rockwellautomation.com/lib/images/googlebanner.gif'>");//<INPUT TYPE=hidden NAME=ie VALUE="+googlecharset+">
//document.write("<input class='search' onFocus=if(this.value=='" + mySearchLbl  + "')value='' onBlur=if(this.value=='')value='" + mySearchLbl  + "'; value='"+ mySearchLbl +"' type='text' name='q' size='14'>");
//document.write("&nbsp;<input type='submit' name='submit' value='&#187;' class='submit' border='0' ></form></div>");//<INPUT TYPE=hidden NAME=language VALUE="+Language+">  <input class='search' onFocus=if(this.value=='" + mySearchLbl  + "')value='' onBlur=if(this.value=='')value='" + mySearchLbl  + "'; value='"+ mySearchLbl +"' type='text' name='q' size='14'>
//END OLD BANNER FORM
document.write("<div id='useroptions' style='margin-right:16px'><span id='username'>");
	// UR COOKIE CALL
		var my_raname = Get_Cookie('ra_ur_salutation');
			if (my_raname != null && my_raname != "") {
			/*var  my_raname = Switch(my_raname,"+"," ");*/ // this function pulls out the plus signs
				if (ns7) { //this fixes for netcapse which does not like or require the decode function
					document.write(myWelcomeLbl + my_raname);
				} else {
					document.write(myWelcomeLbl + decode(my_raname));
				}
			}	
	document.write("</span>");
		writeRAWelcome(location.href);
	document.write("</div></td></tr></table>");
	document.write("<div id=redbarlinks><img src=http://www.rockwellautomation.com/lib/images/spacer.gif width=1 height=17></div></div>");
	document.write('<script type=text/javascript language=javascript src=' + myBanner + '></script>');
