var szPath;



function SetHeader(szImage,szLnkName)

{



if (document.location.href.indexOf('#') == -1)

{

	szPath = document.location.href.substr(0, document.location.href.length - (document.location.pathname.length + document.location.search));

	/*if (document.location.pathname.split('/')[1] != 'analysisresources' && document.location.pathname.split('/')[1] != 'customer' && document.location.pathname.split('/')[1] != 'energymarketing' && document.location.pathname.split('/')[1] != 'products' && document.location.pathname.split('/')[1].substr(document.location.pathname.split('/')[1].length-4) != '.htm')

		szPath += '/' + document.location.pathname.split('/')[1] ;*/

	

}

else

{

	var szTmpPath = document.location.href.substr(0,document.location.href.indexOf('#'))

	

	szPath = szTmpPath.substr(0, szTmpPath.length - (document.location.pathname.length + document.location.search));

	

	/*if (document.location.pathname.split('/')[1] != 'analysisresources' && document.location.pathname.split('/')[1] != 'customer' && document.location.pathname.split('/')[1] != 'energymarketing' && document.location.pathname.split('/')[1] != 'products' && document.location.pathname.substr(document.location.pathname.length-4) != '.htm')

		szPath += '/' + document.location.pathname.split('/')[1] ;

	else if (document.location.pathname.split('/')[2] != 'analysisresources' || document.location.pathname.split('/')[2] != 'customer' || document.location.pathname.split('/')[2] != 'energymarketing' || document.location.pathname.split('/')[2] != 'products' && document.location.pathname.substr(document.location.pathname.length-4) != '.htm')

		szPath += '/' + document.location.pathname.split('/')[1];*/

	

	

}









document.write("<table width=968px")

	document.write(" border=0 cellspacing=0 cellpadding=0>")

	document.write("<tr><td class=header height=119 width=100%>")

	document.write("<table width=100% border=0 cellspacing=0 cellpadding=0>")

	document.write("<tr><td colspan=2><img src='" + szPath + "/images/pixel.gif' width=900 height=1></td></tr>")		

	document.write("<tr><td><A id='lnkHome' href='" + szPath + "/home.aspx'><img src='" + szPath + "/images/new-banner-Logo.jpg' width='477' height='71' runat='server'></A></td>")

	document.write("<td width='240' valign='top'>")

	document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>")

			document.write("<tr>")

				document.write("<td align='right'><a id='lnkContactUs' href='" + szPath + "/customer/contact.htm' class='contact'>Contact Us</a></td>")

			document.write("</tr>")

			document.write("<tr>")

				document.write("<td><img src='" + szPath + "/images/pixel.gif' width='1' height='8'></td>")

			document.write("</tr>")

			document.write("<tr>")

				document.write("<td align='right'><div id='lnkSignIn' style=display:none><a href='"+szPath+"/dashboard/unAuthenticated.aspx'><img src='" + szPath + "/images/btn_signIn.gif' alt='Sign In' width='65' height='24' border='0'></a></div>")

				document.write("<div id='lnkSignOut' style=display:none><a id='acct' href='"+szPath+"/dashboard/unAuthenticated.aspx'><img src='" + szPath + "/images/btn_signout.gif' alt='Sign Out' width='65' height='24' border='0'></a></td>")

			document.write("</tr>")

				document.write("<tr>")

					document.write("<td><img src='" + szPath + "/images/pixel.gif' width='1' height='5'></td>")

				document.write("</tr>")

				document.write("<tr>")

					document.write("<td align='right'><div id='lblUserName' style='display:none;FONT-SIZE: 11px;COLOR: white'></div></td>")

				document.write("</tr>")

				document.write("<tr>")

					document.write("<td align='right'><div id='lblCompany' style='display:none;FONT-SIZE: 11px;COLOR: white'></div></td>")

				document.write("</tr>")

				document.write("<tr width='100%'>")

					document.write("<td align='right' width='100%'><div id='lnkCreateAccount'  style=display:none><A href="+szPath+"/customer/CreateAccountStep1.aspx><font color=white style='FONT-SIZE: 11px'>Create an Account</font></A></DIV></td>")

				document.write("</tr>")

				document.write("</table>")

			document.write("</td>")

		document.write("</tr>")

	document.write("<tr>")

		document.write("<td colspan='2'><img src='" + szPath + "/images/pixel.gif' width='1' height='5'></td>")

	document.write("</tr>")

document.write("</table>")

		document.write("</td>")

	document.write("</tr>")

	/*document.write("</TD>")

	document.write("</TR>")*/

	document.write("<tr>")

		document.write("<td><img src='" + szPath + "/images/pixel.gif' width='1' height='1'></td>")

	document.write("</tr>")

	document.write("<tr>")

		document.write("<td class='header'><img src='" + szPath + "/images/pixel.gif' width='1' height='28'></td>")

		//document.write("</TD>")

	document.write("</tr>")

	document.write("<tr>")

	  document.write("<td class='greenbold' style='height:20px;' id='lblWelcomeNote'></td>")

	document.write("</tr>")

	/*document.write("<tr>")

		document.write("<td><img src='" + szPath + "/images/pixel.gif' width='1' height='20'></td>")

	document.write("</tr>")*/

	

	/*document.write("<tr>")

		document.write("<td>&nbsp;</td>")

	document.write("</tr>")*/

	

document.write("</table>")



/*Begin Script for Omniture Sitecatalyst*/

/*document.write("<script language='JavaScript' type='text/javascript' src='/include/s_code.js'></script>")*/

/*document.write("<script language='javascript' type='text/javascript'>")

document.write("s.pageName='';")

document.write("s.server='';")

document.write("s.channel='';")

document.write("var s_code=s.t();if(s_code)document.write(s_code);")

document.write("</script>")*/

/*End script for Omniture Sitecatalyst*/

	}

	

	function SetUserNameCompany()

	{

		if (document.location.href.indexOf('#') == -1)

		{

			szPath = document.location.href.substr(0, document.location.href.length - (document.location.pathname.length + document.location.search));

			//if (document.location.pathname.split('/')[1] != 'analysisresources' && document.location.pathname.split('/')[1] != 'customer' && document.location.pathname.split('/')[1] != 'energymarketing' && document.location.pathname.split('/')[1] != 'products' && document.location.pathname.split('/')[1] != 'select' && document.location.pathname.split('/')[1].substr(document.location.pathname.split('/')[1].length-4) != '.htm' && document.location.pathname.split('/')[1] != 'survey'  && document.location.pathname.split('/')[1] != 'learnmore' && document.location.pathname.split('/')[1] != 'fingertips')

			//	szPath += '/' + document.location.pathname.split('/')[1] ;

		}

		else

		{

			var szTmpPath = document.location.href.substr(0,document.location.href.indexOf('#'))

			szPath = szTmpPath.substr(0, szTmpPath.length - (document.location.pathname.length + document.location.search));

			//if (document.location.pathname.split('/')[1] != 'analysisresources' && document.location.pathname.split('/')[1] != 'customer' && document.location.pathname.split('/')[1] != 'energymarketing' && document.location.pathname.split('/')[1] != 'products' && document.location.pathname.split('/')[1] != 'select' && document.location.pathname.split('/')[1].substr(document.location.pathname.split('/')[1].length-4) != '.htm' && document.location.pathname.split('/')[1] != 'survey'  && document.location.pathname.split('/')[1] != 'learnmore' && document.location.pathname.split('/')[1] != 'fingertips')

			//	szPath += '/' + document.location.pathname.split('/')[1] ;

		}



		var xmlHTTP = getXmlHttpRequest()

				xmlHTTP.open("POST",szPath+"/AcctValidate.aspx", false);

		 		xmlHTTP.send('');

		 		var msg = xmlHTTP.responseText;

		 		if (msg != 'False') 

				{

					var word=msg.split("/");

					document.getElementById('lnkCreateAccount').style.display = "none";

					var msg0 = " ";

					document.getElementById('lblUserName').innerHTML = word[0]+" "+word[1];

					document.getElementById('lblCompany').innerHTML = word[2];

					//document.getElementById('lblWelcomeNote').innerHTML='Welcome '+word[0];

					/*document.getElementById('nav0accountBtn').src = szPath+'/images/nav0signout_0.gif';*/

                    s.prop7="logged in";

					s.prop5 = word[0] + " " + word[1] + ", " + word[2] ;

					if (word[3] != 'qcsTrue')

					{

						document.getElementById('acct').href = szPath+'/dashboard/unAuthenticated.aspx?signout=true';

					}

					else

					{

						document.getElementById('acct').href = szPath+'/qcsPage.aspx';

					}

					document.getElementById('lblUserName').style.display = "";

					document.getElementById('lblCompany').style.display = "";

					document.getElementById('lnkSignOut').style.display = "";

				}

				else

				{

				    s.prop7="not logged in";

					document.getElementById('lnkCreateAccount').style.display = "";

					document.getElementById('lnkSignIn').style.display = "";

				}

		

		s.eVar7=s.prop7;

		s.server="";

        s.channel="";

        if (s.pageName == undefined)

        {

            s.pageName = "";

        } 

	    var s_code=s.t();if(s_code)document.write(s_code);			

	}

	function getXmlHttpRequest()

	{

		if (navigator.appName == "Netscape")

		return new XMLHttpRequest();

		else

		return new  ActiveXObject("Microsoft.XMLHTTP");

		

	}





	function acctSwap()

			{

				/*var xmlHTTP = getXmlHttpRequest()

				xmlHTTP.open("POST",szPath+"/AcctValidate.aspx", false);

		 		xmlHTTP.send(null);

		 		var msg = xmlHTTP.responseText;

				if (msg != 'False') MM_swapImage('nav0accountBtn', '', szPath+'/images/nav0signout_1.gif', 1);

				else MM_swapImage('nav0accountBtn', '', szPath+'/images/nav0signin_1.gif', 1);*/

			}

	function checkAuthenticate()

			{

				var xmlHTTP = getXmlHttpRequest();//new ActiveXObject("Microsoft.XMLHTTP");

				xmlHTTP.open("POST","/AcctValidate.aspx", false);

				xmlHTTP.send(null);

				var msg = xmlHTTP.responseText;				

				if (msg == 'False') 

				{return false;}

				else {return true}

			}