var _W=window,_D=document;

function gE(e){if(_D.getElementById)return _D.getElementById(e);if(_D.all)return _D.all[e]}

function copyClip1(e){
	gE('do1').focus();
	gE('do1').select();
	if( window.clipboardData && clipboardData.setData){
		textRange=document.body.createTextRange();
		textRange.moveToElementText(lcodes);
		textRange.execCommand('Copy');
	}
}
function copyClip2(e){
	gE('do2').focus();
	gE('do2').select();
	if( window.clipboardData && clipboardData.setData){
		textRange=document.body.createTextRange();
		textRange.moveToElementText(lcodes);
		textRange.execCommand('Copy');
	}
}
function copyClip3(e){
	gE('do3').focus();
	gE('do3').select();
	if( window.clipboardData && clipboardData.setData){
		textRange=document.body.createTextRange();
		textRange.moveToElementText(lcodes);
		textRange.execCommand('Copy');
	}
}

function copy_to_clipboard(text)
{
    if(window.clipboardData)
    {
	window.clipboardData.setData('text',text);
    }
    else
    {
        var clipboarddiv=document.getElementById('divclipboardswf');
	if(clipboarddiv==null)
	{
	   clipboarddiv=document.createElement('div');
           clipboarddiv.setAttribute("name", "divclipboardswf");
	   clipboarddiv.setAttribute("id", "divclipboardswf");
	   document.body.appendChild(clipboarddiv);
	}
        clipboarddiv.innerHTML='<embed src="clipboard.swf" FlashVars="clipboard='+
encodeURIComponent(text)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    }
    alert('The text is copied to your clipboard...');
    return false;
}

function copyIntoClipboard(text) {

    var flashId = 'flashId-HKxmj5';

    /* Replace this with your clipboard.swf location */
    var clipboardSWF = 'clipboard.swf';

    if(!document.getElementById(flashId)) {
        var div = document.createElement('div');
        div.id = flashId;
        document.body.appendChild(div);
    }
    document.getElementById(flashId).innerHTML = '';
    var content = '<embed src="' + 
        clipboardSWF +
        '" FlashVars="clipboard=' + encodeURIComponent(text) +
        '" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(flashId).innerHTML = content;
    alert('The text is copied to your clipboard...');
}


