function load_buildtools_plugin(cl)
{
	if(cl == "nautilusco")
	{
		var thebase = document.getElementsByTagName("base");
		if(thebase[0])
			thebase[0].href = ""; 
	}

	if((cl == "hensley") || (cl == "kebo") || (cl == "kleinmannGROUP") || (cl == "stonewood") || (cl == "solidrock") || (cl == "nautilusco") || (cl == "hcecopower") || (cl == "veranda") || (cl == "risinger") || (cl == "envision") || (cl == "fischer") || (cl == "revision") || (cl == "klondike") || (cl == "lg") || (cl == "ange") || (cl == "forward") || (cl == "3pillar") || (cl == "jones") || (cl == "theworkman") || (cl == "homebridge"))
	{
		jQuery(function($)
		{
		        $("#BuildToolsLogin").click(function ()
			{
				$("#BuildToolsForm").show("slow");
			});
			$("#BuildToolsClose a").click(function ()
			{
				$("#BuildToolsForm").hide("slow");
			});
			$("#BuildToolsFormButton").click(function ()
			{
				$("#BuildToolsForm").hide("slow");
			});
			$("#BuildToolsForm").hide("fast");
		});
	}

	var login_title = "Client Login";
	if(cl == "nautilusco")
		login_title = "Partner Login";
	if(cl == "klondike")
		login_title = "Login";
	if((cl == "jones") || (cl == "homebridge"))
		login_title = "CLIENT LOGIN";
	if((cl == "hensley") || (cl == "kebo") || (cl == "kleinmannGROUP")  || (cl == "stonewood") || (cl == "solidrock") || (cl == "nautilusco") || (cl == "hcecopower") || (cl == "veranda") || (cl == "risinger") || (cl == "envision") || (cl == "fischer") || (cl == "revision") || (cl == "klondike") || (cl == "lg") || (cl == "ange") || (cl == "forward") || (cl == "jones") || (cl == "theworkman") || (cl == "homebridge"))
	{
		document.getElementById("BuildTools_Plugin").innerHTML = '<div id=BuildTools><div id="BuildToolsForm"><div id="BuildToolsClose"><a href="#" id=BuildToolsCloseLink><div id="BuildToolsCloseButton">x</div></a></div><form id=BuildTools_Login action="https://' + cl + '.buildtools.com/" method=POST target="_blank"><fieldset><div class=label title="Username or E-Mail Address?" id=bt_username>Username</div><input type="text" style="width:150px;" id=login name="login" /><br><div class=label title="" id=bt_password>Password</div><input type="password" style="width:150px" id=password name="password" /><br /><div style="padding-top:5px;"><input type=submit name=button id=BuildToolsFormButton style="cursor:pointer" value="Log In" /></div></fieldset></form><div id=BuildToolsAddit><center><a href="https://' + cl + '.buildtools.com/index.php?module=Recover" id=bt_recover target="_blank">Forgot Your Password</a><div id=BuildToolsRuler>&nbsp;</div><span id=bt_middle_text>You dont have a Username yet ?</span><br><a href="https://' + cl + '.buildtools.com/index.php?module=Register" target="_blank" id=bt_request>Request Access</a></center></div><div id=BuildToolsPB><a href="http://www.buildtools.com" target="_blank" title="BuildTools online construction management software for home builders and remodelers" id=bt_link><img src="http://www.buildtools.com/client-login/images/buildtools3.png" id=bt_powered class=BuildToolsLogo border=0></img> Powered By BuildTools</a></div></div><div id=BuildToolsLogin><a href="#BuildToolsForm" id=bt_badge_s><img id=bt_logo src="http://www.buildtools.com/client-login/images/neutral.png" class=BuildToolsLogo border=0 style="padding-right:5px"></img> ' + login_title + '</a></div></div>';
	}
	else if(cl == "3pillar") // WITH BASE TAG
	{
		document.getElementById("BuildTools_Plugin").innerHTML = '<div id=BuildTools><div id="BuildToolsForm"><div id="BuildToolsClose"><a href="' + document.URL + '#" id=BuildToolsCloseLink><div id="BuildToolsCloseButton">x</div></a></div><form id=BuildTools_Login action="https://' + cl + '.buildtools.com/" method=POST target="_blank"><fieldset><label title="Username or E-Mail Address?" id=bt_username>Username</label><br><input type="text" style="width:150px;" id=login name="login" /><br><label title="" id=bt_password>Password</label><br><input type="password" style="width:150px" id=password name="password" /><br /><div style="padding-top:5px;"><input type=submit name=button id=BuildToolsFormButton style="cursor:pointer" value="Log In" /></div></fieldset></form><div id=BuildToolsAddit><center><a href="https://' + cl + '.buildtools.com/index.php?module=Recover" id=bt_recover target="_blank">Forgot Your Password</a><div id=BuildToolsRuler>&nbsp;</div><span id=bt_middle_text>You dont have a Username yet ?</span><br><a href="https://' + cl + '.buildtools.com/index.php?module=Register" target="_blank" id=bt_request>Request Access</a></center></div><div id=BuildToolsPB><a href="http://www.buildtools.com" target="_blank" title="BuildTools online construction management software for home builders and remodelers" id=bt_link><img src="http://www.buildtools.com/client-login/images/buildtools3.png" id=bt_powered class=BuildToolsLogo border=0></img> Powered By BuildTools</a></div></div><div id=BuildToolsLogin><a href="' + document.URL + '#BuildToolsForm" id=bt_badge_s><img id=bt_logo src="http://www.buildtools.com/client-login/images/neutral.png" class=BuildToolsLogo border=0></img>&nbsp;&nbsp;' + login_title + '</a></div></div>';
	}
	else
	{
		if(document.getElementById("BuildTools_Plugin"))
			document.getElementById("BuildTools_Plugin").style.display = "none";
	}

	if(cl == "ange")
	{
		document.getElementById("BuildToolsLogin").style.left = "640px";	
		document.getElementById("BuildToolsLogin").style.top = "350px";	
		document.getElementById("BuildToolsForm").style.left = "620px";	
		document.getElementById("BuildToolsForm").style.top = "350px";	
		document.getElementById("BuildToolsLogin").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/ange_bg_s.png')";
		document.getElementById("BuildToolsForm").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/ange_bg_f.png')";
	}
	if(cl == "hcecopower")
	{
		document.getElementById("BuildToolsLogin").style.marginLeft = "50px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "0px";	
	}
	if(cl == "kebo")
	{
		document.getElementById("BuildToolsLogin").style.marginLeft = "0px";	
		document.getElementById("BuildToolsLogin").style.height = "20px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "0px";	
		if(isIE())
			document.getElementById("BuildToolsLogin").style.marginTop = "2px";
		else
			document.getElementById("BuildToolsLogin").style.marginTop = "2px";
	}
	if(cl == "lg")
	{
		document.getElementById("BuildToolsLogin").style.marginLeft = "265px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "265px";	
		if(isIE())
		{
			document.getElementById("BuildToolsLogin").style.marginTop = "22px";
			document.getElementById("BuildToolsForm").style.marginTop = "22px";
		}
		else
		{
			document.getElementById("BuildToolsLogin").style.marginTop = "22px";
			document.getElementById("BuildToolsForm").style.marginTop = "22px";
		}
	}
	if(cl == "nautilusco")
	{
		if(isIE())
		{
			document.getElementById("BuildToolsForm").style.marginTop = "29px";
			document.getElementById("BuildToolsLogin").style.marginTop = "29px";
		}

		document.getElementById("BuildToolsLogin").style.marginLeft = "320px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "260px";	
		document.getElementById("bt_badge_s").style.color = "#6A69A6";
		document.getElementById("bt_logo").src = "http://www.buildtools.com/client-login/images/neutral_blue.png";
	}
	if(cl == "solidrock")
	{
		if(isIE())
			document.getElementById("BuildToolsLogin").style.marginTop = "0px";
		else
			document.getElementById("BuildToolsLogin").style.marginTop = "1px";
		document.getElementById("bt_badge_s").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/solidrock_bg_s.png')";
		document.getElementById("bt_badge_s").style.color = "#78624C";
		document.getElementById("BuildToolsForm").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/solidrock_bg_f.png')";
		document.getElementById("BuildToolsFormButton").style.color = "#470F00";
		document.getElementById("bt_username").style.color = "#470F00";
		document.getElementById("bt_password").style.color = "#470F00";
		document.getElementById("bt_logo").src = "http://www.buildtools.com/client-login/images/neutral_yellow.png";
		document.getElementById("bt_recover").style.color = "#470F00";
		document.getElementById("bt_middle_text").style.color = "#78624C";
		document.getElementById("bt_request").style.color = "#470F00";
	}
	if(cl == "veranda")
	{
		document.getElementById("BuildToolsLogin").style.marginTop = "-1px";
		document.getElementById("BuildToolsLogin").style.marginLeft = "-470px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "-470px";	
		document.getElementById("BuildToolsLogin").style.MozBoxShadow = "0px 2px 6px #000000";
		document.getElementById("BuildToolsLogin").style.webkitBoxShadow = "0px 2px 6px #000000";
		document.getElementById("BuildToolsLogin").style.khtmlBoxShadow = "0px 2px 6px #000000";
		document.getElementById("BuildToolsLogin").style.boxShadow = "0px 2px 6px #000000";
		document.getElementById("BuildToolsLogin").style.border = "1px solid #FFFFFF";
		document.getElementById("BuildToolsLogin").style.borderTop = "0px";
		document.getElementById("bt_badge_s").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/veranda_bg_s.png')";
		document.getElementById("bt_badge_s").style.color = "#242424";
		// document.getElementById("bt_badge_s").style.border = "1px solid #FFFFFF";
		document.getElementById("bt_badge_s").style.borderTop = "0px";
		document.getElementById("bt_badge_s").style.MozBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("bt_badge_s").style.webkitBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("bt_badge_s").style.khtmlBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("bt_badge_s").style.boxShadow = "0px 0px 0px #FFFFFF";

		document.getElementById("BuildToolsForm").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/veranda_bg_f.png')";
		document.getElementById("BuildToolsForm").style.MozBoxShadow = "0px 2px 6px #242424";
		document.getElementById("BuildToolsForm").style.webkitBoxShadow = "0px 2px 6px #242424";
		document.getElementById("BuildToolsForm").style.khtmlBoxShadow = "0px 2px 6px #242424";
		document.getElementById("BuildToolsForm").style.boxShadow = "0px 2px 6px #242424";
		document.getElementById("BuildToolsForm").style.border = "2px solid #FFFFFF";
		document.getElementById("BuildToolsForm").style.borderTop = "0px";
		document.getElementById("BuildToolsFormButton").style.color = "#111111";
		document.getElementById("bt_username").style.color = "#242424";
		document.getElementById("bt_password").style.color = "#242424";
		document.getElementById("bt_recover").style.color = "#242424";
		document.getElementById("bt_middle_text").style.color = "#292929";
		document.getElementById("bt_request").style.color = "#242424";

	}
	if(cl == "risinger")
	{
		document.getElementById("BuildToolsLogin").style.width = "135px";
		document.getElementById("BuildToolsLogin").style.MozBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("BuildToolsLogin").style.webkitBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("BuildToolsLogin").style.khtmlBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("BuildToolsLogin").style.boxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("BuildToolsLogin").style.border = "0px";
		document.getElementById("BuildToolsLogin").style.border = "0px";
		document.getElementById("BuildToolsLogin").style.marginLeft = "450px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "400px";	
		document.getElementById("bt_badge_s").style.border = "1px solid #999999";
	}
	if((cl == "fischer") || (cl == "revision") || (cl == "klondike"))
	{
		document.getElementById("BuildToolsLogin").style.marginTop = "-1px";
                document.getElementById("BuildToolsLogin").style.marginLeft = "300px";
                document.getElementById("BuildToolsLogin").style.height = "18px";
                document.getElementById("BuildToolsForm").style.marginLeft = "230px";
                document.getElementById("BuildToolsLogin").style.MozBoxShadow = "0px 0px 0px #95ACC2";
                document.getElementById("BuildToolsLogin").style.webkitBoxShadow = "0px 0px 0px #95ACC2";
                document.getElementById("BuildToolsLogin").style.khtmlBoxShadow = "0px 0px 0px #95ACC2";
                document.getElementById("BuildToolsLogin").style.boxShadow = "0px 0px 0px #95ACC2";
                // document.getElementById("BuildToolsLogin").style.border = "0px";
		document.getElementById("bt_logo").src = "http://www.buildtools.com/client-login/images/neutral_trans_80.png";
                document.getElementById("bt_badge_s").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/fischer_bg.png')";
		document.getElementById("bt_badge_s").style.fontWeight = "normal";
                document.getElementById("bt_badge_s").style.color = "#999999";
                // document.getElementById("bt_badge_s").style.border = "1px solid #A6A6A6";
                document.getElementById("bt_badge_s").style.borderTop = "0px";
                document.getElementById("bt_badge_s").style.MozBoxShadow = "0px 0px 0px #A6A6A6";
                document.getElementById("bt_badge_s").style.webkitBoxShadow = "0px 0px 0px #A6A6A6";
                document.getElementById("bt_badge_s").style.khtmlBoxShadow = "0px 0px 0px #A6A6A6";
                document.getElementById("bt_badge_s").style.boxShadow = "0px 0px 0px #A6A6A6";

                document.getElementById("BuildToolsForm").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/fischer_solid_bg.png')";
                document.getElementById("BuildToolsForm").style.MozBoxShadow = "0px 2px 6px #000000";
                document.getElementById("BuildToolsForm").style.webkitBoxShadow = "0px 2px 6px #000000";
                document.getElementById("BuildToolsForm").style.khtmlBoxShadow = "0px 2px 6px #000000";
                document.getElementById("BuildToolsForm").style.boxShadow = "0px 2px 6px #000000";
                document.getElementById("BuildToolsForm").style.border = "1px solid #A6A6A6";
                document.getElementById("BuildToolsForm").style.borderTop = "0px";
                document.getElementById("BuildToolsFormButton").style.color = "#111111";
                document.getElementById("bt_username").style.color = "#999999";
                document.getElementById("bt_password").style.color = "#999999";
                document.getElementById("bt_recover").style.color = "#999999";
                document.getElementById("bt_middle_text").style.color = "#777777";
                document.getElementById("bt_request").style.color = "#777777";
                document.getElementById("bt_link").style.color = "#999999";
                document.getElementById("bt_link").style.fontSize = "12px";

	}
	if(cl == "fischer")
	{
		if(isIE())
                	document.getElementById("BuildToolsLogin").style.height = "26px";
	}
	if(cl == "forward")
	{
		document.getElementById("BuildToolsLogin").style.marginLeft = "-200px";	
		document.getElementById("BuildToolsLogin").style.top = "20px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "-240px";	
		document.getElementById("BuildToolsForm").style.top = "20px";	
	}
	if(cl == "3pillar")
	{
		document.getElementById("BuildToolsLogin").style.marginLeft = "500px";	
		document.getElementById("BuildToolsLogin").style.top = "7px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "460px";	
		document.getElementById("BuildToolsForm").style.top = "7px";	
                document.getElementById("bt_logo").style.border= "0px";
                document.getElementById("bt_powered").style.border= "0px";
                document.getElementById("bt_badge_s").style.color = "#826840";
                document.getElementById("BuildToolsFormButton").style.color = "#6B532E";
                document.getElementById("bt_username").style.color = "#6B532E";
                document.getElementById("bt_password").style.color = "#6B532E";
                document.getElementById("bt_middle_text").style.color = "#6B532E";
                document.getElementById("bt_link").style.color = "#6B532E";
		document.getElementById("bt_logo").src = "http://www.buildtools.com/client-login/images/neutral_brown.png";
                document.getElementById("bt_link").style.display = "none";
	}
	if(cl == "jones")
	{
		document.getElementById("BuildToolsLogin").style.left = "150px";	
		document.getElementById("BuildToolsForm").style.left = "140px";	
		document.getElementById("BuildToolsLogin").style.height = "25px";	
		document.getElementById("BuildToolsLogin").style.border = "0px";	
		document.getElementById("BuildToolsLogin").style.paddingTop = "6px";	
		document.getElementById("BuildToolsLogin").style.borderLeft = "1px solid #CBE4EB";	
		document.getElementById("BuildToolsLogin").style.MozBoxShadow = "0px 1px 2px #AAAAAA";
		document.getElementById("BuildToolsLogin").style.webkitBoxShadow = "0px 1px 2px  #AAAAAA";
		document.getElementById("BuildToolsLogin").style.khtmlBoxShadow = "0px 1px 2px  #AAAAAA";
		document.getElementById("BuildToolsLogin").style.boxShadow = "0px 1px 2px  #AAAAAA";
		document.getElementById("BuildToolsLogin").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/jones_bg_s.png')";
		document.getElementById("bt_badge_s").style.MozBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("bt_badge_s").style.webkitBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("bt_badge_s").style.khtmlBoxShadow = "0px 0px 0px #FFFFFF";
		document.getElementById("bt_badge_s").style.boxShadow = "0px 0px 0px #FFFFFF";
//	$("#bt_badge_s").textShadow();
		document.getElementById("bt_badge_s").style.color = "#FFFFFF";
		document.getElementById("bt_badge_s").style.textShadow = "#AAAAAA -1px -1px 2px";
		document.getElementById("bt_badge_s").style.fontSize = "14px";	
		document.getElementById("BuildToolsForm").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/jones_bg_f.png')";
		document.getElementById("bt_logo").style.display = "none";
	}
	if(cl == "theworkman")
	{
		document.getElementById("BuildToolsLogin").style.marginLeft = "0px";	
		document.getElementById("BuildToolsForm").style.marginLeft = "0px";	
	}
	if(cl == "homebridge")
	{
		document.getElementById("BuildToolsLogin").style.marginLeft = "-240px";	
		document.getElementById("BuildToolsLogin").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/homebridge_bg_s.png')";
		document.getElementById("bt_badge_s").style.color = "#FFFFFF";
		document.getElementById("bt_badge_s").style.textShadow = "#AAAAAA -1px -1px 2px";
		document.getElementById("BuildToolsForm").style.marginLeft = "-250px";	
		document.getElementById("BuildToolsForm").style.backgroundImage = "url('http://www.buildtools.com/client-login/images/homebridge_bg_f.png')";
		document.getElementById("bt_logo").style.display = "none";
		document.getElementById("BuildToolsFormButton").style.backgroundColor = "#E3E6B3";
		document.getElementById("bt_username").style.color = "#575D07";
		document.getElementById("bt_password").style.color = "#575D07";
		document.getElementById("bt_logo").src = "http://www.buildtools.com/client-login/images/neutral_yellow.png";
		document.getElementById("bt_middle_text").style.color = "#7C8410";
		document.getElementById("bt_recover").style.color = "#575D07";
		document.getElementById("bt_request").style.color = "#575D07";
	}
}

function isIE()
{
	    return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}

