function HideContent(d)
{
	if(d.length < 1) { return; }
	document.getElementById(d).style.display = "none";
}

function ShowContent(d)
{
	if(d.length < 1) { return; }
	document.getElementById(d).style.display = "block";
}

function ReverseContentDisplay(d)
{
	if(d.length < 1) { return; }
	if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
	else { document.getElementById(d).style.display = "none"; }
}

function orderShow(obj1,obj2)
{
	if (document.getElementById)
	{
		document.getElementById(obj1).style.display = 'block';
		document.getElementById(obj2).style.display = 'none';
	}
	else if (document.all)
	{
		document.all[obj1].style.display = 'block';
		document.all[obj2].style.display = 'none';
	}
	else alert ('This form will not work in your browser.');
}


function shippingCopy()
{
	if ( document.getElementById('Shipping_Check').checked == true )
	{
		document.getElementById('Shipping_Name').value = document.getElementById('ContactName').value;
		document.getElementById('Shipping_Address').value = document.getElementById('Address').value;
		document.getElementById('Shipping_Address2').value = document.getElementById('Address2').value;
		document.getElementById('Shipping_City').value = document.getElementById('City').value;
		document.getElementById('Shipping_State').value = document.getElementById('State').value;
		document.getElementById('Shipping_ZipCode').value = document.getElementById('ZipCode').value;
		document.getElementById('Shipping_Country').value = document.getElementById('Country').value;
	}
	if ( document.getElementById('Shipping_Check').checked == false )
	{
		document.getElementById('Shipping_Name').value = '';
		document.getElementById('Shipping_Address').value = '';
		document.getElementById('Shipping_Address2').value = '';
		document.getElementById('Shipping_City').value = '';
		document.getElementById('Shipping_State').value = '';
		document.getElementById('Shipping_ZipCode').value = '';
		document.getElementById('Shipping_Country').value = '';
	}
}


function billingCopy()
{
	if ( document.getElementById('Billing_Check').checked == true )
	{
		document.getElementById('Billing_Name').value = document.getElementById('Shipping_Name').value;
		document.getElementById('Billing_Address').value = document.getElementById('Shipping_Address').value;
		document.getElementById('Billing_Address2').value = document.getElementById('Shipping_Address2').value;
		document.getElementById('Billing_City').value = document.getElementById('Shipping_City').value;
		document.getElementById('Billing_State').value = document.getElementById('Shipping_State').value;
		document.getElementById('Billing_ZipCode').value = document.getElementById('Shipping_ZipCode').value;
		document.getElementById('Billing_Country').value = document.getElementById('Shipping_Country').value;
	}
	if ( document.getElementById('Billing_Check').checked == false )
	{
		document.getElementById('Billing_Name').value = '';
		document.getElementById('Billing_Address').value = '';
		document.getElementById('Billing_Address2').value = '';
		document.getElementById('Billing_City').value = '';
		document.getElementById('Billing_State').value = '';
		document.getElementById('Billing_ZipCode').value = '';
		document.getElementById('Billing_Country').value = '';
	}
}



function duraclamp_printFunction(pageTitle, fileServer)
{

var pageTitle = pageTitle;
var FileServer = fileServer;


	if (document.getElementById != null)
	{
		var html = '<html>\n<head>\n';
		html +='<link rel="stylesheet" type="text/css" href="' + FileServer + '/stylesheets/duraclamp.css">\n';
		html +="<style media='print'> body { background-color: #FFFFFF; } </style>\n";
		html +="<style media='screen'> body { background-color: #FFFFFF; } </style>\n";
		html += '</head>\n<body>\n';


//      Print & Close Button 

		html +='<div class="nonPrint">\n';
		html +='<table width="500" cellpadding="0" cellspacing="0" border="0">\n';
		html +='<tr height="25">\n';
		html +='<td width="100%" align="right"><a class="printPageLink" href="javascript:window.print()"><img src="' + FileServer + '/graphics/print_icon.gif" width="14" height="14" alt="Print" hspace="2" border="0">Print</a>&nbsp;&nbsp;&nbsp;<a class="printPageLink" href="javascript:window.close()">Close</a></td>\n';
		html +='</tr>\n';
		html +='</table>\n';
		html +='</div>\n';

//	Start Page Title Information

		html +='<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">\n';
		html +='<tr>\n';
		html +='<td width=\"100%\" valign=\"top\" class=\"printLine\"><img src=\"' + FileServer + '/graphics/clear.gif\" border=\"0\" width=\"8\" height=\"1\"></td>\n';
		html +='</tr>\n';
		html +='<tr>\n';
		html +='<td width=\"100%\" valign=\"top\" align=\"center\" class=\"printTextBold\">' + pageTitle + '</td>\n';
		html +='</tr>\n';
		html +='<tr>\n';
		html +='<td width=\"100%\" valign=\"top\" class=\"printLine\"><img src=\"' + FileServer + '/graphics/clear.gif\" border=\"0\" width=\"8\" height=\"1\"></td>\n';
		html +='</tr>\n';
		html +='</table>\n';


//	Find PrintContent

		var pageDetailElem = document.getElementById("pageDetail");
		if (pageDetailElem != null)
		{
				html += pageDetailElem.innerHTML;
		}
		else
		{
			alert("Could not find the pageDetail section in the HTML");
			return;
		}


//	Footer Section

		html +='<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">\n';
		html +='<tr>\n';
		html +='<td width=\"100%\" valign=\"top\" align=\"center\"><br /><br /></td>\n';
		html +='</tr>\n';
		html +='<tr>\n';
		html +='<td width=\"100%\" valign=\"top\" class=\"printLine\"><img src=\"' + FileServer + '/graphics/clear.gif\" border=\"0\" width=\"8\" height=\"1\"></td>\n';
		html +='</tr>\n';
		html +='</table>\n';
		html +='<table class="centerTable" border="0" cellpadding="2" cellspacing="0" width="500">\n';
		html +='<tbody>\n';
		html +='<tr>\n';
		html +='<td width="100%" align="center" class="printFooterText"><center>&copy; 2007 Burlingham International, Inc. All rights reserved.</center></td>\n';
		html +='</tr>\n';
		html +='<tr>\n';
		html +='<td width="100%" align="center" class="printFooterText"><center>Web Site: http://www.duraclamp.com</center></td>\n';
		html +='</tr>\n';
		html +='</tbody>\n';
		html +='</table>\n';

//	Popup Window + Content

		var displayWin = window.open("","StoryWin","toolbar=no,screenx=0,screeny=0,top=0,left=0,width=605,height=500,directories=no,status=yes,scrollbars=yes,resizable=no,menubar=no");
		with (displayWin.document) {
		write(html);
		close(html);
		}
	}
	else
	{
		alert("Sorry, the print feature is only available in modern browsers.");
	}
}








	// Start Tooltip Code for help button on Forms

	window.onload=function()
	{
		enableTooltips();
	}

	function enableTooltips(id)
	{
		var links,i,h;
		if(!document.getElementById || !document.getElementsByTagName) return;
		//AddCss();
		h=document.createElement("span");
		h.id="btc";
		h.setAttribute("id","btc");
		h.style.position="absolute";
		document.getElementsByTagName("body")[0].appendChild(h);
		if(id==null) links=document.getElementsByTagName("a");
		else links=document.getElementById(id).getElementsByTagName("a");
		for(i=0;i<links.length;i++)
		{
			Prepare(links[i]);
		}
	}

	function Prepare(el)
	{
		var tooltip,t,b,s,l,w;
		t=el.getAttribute("title");
		if(t==null || t.length==0) return;
		el.removeAttribute("tip");
		tooltip=CreateEl("span","tooltip");
		s=CreateEl("span","top");
		w=document.createElement("div");
		s.appendChild(w);
		w.innerHTML = t;
		tooltip.appendChild(s);
		b=CreateEl("b","bottom");
		tooltip.appendChild(b);
		setOpacity(tooltip);
		el.tooltip=tooltip;
		el.onmouseover=showTooltip;
		el.onmouseout=hideTooltip;
		el.onmousemove=Locate;
	}

	function showTooltip(e)
	{
		document.getElementById("btc").appendChild(this.tooltip);
		Locate(e);
	}

	function hideTooltip(e)
	{
		var d=document.getElementById("btc");
		if(d.childNodes.length>0) d.removeChild(d.firstChild);
	}

	function setOpacity(el)
	{
		el.style.filter="alpha(opacity:95)";
		el.style.KHTMLOpacity="0.95";
		el.style.MozOpacity="0.95";
		el.style.opacity="0.95";
	}

	function CreateEl(t,c)
	{
		var x=document.createElement(t);
		x.className=c;
		x.style.display="block";
		return(x);
	}

	function AddCss()
	{
		var l=CreateEl("link");
		l.setAttribute("type","text/css");
		l.setAttribute("rel","stylesheet");
		l.setAttribute("href","../stylesheets/bt.css");
		l.setAttribute("media","screen");
		document.getElementsByTagName("head")[0].appendChild(l);
	}

	function Locate(e)
	{
		var posx=0,posy=0;
		if(e==null) e=window.event;
		if(e.pageX || e.pageY)
		{
			posx=e.pageX; posy=e.pageY;
		}
		else if(e.clientX || e.clientY)
		{
			if(document.documentElement.scrollTop)
			{
				posx=e.clientX+document.documentElement.scrollLeft;
				posy=e.clientY+document.documentElement.scrollTop;
			}
			else
			{
				posx=e.clientX+document.body.scrollLeft;
				posy=e.clientY+document.body.scrollTop;
			}
		}
		document.getElementById("btc").style.top=(posy+3)+"px";
		document.getElementById("btc").style.left=(posx-30)+"px";
	}

	// End Tooltip Code











