// JavaScript Document
function setRes(){
	var scrH = screen.height;
	var scrW = screen.width;
	var bFilePath = "imatges/fondos";
	var bFile= new String();
	if (scrW==1366){
		bFile ="1920_1080.jpg";
	} else {
		switch(scrH){
			case 768:
				bFile ="1024_768.jpg";
				break;
			case 1024:
				bFile ="1280_1024.jpg";
				break;
			case 1050:
				bFile ="1680_1050.jpg";
				break;
			case 864:
				bFile ="1152_864.jpg";
				break;
			case 1080:
				bFile ="1920_1080.jpg";
				break;
			default:
				bFile ="1920_1080.jpg";
				break;
		}
	}
	
	/*document.body.style.background ="url("+bFilePath+"/"+bFile+")";
	document.body.style.backgroundPosition ="left";
	document.body.style.backgroundRepeat ="no-repeat";
	document.body.style.backgroundAttachment ="fixed";*/
	document.writeln("<style type='text/css'>");
	document.writeln("body {background-image: url("+bFilePath+"/"+bFile+");");
	document.writeln("background-repeat: no-repeat;");
	document.writeln("background-attachment:fixed;");
	document.writeln("background-position:left;}");
	document.writeln("</style>");
	
	
	
}

function setHomepageFF()
{
 if (document.all)
    {
        document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage('http://www.lefroid.fr');
 
    }
    else if (window.sidebar)
    {
    if(window.netscape)
    {
         try
   {  
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
         catch(e)  
         {  
    alert("this action was aviod by your browser,if you want to enable,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");  
         }
    } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage','http://www.lefroid.fr');
 }
}


