function copy(id) 
{
	var text2copy = document.getElementById(id).value;

	document.getElementById(id).select();
	if (window.clipboardData) {
          window.clipboardData.setData("Text",text2copy);
    } 
    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="script/_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
   		document.getElementById(flashcopier).innerHTML = divinfo;
   		//alert(document.getElementById(flashcopier).innerHTML);
   }
}
function CopyText(cpyBtnID,id){
	//copyToClipboard(document.getElementById(id).value);
	document.getElementById(id).select();
	var content = document.getElementById(id);
	copyValue(cpyBtnID,content.value);
}

function copyValue(cpyBtnID,text2copy) {
	if (window.clipboardData) {
		window.clipboardData.setData("Text",text2copy);
	} 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="script/_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';//?a¨¤?¨º?1??¨¹
		document.getElementById(flashcopier).innerHTML = divinfo;
	}
}
