function GoTo(page,cc,clang,cpath) {
	var startLoc = new String(window.location);
	var startHost = startLoc.replace(/http(s)?:\/\/((.*\.)?fedex\.com)\/.*/, "$2");
	if ((startHost == "cms.sac.fedex.com") || (startHost == "cmstest1.idev.fedex.com") || (startHost == "untie11.sac.fedex.com") || (startHost == "cmsdev1.idev.fedex.com") || (startHost == "teamsite.idev.fedex.com")){startHost="fedex.com";}
	if (startHost == "fedex.com") {startHost="www.fedex.com";}
	var gtmHost = startHost.replace("www", "gtm");
        if (gtmHost == "gtmtest.fedex.com") {gtmHost = "gtm.test.fedex.com";}
	var locale = cc+"_"+clang;
	var fcl_locale = locale;
	
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FSM") {
		if(clang == "tc"){
			clang="zht";
			fcl_locale=cc+"_tc";
		}
		if(clang == "sc"){
			clang="zhs";
			fcl_locale=cc+"_sc";
		}
		if(clang == "sp"){
			clang="es";
		}
	} 
	
	//PleaseSelect
	PleaseSelect_appName = "fclfsm";
	PleaseSelect_stepURL = "https%3A%2F%2F"+startHost+"%2Fship%2FshipEntryAction.do?method=doRegistration%26locale="+clang+"_"+cc+"%26urlparams="+cpath+"%26sType=F%26action=fsmregister";
	PleaseSelect_afterURL ="http%3A%2F%2F"+startHost+"%2F"+cpath;
	
	//GTM
	GTM_appName = "fclgtm";
	GTM_stepURL = "https%3A%2F%2F"+startHost+"%2FGTM%2FFclStep3?cntry_code="+cpath+"%26link=1%26lid=%2F%2FInternational%2F%2FPack+GTM+Intl+Doc+Corp";
	GTM_afterURL = "https%3A%2F%2F"+startHost+"%2FFID?cntry_code="+cpath+"%26link=1%26lid=%2F%2FInternational%2F%2FPack+GTM+Intl+Doc+Corp";
	
	//FSM
	FSM_appName = "fclfsm";
	FSM_stepURL = "https%3A%2F%2F"+startHost+"%2Fship%2FshipEntryAction.do?method=doRegistration%26locale="+clang+"_"+cc+"%26urlparams="+cpath+"%26sType=F%26action=fsmregister";
	FSM_afterURL = "https%3A%2F%2F"+startHost+"%2Fship%2FshipEntryAction.do?method=doEntry%26locale="+clang+"_"+cc+"%26urlparams="+cpath+"%26sType=F";
	
	//MFX
	MFX_appName = "fclmfx";
	MFX_stepURL = "https%3A%2F%2F"+startHost+"%2Fmyfedex%2Fgo%2Ffclstep3?cc="+cc+"%26language="+clang;
	MFX_afterURL = "https%3A%2F%2F"+startHost+"%2Fmyfedex%2Fgo%2Fhome?cc="+cc+"%26language="+clang;
	
	//RATES
	RATE_appName = "fclrates";
	RATE_stepURL = "https%3A%2F%2F"+startHost+"%2Fratefinder%2Fregstep3?cc="+cc+"%26language="+clang+"%26action=Registration";
	RATE_afterURL = "https%3A%2F%2F"+startHost+"%2Fratefinder%2Ffclhome?cc="+cc+"%26language="+clang;
	
	//INSIGHT
	INSIGHT_appName = "fclinsight";
	INSIGHT_stepURL = "https%3A%2F%2F"+startHost+"%2Finsight%2Fentrance%2Ffcl_registration_landing_post.jsp";
	INSIGHT_afterURL = "https%3A%2F%2F"+startHost+"%2Finsight%2Fentrance%2Fpre_entrance_post.jsp";
	
	//REWARDS FEDERATE
	FEDERATE_appName = "fclmfx";
	FEDERATE_stepURL = "https%3A%2F%2F"+startHost+"%2F"+cc;
	FEDERATE_afterURL = "http%3A%2F%2F"+startHost+"%2F"+cc+"&programIndicator=1";
	

	//BILLING ONLINE
	//FIO_appName = "fclfio";
	//FIO_stepURL = "https%3A%2F%2F"+startHost+"%2FFedExMMA%2Fjsp%2FFioStep3.jsp";
	//FIO_afterURL = "https%3A%2F%2F"+startHost+"%2FFedExMMA%2Fjsp%2FRegistrationRouter.jsp";
        //BILLING ONLINE
        FIO_appName = "fclgfbo";
        FIO_stepURL = "https%3A%2F%2F"+startHost+"%2Ffedexbillingonline%2Fregistration.jsp%3FuserRegistration%3DY%26locale%3Den_US";
        FIO_afterURL = "https%3A%2F%2F"+startHost+"%2Ffedexbillingonline%3Flocale%3Den_US";
	
	//Pickup
	PICKUP_appName = "fclpickup";
	PICKUP_stepURL = "https%3A%2F%2F"+startHost+"%2FPickupApp%2FFCLStep3.jsp";
	PICKUP_afterURL = "https%3A%2F%2F"+startHost+"%2FPickupApp%2FscheduleExpressPickup.do?actionText=init%26locale="+cc+"_"+clang+"%26HIFlag=null%26programIndicator=4";
	
	//Freight
	FXF_appName = "fclfreight";
	FXF_stepURL = "https%3A%2F%2Fwww.fedexfreight.fedex.com%2FfclStep3.jsp";
	FXF_afterURL = "https%3A%2F%2Fwww.fedexfreight.fedex.com%2Ffcllogin.do?programIndicator=3";
	
	//Freight National
	FNL_appName = "fclfreight";
	FNL_stepURL = "https%3A%2F%2Ffnl.fedexnational.fedex.com%2Fus%2FfclStep3.jsp";
	FNL_afterURL = "https%3A%2F%2Ffnl.fedexnational.fedex.com%2Fus%2FFCLLogon?programIndicator=3";
	
	if (document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "") {
		alert("Please select a Start Page.");
	} else {
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FIO") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+FIO_appName+"&locale="+locale+"&step3URL="+FIO_stepURL+"&afterwardsURL="+FIO_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FNL") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+FXF_appName+"&locale="+locale+"&step3URL="+FNL_stepURL+"&afterwardsURL="+FNL_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FXF") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+FXF_appName+"&locale="+locale+"&step3URL="+FXF_stepURL+"&afterwardsURL="+FXF_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "PICKUP") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+PICKUP_appName+"&locale="+locale+"&step3URL="+PICKUP_stepURL+"&afterwardsURL="+PICKUP_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "RATE") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+RATE_appName+"&locale="+locale+"&step3URL="+RATE_stepURL+"&afterwardsURL="+RATE_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "INSIGHT") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+INSIGHT_appName+"&locale="+locale+"&step3URL="+INSIGHT_stepURL+"&afterwardsURL="+INSIGHT_afterURL;			
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "MFX") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+MFX_appName+"&locale="+locale+"&step3URL="+MFX_stepURL+"&afterwardsURL="+MFX_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FEDERATE") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+FEDERATE_appName+"&locale="+locale+"&step3URL="+FEDERATE_stepURL+"&returnurl="+FEDERATE_afterURL;
		}			
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "PleaseSelect") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+PleaseSelect_appName+"&locale="+fcl_locale+"&step3URL="+PleaseSelect_stepURL+"&afterwardsURL="+PleaseSelect_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FSM") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+FSM_appName+"&locale="+locale+"&step3URL="+FSM_stepURL+"&afterwardsURL="+FSM_afterURL;
		}
		if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "GTM") {
			window.location="https://"+startHost+"/fcl/web/jsp/"+page+".jsp?appName="+GTM_appName+"&locale="+locale+"&step3URL="+GTM_stepURL+"&afterwardsURL="+GTM_afterURL;
		}
	}
}
function goLogin(cc,clang,cpath){
	var startLoc = new String(window.location);
	var startHost = startLoc.replace(/http(s)?:\/\/((.*\.)?fedex\.com)\/.*/, "$2");
	var secondHost;
	if ((startHost == "cms.idev.fedex.com") || (startHost == "contentdev.idev.fedex.com") || (startHost == "cmsdev.idev.fedex.com") || (startHost == "cmsdev1.idev.fedex.com") || (startHost == "teamsite.idev.fedex.com")){startHost="fedex.com";}
	if (startHost == "fedex.com") {startHost="www.fedex.com";}
	var gtmHost = startHost.replace("www", "gtm");
        if (gtmHost == "gtmtest.fedex.com") {gtmHost = "gtm.test.fedex.com";}
	var fcl_locale  = cc+"_"+clang;
	var fsm_url  ="ship";
	//var fsm_url  ="shipping";

        var apac_countries = ["fj","fm","la","pf","as","pg","th","au","gu","mh","ph","bn","hk","mm","mn","ck","id","mo","tw","cn","pw","mp","vn","jp","my","vu","kh","nc","wf","nz","kr","sg"];
        
        for(var i=0; i<apac_countries.length; i++) {
	var value = apac_countries[i];
		if(cc == apac_countries[i]){
	          fsm_url  ="shipping_apac";
                //alert(value);
                //alert(fsm_url);
		}
        }

	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FSM") {
		if(clang == "tc"){
			clang="zht";
                        fcl_locale=cc+"_tc";
		}
		if(clang == "sc"){
			clang="zhs";
                        fcl_locale=cc+"_sc";
		}
		if(clang == "kr"){
			clang="ko";
                        fcl_locale=cc+"_kr";
		}
		if(clang == "sp"){
			clang="es";
		}
		if(clang == "th"){
			clang="en";
			cpath="th";
		}
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "MFX") {
		if(clang == "ja"){
			clang="en";
		}
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FXF") {
		if((startHost == "wwwdrt.idev.fedex.com")||(startHost == "wwwbase.idev.fedex.com")){
			secondHost = "qax.freight.fedex.com";
		}
		else{
			secondHost = "www.fedexfreight.fedex.com";
		}
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FNL") {
		if((startHost == "wwwdrt.idev.fedex.com")||(startHost == "wwwbase.idev.fedex.com")){
			secondHost = "qax.freight.fedex.com";
		}
		else{
			secondHost = "fnl.fedexnational.fedex.com";
		}
	}
	
	//PleaseSelect
	PleaseSelect_appName = "fclfsm";
	PleaseSelect_stepURL = "https%3A%2F%2F"+startHost+"%2Fship%2FshipEntryAction.do?method=doRegistration%26locale="+clang+"_"+cc+"%26urlparams="+cpath+"%26sType=F%26action=fsmregister";
	PleaseSelect_afterURL ="http%3A%2F%2F"+startHost+"%2F"+cpath;
	
	//GTM
	GTM_appName = "fclgtm";
	GTM_stepURL = "https%3A%2F%2F"+startHost+"%2FGTM%2FFclStep3?cntry_code="+cpath+"%26link=1%26lid=%2F%2FInternational%2F%2FPack+GTM+Intl+Doc+Corp";
	GTM_afterURL = "https%3A%2F%2F"+startHost+"%2FFID?cntry_code="+cpath+"%26link=1%26lid=%2F%2FInternational%2F%2FPack+GTM+Intl+Doc+Corp";
	
	//FSM
	FSM_appName = "fclfsm";
	FSM_stepURL = "https%3A%2F%2F"+startHost+"%2F"+fsm_url+"%2FshipEntryAction.do?method=doRegistration%26locale="+clang+"_"+cc+"%26urlparams="+cpath+"%26sType=F%26action=fsmregister";
	FSM_afterURL = "https%3A%2F%2F"+startHost+"%2F"+fsm_url+"%2FshipEntryAction.do?method=doEntry%26locale="+clang+"_"+cc+"%26urlparams="+cpath+"%26sType=F";
	
	//MFX
	MFX_appName = "fclmfx";
	MFX_stepURL = "https%3A%2F%2F"+startHost+"%2Fmyfedex%2Fgo%2Ffclstep3?cc="+cc+"%26language="+clang;
	MFX_afterURL = "https%3A%2F%2F"+startHost+"%2Fmyfedex%2Fgo%2Fhome?cc="+cc+"%26language="+clang;
	
	//RATES
	RATE_appName = "fclrates";
	RATE_stepURL = "https%3A%2F%2F"+startHost+"%2Fratefinder%2Fregstep3?cc="+cc+"%26language="+clang+"%26action=Registration";
	RATE_afterURL = "https%3A%2F%2F"+startHost+"%2Fratefinder%2Ffclhome?cc="+cc+"%26language="+clang;
	
	//INSIGHT
	INSIGHT_appName = "fclinsight";
	INSIGHT_stepURL = "https%3A%2F%2F"+startHost+"%2Finsight%2Fentrance%2Ffcl_registration_landing_post.jsp";
	INSIGHT_afterURL = "https%3A%2F%2F"+startHost+"%2Finsight%2Fentrance%2Fpre_entrance_post.jsp";
	
	//REWARDS FEDERATE
	FEDERATE_appName = "fclmfx";
	FEDERATE_stepURL = "https%3A%2F%2F"+startHost+"%2F"+cc;
	//FEDERATE_afterURL = "http%3A%2F%2F"+startHost+"%2F"+cc+"?programIndicator=1";
	FEDERATE_afterURL = "http%3A%2F%2F"+startHost+"%2F"+cc;
	

	//BILLING ONLINE
	//FIO_appName = "fclfio";
	//FIO_stepURL = "https%3A%2F%2F"+startHost+"%2FFedExMMA%2Fjsp%2FFioStep3.jsp";
	//FIO_afterURL = "https%3A%2F%2F"+startHost+"%2FFedExMMA%2Fjsp%2FRegistrationRouter.jsp";
        //BILLING ONLINE
        FIO_appName = "fclgfbo";
        FIO_stepURL = "https%3A%2F%2F"+startHost+"%2Ffedexbillingonline%2Fregistration.jsp%3FuserRegistration%3DY%26locale%3Den_US";
        FIO_afterURL = "https%3A%2F%2F"+startHost+"%2Ffedexbillingonline%3Flocale%3Den_US";
	
	//Pickup
	PICKUP_appName = "fclpickup";
	PICKUP_stepURL = "https%3A%2F%2F"+startHost+"%2FPickupApp%2FFCLStep3.jsp";
	PICKUP_afterURL = "https%3A%2F%2F"+startHost+"%2FPickupApp%2F?locale="+clang+"_"+cc;
	
	//Freight
	FXF_appName = "fclfreight";
	FXF_stepURL = "https%3A%2F%2F"+secondHost+"%2FfclStep3.jsp";
	FXF_afterURL = "https%3A%2F%2F"+secondHost+"%2Ffcllogin.do?programIndicator=3";
	
	//Freight National
	FNL_appName = "fclfreight";
	FNL_stepURL = "https%3A%2F%2F"+secondHost+"%2Fus%2FfclStep3.jsp";
	FNL_afterURL = "https%3A%2F%2F"+secondHost+"%2Fus%2FFCLLogon?programIndicator=3";
	
	
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FIO") {
		document.logonForm.appName.value=FIO_appName;
		document.logonForm.step3URL.value=FIO_stepURL;
		document.logonForm.afterwardsURL.value=FIO_afterURL;
		document.logonForm.returnurl.value=FIO_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+FIO_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+FIO_stepURL+"&amp;afterwardsURL="+FIO_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FNL") {
		document.logonForm.appName.value=FNL_appName;
		document.logonForm.step3URL.value=FNL_stepURL;
		document.logonForm.afterwardsURL.value=FNL_afterURL;
		document.logonForm.returnurl.value=FNL_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+FNL_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+FNL_stepURL+"&amp;afterwardsURL="+FNL_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FXF") {
		document.logonForm.appName.value=FXF_appName;
		document.logonForm.step3URL.value=FXF_stepURL;
		document.logonForm.afterwardsURL.value=FXF_afterURL;
		document.logonForm.returnurl.value=FXF_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+FXF_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+FXF_stepURL+"&amp;afterwardsURL="+FXF_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "PICKUP") {
		document.logonForm.appName.value=PICKUP_appName;
		document.logonForm.step3URL.value=PICKUP_stepURL;
		document.logonForm.afterwardsURL.value=PICKUP_afterURL;
		document.logonForm.returnurl.value=PICKUP_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+PICKUP_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+PICKUP_stepURL+"&amp;afterwardsURL="+PICKUP_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "RATE") {
		document.logonForm.appName.value=RATE_appName;
		document.logonForm.step3URL.value=RATE_stepURL;
		document.logonForm.afterwardsURL.value=RATE_afterURL;
		document.logonForm.returnurl.value=RATE_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+RATE_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+RATE_stepURL+"&amp;afterwardsURL="+RATE_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "INSIGHT") {
		document.logonForm.appName.value=INSIGHT_appName;
		document.logonForm.step3URL.value=INSIGHT_stepURL;
		document.logonForm.afterwardsURL.value=INSIGHT_afterURL;
		document.logonForm.returnurl.value=INSIGHT_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+INSIGHT_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+INSIGHT_stepURL+"&amp;afterwardsURL="+INSIGHT_afterURL;		
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FEDERATE") {
		document.logonForm.appName.value=FEDERATE_appName;
		document.logonForm.step3URL.value=FEDERATE_stepURL;
		document.logonForm.afterwardsURL.value=FEDERATE_afterURL;
		document.logonForm.returnurl.value=FEDERATE_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+FEDERATE_appName+"&locale="+cc+"_"+clang+"&step3URL="+FEDERATE_stepURL+"&returnurl="+FEDERATE_afterURL;
		
	}	
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "MFX") {
		document.logonForm.appName.value=MFX_appName;
		document.logonForm.step3URL.value=MFX_stepURL;
		document.logonForm.afterwardsURL.value=MFX_afterURL;
		document.logonForm.returnurl.value=MFX_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+MFX_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+MFX_stepURL+"&amp;afterwardsURL="+MFX_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "PleaseSelect") {
		document.logonForm.appName.value=PleaseSelect_appName;
		document.logonForm.step3URL.value=PleaseSelect_stepURL;
		document.logonForm.afterwardsURL.value=PleaseSelect_afterURL;
		document.logonForm.returnurl.value=PleaseSelect_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+PleaseSelect_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+PleaseSelect_stepURL+"&amp;afterwardsURL="+PleaseSelect_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "FSM") {
		document.logonForm.appName.value=FSM_appName;
		document.logonForm.step3URL.value=FSM_stepURL;
		document.logonForm.afterwardsURL.value=FSM_afterURL;
		document.logonForm.returnurl.value=FSM_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+FSM_appName+"&amp;locale="+fcl_locale+"&amp;step3URL="+FSM_stepURL+"&amp;afterwardsURL="+FSM_afterURL;
	}
	if(document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value == "GTM") {
		document.logonForm.appName.value=GTM_appName;
		document.logonForm.step3URL.value=GTM_stepURL;
		document.logonForm.afterwardsURL.value=GTM_afterURL;
		document.logonForm.returnurl.value=GTM_afterURL;
		document.logonForm.action = "https://"+startHost+"/fcl/logon.do?appName="+GTM_appName+"&amp;locale="+cc+"_"+clang+"&amp;step3URL="+GTM_stepURL+"&amp;afterwardsURL="+GTM_afterURL;
	}
}

function Save() {
	if(document.logonForm.remusrid.checked && document.logonForm.username.value != "") {
		setcookie('FCLID',document.logonForm.username.value,9125);
	} else {
		setcookie('FCLID',"",9125);
	}
	if(document.logonForm.startpage != null && document.logonForm.startpage != "undefined"){
		if(document.logonForm.remusrid.checked){
			setcookie('FCL_START',document.logonForm.startpage.options[document.logonForm.startpage.selectedIndex].value,9125);
		}
		else{
			deletecookie('FCL_START');
		}
	}
}
function addWSSInfo(name) {	
	if(name == '')return;
	self._ci = name;
	self._c1 = name;
	_hbSet('customerid',name);
	_hbSet('c1',name);
	_hbSend();
	return;
}

function setcookie(name,value,duration){
        cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration)+"; path=/; domain=.fedex.com;";
        document.cookie=cookiestring;
        if(!getcookie(name)){
                return false;
        }else{
                return true;
        }
}


function deletecookie(name){
        cookiestring=name+"=; EXPIRES=Thu, 01-Jan-70 00:00:01 GMT; path=/; domain=.fedex.com;";
        document.cookie=cookiestring;
        if(!getcookie(name)){
                return false;
        }else{
                return true;
        }
}

function getcookie(cookiename) {
        var cookiestring=""+document.cookie;
        var index1=cookiestring.indexOf(cookiename);
        if (index1==-1 || cookiename=="") return "";
        var index2=cookiestring.indexOf(';',index1);
        if (index2==-1) index2=cookiestring.length;
        return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}

function getexpirydate( nodays){
        var UTCstring;
        Today = new Date();
        nomilli=Date.parse(Today);
        Today.setTime(nomilli+nodays*24*60*60*1000);
        UTCstring = Today.toUTCString();
        return UTCstring;
}

function displayModule(){
	var fclID = getcookie('FCLID');
	var fclStart = getcookie('FCL_START');
	if (fclStart != "" && fclStart != ";") {
		if (document.logonForm){
			if(document.logonForm.startpage != null && document.logonForm.startpage != "undefined"){
				for (var optn = 0;optn<document.logonForm.startpage.options.length;optn++) {
					if (document.logonForm.startpage.options[optn].value == fclStart) {
						document.logonForm.startpage.value=fclStart;				
					}
				}
			}
				if (fclID != "" && fclID !=";") {
					document.logonForm.username.value=fclID;
					document.logonForm.remusrid.checked="true";
				}
		}
	}
}
// End Login Module

