//<![CDATA[
var colorWhite = "#ffffff"
var colorEggShell = "#e9e9e9";
var colorDarkGrey = "#cccccc";
var colorLightGrey = "#dddddd";
var colorBlue = "#336699";

function showCSS(mainPage)
{
	var s = "";
	var dir = "";
	var isIE = window.ActiveXObject ? true : false; // ActiveX is only used in Internet Explorer

	if (!mainPage)
	{
		dir = "../";
	}

	if (isIE)
	{
		s = s + "<link rel='stylesheet' type='text/css' href='" + dir + "css/style_ie.css' />"
	}
	else
	{
		s = s + "<link rel='stylesheet' type='text/css' href='" + dir + "css/style_firefox.css' />"
	}

	return(s);
}

function showHeaderAndMenu(mainPage)
{
	var dir = "";

	if (!mainPage)
	{
		dir = "../";
	}

	var s = "" +
	//this forms the header for phone number and login
	"<div class='head' width='100%'><!-- required for min height IE --></div>" +
	"<div id='frame'>" +

	"<table width='100%' cellspacing='0' cellpadding='0' border='0' style='background-color:" + colorWhite + ";'>" +
		"<tr>" +
			"<td align='left'>" +
				"<table width='100%' cellpadding='0' cellspacing='0' border='0'>" +
					"<tr>" +
						"<td>" +
							"<a href='" + dir + "index.html'>" +
							"<img class='logo' src='" + dir + "images/logo3.png' alt='Customer Solutions Online Logo' border='0'>" +
							"</a>" +
						"</td>" +
					"</tr>" +
				"</table>" +
			"</td>" +
			"<td align='right' nowrap>" +
				"<table width='100%' cellpadding='0' cellspacing='0' border='0'>" +
					"<tr>" +
						"<td align='right' width='80%'>" +
							"<img src='" + dir + "images/left_header_tab.png' alt='' width='5px' height='20px' style='display:block;'/>" +
						"</td>" +
						"<td align='right' nowrap style='background-color:" + colorLightGrey + "; padding-left:2px; padding-right:2px; vertical-align:top;'>" +
							"<span class='login'>1-888-488-4CSO | </span><a class='login' href='" + dir + "customer/home.html'>CUSTOMER LOGIN</a>" +
						"</td>" +
						"<td align='left'>" +
							"<img src='" + dir + "images/right_header_tab.png' alt='' width='5px' height='20px' style='display:block;'/>" +
						"</td>" +
					"</tr>" +
				"</table>" +
			"</td>" +
		"</tr>" +
	"</table>" +
	"<table width='100%' cellspacing='0' cellpadding='0' border='0' style='background-color:" + colorBlue + ";'>" +
		"<tr>" +
			"<td align='left'>" +
				"<img src='" + dir + "images/left_menu_tab.gif' alt='' width='5px' height='20px' style='display:block;'/>" +
			"</td>" +
			"<td width='100%'>" +
				"<p class='menu'>" +
				"<a class='menutext' href='" + dir + "index.html'>Home</a>" +
				"<a class='menutext' href='" + dir + "about/home.html'>About CSO</a>" +
				"<a class='menutext' href='" + dir + "industry/home.html'>Industry Solutions</a>" +
				"<a class='menutext' href='" + dir + "custom/home.html'>Custom Solutions</a>" +
				//"<a class='menutext' href='" + dir + "partner/home.html'>Partner Program</a>" +
				"<a class='menutext' href='" + dir + "news/home.html'>Newsroom</a>" +
				"<a class='menutext' href='http://www.csobid2give.com/recent.html'>Bid2Give</a>" +
				"<a class='menutext' href='" + dir + "about/contact.html'>Contact Us</a>" +
				//"<a class='menutext' href='" + dir + "customer/home.html'>Existing Customers</a>" +
				"</p>" +
			"</td>" +
			"<td>" +
				"<img src='" + dir + "images/right_menu_tab.gif' alt='' width='5px' height='20px' style='display:block;'/>" +
			"</td>" +
		"</tr>" +
	"</table>";

	return(s);

}

function startBox() {
	var s = "<div class='box'><!-- <div class='boxtop'><div></div></div>--><div class='boxcontent'>";
	return (s);
}

function showLeftMenu(mainPage, currentPage, currentSection)
{
	var s;
	var dir = "";

	if (!mainPage)
	{
		dir = "../";
	}

	if (currentPage == "about")
	{
		s = "<img id=\"aboutcso\" src=\"" + dir + "images/aboutcso.png\" alt=\"About CSO\" style=\"display:block;\"/>";
		s = s + startBox();

		if (currentSection == "exec") {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"exec.html\">Executive Team</a><br>" +
		"<a class=\"leftmenusub\" href=\"exec.html#paula\">Paula Darling</a><br>" +
		"<a class=\"leftmenusub\" href=\"exec.html#ryan\">Ryan Roberts</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\" onmouseover=\"onOff('1')\" onmouseout=\"onOff('1')\" href=\"exec.html\">Executive Team</a><br>";
		}
		

		if (currentSection == "location") {
		s = s + "<img class=\"bullet\" id=\"3\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"location.html\">Locations</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"3\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('3')\" onmouseout=\"onOff('3')\" href=\"location.html\">Locations</a><br>";
		}

		if (currentSection == "contact") {
		s = s + "<img class=\"bullet\" id=\"4\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"contact.html\">Contact Us</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"4\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('4')\" onmouseout=\"onOff('4')\" href=\"contact.html\">Contact Us</a><br>";
		}
	}
	else if (currentPage == "customer")
	{
		s = "<img id=\"aboutcso\" src=\"" + dir + "images/existingcustomers.png\" alt=\"Existing Customers\" style=\"display:block;\"/>";
		s = s + startBox();

		if (currentSection == "home") {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"home.html\">Customer Login</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\" onmouseover=\"onOff('1')\" onmouseout=\"onOff('1')\" href=\"home.html\">Customer Login</a><br>";
		}

		if (currentSection == "ic") {
		s = s + "<img class=\"bullet\" id=\"2\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"ic.html\">Infinite Conferencing</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"2\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\" onmouseover=\"onOff('2')\" onmouseout=\"onOff('2')\" href=\"ic.html\">Infinite Conferencing</a><br>";
		}
	}
	else if (currentPage == "custom")
	{
		s = "<img id=\"aboutcso\" src=\"" + dir + "images/customsolutions.png\" alt=\"Custom Solutions\" style=\"display:block;\"/>";
		s = s + startBox();

		/*
		if (currentSection == "features") {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"features.html\">Architecture Features</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('1')\" onmouseout=\"onOff('1')\" href=\"features.html\">Architecture Features</a><br>";
		}
		*/

		if (currentSection == "modules") {
		s = s + "<img class=\"bullet\" id=\"2\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"modules.html\">CSO Modules</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"2\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('2')\" onmouseout=\"onOff('2')\" href=\"modules.html\">CSO Modules</a><br>";
		}
	}
	else if (currentPage == "industry")
	{
		s = "<img id=\"aboutcso\" src=\"" + dir + "images/industrysolutions.png\" alt=\"Industry Solutions\" style=\"display:block;\"/>";
		s = s + startBox();

		if (currentSection == "m3") {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"home.html\">M3</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('1')\" onmouseout=\"onOff('1')\" href=\"home.html\">M3</a><br>";
		}

		if (currentSection == "t2") {
		s = s + "<img class=\"bullet\" id=\"2\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"t2.html\">T2</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"2\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('2')\" onmouseout=\"onOff('2')\" href=\"t2.html\">T2</a><br>";
		}

		if (currentSection == "we") {
		s = s + "<img class=\"bullet\" id=\"3\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"we.html\">We</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"3\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('3')\" onmouseout=\"onOff('3')\" href=\"we.html\">We</a><br>";
		}

		if (currentSection == "inventory") {
		s = s + "<img class=\"bullet\" id=\"4\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"inventory.html\">Inventory and Asset Management</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"4\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('4')\" onmouseout=\"onOff('4')\" href=\"inventory.html\">Inventory and Asset Management</a><br>";
		}

		if (currentSection == "b2g") {
		//s = s + "<img class=\"bullet\" id=\"4\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"inventory.html\">Inventory and Asset Management</a><br>";
		//} else {
		//s = s + "<img class=\"bullet\" id=\"4\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\"  onmouseover=\"onOff('4')\" onmouseout=\"onOff('4')\" href=\"inventory.html\">Inventory and Asset Management</a><br>";
		}
	}
	else if (currentPage == "news")
	{
		s = "<img id=\"aboutcso\" src=\"" + dir + "images/newsroom.png\" alt=\"Newsroom\" style=\"display:block;\"/>";
		s = s + startBox();

		if (currentSection == "home") {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"home.html\">Recent Press Releases</a><br>" +
		"<a class=\"leftmenusub\" href=\"pressreleases.html\">Press Releases</a><br>" +
		"<a class=\"leftmenusub\" href=\"mediainquiries.html\">Media Inquiries</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\" onmouseover=\"onOff('1')\" onmouseout=\"onOff('1')\" href=\"home.html\">Recent Press Releases</a><br>";
		}
	}
	else if (currentPage == "sitemap")
	{
		s = "<img id=\"aboutcso\" src=\"" + dir + "images/sitemap.png\" alt=\"Site Map\" style=\"display:block;\"/>";
		s = s + startBox();

		if (currentSection == "home") {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_on.gif\" alt=\"\" /><a class=\"leftmenu\" href=\"sitemap.html\">Site Map</a><br>";
		} else {
		s = s + "<img class=\"bullet\" id=\"1\" src=\"" + dir + "images/bullet_off.gif\" alt=\"\" /><a class=\"leftmenu\" onmouseover=\"onOff('1')\" onmouseout=\"onOff('1')\" href=\"sitemap.html\">Site Map</a><br>";
		}
	}

	//end box
	s = s + "</div><div class='boxbottom'><div><!-- --></div></div></div>";

	return s;
}

function showFooter(mainPage){

	var s = "";
	var dir = "";

	s = s +
	"<div id='footer'><table width='100%' height='100%' cellpadding='0' cellspacing='0' border='0' style='";

	if (mainPage)
	{
		dir = "../";
	}

	s = s + "background-color:" + colorDarkGrey + "; border-top: 0px solid " + colorDarkGrey + "; border-bottom: 0px solid " + colorDarkGrey + ";border-left: 0px solid #cccccc; border-right: 0px solid " + colorDarkGrey + ";'>" +
	"<tr>" +
	"<td align='left'>" +
	"<img src='" + dir + "images/left_footer_tab.png' alt='' width='5px' height='20px' style='display:block;'/>" +
	"</td>" +
	"<td align='left' width='50%' style='vertical-align:middle;'>" +
	"<a href='" + dir + "sitemap.html' class='sitemap'>Site Map</a>" +
	"</td>" +
	"<td align='right' width='50%' style='vertical-align:middle;'>" +
	"<span class='copyright'>Copyright &copy; 2010 Customer Solutions Online, Inc. All right reserved.</span>" +
	"</td>" +
	"<td align='right'>" +
	"<img src='" + dir + "images/right_footer_tab.png' alt='' width='5px' height='20px' style='display:block;'/>" +
	"</td>" +
	"</tr>" +
	"</table></div>";

	return(s);
}

function showImage(main, imageName, width, height, title, style)
{
	var s = "";
	var dir = "";

	if (!main)
	{
		dir = "../";
	}

	s = s + "<img src=\"" + dir + "images/" + imageName + "\" width=\"" + width + "\" height=\"" + height + "\" alt=\"" + title + "\" style=\"" + style + "\">";
	return(s);
}

function showScreenshot(img)
{
	var thisSource = img.src;
	var desc;
	var left = (screen.width - 725) / 2;

	if (thisSource.indexOf("sm") > 0)
	{
		thisSource = thisSource.replace(/sm/, "lg");
	}

	desc = "status=no, fullscreen=no, toolbar=no, menubar=no, directories=no,";
	desc = desc + "resizable=no, scrollbars=yes, titlebar=no, fullscreen=no,";
	desc = desc + "left=" + left + ", width=722, height=545";
	printWindow = window.open(thisSource, "Screenshot", desc);
	printWindow.focus();
}

function onOff(img)
{
	thisImage = document.getElementById(img);
	thisSource = thisImage.src;

	if(thisSource.indexOf("off") > 0)
	{
		thisSource = thisSource.replace(/off/,"on");
	}
	else
	{
		thisSource = thisSource.replace(/on/,"off");
	}

	thisImage.src = thisSource;
}

//rotating images
var images = new Array();
var hrefs = new Array();
images[0] = "testimonials/test_pointeofview.jpg";
hrefs[0] = "http://www.pointeofview.com";
images[1] = "testimonials/test_caseanywhere.jpg";
hrefs[1] = "http://www.caseanywhere.com";
images[2] = "testimonials/test_profero.jpg";
hrefs[2] = "http://www.proferogroup.com";
images[3] = "testimonials/test_jnj.jpg";
hrefs[3] = "http://www.jnj.com"
images[4] = "testimonials/test_remax.jpg";
hrefs[4] = "http://www.remax.com"

var thisImage;
var currentImage = 0;
var rotate = true;

/*function rotateImage(id)
{
	thisImage = document.getElementById(id);
	thisHREF = document.getElementById("testimonial_href");

	if (rotate)
	{
		if (images[currentImage + 1])
		{
			thisImage.src = "images/" + images[currentImage + 1]
			thisHREF.href = hrefs[currentImage + 1];
			currentImage++
		}
		else
		{
			thisImage.src = "images/" + images[0];
			thisHREF.href = hrefs[0];
			currentImage = 0;
		}
	}

	setTimeout(function() {rotateImage(id);}, 15000);
}*/

//]]>




