/* ########## FUNCIO OBRE UNA FINESTRA A MIDA */
function obrir(nom,amplada,baixada){
if (amplada==0) {amplada=screen.width-10;}
if (baixada==0){baixada=screen.height-30;}

pitekandemor="left=40,top=40,screenX=0,screenY=0,status=no,toolbar=no,width="+amplada+",height="+baixada+",directory=no,resize=no,scrollbars=yes";
    result = window.open(nom,"",pitekandemor);
}

// javascript:obrir('contactar.asp',585,700)    

function noticia(nom){
var alto, ancho
alto=(screen.height)-(Math.round(screen.height)/5);
ancho=(screen.width)-(Math.round(screen.width)/5);

    result = window.open('/docs/informatiu/'+ nom,"","left="+Math.round(screen.width-ancho)/2+",top="+Math.round(screen.height-alto)/2+",width="+ancho+",height="+alto+",scrollbars=yes,status=yes,resizable=yes");
    result.status="Cambra Oficial de Comerç i Indústria de Lleida";
}






//window.open('/includes/gmap.asp?location='+map.getcenter()+',,left=0,top=0,screenX=0,screenY=0,status=no,toolbar=yes,width='+screen.width+',height='+screen.height+',directory=no,resize=yes,scrollbars=yes);

//prevent frame enclosing
if (window != window.top) {top.location.href = location.href; }


/* Testeig camps de text */
function dades(){
	if(checkit_ins(document.env_dades)==0){
       return;
    }
  	document.env_dades.submit();
}
function checkit_ins(form){
   	if(form.nom.value == ""){
		alert("No heu omplert el camp 'Nom i Cognoms'");
        return (0);
	}else if(form.telf.value == ""){
		alert("No heu omplert el camp 'Telèfon'");
        return (0);
	}else if(form.email.value.indexOf("@") == -1){
		alert("No heu omplert el camp 'E-mail'");
        return (0);
	}else{
        return (1);
  	}
}



function acrobat_version(){

var acrobat=new Object();

acrobat.installed=false;
acrobat.version='0.0';

if (navigator.plugins && navigator.plugins.length)
{
for ( var x = 0, l = navigator.plugins.length; x < l; ++x ) 
{
if (navigator.plugins[x].description.indexOf('Adobe Acrobat') != -1)
{
acrobat.version=parseFloat(navigator.plugins[x].description.split('Version ')[1]);

if (acrobat.version.toString().length == 1) acrobat.version+='.0';

acrobat.installed=true;
break;
}
}
}
else if (window.ActiveXObject)
{
for (x=2; x<10; x++)
{
try
{
oAcro=eval("new ActiveXObject('PDF.PdfCtrl."+x+"');");
if (oAcro)
{
acrobat.installed=true;
acrobat.version=x+'.0';
}
}
catch(e) {}
}

try
{
oAcro4=new ActiveXObject('PDF.PdfCtrl.1');
if (oAcro4)
{
acrobat.installed=true;
acrobat.version='4.0';
}
}
catch(e) {}

try
{
oAcro7=new ActiveXObject('AcroPDF.PDF.1');
if (oAcro7)
{
acrobat.installed=true;
acrobat.version='7.0';
}
}
catch(e) {}

}

return acrobat.version;
}
