function disableRightClick() {
	var offX=2
	var offY=2
	var cW=document.all.context.clientWidth+2
	var cH=document.all.context.clientHeight+2
	var bW=document.body.clientWidth
	var bH=document.body.clientHeight
	var sbT=document.body.scrollTop

	if ((event.clientX+offX)>(bW-cW)) {
		document.all.context.style.left=bW-cW
	} else {
		document.all.context.style.left=event.clientX+offX
	}
	
	if ((event.clientY+offY+cH)<(bH+sbT)) {
		document.all.context.style.top=event.clientY+offY
	} else {
		document.all.context.style.top=bH-cH+sbT
	}
	
	clearTimeout(hideContext)
	document.all.context.style.visibility="visible"
	return false;
}

var hideContext

function contextOver(a) {
	a.style.borderColor=''
	a.style.backgroundColor="#999999"
	a.style.color='#000000'
}

function contextOut(a) {
	a.style.borderColor=''
	a.style.backgroundColor=""
	a.style.color=''
}

function setHideContext() { hideContext=setTimeout("hideContextMenu()", 750) }

function hideContextMenu() { document.all.context.style.visibility="hidden" }

function subscribe() {
	var a= prompt("Zadajte prosím svoju e-mailovú adresu:")
	if (!a) return
	if (checkmail(a)) {
		window.location="subscribe.php?a="+a
	} else {
		subscribe()
	}
}

function checkmail(a) {
	var q=0
	if (a.indexOf("@")<2 || a.length<6 || a.indexOf(".")==-1) {q=1}
	if (q==1) {
		alert("Toto nie je správna e-mailová adresa!")
		return false
	} else {
		return true	
	}
}

