function fnSelect(objId)
{
	fnDeSelect();
	if (document.selection) 
	{
		var range = document.body.createTextRange();
		range.moveToElementText(document.getElementById(objId));
		range.select();
		range.execCommand("Copy")
	} else if (window.getSelection) {
		var range = document.createRange();
		range.selectNode(document.getElementById(objId));
		window.getSelection().addRange(range);
		alert("Your browser does not support the copy feature, but it did highlight the text for you.");
	} 
}
function fnDeSelect() 
{
	if (document.selection) document.selection.empty();
	else if (window.getSelection) window.getSelection().removeAllRanges();
	else alert("Your browser does not support this feature.");
}


function copy(inElement) {
	if (inElement.createTextRange) {
		var range = inElement.createTextRange();
		if (range && BodyLoaded==1)
			range.execCommand('Copy');
	} else {
		var flashcopier = 'flashcopier';
		if(!document.getElementById(flashcopier)) {
			var divholder = document.createElement('div');
			divholder.id = flashcopier;
			document.body.appendChild(divholder);
		}
		document.getElementById(flashcopier).innerHTML = '';
		var divinfo = '<embed src="_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(inElement.value)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
		document.getElementById(flashcopier).innerHTML = divinfo;
	}
}


function highlight(field) {
    field.focus();
    field.select();
    var urlSwf = "http://static.tinypic.com/j/_clipboard.swf";

    window.status = 'Copied text to clipboard';

    // Copy the text inside the text box to the user's clipboard
    var flashcopier = 'flashcopier';
    var divholder = document.createElement('div');
    divholder.id = flashcopier;
    document.body.appendChild(divholder);

    divholder.innerHTML = '';
    var divinfo = '<em'+'bed src="' + urlSwf + '" FlashVars="clipboard='+escape(field.value)+'" width="0" height="0" type="application/x-shockwave-flash"></em'+'bed>';
    divholder.innerHTML = divinfo;

    return false;
}


function copy2(text) {
    var urlSwf = "http://static.tinypic.com/j/_clipboard.swf";

    window.status = 'Copied text to clipboard';

    // Copy the text inside the text box to the user's clipboard
    var flashcopier = 'flashcopier';
    var divholder = document.createElement('div');
    divholder.id = flashcopier;
    document.body.appendChild(divholder);

    divholder.innerHTML = '';
    var divinfo = '<em'+'bed src="' + urlSwf + '" FlashVars="clipboard='+escape(text)+'" width="0" height="0" type="application/x-shockwave-flash"></em'+'bed>';
    divholder.innerHTML = divinfo;

    return false;
}