		function getById(id)
		{
		  if (document.all)
		    return document.all[id];
		  if (document.getElementById)
		    return document.getElementById(id);
		  if (document.layers)
		    return document.layers[id];
		  return document[id];
		}

		function URLencode(s)
		{
		  return escape(s).replace(/\+/g, '%2C').replace(/\"/g,'%22').replace(/\'/g, '%27');
		}


function CopyToClipBoard(e)
{

var holdtext = getById('holdtext');

holdtext.value = e.innerText;
Copied = holdtext.createTextRange(); 
Copied.execCommand("Copy"); 
}

	var popWinCount=0;

	function popupWin(url,width,height) {
		if(width==undefined) width="600";
		if(height==undefined) height="600";

		var w = screen.width;
		var h = screen.height;
		var adj=10;

		if(w<740){
		  var lift=0.90;
		}
		if(w>=740 & w<835){
		  var lift=0.91;
		}
		if(w>=835){
		  var lift=0.93;
		}
		
	    var posTop =  ((h-(600/lift)-adj)/2);
		var posLeft = ((w-(600)-adj)/2);
		posTop = parseInt(posTop);
		posLeft = parseInt(posLeft);	
		popWinCount++;
		window.open(url,'win'+popWinCount,"height="+height+",width="+width+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,left="+posLeft+",top="+posTop);
	}
