// Förhindrar att man kan högerklicka på en bild

<!--

var message="Please don't download images. Respect the artist!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 

// Öppnar POP-UP mitt på skärmen
function openWin(cUrl, cWidth, cHeight) {
	var popWin;
	var leftPos = (screen.width) ? (screen.width-cWidth) / 2 : 0;
	var topPos = (screen.height) ? (screen.height-cHeight) / 2 : 0;
	
	popWin = window.open(cUrl, 'popwindow', 'scrollbars=yes,toolbar=no'+',left='+leftPos+',top='+topPos+',width='+cWidth+',height='+cHeight);

	return;	
}


// Validerar tipsa en vän formuläret
function validateTipAFriendForm() {
	var docEl = document.getElementById;
	
	if (docEl('inpFriendEmail').value == '') {
		alert('Fyll i din väns e-postadress');
		docEl('inpFriendEmail').focus();
		return;
	} else if (docEl('inpName').value == '') {
		alert('Fyll i ditt namn');
		docEl('inpName').focus();
		return;
	} else if (docEl('inpComments').value == '') {
		alert('Skriv några kommentarer');
		docEl('inpComments').focus();
		return;
	} else {
		docEl('frmTipaFriend').submit();
		docEl('btnSend').disabled = true;
	}
}