//Disable right click script III- By Renigade (renigade@mediaone.net)

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")


//Disable select-text script (IE4+, NS6+)- By Andy Scott

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}


//Finestres verticals i horitzontals pels ambients amb url donada com a variable des de la movie Flash

var newwindow = '';
var alturavert=(screen.height-500)/2;
var anchuravert=(screen.width-350)/2;
var alturahor=(screen.height-350)/2;
var anchurahor=(screen.width-500)/2;

function vertical(url)

{
newwindow=window.open(url,'name','height=500,width=350,left='+anchuravert+',top='+alturavert+',scrollbars=0,status=no,toolbar=no,directories=no,menubar=no');
}

function horitzontal(url)

{
newwindow=window.open(url,'name','height=350,width=500,left='+anchurahor+',top='+alturahor+',scrollbars=0,status=no,toolbar=no,directories=no,menubar=no');
}
