var IE = window.external && (navigator.platform == "Win32" || (window.ScriptEngine&&ScriptEngine().indexOf("InScript")+1));
var FF = (navigator.userAgent.toLowerCase().indexOf("firefox")+1)?true:false;
var OP = window.opera && window.print;
var NS = window.netscape && !OP;


onload = function()
{
	var sel = document.getElementById('show');
	if(sel)
		sel.selectedIndex = sel.selectedIndex;
}

function rollover(id, image)
{
	document.getElementById(id).src = 'images/' + image;
}

function printinfo()
{
	if (IE && !FF)
	{
		document.company.focus();
		document.company.print();
	}
	else
	{
		window.frames['company'].focus();
		window.frames['company'].print();
	}

}
function clipboard() 
{
	if(window.clipboardData || NS)
	{
		if(IE && !FF)
		{
			document.getElementById('holdtext').innerText = document.getElementById('copytext').innerText;
			copied = document.getElementById('holdtext').createTextRange();
			//copied.execCommand('RemoveFormat');
			copied.execCommand('Copy');
			
			/*
			if(!window.clipboardData.setData("Text",f))
			{
				alert("Text was not copied to clipboard!");
				return false;
			}
			*/
		}
		else
		{
			try
			{
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
			}
			catch(e)
			{
				alert("Your current Internet Security settings do not allow data copying to clipboard. Text was not copied to clipboard!");
				return;
			}
			try
			{
				e=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard)
			}
			catch(e)
			{
				return;
			}
			try
			{
				b=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable)
			}
			catch(e)
			{
				return;
			}
			b.addDataFlavor("text/unicode");
			o=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
			//alert(document.getElementById('copytext'));
			f=document.getElementById('copytextplain').innerHTML;
			o.data=f;
			b.setTransferData("text/unicode",o,f.length*2);
			try
			{
				t=Components.interfaces.nsIClipboard
			}
			catch(e)
			{
				return;
			}
			e.setData(b,null,t.kGlobalClipboard)
		}
	}
	else
	{
		if(OP)
		{
			if(window.clipboardData || navigator.mimeTypes["application/x-shockwave-flash"])
			{
				f=document.getElementById('copytextplain').innerHTML;
				e=document.createElement("div");
				document.body.appendChild(e);
				e.innerHTML="<embed src='clipboard.swf' FlashVars='clipboard="+f+"' width='0' height='0' type='application/x-shockwave-flash'></embed>";
				//alert("Text successfully copied to clipboard:\n\n"+f)
			}
			else
			{
				alert("Text was not copied to clipboard!")
			}
			return;
			
		}
		else
			alert("Your browser doesn't support copy to clipboard feature.");
		
		return;
	}
//alert("Text successfully copied to clipboard:\n\n"+f);
return;





}

