
window.onerror = null;

function BoutonDroit()
{
        if((event.button==2)||(event.button==3)||(event.button==4))
                        alert('Contenu Protégé');
}
document.onmousedown=BoutonDroit;




function resizeOuterTo(w,h) {
 if (parseInt(navigator.appVersion)>3) {
   if (navigator.appName=="Netscape") {
   
	top.outerWidth=w;
    top.outerHeight=h;
	
	
   }
   else 
   {
   top.moveTo(0,0);
   top.resizeTo(w,h);
   }
   }
}

function init_position_popup(taille,index)
{
if (index==1)		//1= left / 2= top
	{
	return ((screen.width - taille) / 2);
	}
	else
	{
	return ((screen.height - taille) / 2);
	}	

}

function handleFormKeyPress(form) 
	{ 
	if ((event.which && event.which == 13)||(event.keyCode && event.keyCode == 13)) 
		{
		form.submit();
		}
	}


function openWindow(theURL,winName,features) { //v2.0
  	fonctionplus = 'copyhistory=false, resizable=false, scrollbars=false, directories=false, status=false';
	features2 = features + fonctionplus;
	window.open(theURL,winName,features2);
}
function openWindowScroll(theURL,winName,features) { //v2.0
  	fonctionplus = 'copyhistory=false, resizable=false, scrollbars=yes, directories=false, status=false';
	features2 = features + fonctionplus;
	window.open(theURL,winName,features2);
}

function getsize(value,mode){
		var sens = mode ;
		var valeur = value ;

		wid = screen.width;
		hit = screen.height;
		
		if (mode == 1){
			marge = (wid - valeur)/2 ;
			}
		else
			{
			marge = ((hit - valeur)/2) -30 ;
			}


		return marge;
}

function init_position_popup(taille,index)
{
if (index==1)		//1= left / 2= top
	{
	return ((screen.width - taille) / 2);
	}
	else
	{
	return ((screen.height - taille) / 2);
	}	

//top = ((screen.height - 570) / 2);
//left =	((screen.width - 596) / 2);
}


