if(document.addEventListener) {
	document.addEventListener("keydown",copyprotect,false);
}
else if (!document.addEventListener){
	document.attachEvent("onkeydown",copyprotect);
}

function copyprotect(e){
	if (!e) var e = window.event;
	if((e.ctrlKey) && (e.keyCode == 67)){
		clearSelection();
		return false;
	}
	else if((!e.ctrlKey) && (e.keyCode != 67)){
		return true;
	}
}

function clearSelection(){
	var txt = '';
	var foundIn = '';
	if (window.getSelection)	{
		txt = window.getSelection();
		foundIn = 'window.getSelection()';
		txt.removeAllRanges();
	}
	else if (document.getSelection)	{
		txt = document.getSelection();
		foundIn = 'document.getSelection()';
		txt.removeAllRanges();
	}
	else if (document.selection)	{
		txt = document.selection.createRange().text;
		foundIn = 'document.selection.createRange()';
		document.selection.empty();
	}
	else return;
}
document.oncontextmenu = function () {return false; }

